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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Escalating Privileges<br />

Exploiting <strong>SQL</strong> <strong>Injection</strong> • Chapter 4 217<br />

˛˛ All major DBMSs have suffered from privilege escalation vulnerabilities in the past.<br />

The one you are attacking might not have been updated with the latest security<br />

fixes.<br />

˛˛ In other cases, it may be possible to attempt to brute-force the administrative<br />

account; for instance, using OPENROWSET on <strong>SQL</strong> Server.<br />

Stealing the Password Hashes<br />

˛˛ If you have administrative privileges, do not miss the chance to grab the password<br />

hashes. People tend to reuse their passwords <strong>and</strong> those hashes could be the keys to<br />

the kingdom.<br />

Out-of-B<strong>and</strong> Communication<br />

˛˛ If it’s not possible to extract data using the previous methods, try establishing<br />

a completely different channel.<br />

˛˛ Possible choices include e-mail (SMTP), HTTP, DNS, file system, or databasespecific<br />

connections.<br />

Automating <strong>SQL</strong> <strong>Injection</strong> Exploitation<br />

˛˛ The majority of the attacks analyzed in this chapter require a high number of<br />

requests to reach their goal.<br />

˛˛ Luckily, several free tools can assist in automating the attack.<br />

˛˛ These tools provide a plethora of different attack modes <strong>and</strong> options, ranging from<br />

the fingerprint of the remote DBMS to the extraction of the data it contains.

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

Saved successfully!

Ooh no, something went wrong!