Click here to monitor SSC

Tony Davis

Simple-Talk Editor
News, views and good brews

SQL Server Rootkits: Security Scare or Nightmare?

Published Thursday, September 17, 2009 5:12 PM

How many DBAs, I wonder, really know how to go about detecting potential rootkits in their SQL Servers? To install a simple database rootkit is an easier task than you might imagine, and once it's there it can be very difficult to uncover, as it goes about capturing passwords, stealing data, tampering with user accounts, or performing similar nefarious activities.

The term rootkit emerged from the UNIX world, where the ROOT privilege was top of the tree. A database rootkit is essentially an application or procedure that it used to covertly maintain unauthorized administration-level access to that database, as opposed to the underlying operating system that is the prey of traditional rootkits.

A SQL Server rootkit can take many guises, but in its simplest form it can be a function whose logic has been subtly altered to return different results, or a stored procedure slipped quietly into a system database and executed by unsuspecting users, in place of the legitimate target procedure. System views, the results from which seem genuine to the untrained eye, have been tweaked to mask the changes, and hide the existence of the rogue database login.

What may be surprising to some is just how easy it is to install this type of rootkit on a SQL Server, once an intruder has obtained administration-level access. Kevvie Fowler's excellent book, SQL Server Forensic Analysis, explains in step-by-step detail how this might be done on SQL Server 2000 and 2005. Certain entry points have been closed in SQL 2008 but it's still entirely possible, for example, to exploit the way in which SQL Server searches the Master database for a referenced object, if it cannot be found locally.

The relative ease of introducing such rootkits stands in stark contrast to the task of detecting them, and the damage that they have potentially inflicted. It involves identifying and collecting the various data fragments (artifacts) that are the 'fingerprints' left by the nefarious hacker, developing incident response scripts, installing "Windows Forensic Toolchests", collecting, collating and analysing all of this data in order to painstakingly reconstruct the activity of the intruder.

It's a fascinating journey but one feels exhausted almost before one begins, and I wonder how many DBAs have the processes in place to detect this sort of activity or, indeed, the sort of layered security measures that can help prevent such intrusions in the first place, as described in John Magnabosco's new book, Protecting SQL Server Data.

How real is the threat of SQL Server Rootkits? Are they a serious danger, or just another security issue that is being conjured up to instil unjustified fear and dread in the DBA? As always, it is your comments that will lead opinion.

Cheers,

Tony.

Comments

No Comments
You need to sign in to comment on this blog
<September 2009>
SuMoTuWeThFrSa
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910
How to Kill a Company in One Step or Save it in Three
 The majority of companies that suffer a major data loss subsequently go out of business. Wesley David... Read more...

Migrating from OCS 2007 R2 to Lync: Part 4
 Having migrated the rest of our users and legacy resources across and started getting ready to... Read more...

Automated Script-generation with Powershell and SMO
 In the first of a series of articles on automating the process of building, modifying and copying SQL... Read more...

Seth Godin: Big in the IT Business
 Seth Godin has transformed our understanding of marketing in IT. He invented the concept of 'permission... Read more...

Using SQL Test Database Unit Testing with TeamCity Continuous Integration
 With database applications, the process of test and integration can be frustratingly slow because so... Read more...