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.

428 Chapter 10 • References<br />

Table 10.10 Continued. Microsoft <strong>SQL</strong> Server Version Numbers<br />

Version Number<br />

Service Pack<br />

8.00.2039 Microsoft <strong>SQL</strong> Server 2000 SP4<br />

8.00.818 Microsoft <strong>SQL</strong> Server 2000 SP3<br />

w/ Cumulative Patch MS03-031<br />

8.00.760 Microsoft <strong>SQL</strong> Server 2000 SP3<br />

8.00.532 Microsoft <strong>SQL</strong> Server 2000 SP2<br />

8.00.384 Microsoft <strong>SQL</strong> Server 2000 SP1<br />

8.00.194 Microsoft <strong>SQL</strong> Server 2000<br />

7.00.1063 Microsoft <strong>SQL</strong> Server 7.0 SP4<br />

7.00.961 Microsoft <strong>SQL</strong> Server 7.0 SP3<br />

7.00.842 Microsoft <strong>SQL</strong> Server 7.0 SP2<br />

7.00.699 Microsoft <strong>SQL</strong> Server 7.0 SP1<br />

7.00.623 Microsoft <strong>SQL</strong> Server 7.0<br />

6.50.479 Microsoft <strong>SQL</strong> Server 6.5 SP5a Update<br />

6.50.416 Microsoft <strong>SQL</strong> Server 6.5 SP5a<br />

6.50.415 Microsoft <strong>SQL</strong> Server 6.5 SP5<br />

6.50.281 Microsoft <strong>SQL</strong> Server 6.5 SP4<br />

6.50.258 Microsoft <strong>SQL</strong> Server 6.5 SP3<br />

6.50.240 Microsoft <strong>SQL</strong> Server 6.5 SP2<br />

6.50.213 Microsoft <strong>SQL</strong> Server 6.5 SP1<br />

6.50.201 Microsoft <strong>SQL</strong> Server 6.5 RTM<br />

OPENROWSET Reauthentication Attack<br />

Many Microsoft <strong>SQL</strong> applications that I have encountered are configured to use an<br />

application-specific user account with limited privileges. However, the same applications are<br />

often integrating with an <strong>SQL</strong> server that has a weak sa (system administrator) account<br />

password. The following OPENROWSET query will attempt to connect to <strong>SQL</strong> Server<br />

with address 127.0.0.1 using the sa account with a password of letmein:<br />

SELECT * FROM OPENROWSET('<strong>SQL</strong>OLEDB','127.0.0.1';'sa';'letmein',<br />

'SET FMTONLY OFF execute master..xp_cmdshell "dir"')--<br />

A scripted injection attack that switches out the password value for common dictionary<br />

words could be used to launch an attack against the local sa account. Furthermore,

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

Saved successfully!

Ooh no, something went wrong!