暴力破解:token防爆破
校验方式:
请求中添加token防止爆破,登录时需携带服务器上一次加载时发送的token进行校验
解决:
burp--intruder模块设置中使用Grep-Extract功能提取页面中的token,并将载荷类型更改为递归查询[Recursive grep]
正常登录
尝试枚举提示token错误
递归提取token枚举密码
1.Positions模块攻击类型选为Pitchfork,标记密码和token字段为载荷
2.Setting模块Grep-Extract匹配token字段
鼠标框选具体值,点击ok即可
3.Payloads模块设置载荷类型和值
载荷1 类型简单列表,添加密码即可
载荷2 类型递归查询 选择提取token字段表达式 添加初始请求值
4.如果失败,需要调整线程池为1线程
5.运行流程/原理
初始请求1发送载荷,Grep-Extract功能提取返回的token用于下次请求
【1:password=123456&token=suibian 提取token:720956735e49f98f5b514206952
请求2发送载荷,Grep-Extract功能提取返回的token用于下次请求
【2:password=123456789&token=7.......2 提取token: 997696735e49fe551b061883434
请求3发送载荷,Grep-Extract功能提取返回的token用于下次请求
【3:password=123123&token=9.......4 提取token:719636735e4a044c1b485173632
6.枚举密码
官方文档[英/中]Recursive grep 递归 grep
This enables you to extract text from the response to the previous request, and use it as the payload for the current request.
这使您能够从对上一个请求的响应中提取文本,并将其用作当前请求的负载。You can use this payload type when you need to work recursively to extract useful data or deliver an exploit. For example, to extract the contents of a database via SQL injection by recursively injecting queries of the form:
当您需要递归地提取有用的数据或提供漏洞利用时,您可以使用此有效负载类型。例如,要通过 SQL 注入递归注入以下形式的查询来提取数据库的内容:
UNION SELECT name FROM sysobjects WHERE name > 'a'
The server's error message discloses the name of the first database object:
服务器的错误消息会泄露第一个数据库对象的名称:
Syntax error converting the varchar value 'accounts' to a column of data type int.
The query is then repeated using "accounts" to identify the next object. This task can be easily automated using recursive grep payloads to quickly list all objects within the database.
然后使用 “accounts” 重复查询以识别下一个对象。使用递归 grep 有效负载可以轻松自动执行此任务,以快速列出数据库中的所有对象。The following settings must be configured:
必须配置以下设置:
- Initial payload for first request - Enter an initial payload. This is used to generate the first request and response.
First request (第一个请求的初始负载) - 输入初始负载。这用于生成第一个请求和响应。- Extract grep item - Select an extract grep item. This is used to extract an interesting part of the previous response, which is then used to derive further payloads. For instructions on how to define an extract grep item, see Burp Intruder attack settings.
Extract grep 项目 - 选择提取 grep 项目。这用于提取上一个响应的有趣部分,然后用于派生进一步的有效负载。有关如何定义 extract grep 项目的说明,请参阅Burp Intruder 攻击设置。- Stop if duplicate payload found - Stop the attack when the same payload is derived twice in succession. This normally indicates that the exercise is complete.
如果找到重复的负载,则停止 - 当连续两次派生相同的负载时,停止攻击。这通常表示练习已完成。Note 注意
Attacks using the recursive grep payload type must use a resource pool with a max concurrent request of 1. For more information on resource pools, see Intruder resource pools.
使用递归 grep 有效负载类型的攻击必须使用最大并发请求数为 1 的资源池。有关资源池的更多信息,请参阅 Intruder 资源池。
Burp Intruder 有效载荷类型
Burp Intruder 有效载荷类型 - PortSwigger --- Burp Intruder payload types - PortSwigger