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.

xiv<br />

Contents<br />

Oracle.................................................. 301<br />

DBMS_SCHEDULER................................... 302<br />

PL/<strong>SQL</strong> Native. ....................................... 302<br />

Other Possibilities.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303<br />

Alter System Set Events................................... 303<br />

PL/<strong>SQL</strong> Native 9i. ..................................... 303<br />

Buffer Overflows. ...................................... 304<br />

Custom Application Code................................. 304<br />

My<strong>SQL</strong>. ............................................... 304<br />

Microsoft <strong>SQL</strong> Server .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305<br />

Consolidating Access .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309<br />

Summary. ................................................... 312<br />

Solutions Fast Track.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312<br />

Frequently Asked Questions.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314<br />

Endnotes.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315<br />

Chapter 7 Advanced Topics .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317<br />

Introduction .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318<br />

Evading Input Filters.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318<br />

Using Case Variation. ........................................ 319<br />

Using <strong>SQL</strong> Comments........................................ 319<br />

Using URL Encoding .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320<br />

Using Dynamic Query Execution................................ 322<br />

Using Null Bytes.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323<br />

Nesting Stripped Expressions .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324<br />

Exploiting Truncation......................................... 324<br />

Bypassing Custom Filters .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326<br />

Using Non-St<strong>and</strong>ard Entry Points................................ 327<br />

Exploiting Second-Order <strong>SQL</strong> <strong>Injection</strong>. ............................ 329<br />

Finding Second-Order Vulnerabilities. ............................ 332<br />

Using Hybrid <strong>Attacks</strong>. .......................................... 335<br />

Leveraging Captured Data. .................................... 335<br />

Creating Cross-Site Scripting .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335<br />

Running Operating System Comm<strong>and</strong>s on Oracle .. . . . . . . . . . . . . . . . . . 336<br />

Exploiting Authenticated Vulnerabilities............................ 337<br />

Summary. ................................................... 338<br />

Solutions Fast Track.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338<br />

Frequently Asked Questions.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340

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

Saved successfully!

Ooh no, something went wrong!