簡要SQL注入
1、如何判斷注入點
老方法:
-
and 1=1頁面正常
-
and 1=2頁面錯誤
這樣可能存在注入點
新方法:
- 隨便輸入任意數字文字,例如id=1dhlahdajd蘋果,回顯空白或者回顯與正常的不一樣,則正面存在注入點
- 有些網站會跳轉到404界面,這個說明網站有注入檢測,不存在注入點
2、注入思路
- 判定注入型別 id=1’、id=1"、id=3-1、id=1’)等等,根據報錯資訊來判斷是字符型(單引、雙引)、數值型、復合帶括號型等
- 判定注入列數 order by
- 判斷顯示位,結合union聯合查詢,例如union select 1,2,3
- 開始資訊收集:
- 資料庫版本version()
- 資料庫名字database()
- 資料庫用戶user()
- 作業系統@@version_compile_os()
? 5.利用information_schema開始對所在的資料庫查詢
3、information_schema查詢知識點
-
在mysql5.0以上的版本,mysql會自帶一個information_schema的資料庫,它是一個存盤所有資料庫名、表名、列名的資料庫,也相當于可以通過查詢它來獲取指定的資料庫名、表名、列名
-
在information_schema資料庫中的表名代表意思:
-
information_schema.tables:記錄著所有表名
-
information_schema.columns:記錄著所有列名
-
table_schema:資料庫名
-
table_name:表名
-
column_name:列名
-
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/352107.html
標籤:其他
上一篇:PowerSploit 基礎知識
