`
txf2004
  • 浏览: 7131357 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

利用FSO做的ASP木马检索工具

阅读更多

<%@ LANGUAGE="VBSCRIPT"codepage ="936" %>
<%option explicit
dim timer1,timer2,thetime
timer1=timer
Server.ScriptTimeout=1200
'on error resume next%>
<html>
<head>
<style>
<!--
body{font-family: 宋体; font-size: 10pt}
table{ font-family: 宋体; font-size: 9pt }
a{ font-family: 宋体; font-size: 9pt; color: #000000; text-decoration: none }
a:hover{ font-family: "宋体"; color: #333333; text-decoration: none }
input { BORDER-RIGHT: #888888 1px solid; BORDER-TOP: #888888 1px solid; BACKGROUND: #ffffff; BORDER-LEFT: #888888 1px solid; BORDER-BOTTOM: #888888 1px solid; FONT-FAMILY: "Verdana", "Arial"font-color: #ffffff;FONT-SIZE: 9pt;
}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>思易ASP木马追捕</title>
</head>


<body>
思易ASP木马追捕1.0 <a href="http://www.home4e.com/download/asp.rar">下载地址</a><br>
检查你的网站中是否含有可疑ASP程序<br>
<a href="#" onClick="JavaScript:if (d.style.display='none'){d.style.display='';}else {d.style.display='none';}">使用说明</a><br>
<div id=d style="display:none">FSO-FSO组件,具有远程删除新建修改文件的(夹)功能<br>
流-Adodb.stream的调用,一般用于上传文件,如果单独调用stream也很危险<br>
SHELL-SHELL组件调用<br>
WS-&nbsp;WSCIPT组件调用<br>
XML-xmlhttp<br>
密-是否加过密<br>
以上各调用得越多则该文件的危险性就越高<br>
</div>
<%
dim chktype,url
dim yes,no
dim Ofso,Ofile,Ofolder,subfolder
dim filename,path,folder


chktype = Request.form("chktype")
if chktype = "" then chktype=Request.Querystring("chktype")
if chktype="" then chktype="asp,js,inc"
yes = "<font color=red>√</font>"
no ="<font color=green>-</font>"
path = Request("path")
if len(path)=0 then path = Server.Mappath("\")
url = request.servervariables("Script_name")&"?chktype="&Server.Urlencode(chktype) '本文件的名称


set Ofso = Server.CreateObject("Scripting.FileSystemObject")
set ofolder = Ofso.Getfolder(path)
%>
<table width="500" border="0" cellpadding="1" cellspacing="1" bordercolor="#009900" bgcolor="#666666">
<form action="<%=url%>&path=<%=path%>" method="post">
<tr bgcolor="#666666">
<td height="20" colspan="3"><font color=#ffffff>检查的文件类型(用逗号隔开,默认检查asp,inc,js): </font>
<input name="chktype" type="text" id="chktype" value="<%=chktype%>" size="10">
<input type="submit"value="确定"></td>
</tr>
</form>
<tr bgcolor="#FFFFFF">
<td height="1" colspan="3"></td>
</tr><tr bgcolor="#FFFFFF">
<td height="1" colspan="3">当前目录:<%=path%></td>
</tr>
<tr bgcolor="#666666">
<td width="93" height="20"><a href="<%if not ofolder.IsRootFolder then response.write url&"&path="&ofolder.parentfolder%>">■↑回上级目录</a></td>
<td width="175">&nbsp;</td>
<td width="218"><font color="#FFFFFF"><a href="<%=url%>&path=<%=path%>&bian=bian">搜索本目录下所有文件</a></font></td>
</tr>
<%if ofolder.subfolders.count>0 then
for each subfolder in ofolder.subfolders
response.write "<tr bgcolor=#E8E8E8>"
response.write "<td height=20 colspan=3>"
response.write "<a href="&url&"&path="&server.urlencode(subfolder)&">"&subfolder&"</a>"


response.write "</td></tr>"
next
end if
response.write "</table>"
if ofolder.files.count>0 then
%>
<table width="500" border="0" cellpadding="1" cellspacing="1" bgcolor="#666666">
<tr bgcolor="#666666">
<td height="20"><font color="#FFFFFF">所在目录<%=ofolder%></font></td>
<td width="22" align="center"><font color="#990000">FSO</font></td>
<td width="22" align="center"><font color="#990000">删</font></td>
<td width="22" align="center"><font color="#990000">建</font></td>
<td width="22" align="center"><font color="#990000">移</font></td>
<td width="22" align="center"><font color="#990000">流</font></td>
<td width="22" align="center"><font color="#990000">SHELL</font></td>
<td width="22" align="center"><font color="#990000">WS</font></td>
<td width="22" align="center"><font color="#990000">XML</font></td>
<td width="22" align="center"><font color="#990000">密</font></td>
</tr>
<%
if request("bian")="bian" then
checkfolder(path)
else
checkfiles(path)
end if
response.write "</table>"
end if
sub checkfiles(curpath)
dim ofolder
dim fileext,fileallow,filetxt
dim fso,del,create,mov,stream,shell,ws,xmlhttp,encode

'response.write curpath&"<br>"
if not ofso.FolderExists(curpath) then exit sub
set ofolder = Ofso.getfolder(curpath)
for each filename in ofolder.files
fileallow = false
fso = ndel = ncreate = nmov = nstream = nshell = nws=nxmlhttp = nencode=no
fileext = lcase(right(filename,len(filename)-instrrev(filename,".")))
if instr(chktype,fileext)>0 then
fileallow = true
end if
'response.write fileext&"|"&fileallow
if fileallow then
set ofile = ofso.OpenTextFile(filename)
filetxt = lcase(ofile.readall())
if instr(filetxt,"scripting.filesystemobject")>0 then fso = yes else fso = no
if fso = yes then
if instr(filetxt,"deletefolder")>0 or instr(filetxt,"delete")>0 then del =yes else del = no
if instr(filetxt,"opentextfile")>0 or instr(filetxt,"createtextfile")>0 or instr(filetxt,"openastextstream")>0 then create =yes else create = no
if instr(filetxt,"move")>0 then mov = yes else mov = no
end if
if instr(filetxt,"adodb.stream")>0 then stream = yes else stream = no
if instr(filetxt,"shell.application")>0 then shell = yes else shell = no
if instr(filetxt,"wscript")>0 then ws = yes else ws = no
if instr(filetxt,"xmlhttp")>0 then xmlhttp =yes else xmlhttp = no
if instr(filetxt,"vbscript.encode")> 0or instr(filetxt,"javascript.encode")> 0 then encode = yes else encode = no
filetxt = ""
set ofile= nothing

response.write "<tr bgcolor=#E8E8E8>"
response.write"<td height=20>"&filename&"</td>"
response.write"<td align=center>"& fso&"</td>"
response.write"<td align=center>"& del&"</td>"
response.write"<td align=center>"& create&"</td>"
response.write"<td align=center>"& mov&"</td>"
response.write"<td align=center>"& stream&"</td>"
response.write"<td align=center>"& shell&"</td>"
response.write"<td align=center>"& ws&"</td>"
response.write"<td align=center>"& xmlhttp&"</td>"
response.write"<td align=center>"& encode&"</td>"
response.write "</tr>"
end if
next
set ofolder = nothing
end sub


sub checkfolder(curpath)
dim sfolder
'set fso = Server.CreateObject("scripting.filesystemobject")
set sfolder = Ofso.getfolder(curpath)
if sfolder.subfolders.count>0 then
for each subfolder in sfolder.subfolders
call checkfolder(subfolder)
checkfiles(subfolder)
next
end if
set sfolder = nothing
end sub
'set ofolder = nothing
set ofso = nothing%>
欢迎访问 【<a href="http://www.home4e.com">思易网</a>】 <a href="www.home4e.comhttp://www.home4e.com/">www.home4e.com</a><br>
本程序由Blueeyes编写,转载时请保留这些信息
<%timer2 = timer
thetime=cstr(int(((timer2-timer1)*10000 )+0.5)/10)
response.write "<br>本页执行共用了"&thetime&"毫秒"%>
</body>
</html>

分享到:
评论

相关推荐

    简单ASP使用FSO生成静态页源码

    在ASP中,你可以先加载动态数据,然后利用FSO生成这两个页面。例如,"index.html"可能会显示最新或最热门的内容,而"list.html"可能展示所有分类或按时间排序的内容列表。在生成这些页面时,需要确保动态数据(例如...

    asp fso网站计数器

    在ASP中,FSO组件是一个强大的工具,它可以操作文件系统,包括读取、写入、创建和删除文件以及目录。 FSO(FileSystemObject)是ASP内置的对象模型,它提供了对Windows文件系统的编程接口。通过FSO,我们可以创建、...

    vb_FSO及木马

    1、 VB的文件系统对象FSO)第一部分 2、 VB的文件系统对象(FSO)第二部分 3、 VB的数据库系统第一部分 4、 VB的数据库系统第二部分 5、 VB的网络编程模式 6、 木马编写的一般对象知识 7、 编写一个简单木马 8、 复杂...

    [原创]FSO文件浏览器

    这是一个利用FSO集合对象编写的FSO文件浏览器(如果你非要说它是木马,我也不反对),在功能上仿照了“海洋顶端木马”设计,不过代码完全是重写的,没有使用如Shell.Application等容易造成杀毒软件误杀的组件。...

    asp与fso开发案例

    2. **RAR解压缩**:在ASP环境中,虽然没有内置的RAR文件处理功能,但可以通过调用外部命令行工具,如WinRAR的RAR.exe,来实现RAR文件的解压缩。通过`Shell`对象,我们可以执行外部程序并传递参数,从而实现RAR文件的...

    aspFSO文件浏览器1.0

    FSO文件浏览器 1.0 这是一个利用FSO集合对象编写的FSO文件浏览器(如果你非要说它是木马,我也不反对),在功能上仿照了“海洋顶端木马”设计,不过代码完全是重写的,没有使用如Shell.Application等容易造成杀毒...

    易语言利用FSO对象取文件夹大小

    以下是一段易语言代码示例,展示了如何利用FSO对象获取文件夹大小: ```易语言 .声明 ("Scripting.FileSystemObject", "FSO") .定义 .全局变量 .类型 "FileSystemObject" .定义 .全局变量 .类型 "Folder" .定义 ....

    asp fso静态生成页面

    总结起来,"asp fso静态生成页面"是一个利用ASP服务器端脚本和FileSystemObject进行文件操作的技术,将动态生成的内容转化为静态HTML页面,以提高网站性能和用户体验。这一过程涉及动态内容的处理、文件的创建与写入...

    ASP+FSO可视化目录编历(可增、删、改)

    在本项目中,"ASP+FSO可视化目录编历(可增、删、改)",指的是利用ASP技术和FileSystemObject(FSO)来实现对服务器上文件系统的可视化操作,包括添加、删除和修改文件或目录的功能。 FileSystemObject是ASP内置的...

    易语言利用FSO对象取文件夹大小源码

    本知识点主要关注如何利用易语言结合FileSystemObject(FSO)对象来获取文件夹的大小。FSO是Microsoft脚本语言中的一种功能,允许开发者在Windows操作系统上进行文件和文件夹的管理工作。 首先,我们要了解FSO对象...

    检测ASP图片木马的函数

    检测ASP图片木马的函数使用FSO(File System Object)来读取客户端文件的内容,并检查文件内容中是否包含有危险的操作字符。如果文件内容包含有恶意代码,函数将返回True,否则返回False。 函数实现 下面是检测ASP...

    fso.rar_asp fso

    标题"Fso.rar_asp fso"中的关键词"asp fso"指的是ASP(Active Server Pages)中的 FileSystemObject(FSO)技术。ASP 是一种服务器端脚本环境,用于创建动态交互式网页,而FSO则是ASP内建的对象模型,允许开发者在...

    fso.rar_asp fso_fso_文本读写

    在ASP(Active Server Pages)开发中,FSO(File System Object)是一个强大的工具,它允许开发者在服务器端进行文件操作,如创建、读取、写入、删除文件和目录。"fso.rar_asp fso_fso_文本读写"这个标题表明我们将...

    Asp木马漏洞安全防范策略

    除了FSO技术外,另一种常见的Asp木马技术是通过创建`Shell.Application`对象,并利用`shell.namespace`方法对文件和文件夹进行操作。这种方法虽无法执行部分高级DOS命令,但仍然能够实现文件复制、移动等功能。 - *...

    fso.rar_asp fso_fso a

    标题 "fso.rar_asp fso_fso a" 暗示了这是一个关于ASP(Active Server Pages)中FileSystemObject(FSO)组件的资源包,主要用于处理文件系统操作。描述指出这是一套分页组件的源码,可以解决特定的分页算法问题,...

    易语言利用FSO对象清除COOKIES

    在这个主题中,我们将深入探讨如何利用易语言和FSO(FileSystemObject)对象来实现Cookies的清理。 首先,让我们理解什么是FSO(FileSystemObject)。FSO是Microsoft的ActiveX组件,它提供了一套全面的方法和属性,...

    VB用FSO遍历文件夹操作示例程序.7z

    在VB(Visual Basic)编程中,FileSystemObject(FSO)是一个强大的工具,它允许程序员进行各种文件和文件夹的操作,如创建、删除、复制、移动和遍历文件系统。在这个"VB用FSO遍历文件夹操作示例程序"中,我们将深入...

    asp下利用fso实现文件夹或文件移动改名等操作函数

    asp下利用fso实现文件夹或文件移动改名等操作函数 在 ASP 中,fso(File System Object)是一个非常强大的对象,它可以帮助我们实现文件和文件夹的各种操作,例如移动、复制、删除、重命名等。下面我们将详细介绍...

    ASP FSO在线文件管理、上传、编辑系统

    ASP FSO在线文件管理、上传、编辑系统是一个基于ASP(Active Server Pages)技术,并利用FSO(FileSystemObject)对象实现的文件操作平台。这个系统允许用户通过Web浏览器进行文件的管理,包括上传、下载、编辑、...

    ASP用FSO生成HTML实例详解

    ASP用FSO生成HTML静态页面,结合后台数据库和前台页面实例详细讲解,技术原理简单易懂,一看就能明白,详细看后台自己开发出更完整功能的整站静态生成。

Global site tag (gtag.js) - Google Analytics