REcollapse:一款功能强大的黑盒正则式模糊化辅助工具

2023-06-15
1102

关于REcollapse

REcollapse是一款功能强大的黑盒正则式模糊化辅助工具,该工具可以帮助广大研究人员绕过验证并发现Web应用程序中的常规安全问题。

除此之外,该工具还可以帮助绕过Web应用防火墙和一些弱漏洞缓解方案。

该工具的主要目标是为了生成针对渗透测试的Payload,实际的渗透测试任务应该使用其他类似Burpffuf等工具来实现。

工具安装

由于该工具基于Python 3开发,因此我们首先要在本地设备上安装并配置好Python 3环境。

接下来,广大研究人员可以使用下列命令将该项目源码克隆至本地:

git clone https://github.com/0xacb/recollapse.git

接下来,切换到项目目录中,使用pip3命令和项目提供的requirements.txt文件安装该工具所需的其他依赖组件:

pip3 install --user --upgrade -r requirements.txt

依赖组件安装完成后,执行安装脚本即可:

./install.sh

Docker安装

docker pull 0xacb/recollapse
docker build -t recollapse .

工具使用

$ recollapse -h

usage: recollapse [-h] [-p POSITIONS] [-e {1,2,3}] [-r RANGE] [-s SIZE] [-f FILE]

                  [-an] [-mn MAXNORM] [-nt]

                  [input]

 

REcollapse is a helper tool for black-box regex fuzzing to bypass validations and

discover normalizations in web applications

 

positional arguments:

  input                 原始输入

 

options:

  -h, --help            显示工具帮助信息和退出

  -p POSITIONS, --positions POSITIONS

                        重要位置模式,例如1,2,3,4,默认为1

  -e {1,2,3}, --encoding {1,2,3}

                        1: URL编码格式(默认), 2: Unicode格式, 3: 原始格式

  -r RANGE, --range RANGE

                        模糊化处理的字节范围,例如0, 0xff(默认)

  -s SIZE, --size SIZE    模糊处理的字节数量,默认为1

  -f FILE, --file FILE      从文件读取输入

  -an, --alphanum       在模糊范围中引入含有数字和字母的字节数据

  -mn MAXNORM, --maxnorm MAXNORM

                        合规化最大数量,默认为3

  -nt, --normtable      打印规范化表

工具输出样例

$ recollapse -e 1 -p 1,2,4 -r 10-11 https://legit.example.com

%0ahttps://legit.example.com

%0bhttps://legit.example.com

https%0a://legit.example.com

https%0b://legit.example.com

https:%0a//legit.example.com

https:%0b//legit.example.com

https:/%0a/legit.example.com

https:/%0b/legit.example.com

https://%0alegit.example.com

https://%0blegit.example.com

https://legit%0a.example.com

https://legit%0b.example.com

https://legit.%0aexample.com

https://legit.%0bexample.com

https://legit.example%0a.com

https://legit.example%0b.com

https://legit.example.%0acom

https://legit.example.%0bcom

https://legit.example.com%0a

https://legit.example.com%0b

许可证协议

本项目的开发与发布遵循MIT开源许可证协议。

项目地址

REcollapse:【GitHub传送门

参考资料

https://0xacb.com/2022/11/21/recollapse/

https://portswigger.net/burp

https://github.com/ffuf/ffuf

https://bsideslisbon.org/

https://github.com/0xacb/recollapse/blob/main/slides/nahamcon_2022_eu_till_recollapse.pdf

https://github.com/0xacb/recollapse/blob/main/slides/bsideslisbon_2022_till_recollapse.pdf

转载时必须以链接形式注明原始出处及本声明

扫描关注公众号