19.09.2017 Views

the-web-application-hackers-handbook

Create successful ePaper yourself

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

Chapter 9 n Attacking Data Stores 337<br />

Oracle: ORA-00972:identifier is too long<br />

MS-SQL: String or binary data would be truncated.<br />

MySQL: N/A<br />

Translation: This does not indicate SQL injection. You may see this error message<br />

if you have entered a long string. You’re unlikely to get a buffer overflow<br />

here ei<strong>the</strong>r, because <strong>the</strong> database is handling your input safely.<br />

Oracle: ORA-00942: table or view does not exist<br />

MS-SQL: Msg 208, Level 16, State 1, Line 1<br />

Invalid object name ‘foo’<br />

MySQL: Table ‘DBNAME.SOMETABLE’ doesn’t exist<br />

Translation: Ei<strong>the</strong>r you are trying to access a table or view that does not exist, or,<br />

in <strong>the</strong> case of Oracle, <strong>the</strong> database user does not have privileges for<br />

<strong>the</strong> table or view. Test your query against a table you know you have<br />

access to, such as DUAL. MySQL should helpfully reveal <strong>the</strong> current<br />

database schema DBNAME when this condition is encountered.<br />

Oracle: ORA-00920: invalid relational operator<br />

MS-SQL: Msg 170, Level 15, State 1, Line 1<br />

Line 1: Incorrect syntax near foo<br />

MySQL:<br />

Translation:<br />

You have an error in your SQL syntax. Check <strong>the</strong><br />

manual that corresponds to your MySQL server version<br />

for <strong>the</strong> right syntax to use near ‘’ at line 1<br />

You were probably altering something in a WHERE clause, and your<br />

SQL injection attempt has disrupted <strong>the</strong> grammar.<br />

Oracle:<br />

MS-SQL:<br />

MySQL:<br />

Translation:<br />

ORA-00907: missing right paren<strong>the</strong>sis<br />

N/A<br />

You have an error in your SQL syntax. Check <strong>the</strong><br />

manual that corresponds to your MySQL server version<br />

for <strong>the</strong> right syntax to use near ‘’ at line 1<br />

Your SQL injection attempt has worked, but <strong>the</strong> injection point was<br />

inside paren<strong>the</strong>ses. You probably commented out <strong>the</strong> closing paren<strong>the</strong>sis<br />

with injected comment characters (--).<br />

Continued

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

Saved successfully!

Ooh no, something went wrong!