Ethical Hacker Tip: JS Miner – A Powerful Burp Extension for Secret Extraction

Listen to this Post

JS Miner is a must-have Burp Suite extension for ethical hackers and penetration testers. It automates the extraction of secrets (such as API keys, tokens, and credentials) from target applications with minimal effort. Below, we’ll cover setup, configuration, and practical usage.

Prerequisites for JS Miner

To run JS Miner (and most Burp extensions), you need three dependencies:

  1. OpenJRE (Java Runtime Environment) – Required to execute Burp extensions.

– Linux: `sudo apt install openjdk-11-jre`
– Windows/macOS: Download from Java SE Development Kit

2. Jython – Enables Python-based Burp extensions.

3. JRuby – Allows Ruby-based Burp extensions.

Configuring Burp Suite for JS Miner

1. Open Burp Suite → Extender → Options.

  1. Set the paths for Jython and JRuby (.jar files).
  2. Go to the BApp Store (Extensions tab) and install JS Miner.
  3. Refresh extensions and ensure JS Miner is active.

You Should Know: Practical Usage & Commands

  • Scanning for Secrets:
  • JS Miner automatically scans HTTP traffic for:
  • API keys ("API_KEY":"...")
  • OAuth tokens ("oauth_token":"...")
  • Access tokens ("access_token":"...")
  • Example output:
    "API_KEY":"OAUTH_CLIENT"
    access_token:"access_token"
    oauth_token:"oauth_token"
    pageToken:"pageToken"
    

  • Manual Verification:

  • Use `grep` to search extracted data:
    grep -r "API_KEY" /path/to/burp/logs
    
  • Check for exposed endpoints with curl:

    curl -H "Authorization: Bearer ACCESS_TOKEN" https://api.target.com/data
    

  • Automating with Bash:

  • Extract and filter low-entropy strings:
    cat burp_log.json | jq '.secrets[] | select(.entropy < 3.5)' 
    

What Undercode Say

JS Miner significantly enhances web app testing by automating secret detection. However, always verify findings manually to avoid false positives. Combine it with:
– Linux Commands:

strings target.js | grep -E "key|token|secret"

– Windows PowerShell:

Select-String -Path ".js" -Pattern "password|token|api_key"

– Burp Macros: Automate repetitive scans via Session → Macros.

Expected Output

A structured report of exposed secrets, ready for manual validation and exploitation testing.

Relevant URLs:

References:

Reported By: Activity 7312902655784148992 – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅

Join Our Cyber World:

💬 Whatsapp | 💬 TelegramFeatured Image