SQL Server Security: Chapter 2, Under Siege: How SQL Server is Hacked

This excerpt is from Chapter 2, Under Siege: How SQL Server is Hacked from SQL Server Security by David Litchfield.

This excerpt is from Chapter 2, Under Siege: How SQL Server is Hacked of SQL Server Security written by David Litchfield

and published by McGraw-Hill/Osborne Media. Read the entire chapter here.

Picking the right tools for the job

Before any job is undertaken, be it grouting the shower or paving a patio, a lot of unnecessary grief can be avoided by getting the right tools beforehand. Attacking a computer system is no different. As far as compromising Microsoft SQL Server is concerned, the tools of the trade are a combination of the SQL Server client tools, such as Query Analyzer, SQLPing and a C compiler. One of the most important tools is a copy of SQL Server itself. It's far better to examine vulnerability and then code an exploit for it on a system in the lab than to experiment on the live target system.

Although SQL Server is generally good at handling exceptions and remaining up, there are some areas where an access violation will bring the server down, which generally is not a good thing. Further, for every exception raised and caught, an entry is added to the Application Event Log, again something that should be avoided where possible if the attacker wants to avoid raising alarms. If the attacker is intent upon breaking into the SQL server, and it's fully patched, then they may need to discover their own new vulnerability. Having access to the server software, in this scenario, is an absolute must. A good decompiler, such as Datarescue's IDA Pro, helps enormously too, where stress testing turns up nothing and one must turn to reverse engineering. Finally, a network capture tool (sniffer), such as NGSSniff or Ethereal, is enormously handy on occasion, too.

The author's SQL Server toolkit consists of the following:

  • MS SQL Server 2000, Developer Edition
  • MS SQL Client tools such as Query Analyzer and odbcping
  • NGSSniff
  • NGSSQLCrack
  • NGSSQuirreL
  • Microsoft Visual C++

In addition to these, there are the author's own tools created using the compiler. You never know what you're going to need in any attempted penetration, so the compiler provides a method to create new tools on the fly. Some of the tools listed above will be discussed throughout various sections of this chapter.


For more information on this topic, visit these resources:
This was first published in September 2003

Dig deeper on Database Security Management

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchCloudSecurity

SearchNetworking

SearchCIO

SearchConsumerization

SearchEnterpriseDesktop

SearchCloudComputing

ComputerWeekly

Close