sp is a perl tool to perform sql injection very easily and fast.
It permit many attack vectors (blind, union, error based).
sp uses dichotomy to perform blind SQL injections.
sp will try to get an ERROR message to determine the DATABASE TYPE and a MATCH message to use BLIND SQL Injections.
custom: what type of information you want to show
VALUE | INFO | |
T | Target | |
P/p | Parameters | |
D/d | Databases | |
t | Tables | |
C/c | Columns | |
Q/q | Queries |
Set <param> value to <value>.
sp> set MATCH <b>Title</b> // Set MATCH value to <b>Title</b>
Using save without arguments will save data to the last loaded file.
Logfiles are created in the ./data/ directory and their extension is ".xml"
It will save target url, arg, match & error, union params (shown and fields), and other parameters.
Set the charset for blind attacks.
VALUE | CHARSET | |
all | etaonisrhldcumfpwgbyvkxjqz0123456789_-\$.^()[]{}¦*\"'@=/\|#?+&!`<>:;,\ | |
num | 0123456789 | |
md5 | abcdef0123456789 | |
alpha | etaonisrhldcumfpwgbyvkxjqz | |
alphanum | etaonisrhldcumfpwgbyvkxjqz0123456789 | |
anything else | what you want |
If you wanna use UNION stuffs, you have to configure it first using this.This will set FIELDS and SHOWN values, which are necessary for UNION or MUNION attack.
You can view it with "infop" or set it yourself using "set".
As you can see, there are 4 ways to map SQL.
UNION will use UNION.
MUNION will use UNION too, but is useful when just 1 SQL row is printed on the page.
BLIND will use a SQL Blind Injection.
GUESS will try to guess tables or columns using a dictionary.
Everything that is found is added to a specific list that you can see using "info"
Here are many exemples with explanations.
custom: what type of information you want to dump (by default, dump everything)
VALUE | INFO | |
D | Databases | |
T | Tables | |
C | Columns |
This will list SQL users and their password.
Try to get <file> content using SQL "load_file()".
sp> blind-file-search <file> <string>Try to find <string> into <file> using SQL "load_file()".
sp> guess-filesTry to find interesting files.
sp> blind-file-get /etc/passwd 193 // Get /etc/password content, starting at char n°193 sp> blind-file-search /etc/passwd admin // Find word "admin" in /etc/passwd file
As you can see, there are 4 ways to map SQL.
UNION will use UNION.
MUNION will use UNION too, but is useful when just 1 SQL row is printed on the page.
BLIND will use a SQL Blind Injection.
MBLIND will use a SQL Blind Injection, but this will print all rows.
If only 1 row is found, results are saved into QUERIES ("infoq" to see them)
Here are many exemples with explanations.
Enable or disable HTTP proxy.