Sql Injection Cheat Sheet

ADVERTISEMENT

SQL Injection Cheat Sheet
SQL Injection Cheat Sheet, Document Version 1.4
About SQL Injection Cheat Sheet
Currently only for MySQL and Microsoft SQL Server, some ORACLE and some
PostgreSQL. Most of samples are not correct for every single situation. Most of the
real world environments may change because of parenthesis, different code bases and
unexpected, strange SQL sentences.
Samples are provided to allow reader to get basic idea of a potential attack and almost
every section includes a brief information about itself.
M : MySQL
S : SQL Server
P : PostgreSQL
O : Oracle
+ : Possibly all other databases
Examples;
(MS) means : MySQL and SQL Server etc.
(M*S) means : Only in some versions of MySQL or special conditions see
related note and SQL Server
Table Of Contents
1.
About SQL Injection Cheat Sheet
2.
Syntax Reference, Sample Attacks and Dirty SQL Injection Tricks
1.
Line Comments
SQL Injection Attack Samples
2.
Inline Comments
Classical Inline Comment SQL Injection Attack Samples
MySQL Version Detection Sample Attacks
3.
Stacking Queries
Language / Database Stacked Query Support Table
About MySQL and PHP
Stacked SQL Injection Attack Samples
4.
If Statements
MySQL If Statement
SQL Server If Statement
If Statement SQL Injection Attack Samples
5.
Using Integers
6.
String Operations
String Concatenation

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education