{"id":13762817,"url":"https://github.com/0xacb/recollapse","last_synced_at":"2025-05-10T15:31:55.123Z","repository":{"id":63587272,"uuid":"565317054","full_name":"0xacb/recollapse","owner":"0xacb","description":"REcollapse is a helper tool for black-box regex fuzzing to bypass validations and discover normalizations in web applications","archived":false,"fork":false,"pushed_at":"2025-04-20T23:28:41.000Z","size":731,"stargazers_count":1051,"open_issues_count":1,"forks_count":117,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-04-21T00:29:24.829Z","etag":null,"topics":["fuzzing","hacking-tools","normalization","regex","waf-bypass"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xacb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-11-13T02:03:37.000Z","updated_at":"2025-04-20T23:28:45.000Z","dependencies_parsed_at":"2025-04-21T00:37:22.192Z","dependency_job_id":null,"html_url":"https://github.com/0xacb/recollapse","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xacb%2Frecollapse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xacb%2Frecollapse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xacb%2Frecollapse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xacb%2Frecollapse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xacb","download_url":"https://codeload.github.com/0xacb/recollapse/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253436601,"owners_count":21908368,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fuzzing","hacking-tools","normalization","regex","waf-bypass"],"created_at":"2024-08-03T14:00:58.383Z","updated_at":"2025-05-10T15:31:55.106Z","avatar_url":"https://github.com/0xacb.png","language":"Python","funding_links":[],"categories":["Weapons","hacking-tools"],"sub_categories":["Tools"],"readme":"# REcollapse\n\nREcollapse is a helper tool for black-box regex fuzzing to bypass validations and discover normalizations in web applications.\n\nIt can also be helpful to bypass WAFs and weak vulnerability mitigations. For more information, take a look at the [REcollapse blog post](https://0xacb.com/2022/11/21/recollapse/).\n\nThe goal of this tool is to generate payloads for testing. Actual fuzzing shall be done with other tools like [Burp](https://portswigger.net/burp) (intruder), [Caido](https://caido.io) (automate), [ffuf](https://github.com/ffuf/ffuf), or similar.\n\n---------------\n\n### Installation\n\n**Requirements**: Python 3\n\n`pip3 install --user --upgrade --break-system-packages -r requirements.txt` or `./install.sh`\n\n**Docker**\n\n`docker build -t recollapse .` or `docker pull 0xacb/recollapse`\n\n---------------\n\n### Usage\n```\n$ recollapse -h\nusage: recollapse [-h] [-p POSITIONS] [-e {1,2,3,4}] [-r RANGE] [-s SIZE] [-f FILE] [-an] [-mn MAXNORM] [-nt] [--version] [input]\n\nREcollapse is a helper tool for black-box regex fuzzing to bypass validations and discover normalizations in web applications\n\npositional arguments:\n  input                 original input\n\noptions:\n  -h, --help            show this help message and exit\n  -p POSITIONS, --positions POSITIONS\n                        pivot position modes. Example: 1,2,3,4,5 (default). 1: starting, 2: separator, 3: normalization, 4: termination, 5: regex metacharacters\n  -e {1,2,3,4}, --encoding {1,2,3,4}\n                        1: URL-encoded format (default), 2: Unicode format, 3: Raw format, 4: Double URL-encoded format\n  -r RANGE, --range RANGE\n                        range of bytes for fuzzing. Example: 0,0xff (default)\n  -s SIZE, --size SIZE  number of fuzzing bytes (default: 1)\n  -f FILE, --file FILE  read input from file\n  -an, --alphanum       include alphanumeric bytes in fuzzing range\n  -mn MAXNORM, --maxnorm MAXNORM\n                        maximum number of normalizations (default: 3)\n  -nt, --normtable      print normalization table\n  --version             show recollapse version\n```\n\n---------------\n\n### Detailed options explanation\n\nLet's consider `this_is.an_example` as the input.\n\n**Positions**\n\n1. Fuzz the beginning of the input: `$this_is.an_example`\n2. Fuzz the before and after special characters: `this$_$is$.$an$_$example`\n3. Fuzz normalization positions: replace all possible bytes according to the [normalization table](https://0xacb.com/normalization_table)\n4. Fuzz the end of the input: `this_is.an_example$`\n5. Fuzz regex metacharacters: replace all possible regex metacharacters: `.^$*+-?()[]{}\\|`\n\n**Encoding**\n\n1. URL-encoded format to be used with `application/x-www-form-urlencoded` or query/body parameters: `%22this_is.an_example`\n2. Unicode format to be used with `application/json`: `\\u0022this_is.an_example`\n3. Raw format to be used with `multipart/form-data`: `\"this_is.an_example`\n4. Double URL-encoded format\n\n**Range**\n\nSpecify a range of bytes for fuzzing: `-r 1-127`. This will exclude alphanumeric characters unless the `-an` option is provided.\n\n**Size**\n\nSpecify the size of fuzzing for positions `1`, `2` and `4`. The default approach is to fuzz all possible values for one byte. Increasing the size will consume more resources and generate many more inputs, but it can lead to finding new bypasses.\n\n**File**\n\nInput can be provided as a positional argument, stdin, or a file through the `-f` option.\n\n**Alphanumeric**\n\nBy default, alphanumeric characters will be excluded from output generation, which is usually not interesting in terms of responses. You can allow this with the `-an` option.\n\n**Maximum number or normalizations**\n\nNot all normalization libraries have the same behavior. By default, three possibilities for normalizations are generated for each input index, which is usually enough. Use the `-mn` option to go further.\n\n**Normalization table**\n\nUse the `-nt` option to show the normalization table.\n\n---------------\n\n### Examples\n\n```bash\n$ recollapse -e 1 -p 1,2,4 -r 10-11 https://legit.example.com\n%0ahttps://legit.example.com\n%0bhttps://legit.example.com\nhttps%0a://legit.example.com\nhttps%0b://legit.example.com\n...\n\n$ echo \"a@b.com\" | recollapse \n%00a@b.com\n%01a@b.com\n...\n\n$ echo \"\u003csvg/onload=alert(1)\u003e\" | recollapse | ffuf -w - -u \"https://example.com/?param=FUZZ\" -mc 200,403,500\n```\n\n---------------\n\n### Resources\n\nThis technique has been presented on [BSidesLisbon 2022](https://bsideslisbon.org/)\n\n**Blog post**: https://0xacb.com/2022/11/21/recollapse/\n\n**Slides**:\n\n- [nahamcon_2022_eu_till_recollapse.pdf](https://github.com/0xacb/recollapse/blob/main/slides/nahamcon_2022_eu_till_recollapse.pdf)\n- [bsideslisbon_2022_till_recollapse.pdf](https://github.com/0xacb/recollapse/blob/main/slides/bsideslisbon_2022_till_recollapse.pdf)\n\n**Videos**:\n\n- [NahamCon 2022 EU](https://www.youtube.com/watch?v=1eLTMKWciic)\n- [BSidesLisbon 2022](https://www.youtube.com/watch?v=nb91qhj5cOE)\n\n**Normalization table**: https://0xacb.com/normalization_table\n\n---------------\n\n**Thanks**\n\n- [@regala_](https://twitter.com/regala_)\n- [@0xz3z4d45](https://twitter.com/0xz3z4d45)\n- [@jllis](https://twitter.com/jllis)\n- [@samwcyo](https://twitter.com/samwcyo)\n- [@yassineaboukir](https://twitter.com/yassineaboukir)\n- [@0xteknogeek](https://twitter.com/0xteknogeek)\n- [@vgpinho](https://github.com/vgpinho)\n- **BBAC**\n\nand\n\n- [@ethiack](https://twitter.com/ethiack) team\n- [@0xdisturbance](https://twitter.com/0xdisturbance) team\n- [@hacker0x01](https://twitter.com/hacker0x01) team\n\n---------------\n\n### ⚠ Legal Disclaimer ⚠\n\nThis project is made for educational and ethical testing purposes only. Usage of this tool for attacking targets without prior mutual consent is illegal. Developers assume no liability and are not responsible for any misuse or damage caused by this tool.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xacb%2Frecollapse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xacb%2Frecollapse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xacb%2Frecollapse/lists"}