28.10.2014 Views

SQL Injection Attacks and Defense - 2009

SQL Injection Attacks and Defense - 2009

SQL Injection Attacks and Defense - 2009

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

402 Chapter 9 • Platform-Level <strong>Defense</strong>s<br />

least-privileged operating system account. You should configure database server software<br />

running on ∗nix systems to run in the context of an account that is a member of a custom<br />

group that has minimal file system permissions to run the software. By default, <strong>SQL</strong> Server<br />

2005 <strong>and</strong> later installers will select the minimally privileged NETWORK SERVICE account<br />

for running <strong>SQL</strong> Server.<br />

Tools & Traps…<br />

<strong>SQL</strong> Server Taking Security Seriously<br />

The good news is that starting with <strong>SQL</strong> Server 2005, Microsoft included a h<strong>and</strong>y configuration<br />

utility called <strong>SQL</strong> Server Service Area Configuration, which makes it really<br />

easy to disable most of the functionality that an attacker could abuse. Previous versions<br />

of <strong>SQL</strong> Server required running Transact-<strong>SQL</strong> statements or modifying the Windows<br />

Registry. Even better, most of the dangerous features are disabled by default.<br />

Ensure That the Database<br />

Server Software Is Patched<br />

Keeping software up to date with the current patch level is a fundamental security principle,<br />

but it’s easy to overlook given that database servers are not Internet-facing systems. An attacker<br />

can exploit server vulnerabilities via an application-level <strong>SQL</strong> injection vulnerability just as<br />

easily as though he were on the same network as the database server. The exploit payload<br />

could be a sequence of <strong>SQL</strong> comm<strong>and</strong>s that exploit an <strong>SQL</strong> injection vulnerability in a<br />

PL/<strong>SQL</strong> package, or even shell code to exploit a buffer overflow in an extended stored<br />

procedure. Automated update mechanisms are ideal for keeping up to date. You can keep<br />

<strong>SQL</strong> Server up to date with Windows Update (www.update.microsoft.com). Oracle database<br />

administrators can check for current updates by signing up with the Oracle MetaLink service<br />

(https://metalink.oracle.com/CSP/ui/index.html). Third-party patch management systems<br />

are another way to keep patch levels current. Table 9.1 shows comm<strong>and</strong>s that can help<br />

you determine the version of the database server software for <strong>SQL</strong> Server <strong>and</strong> Oracle.<br />

Also included in the table are links for checking the version information to tell whether<br />

your database server is completely patched.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!