Repository: daffainfo/match-replace-burp Branch: main Commit: 2357f7bf89a6 Files: 4 Total size: 11.6 KB Directory structure: gitextract_plj6h5nn/ ├── CONTRIBUTING.md ├── LICENSE ├── README.md └── match-replace-burp.json ================================================ FILE CONTENTS ================================================ ================================================ FILE: CONTRIBUTING.md ================================================ ## Contributor License Agreement By contributing to this repository, you agree to abide by the terms and conditions of the [LICENSE](/LICENSE). ## How to Contribute Thank you for considering contributing to our project! We welcome contributions from the community to help improve and grow this project. Please follow the guidelines below to make the process smooth for everyone involved. ### Contribution Workflow 1. **Fork the Repository**: Start by forking this repository to your own GitHub account using the "Fork" button at the top-right corner of this page. 2. **Clone the Repository**: Clone your forked repository to your local machine using the following command, replacing `` with your GitHub username: ```shell git clone https://github.com//all-about-apikey.git 3. **Add Burpsuite Tips**: Add some burpsuite tips that aren't already in this repository ### Tips - If you don't know where to start, you can find some tips on Twitter using `match replace burp` or `match replace` keywords ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2022 Muhammad Daffa Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ # Match Replace Burp Useful Match and Replace BurpSuite Rules ## Finding hidden buttons, forms, and other UI elements Many websites contain hidden buttons, forms, and other UI elements like ```html
``` * Show Hidden UI (1) * Show Hidden UI (2) * Change disable to enable ## Changing `false` to `true` Sometimes we can get hidden features by changing from `false` to `true`. The example: * Changing role from normal user to admin * Make email verified ## Bypass WAF Bypassing WAF by adding some headers * Adding `X-Forwarded-Host: 127.0.0.1` > Create another rule but change the header to: ``` X-Forwarded-Port: 127.0.0.1 X-Forwarded-By: 127.0.0.1 X-Forwarded-Scheme: 127.0.0.1 X-Frame-Options: Allow X-Forwarded-For: 127.0.0.1 X-Client-IP: 127.0.0.1 X-Real-IP: 127.0.0.1 X-Originating-IP: 127.0.0.1 X-Remote-IP: 127.0.0.1 X-Remote-Addr: 127.0.0.1 X-Cluster-Client-IP: 127.0.0.1 True-Client-IP: 127.0.0.1 Client-IP: 127.0.0.1 Origin: null Origin: Domain.attacker.com ``` ## Finding IDOR By changing original user UUID to another UUID > Create another rule but change the `type` to "Request First Line" ## Finding XSS By adding some XSS payload into the request * Finding XSS on `User-Agent` * Finding XSS on `Referer` * Auto replace user input with XSS payload > So by just inputting the words `xss_payload` on the website it will be immediately replaced with `">` > Change the XSS payload as you want ## MISC Some random match and replace rules * Finding [CVE-2021-44228](https://github.com/advisories/GHSA-jfh8-c2jp-5v3q) > Create some another rules to look for them in headers, parameters and more. Because log4j can be found anywhere * Help companies to identify your traffic and separate them from malicious traffic by adding a custom header References: - https://twitter.com/PTestical/status/1413497660133318659 - https://twitter.com/HolyBugx/status/1355472991061213184 - https://twitter.com/intigriti/status/1192103070072741894 - https://twitter.com/payloadartist/status/1469582893772984322 - https://twitter.com/payloadartist/status/1422247377516122114 - https://twitter.com/hackerscrolls/status/1247177578269597698 > Soon will be updated again ================================================ FILE: match-replace-burp.json ================================================ { "proxy":{ "match_replace_rules":[ { "comment":"Emulate IE", "enabled":false, "is_simple_match":false, "rule_type":"request_header", "string_match":"^User-Agent.*$", "string_replace":"User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" }, { "comment":"Emulate iOS", "enabled":false, "is_simple_match":false, "rule_type":"request_header", "string_match":"^User-Agent.*$", "string_replace":"User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B176 Safari/7534.48.3" }, { "comment":"Emulate Android", "enabled":false, "is_simple_match":false, "rule_type":"request_header", "string_match":"^User-Agent.*$", "string_replace":"User-Agent: Mozilla/5.0 (Linux; U; Android 2.2; en-us; Droid Build/FRG22D) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1" }, { "comment":"Require non-cached response", "enabled":false, "is_simple_match":false, "rule_type":"request_header", "string_match":"^If-Modified-Since.*$" }, { "comment":"Require non-cached response", "enabled":false, "is_simple_match":false, "rule_type":"request_header", "string_match":"^If-None-Match.*$" }, { "comment":"Hide Referer header", "enabled":false, "is_simple_match":false, "rule_type":"request_header", "string_match":"^Referer.*$" }, { "comment":"Require non-compressed responses", "enabled":false, "is_simple_match":false, "rule_type":"request_header", "string_match":"^Accept-Encoding.*$" }, { "comment":"Ignore cookies", "enabled":false, "is_simple_match":false, "rule_type":"response_header", "string_match":"^Set-Cookie.*$" }, { "comment":"Rewrite Host header", "enabled":false, "is_simple_match":false, "rule_type":"request_header", "string_match":"^Host: foo.example.org$", "string_replace":"Host: bar.example.org" }, { "comment":"Add spoofed CORS origin", "enabled":false, "is_simple_match":true, "rule_type":"request_header", "string_replace":"Origin: foo.example.org" }, { "comment":"Remove HSTS headers", "enabled":false, "is_simple_match":false, "rule_type":"response_header", "string_match":"^Strict\\-Transport\\-Security.*$" }, { "comment":"Disable browser XSS protection", "enabled":false, "is_simple_match":true, "rule_type":"response_header", "string_replace":"X-XSS-Protection: 0" }, { "comment":"Show Hiddden UI", "enabled":true, "is_simple_match":true, "rule_type":"response_body", "string_match":"hidden", "string_replace":"hizzen" }, { "comment":"Show Hiddden UI", "enabled":true, "is_simple_match":true, "rule_type":"response_body", "string_match":"display: none", "string_replace":"display: n0ne" }, { "comment":"Change disable to enable", "enabled":true, "is_simple_match":true, "rule_type":"response_body", "string_match":"disable", "string_replace":"enable" }, { "comment":"Change from false to true", "enabled":true, "is_simple_match":true, "rule_type":"response_body", "string_match":"false", "string_replace":"true" }, { "comment":"Bypass WAF", "enabled":true, "is_simple_match":true, "rule_type":"request_header", "string_replace":"X-Forwarded-Host:: 127.0.0.1" }, { "comment":"Bypass WAF", "enabled":true, "is_simple_match":true, "rule_type":"request_header", "string_replace":"X-Forwarded-By: 127.0.0.1" }, { "comment":"Bypass WAF", "enabled":true, "is_simple_match":true, "rule_type":"request_header", "string_replace":"X-Forwarded-Scheme: 127.0.0.1" }, { "comment":"Easy replace XSS payload", "enabled":true, "is_simple_match":true, "rule_type":"request_header", "string_match":"xss_payload", "string_replace":"\">" } ] } }