当前位置:网站首页>反CSRF爆破的三种姿势
反CSRF爆破的三种姿势
2022-06-29 09:37:00 【zkzq】
零基础学黑客,搜索公众号:白帽子左一
姿势1:CSRF Token Tracker
CSRF Token Tracker是个插件,可以在BApp Store下载安装

这种方式可以说是最简单的,但是不适用姿势2和姿势3中的案例
现有一个请求参数是user_token

只需要在插件中添加

注意这里有个坑(搞了好久)
比如你想在repeater模块测试一下重新发送请求会不会修改密码

发现返回的结果仍然是302
这里是需要有一个有效的,没有使用过的user_token去请求的!
然后再去重放请求包就都会自动更新token了
总结一句就是你第一次用有效的token重放请求包就永远有效(自动更新token了)
你第一次用无效的token重放请求包就永远无效
姿势2:定义宏
在这个案例中使用CSRF Token Tracker无法成功自动更新token


开始定义宏





一路OK回到这里



不懂就选择1,在所有请求前都运行宏

来到repeater模块重新发送请求就不会说非法的csrftoken

来看日志发生了什么

我们使用repeater重放了登录的请求,也就是图中第71个请求
宏帮我们自动进行了了第70个请求获取了新的token让第71个带着新的token去登录
姿势3:宏+Extractor
在这个案例中前两种姿势均无效
下载安装插件

先看下两个请求包
第一个请求包就是获取token的

第二个就是带着token去访问

看过这两个请求包应该就明白了
这次token是在请求头中
而定义宏的时候会让你选择更新token的地方
这个地方却没有更新请求头的功能
所以姿势2在这里就失效了

首先定义宏获取token
这个宏只需要要确保在请求2之前会执行请求1
相比于姿势2的步骤简单一点



到这里宏就配置好了
在repeater重放请求2然后再logger+=里面查看
确保每次都会在请求2前自动执行请求1就是正常的

然后配置插件Extractor
把两个请求包都发送到Extractor



此时回到repeater模块重放发现token就有效了

再次回到logger++看发生了什么
看到第87个请求获取的token值为
407667d008b147199d174681a655aea0

第88个请求包的accessToken值也是407667d008b147199d174681a655aea0

总结一下姿势3的思路
宏负责在请求2前发送请求1
Extractor插件负责匹配和替换token
作者:VVeaker
原文地址:https://xz.aliyun.com/t/11419


边栏推荐
- Findbugs修改总结
- AQS之ReentrantLock源码解析
- Fully understand the volatile keyword
- CLR via C reading notes - single instance application
- Reprint: five methods to determine whether an object has attributes
- If [not] exists in MySQL
- Recurrence of vulnerability analysis for Cisco ASA, FTD and hyperflex HX
- 由ASP.NET Core根据路径下载文件异常引发的探究
- Linux下Redis安装及集群搭建
- Win32Exception (0x80004005): 组策略阻止了这个程序。要获取详细信息,请与系统管理员联系。
猜你喜欢

给定两个整形变量的值,将两个值的内容进行交换 (C语言)

Real time value transfer from C form to another form

基于STM32+RFID设计的宿舍检修管理系统

UserWarning: Usage of dash-separated ‘script-dir‘ will not be supported in future versions. 笔记

IIS server related error

解决zxing的QR码包含中文时乱码的问题

2600 pages in total! Another divine interview manual is available~

Attribute in C

共2600页!又一份神级的面试手册面世~

Analysis of BlockingQueue source code of AQS
随机推荐
Reading notes of CLR via C -clr boarding and AppDomain
September 25, 2020 noncopyable of boost library for singleton mode
Win32Exception (0x80004005): 组策略阻止了这个程序。要获取详细信息,请与系统管理员联系。
Report card of regional industrial Internet market, the second place of Baidu intelligent yunkaiwu
Design of intelligent test paper generation system
The process of updating a record in MySQL
Analysis of BlockingQueue source code of AQS
Voir le classement des blogs pour csdn
C language printf family
BUUCTF--内涵的软件
IIS服务器相关错误
Analysis on the specific execution process of an insert statement in MySQL 8.0 (2)
DevExpress的双击获取单元格数据
BUUCTF--reverse2
C#中IEqualityComparer接口的实现
Analyze in detail the PBOT mining virus family behavior and the principle of exploited vulnerabilities, and provide detailed protection suggestions for the blue army
C#使用WinExec调用exe程序
mysql中的if [not] exists
Is it safe to open a securities account? Is it reliable?
MySQL innodb每行数据长度的限制