Giter VIP home page Giter VIP logo

burp-js-miner's Introduction

Burp JS Miner

This tool tries to find interesting stuff inside static files; mainly JavaScript and JSON files.

Background

While assessing a web application, it is expected to enumerate information residing inside static files such as JavaScript or JSON resources.

This tool tries to help with this "initial" recon phase, which should be followed by manual review/analysis of the reported issues.

Note: Like many other tools of the same nature, this tool is expected to produce false positives. Also, as it is meant to be used as a helper tool, but it does not replace manual review/analysis (nothing really can).

Features

Secrets / credentials (passive)

Subdomains (passive)

  • Nothing special here.

Cloud URLs (passive)

  • Support for (AWS, Azure, Google, CloudFront, Digital Ocean, Oracle, Alibaba, Firebase, Rackspace, Dream Host)

Dependency Confusion (passive but connects to NPM JS registry to verify the issue)

  • Reports a critical issue when a dependency or an organization is missing from the NPM registry.
  • Reports informational issues for identified dependencies.

JS Source Mapper (active and passive)

  • Tries to construct source code from JavaScript Source Map Files (if found).
  • Actively tries to guess the common location of the ".map" files;
  • It can also (passively) parse inline base64 JS map files.

Static files dumper (passive but requires manual invocation)

  • A one-click option to dump static files from one or multiple websites.
  • Think ctrl+A in your Burp's sitemap, then dump all static files.
  • You can use this feature to run your custom tools to find specific patterns for example.

API Endpoints Finder (passive)

  • Tries to find GET/POST/PUT/DELETE/PATCH API endpoints.

How to use this tool

  • Download from BApp Store, or download the pre-built "jar" file from "Releases" then load it normally to your Burp Suite.
  • Passive scans are invoked automatically, while active scans require manual invocation ( by right-clicking your targets) from the site map or other Burp windows.
  • No configuration needed, no extra Burp Suite tab.
    • Just install and maybe enjoy.

More information

The tool contains two main scans:

  • Passive scans, which are enabled by default (to search for inline JS map files, secrets, subdomains and cloud URLs).
  • Actively try to guess JavaScript source map files. (During the process, HTTP requests will be sent)

For the best results:

  • Ensure to navigate your target first in order for all the static files to be loaded;
  • Passive scans will trigger automatically. Ensure Burp's Sitemap is displaying your target's static files.
  • Then right-click on the target domain (example.com) from Burp Suite's site map tree, then select one of "JS Miner" scan options.
  • Sometimes you may need to allow cookies to be sent by the extension. Check the wiki for how to do that.

Motivation and contribution

As I'm using Burp Suite almost every day, my goal was to have a burp extension that searches for information inside static files. (Many good command-line tools are out there that are doing what this extension is doing)

I'm open for ideas/suggestions to help improve or optimize this tool.

Contributors; thanks to

  • Stanislav Kravchenko: For suggesting the dependency confusion feature, besides helping with testing and improving the functionality.

Build from source

git clone https://github.com/minamo7sen/burp-JS-Miner.git
cd burp-JS-Miner
gradle fatJar

Then, the jar file can be found at build/libs/burp-JS-Miner-all.jar.

Disclaimer

It is the user's responsibility to obey all applicable local, state and federal laws. The author assumes no liability and is not responsible for any misuse or damage caused by this tool.

License

This project is licensed under the terms of the Apache 2.0 open source license. Please refer to LICENSE for the full terms.

burp-js-miner's People

Contributors

fapami avatar minamo7sen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

burp-js-miner's Issues

[ENHANCEMENT] Detect UUID

Hello,
Thanks for JSMiner, very useful !

While browsing an application, I was able to detect some UUIDs that were useful but which JSMiner does not detect because the secrets regex does not seem to be adapted for a UUID.

So I think it might be interesting to add UUID detection in JSMiner? The following regex should do the job

[a-fA-F\d+]{8}-[a-fA-F\d+]{4}-4[a-fA-F\d+]{3}-[a-fA-F\d+]{4}-[a-fA-F\d+]{12}

On the other hand I don't know if it can really be counted as a secret, so I don't know if it belongs in SECRETS_REGEX.

Regards

github and gitlab tokens

Hey just to say i am loving this plugin but noticed it missed a few things that were in js that could do with being highlighted.

gitlab personal token: '\b(glpat-[0-9a-zA-Z_-]{20})(?:\b|$)'
gitlab pipeline token: '\b(glptt-[0-9a-f]{40})\b'

github personal token

- "ghp_.{36}" - "github_pat_.{82}"
github hub app token: "\b((?:ghu|ghs)_[a-zA-Z0-9]{36})\b"

Keep up the good work!

Flag on Basic auth secrets

Hey,

I have a js file with the following.

Authorization:"Basic c21lZ3NtZWdzbWVnYWRzMTIzMTMxMjMx"

any way to get it to highlight stuff like this? as it would be really handy.

File write failure on scan (Burp on Windows 10)

Version 1.15
Burp version 2022.3.8
Burp Build Number 13217
Burp Update Channel Stable
Windows 10
java.runtime.version 17.0.2+8-86

Errors produced on running a scan (lots of repeated)

[-] Unexpected OS file write was prevented.
[-] Error saving the file - saveFile IOException.
[-] Unexpected OS file write was prevented.
[-] Error saving the file - saveFile IOException.
[-] Unexpected OS file write was prevented.
[-] Error saving the file - saveFile IOException.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.