论坛后台Asp木马扫描功能 for BBSXP 2008 新鲜出炉了!!!!

By admin at 2008-07-15 • 0人收藏 • 4747人看过

 

木马查询
详情见截图

安装说明
1.打开Admin_Default.asp
找到
  <tr class=CommonListTitle>
   <td align="center">系 统</td>
  </tr>

<!----木马扫描开始---->
  <tr class="CommonListCell">
   <td align="center"><a target="main" href="Admin_ScanWebshell.asp">木马扫描</a></td>
  </tr>
<!----木马扫描结束---->
加到下面

2.将下面的代码保存为Admin_ScanWebshell.asp
存放在根目录下
OK!

图中所示的hack.asp是我放上去测试的海阳顶端木马!!
连大名鼎鼎的海阳顶端都无所遁形了!
哈哈哈哈哈哈哈哈哈哈!


想灌水的话,灌水后请立刻下线,否则本人将进行大规模的流量攻击,直至所示IP的电脑瘫痪为止!

下场

Admin_ScanWebshell.asp内容:

[ybbtopic=10]
<!-- #include file="setup.asp" -->
<%
AdminTop
if RequestCookies("UserPassword")="" or RequestCookies("UserPassword")<>session("pass") then response.redirect "Admin_Default.asp"
Log("")

dim Report
server.ScriptTimeout=6000
DimFileExt="asp,cer,asa,cdx"
Sun=0
SumFiles=0
SumFolders=1
TmpPath=Server.MapPath(".")
'''
Checkbackdoor=0
'''1为查询特征码Execute,0为不查,在BBSXp中查询这个容易造成误报

Call ShowAllFile(TmpPath)
%>
<table border="0" cellpadding="5" cellspacing="1" width=90%  class="CommonListArea" align=center>

  <tr>
    <td class="CommonListCell">
        <div id="updateInfo"></div>
扫描完毕!一共检查文件夹<font color="#FF0000"><%=SumFolders%></font>个,文件<font color="#FF0000"><%=SumFiles%></font>个
<br>发现可疑点<font color="#FF0000"><%=Sun%></font>个
<br>本插件所查询出来的内容不一定准确,可能为误报.<br>请定期到灿斌工作室更新木马库!
</td></tr></table>


<table cellspacing="1" cellpadding="5" width="90%" border="0" class=CommonListArea align="center">
    <tr class=CommonListTitle>
      <td width="20%">文件相对路径</td>
      <td width="15%">特征码</td>
      <td width="40%">描述</td>
      <td width="20%">创建/修改时间</td>
      </tr>
       <p>
    <%=Report%>
    <br/></p>
    </table>
<%

'遍历处理path及其子目录所有文件
Sub ShowAllFile(Path)
 Set FSO=CreateObject("Scripting.FileSystemObject")
 if not fso.FolderExists(path) then exit sub
 Set f=FSO.GetFolder(Path)
 Set fc2=f.files
 For Each myfile in fc2
  If CheckExt(FSO.GetExtensionName(path&"\"&myfile.name)) Then
   Call ScanFile(Path&Temp&"\"&myfile.name, "")
   SumFiles = SumFiles + 1
  End If
 Next
 Set fc=f.SubFolders
 For Each f1 in fc
  ShowAllFile path&"\"&f1.name
  SumFolders = SumFolders + 1
    Next
 Set FSO=Nothing
End Sub

'检测文件
Sub ScanFile(FilePath, InFile)
 If InFile <> "" Then
  Infiles = "该文件被<a href=""http://"&Request.Servervariables("server_name")&"\"&InFile&""" target=_blank>"& InFile & "</a>文件包含执行"
 End If
 Set FSOs = CreateObject("Scripting.FileSystemObject")
 on error resume next
 set ofile = fsos.OpenTextFile(FilePath)
 filetxt = Lcase(ofile.readall())
 If err Then Exit Sub end if
 if len(filetxt)>0 then
  '特征码检查
  temp = "<a href=""http://"&Request.Servervariables("server_name")&"\"&replace(FilePath,server.MapPath("\")&"\","",1,1,1)&""" target=_blank>"&replace(FilePath,server.MapPath("\")&"\","",1,1,1)&"</a>"
   'Check "WScr"&DoMyBest&"ipt.Shell"
   If instr( filetxt, Lcase("WScr"&DoMyBest&"ipt.Shell") ) or Instr( filetxt, Lcase("clsid:72C24DD5-D70A"&DoMyBest&"-438B-8A42-98424B88AFB8") ) then
    Report = Report&"<tr class=CommonListCell><td>"&temp&"</td><td>WScr"&DoMyBest&"ipt.Shell 或者 clsid:72C24DD5-D70A"&DoMyBest&"-438B-8A42-98424B88AFB8</td><td>危险组件,一般被ASP木马利用。"&infiles&"</td><td>"&GetDateCreate(filepath)&"<br>"&GetDateModify(filepath)&"</td></tr>"
    Sun = Sun + 1
   End if
   'Check "She"&DoMyBest&"ll.Application"
   If instr( filetxt, Lcase("She"&DoMyBest&"ll.Application") ) or Instr( filetxt, Lcase("clsid:13709620-C27"&DoMyBest&"9-11CE-A49E-444553540000") ) then
    Report = Report&"<tr class=CommonListCell><td>"&temp&"</td><td>She"&DoMyBest&"ll.Application 或者 clsid:13709620-C27"&DoMyBest&"9-11CE-A49E-444553540000</td><td>危险组件,一般被ASP木马利用。"&infiles&"</td><td>"&GetDateCreate(filepath)&"<br>"&GetDateModify(filepath)&"</td></tr>"
    Sun = Sun + 1
   End If
   'Check .Encode
   Set regEx = New RegExp
   regEx.IgnoreCase = True
   regEx.Global = True
   regEx.Pattern = "@\s*LANGUAGE\s*=\s*[""]?\s*(vbscript|jscript|javascript).encode\b"
   If regEx.Test(filetxt) Then
    Report = Report&"<tr class=CommonListCell><td>"&temp&"</td><td>(vbscript|jscript|javascript).Encode</td><td>似乎脚本被加密了,一般ASP文件是不会加密的。"&infiles&"</td><td>"&GetDateCreate(filepath)&"<br>"&GetDateModify(filepath)&"</td></tr>"
    Sun = Sun + 1
   End If
   'Check my ASP backdoor :(
   regEx.Pattern = "\bEv"&"al\b"
   If regEx.Test(filetxt) Then
    Report = Report&"<tr class=CommonListCell><td>"&temp&"</td><td>Ev"&"al</td><td>e"&"val()函数可以执行任意ASP代码,被一些后门利用。其形式一般是:ev"&"al(X)<br>但是javascript代码中也可以使用,有可能是误报。"&infiles&"</td><td>"&GetDateCreate(filepath)&"<br>"&GetDateModify(filepath)&"</td></tr>"
    Sun = Sun + 1
   End If
   'Check exe&cute backdoor
   regEx.Pattern = "[^.]\bExe"&"cute\b"
   If regEx.Test(filetxt) and Checkbackdoor=1 Then
    Report = Report&"<tr class=CommonListCell><td>"&temp&"</td><td>Exec"&"ute</td><td>e"&"xecute()函数可以执行任意ASP代码,被一些后门利用。其形式一般是:ex"&"ecute(X)。<br>"&infiles&"</td><td>"&GetDateCreate(filepath)&"<br>"&GetDateModify(filepath)&"</td></tr>"
    Sun = Sun + 1
   End If
   Set regEx = Nothing
   
  'Check include file
  Set regEx = New RegExp
  regEx.IgnoreCase = True
  regEx.Global = True
  regEx.Pattern = "<!--\s*#include\s*file\s*=\s*"".*"""
  Set Matches = regEx.Execute(filetxt)
  For Each Match in Matches
   tFile = Replace(Mid(Match.Value, Instr(Match.Value, """") + 1, Len(Match.Value) - Instr(Match.Value, """") - 1),"/","\")
   If Not CheckExt(FSOs.GetExtensionName(tFile)) Then
    Call ScanFile( Mid(FilePath,1,InStrRev(FilePath,"\"))&tFile, replace(FilePath,server.MapPath("\")&"\","",1,1,1) )
    SumFiles = SumFiles + 1
   End If
  Next
  Set Matches = Nothing
  Set regEx = Nothing
  
  'Check include virtual
  Set regEx = New RegExp
  regEx.IgnoreCase = True
  regEx.Global = True
  regEx.Pattern = "<!--\s*#include\s*virtual\s*=\s*"".*"""
  Set Matches = regEx.Execute(filetxt)
  For Each Match in Matches
   tFile = Replace(Mid(Match.Value, Instr(Match.Value, """") + 1, Len(Match.Value) - Instr(Match.Value, """") - 1),"/","\")
   If Not CheckExt(FSOs.GetExtensionName(tFile)) Then
    Call ScanFile( Server.MapPath("\")&"\"&tFile, replace(FilePath,server.MapPath("\")&"\","",1,1,1) )
    SumFiles = SumFiles + 1
   End If
  Next
  Set Matches = Nothing
  Set regEx = Nothing
  
  'Check Server&.Execute|Transfer
  Set regEx = New RegExp
  regEx.IgnoreCase = True
  regEx.Global = True
  regEx.Pattern = "Server.(Exec"&"ute|Transfer)([ \t]*|\()"".*"""
  Set Matches = regEx.Execute(filetxt)
  For Each Match in Matches
   tFile = Replace(Mid(Match.Value, Instr(Match.Value, """") + 1, Len(Match.Value) - Instr(Match.Value, """") - 1),"/","\")
   If Not CheckExt(FSOs.GetExtensionName(tFile)) Then
    Call ScanFile( Mid(FilePath,1,InStrRev(FilePath,"\"))&tFile, replace(FilePath,server.MapPath("\")&"\","",1,1,1) )
    SumFiles = SumFiles + 1
   End If
  Next
  Set Matches = Nothing
  Set regEx = Nothing
  
  'Check Server&.Execute|Transfer
  Set regEx = New RegExp
  regEx.IgnoreCase = True
  regEx.Global = True
  regEx.Pattern = "Server.(Exec"&"ute|Transfer)([ \t]*|\()[^""]\)"
  If regEx.Test(filetxt) Then
   Report = Report&"<tr class=CommonListCell><td>"&temp&"</td><td>Server.Exec"&"ute</td><td>不能跟踪检查Server.e"&"xecute()函数执行的文件。请管理员自行检查。<br>"&infiles&"</td><td>"&GetDateCreate(filepath)&"<br>"&GetDateModify(filepath)&"</td></tr>"
   Sun = Sun + 1
  End If
  Set Matches = Nothing
  Set regEx = Nothing
  
  'Check Crea"&"teObject
  Set regEx = New RegExp
  regEx.IgnoreCase = True
  regEx.Global = True
  regEx.Pattern = "CreateO"&"bject[ |\t]*\(.*\)"
  Set Matches = regEx.Execute(filetxt)
  For Each Match in Matches
   If Instr(Match.Value, "&") or Instr(Match.Value, "+") or Instr(Match.Value, """") = 0 or Instr(Match.Value, "(") <> InStrRev(Match.Value, "(") Then
    Report = Report&"<tr class=CommonListCell><td>"&temp&"</td><td>Creat"&"eObject</td><td>Crea"&"teObject函数使用了变形技术,仔细复查。"&infiles&"</td><td>"&GetDateCreate(filepath)&"<br>"&GetDateModify(filepath)&"</td></tr>"
    Sun = Sun + 1
    exit sub
   End If
  Next
  Set Matches = Nothing
  Set regEx = Nothing
 end if
 set ofile = nothing
 set fsos = nothing
End Sub

'检查文件后缀,如果与预定的匹配即返回TRUE
Function CheckExt(FileExt)
 If DimFileExt = "*" Then CheckExt = True
 Ext = Split(DimFileExt,",")
 For i = 0 To Ubound(Ext)
  If Lcase(FileExt) = Ext(i) Then
   CheckExt = True
   Exit Function
  End If
 Next
End Function

Function GetDateModify(filepath)
 Set fso = CreateObject("Scripting.FileSystemObject")
    Set f = fso.GetFile(filepath)
 s = f.DateLastModified
 set f = nothing
 set fso = nothing
 GetDateModify = s
End Function

Function GetDateCreate(filepath)
 Set fso = CreateObject("Scripting.FileSystemObject")
    Set f = fso.GetFile(filepath)
 s = f.DateCreated
 set f = nothing
 set fso = nothing
 GetDateCreate = s
End Function

AdminFooter
%>[/ybbtopic]

这是你们逼的

现在想要本插件

好!行!

你发8个非灌水的主题
加我QQ;517038270

我就把插件发给你
你们整天灌水

我也没有办法

这是你们逼的

[此帖子已被 admin 在 2008-7-20 15:31:42 编辑过]

21 个回复 | 最后更新于 2008-12-12
2008-07-15   #1

喜欢死了~~~~

2008-07-15   #2
我也喜欢死了(老子自己的东西还能不喜欢吗?)
2008-07-15   #3

喜欢活了,哈哈

不过你 那个博客 插件呢,找了一天了,都没有找到!!!!!

2008-07-16   #4
哇,你真有才,跟你学学就好了
2008-07-18   #5

老子在网吧,你能啥滴!操,用个小代理就把你平啦,你牛B个鸡八!老子玩的时候你还吃奶呢!

2008-07-18   #6
老子能不把插件发给你啊
2008-07-20   #7

牛X  你也不怕别人把你的给黑黑了。。。

2008-07-20   #8

反正服务器不是我的!

2008-07-22   #9

我用了怎么显示这个呢?

无法显示网页

您要访问的网页有问题,无法显示。

请尝试以下操作:


HTTP 500 - 内部服务器错误
Internet Explorer

在线等灿斌兄回答

2008-07-23   #10

有2007的就好了,我不想升成2008

2008-07-24   #11
cxgcxgghc
2008-08-25   #12

这么多要求呀,DDDDDDDDDDDDDDDDDD

2008-08-25   #13
博客插件我也没找到……这个看ftp上的修改日期不也行吗?
2008-08-26   #14
插件我也没找到
2008-08-26   #15
好东西哦啊
2008-08-28   #16

不能下呀,郁闷

 

2008-08-29   #17

我看以下啊 ?

2008-09-03   #18

想灌水的话,灌水后请立刻下线,否则本人将进行大规模的流量攻击,直至所示IP的电脑瘫痪为止!

乖乖!真厉害

2008-09-05   #19
谢谢夸奖!

登录后方可回帖

登 录
信息栏

Carbon Forum是一个基于话题的高性能轻型PHP论坛

下载地址:Carbon Forum v5.9.0
QQ群:12607708(QQ我不常上)

donate

手机支付宝扫描上方二维码可向本项目捐款

粤公网安备 44030602003677号
粤ICP备17135490号

Loading...