RegexFinder is a BurpSuitePro extension to passively scan responses for occurrence of regular expression patterns. Vulnerabilities or additional information about application can be found based on patterns. Regular expressions can be used to detect patterns of:
- error messages
- software version
- reflected values
- Javascript functions (like postMessage or document.write)
- API keys
- information disclosures
The tester adds and controls list of patterns, which are used by the extension. Each pattern has category and description. If extension found pattern in HTTP response, it adds an issue. Issue name is category assigned by the tester. Issue description contains details about the pattern and description assigned by the tester. List of patterns can be uploaded as tab-delimited file (.tsv, .tab) file. It can also be filled manually by adding / removing values. Example tab-delimited file included here.
I would summarize it as simplified, extended and adapted to the current version of Burp Suite extension originally created by August Detlefsen.
- Download the RegexFinder.jar file.
- In Burp Suite open Extender tab.
- In Extensions tab, click Add button.
- Choose downloaded jar file -> Next.
- Check installation for no error messages.
- On RegexFinder tab load tsv file containing list of patterns.
- In example the following pattern
AIza[0-9A-Za-z-_]{35}
. That pattern matches Google API key. - When you look through the pages, extension is going to add an issue if there is a match.
- You can then verify found Google API key using gmapsapiscanner.
Good starting point is original list used for Error Message Checks located here.
Good starting point is original list used for Software Version Checks located here.
Extension Reflection Tracer uses the following pattern tr4c3[a-z0-9]{8}
. You can create any value which can be distinguished using regular expression and add it to the file with list of patterns.
Good starting point are the following repos:
How these API keys can be used:
- Open new project
- In
Project Structure
, sectionModules
- add dependency for BurpSuitePro jar. - In
Project Structure
, sectionArtifacts
- add a new artifact which produces jar. - Copy src to src folder.
- Add new
Add Configuration Run
. Setup it asApplication
andMain class
to burp.StartBurp. - Play button will start BurpSuitePro.
Run Build
> Build Artifacts...
- The passive scan of HTTP responses based on user-defined list of rules.
- Rule contains: name, description and pattern.
- Extension creates an issue based on rule information.
- Use of BurpSuite built-in mechanism - function
doPassiveScan
. - Configuration of extensions through built-in BurpSuite mechanism (i.e. passive scan of HTTP responses from Repeater is possible through configuration of live task).
- Minimalistic.
Special thanks for the following projects and their creators for inspiration:
Extension borrows a good piece of code from Error Message Checks and Burp Suite Utils.