JavaScript 分析器 – Burp Suite 扩展程序
JavaScript Analyzer – Burp Suite Extension

原始链接: https://github.com/jenish-sojitra/JSAnalyzer

## JS 分析器:Burp Suite 的 JavaScript 静态分析工具 JS 分析器是一款为 Burp Suite 设计的 JavaScript 静态分析扩展,注重准确性和最大程度地减少误报。它可以自动从 JavaScript 代码中提取有价值的信息,包括 **API 端点**、**URL**(包括云存储链接)、**密钥**(适用于 AWS、Stripe、GitHub 等的 API 密钥、令牌)和 **电子邮件地址**。 该工具还可以识别对敏感 **文件**(.sql、.env、.pdf 等)的引用,并采用 **智能过滤** 来消除 XML 命名空间和模块导入等常见元素产生的干扰。 发现的结果会清晰地溯源到原始 **JS 文件**。 **主要特性:** * **实时搜索和过滤** * **结果复制/JSON 导出** * **独立 Jython JAR**,提供灵活性 * **API 集成**,可在其他 Python 项目中使用。 JS 分析器通过快速发现隐藏在 JavaScript 应用程序中的潜在敏感数据,简化漏洞评估。 欢迎贡献和改进!

黑客新闻 新 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 JavaScript 分析器 – Burp Suite 扩展 (github.com/jenish-sojitra) 20 分,by handfuloflight 1 天前 | 隐藏 | 过去 | 收藏 | 讨论 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

A powerful Burp Suite extension for JavaScript static analysis. Extracts API endpoints, URLs, secrets, and email addresses from JavaScript files with intelligent noise filtering. The goal is reduce noise as much as possible to ensure the accuracy

Burp Suite Python License

  • Endpoint Detection - Finds API paths, REST endpoints, OAuth URLs, admin routes
  • URL Extraction - Extracts full URLs including cloud storage (AWS S3, Azure, GCP)
  • Secret Scanning - Detects API keys, tokens, credentials (AWS, Stripe, GitHub, Slack, JWT, etc.)
  • Email Extraction - Finds email addresses in JS code
  • File Detection - Detects references to sensitive files (.sql, .csv, .bak, .env, .pdf, etc.)
  • Smart Filtering - Removes noise from XML namespaces, module imports, build artifacts
  • Source Tracking - Shows which JS file each finding came from
  • Live Search - Filter results in real-time
  • Copy Function - Copy individual or all findings to clipboard
  • JSON Export - Export all findings to JSON file
  1. Download Jython standalone JAR
  2. In Burp Suite: Extensions > Extensions-Settings > Python Environment
  3. Set the Jython JAR path
  4. Extensions > Installed > Add
  5. Select Python and browse to js_analyzer.py
  1. Browse websites with your browser proxied through Burp Suite
  2. Right-click on any raw(s) containing JS response in (either of following tabs):
    • Proxy > HTTP history
    • Target > Site map
    • Repeater
  3. Select "Analyze JS with JS Analyzer"
  4. Check the JS Analyzer tab for results

You can select multiple requests from HTTP history or Dashboard and send it all together to JS Analayzer.

Pattern Example
API paths /api/v1/users, /api/v2/auth
REST endpoints /rest/data, /graphql
OAuth/Auth /oauth2/token, /auth/login, /callback
Admin routes /admin, /dashboard, /internal
Well-known /.well-known/openid-configuration
Type Pattern
AWS Access Key AKIA[0-9A-Z]{16}
Google API Key AIza[0-9A-Za-z\-_]{35}
Stripe Live Key sk_live_[0-9a-zA-Z]{24,}
GitHub PAT ghp_[0-9a-zA-Z]{36}
Slack Token xox[baprs]-...
JWT eyJ...
Private Keys -----BEGIN PRIVATE KEY-----
Database URLs mongodb://, postgres://, mysql://

#Note: Feel free to fork and add more secrets detections as required.

The extension automatically filters out:

  • XML namespaces (schemas.openxmlformats.org, www.w3.org)
  • Module imports (./, ../, @angular/, etc.)
  • PDF internal paths (/Type, /Font, /Filter)
  • Excel/XML paths (xl/, docProps/, worksheets/)
  • Locale files (en.js, fr-ca.js)
  • Crypto library internals (sha.js, aes, bn.js)

Detects references to sensitive file types:

Category Extensions
Data .sql, .csv, .xlsx, .json, .xml, .yaml
Config .env, .conf, .ini, .cfg, .config
Backup .bak, .backup, .old, .orig
Certs .key, .pem, .crt, .p12, .pfx
Docs .pdf, .doc, .docx
Archives .zip, .tar, .gz
Scripts .sh, .bat, .ps1, .py

For use in your own Python projects or APIs:

from js_analyzer_engine import JSAnalyzerEngine

engine = JSAnalyzerEngine()
results = engine.analyze(javascript_content)

print(results["endpoints"])  # ['/api/v1/users', ...]
print(results["urls"])       # ['https://api.example.com', ...]
print(results["secrets"])    # [{'type': 'AWS Key', 'value': '...', 'masked': '...'}, ...]
print(results["emails"])     # ['[email protected]', ...]
from flask import Flask, request, jsonify
from js_analyzer_engine import JSAnalyzerEngine

app = Flask(__name__)
engine = JSAnalyzerEngine()

@app.route('/analyze', methods=['POST'])
def analyze():
    content = request.json.get('content', '')
    results = engine.analyze(content)
    return jsonify(results)

if __name__ == '__main__':
    app.run(port=5000)
JSextension/
├── js_analyzer.py          # Main Burp extension entry point
├── ui/
│   ├── __init__.py
│   └── results_panel.py    # Burp UI panel
├── README.md
└── LICENSE

Contributions are welcome! Feel free to:

  • Add new secret patterns
  • Improve noise filtering
  • Add new endpoint patterns
  • Report bugs or issues

MIT License - see LICENSE file.

Inspired by:

Jenish Sojitra (https://x.com/_jensec)

Created with ❤️ for the InfoSec and Tech community.

联系我们 contact @ memedata.com