Steven5233/BLfinder
GitHub: Steven5233/BLfinder
BLFinder 是一款业务逻辑漏洞扫描引擎,专门检测自动化工具容易遗漏的价格操纵、IDOR、竞态条件等深层业务缺陷。
Stars: 1 | Forks: 0
██████╗ ██╗ ███████╗██╗███╗ ██╗██████╗ ███████╗██████╗
██╔══██╗██║ ██╔════╝██║████╗ ██║██╔══██╗██╔════╝██╔══██╗
██████╔╝██║ █████╗ ██║██╔██╗ ██║██║ ██║█████╗ ██████╔╝
██╔══██╗██║ ██╔══╝ ██║██║╚██╗██║██║ ██║██╔══╝ ██╔══██╗
██████╔╝███████╗██║ ██║██║ ╚████║██████╔╝███████╗██║ ██║
╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═════╝ ╚══════╝╚═╝ ╚═╝
### Business Logic Flaw Detection Engine — v3.1 Phase 5+
*The scanner that finds what 90% of bug bounty hunters miss.*
*Traffic import · Persistent database · Deep discovery · Live dashboard · HackerOne integration.*
[](https://python.org) [](https://termux.dev) [](LICENSE) [](https://owasp.org/API-Security) [](https://hackerone.com) [](https://github.com/Steven5233/BLfinder) [](https://github.com/Steven5233/BLfinder)
## Table of Contents
- [What is BLFinder?](#-what-is-blfinder)
- [What Sets It Apart](#-what-sets-it-apart)
- [Phase Architecture](#-phase-architecture)
- [Detection Modules — All 21](#-detection-modules--all-21)
- [Phase 5+: Deep Discovery Engine](#-phase-5-deep-discovery-engine)
- [Phase 5: Professional Operations](#-phase-5-professional-operations)
- [Installation](#-installation)
- [Quick Start](#-quick-start)
- [All CLI Flags](#-all-cli-flags)
- [Traffic Import](#-traffic-import)
- [Scan Profiles](#-scan-profiles)
- [Persistent Database](#-persistent-database)
- [HackerOne Integration](#-hackerone-integration)
- [Live Dashboard](#-live-dashboard)
- [Endpoints File Format](#-endpoints-file-format)
- [Flow Templates](#-flow-templates)
- [Evidence & Reports](#-evidence--reports)
- [Understanding Results](#-understanding-results)
- [Bug Bounty Playbook](#-bug-bounty-playbook)
- [Troubleshooting](#-troubleshooting)
- [Project Structure](#-project-structure)
- [Contributing](#-contributing)
- [About the Author](#-about-the-author)
- [Acknowledgements](#-acknowledgements)
## 🔍 What is BLFinder?
BLFinder is an **async Python security scanner** built exclusively to detect business logic vulnerabilities in REST APIs and web applications. Unlike generic scanners (Burp Suite active scan, OWASP ZAP, nikto), BLFinder focuses on flaws that require **semantic understanding of the application's business rules** — vulnerabilities that no signature-based tool can detect.
It runs natively on **Termux for Android**, so you can hunt from anywhere.
**Every finding includes:**
| Component | Detail |
|---|---|
| **EvidencePackage** | Live-captured HTTP pairs — not templates, not guesses |
| **Field-level diff** | Exactly which JSON fields changed between baseline and attack |
| **Impact assessment** | Actual PII, credentials, or financial data found in the response |
| **Confidence score** | 0–100% with reasoning and false-positive analysis |
| **Proof of Concept** | Verified `curl`, Python, Burp raw HTTP, and HTTPie |
| **HackerOne markdown** | One-click copy-paste submission with real evidence |
| **Persistent database** | Findings stored across sessions, duplicates auto-filtered |
| **Direct H1 export** | Push to HackerOne as draft reports via API |
## 🎯 What Sets It Apart
Most automated scanners test for known patterns — SQLi, XSS, path traversal. Business logic flaws require understanding **what the application is supposed to do** and testing whether it can be forced to do something else. No CVE, no signature, no SAST rule catches these.
| Vulnerability Type | Burp Active | OWASP ZAP | BLFinder |
|---|:---:|:---:|:---:|
| Price / Quantity Manipulation | ❌ | ❌ | ✅ |
| IDOR / BOLA (cross-user confirmed) | ⚠️ | ⚠️ | ✅ |
| Blind IDOR (5-oracle detection) | ❌ | ❌ | ✅ |
| Race Conditions (double-spend) | ❌ | ❌ | ✅ |
| JWT alg:none + Claim Escalation | ⚠️ | ❌ | ✅ |
| State Machine Abuse | ❌ | ❌ | ✅ |
| Mass Assignment | ⚠️ | ❌ | ✅ |
| Multi-Step Flow Attacks | ❌ | ❌ | ✅ |
| Workflow / MFA Bypass | ❌ | ❌ | ✅ |
| GraphQL Deep Scan + IDOR | ❌ | ⚠️ | ✅ |
| WebSocket Vulnerability Scan | ❌ | ❌ | ✅ |
| API Version Abuse | ❌ | ❌ | ✅ |
| Coupon Stacking / Type Confusion | ❌ | ❌ | ✅ |
| BOPLA (hidden field exposure) | ❌ | ❌ | ✅ |
| OAuth2 Vulnerability Testing | ❌ | ❌ | ✅ |
| JS AST Endpoint Extraction | ❌ | ❌ | ✅ |
| OpenAPI / Swagger Auto-Discovery | ❌ | ⚠️ | ✅ |
| Headless SPA Crawl (Playwright) | ❌ | ❌ | ✅ |
| Burp / HAR / mitmproxy Import | manual | manual | ✅ |
| Persistent Finding Database | ❌ | ❌ | ✅ |
| HackerOne API Export | ❌ | ❌ | ✅ |
| Real Evidence Capture | manual | manual | ✅ |
## 🏗️ Phase Architecture
BLFinder is structured in five cumulative phases. Each phase builds on the last — you get everything below your phase for free.
┌─────────────────────────────────────────────────────────────────────────┐
│ Phase 1 — Detection Core │
│ Multi-step flow attacks · Blind IDOR oracles · Session management │
│ OAuth2 · Timing oracle · Volatile field learning │
├─────────────────────────────────────────────────────────────────────────┤
│ Phase 2 — Evidence Engine │
│ Live HTTP capture · Field-level JSON diff · Impact scoring │
│ Burp-format raw HTTP · HackerOne-ready markdown generation │
├─────────────────────────────────────────────────────────────────────────┤
│ Phase 3 — Validation & Recon │
│ Soft-404 prevention · WAF detection · Subdomain mapping │
│ JS secret extraction · Response classification · Confidence capping │
├─────────────────────────────────────────────────────────────────────────┤
│ Phase 4 — Attack Surface Expansion │
│ Mass IDOR enumeration · GraphQL deep scan · WebSocket scanner │
│ API version abuse · Business context classifier │
├─────────────────────────────────────────────────────────────────────────┤
│ Phase 5 — Professional Operations │
│ Traffic import (Burp/HAR/mitmproxy) · Scan profiles · SQLite database │
│ Deduplication · HackerOne API export · Live TUI dashboard │
├─────────────────────────────────────────────────────────────────────────┤
│ Phase 5+ — Deep Discovery Engine ◄ NEW │
│ JS AST parsing · OpenAPI/Swagger/Postman · Smart wordlist (depth 1–5) │
│ API version permutation · Headless SPA crawl · Priority scoring │
│ Schema enrichment · Proto/gRPC extraction · Soft-404 filter │
└─────────────────────────────────────────────────────────────────────────┘
## 🧩 Detection Modules — All 21
### 🔴 Critical
| # | Module | What It Detects |
|---|--------|-----------------|
| 1 | **Price Manipulation** | Tampers price/amount/total/fee fields including deeply nested JSON. Confirms when orders are accepted at attacker-controlled prices via response field comparison. Tests 10 tamper values including `0`, `0.01`, `-1`, `null`, and `false`. |
| 2 | **Negative Quantity** | Submits negative quantities to trigger reverse charges, negative inventory, or credit abuse. Canary-tested to eliminate servers that accept any value indiscriminately. |
| 3 | **IDOR / BOLA** | Path ID swaps, body ID mutation, UUID permutation, header injection (`X-User-Id`, `X-Admin-User`), and no-auth access — all with optional cross-user confirmation via second token. Full evidence capture on every test. |
| 4 | **Blind IDOR** | 5-oracle detection (HTTP status, response size, error message, timing, cross-user similarity) for IDORs where the server returns HTTP 200 regardless. Designed for APIs with uniform success responses. |
| 5 | **Mass Assignment** | Injects privileged fields (`is_admin`, `role`, `kyc_verified`, `price_override`) and confirms reflection via baseline comparison. Also auto-discovers target-specific privilege fields from live 200 responses. Eliminates false positives from pre-set fields. |
| 6 | **State Machine Abuse** | Forces objects to privileged states (`paid`, `approved`, `completed`, `verified`) without satisfying transition conditions. Confirmed when the state appears in the response body. |
| 7 | **Race Conditions** | Fires 15 concurrent requests to detect double-spending, reward duplication, and single-use bypass. Extended indicator list covers gambling/fintech keywords: `bet`, `wager`, `stake`, `cashout`, `bonus`, `deposit`, `topup`. Re-verifies with a sequential request after burst to establish ground truth. |
| 8 | **JWT alg:none Bypass** | Tests signature bypass by replacing the algorithm with `none`. Canary-verified with a fully random invalid token to confirm the server does not accept everything. |
| 9 | **BFLA / Privilege Escalation** | Probes 12 admin and internal paths with low-privilege and no-auth tokens. Confirms actual content is returned (not a generic landing page) before reporting. |
### 🟠 High
| # | Module | What It Detects |
|---|--------|-----------------|
| 10 | **Workflow / MFA Bypass** | Skips numbered workflow steps (`step_2` → `step_5`), tests OTP/MFA token omission. Canary step (999) prevents false positives. |
| 11 | **Coupon Abuse** | Array injection and type confusion (`["CODE","CODE"]`). Confirmed by comparing extracted discount amounts before and after. |
| 12 | **BOPLA** | Hidden fields exposed via `?expand=all`, `?fields=*`, `?include_deleted=true`. Detects sensitive field names (`password`, `salary`, `ssn`, `secret`) in newly exposed keys. |
| 13 | **Time Logic Bypass** | Far-future (`2099-12-31`) and negative UNIX timestamps in body fields. Confirmed only when the response meaningfully differs from the baseline. |
| 14 | **Integer Overflow** | Extreme values (`2^31-1`, `2^63-1`, `-2^31`) that cause HTTP 500 or negative values in the response (e.g. negative balance after large deposit). |
| 15 | **Limit / Offset Abuse** | Pagination manipulation (`limit=99999`) to bulk-export records. Compares actual parsed record counts, not just byte length. |
| 16 | **BFLA (Cross-User)** | User 2 performing `DELETE`/`PUT`/`PATCH` on User 1's resources — requires a second token. Reports confirmed only when the mutating method succeeds. |
| 17 | **Soft Delete Bypass** | Accessing deleted/archived records via filter parameters. Semantic diff confirms a real change, not noise. |
### 🟡 Medium
| # | Module | What It Detects |
|---|--------|-----------------|
| 18 | **GraphQL** | Introspection enabled in production, unauthenticated data access (`users`, `me`). Tests multiple common GraphQL paths automatically. |
| 19 | **Account Enumeration** | Different error messages for valid vs invalid accounts, and a statistical timing oracle (>200ms delta triggers a low-confidence finding). |
| 20 | **HTTP Method Override** | `X-HTTP-Method-Override: DELETE` and `_method=DELETE` headers causing a different response than the plain `POST` baseline. |
| 21 | **Parameter Pollution** | Duplicate query parameters (e.g. `id=1&id=999999`) changing application behaviour via semantic diff. |
### 🔬 Phase 4: Expanded Attack Surface
Activate with dedicated flags. Run after the standard 21-module sweep.
| Module | Flag | What It Detects |
|--------|------|-----------------|
| **GraphQL Deep Scan** | `--graphql-deep` | Full schema traversal, field-level IDOR, batching abuse, alias DoS |
| **WebSocket Scanner** | `--websocket` | Auth bypass over WS, message injection, WS IDOR, race conditions |
| **API Version Abuse** | `--version-scan` | Retired `v1`/`v2` endpoints with weaker controls still accessible |
| **IDOR Mass Enumeration** | `--idor-range N` | Rapid ID-range enumeration; harvests IDs from baseline responses. Supports numeric, UUID, MongoDB ObjectID, Stripe-format, and base62 IDs |
| **Cross-Endpoint BOLA** | `--idor-cross-endpoint` | Uses IDs harvested from one endpoint to attack others in the same session |
## 🌐 Phase 5+: Deep Discovery Engine
The Deep Discovery Engine replaces the legacy regex crawler with a multi-layer pipeline that finds endpoints invisible to traditional crawlers.
Layer 1 → robots.txt · sitemap.xml (RobotsParser)
Layer 2a → JS file fetching + AST endpoint extraction (JSASTParser)
Layer 2b → OpenAPI / Swagger / Postman spec probing (OpenAPIParser)
(30+ well-known paths auto-probed + custom --openapi-path)
Layer 4a → Business-context-seeded smart wordlist (SmartWordlist)
depth 1 (~200 paths) … depth 5 (~10,000 paths)
Layer 4b → API version shadow discovery (VersionPermuter)
v1→v2→v3→internal→legacy→beta permutations
Layer 5 → URL normalisation + deduplication (normaliser)
Optional → Playwright headless SPA crawl (--use-headless)
Intercepts all XHR/fetch calls during navigation
Clicks buttons/forms with --headless-interact
### Discovery Flags
# Enable the full pipeline
--deep-discovery
# Wordlist depth (default: 2)
--wordlist-depth 3 # ~1500 paths + full sub-resource tree
# Engine-level depth
--discovery-depth 3
# Skip individual layers
--no-robots # Skip robots.txt / sitemap.xml
--no-js-ast # Skip JS AST pass
--no-openapi # Skip OpenAPI/Swagger probing
--no-version-permute # Skip version shadow discovery
--no-wordlist # Skip wordlist entirely (spec/JS/headless only)
# Extra spec paths beyond the 30+ probed automatically
--openapi-path /api/v1/openapi.json
--openapi-path /internal/swagger.yaml
# Business context tags — seeds the wordlist with domain-specific paths
--business-tags payment,order,admin,transfer
# Headless crawl (requires: pip install playwright && playwright install chromium)
--use-headless
--headless-interact # Also click buttons and submit forms
# gRPC / Protobuf
--proto-path ./protos/user_service.proto
# Save all discovered endpoints before scanning
--save-discovery ~/discovered.json
# Discovery-only — skip all attack modules
--no-scan
### Example: Deep Discovery Pipeline
# Full pipeline at depth 3 with headless crawl and business tags
python blfinder.py \
-t https://api.target.com \
-T mytoken \
--deep-discovery \
--wordlist-depth 3 \
--business-tags payment,order,subscription \
--use-headless \
--save-discovery discovered.json \
--html -o ~/results
# Discovery only — review endpoints before attacking
python blfinder.py \
-t https://api.target.com -T mytoken \
--deep-discovery --wordlist-depth 2 \
--save-discovery endpoints.json \
--no-scan
# Then scan the saved endpoints
python blfinder.py \
-t https://api.target.com -T mytoken \
-e endpoints.json \
--html --json -o ~/results
## ⚙️ Phase 5: Professional Operations
### Traffic Import
Stop writing `endpoints.json` by hand. Import real traffic directly from your proxy — this is the **most important workflow improvement** for getting real results. When you import from Burp, blfinder uses your actual session cookies, real request bodies, and real field values.
# Burp Suite XML/JSON export
python blfinder.py -t https://target.com -T token \
--import-burp burp_session.xml
# Browser HAR (Chrome DevTools → Network → Save all as HAR)
python blfinder.py -t https://target.com -T token \
--import-har session.har
# mitmproxy flows
python blfinder.py -t https://target.com -T token \
--import-mitmproxy flows.bin
# Filter to API paths and save generated endpoints file
python blfinder.py -t https://target.com -T token \
--import-burp burp_session.xml \
--import-filter "/api/" \
--import-save ~/endpoints.json
# Combine all three sources — deduplication is automatic
python blfinder.py -t https://target.com -T token \
-e known.json \
--import-burp burp.xml \
--import-har session.har \
--import-filter "/api/v"
### Scan Profiles
Eight built-in profiles tune every scanner parameter for a specific target type. **CLI flags always override profile settings.**
| Profile | Best For | Key Settings |
|---------|----------|--------------|
| `ecommerce` | Shopping carts, checkout flows | Price/coupon modules first, checkout flow, IDOR on order IDs |
| `fintech` | Banking, payment APIs | High confidence (70%), slow rate (1.5s), deep IDOR, strict validation |
| `saas` | SaaS dashboards, admin panels | Mass assignment, BFLA, GraphQL deep, tenant IDOR |
| `stealth` | WAF-protected or rate-limited targets | Very slow rate (3s), random UA rotation, minimal footprint |
| `fast` | CTFs, test environments | Zero delay, low confidence threshold, all modules enabled |
| `graphql` | GraphQL-first APIs | GraphQL deep scan, introspection, batching abuse |
| `api_only` | Pure REST APIs, no frontend | JS extraction off, subdomain recon off, API modules only |
| `thorough` | High-value targets, maximum coverage | All modules, multiple confirmation attempts, full recon |
python blfinder.py -t https://shop.target.com -T token --profile ecommerce
python blfinder.py -t https://api.bank.com -T token --profile fintech
python blfinder.py -t https://app.saas.com -T token --profile saas
**Custom profile** — create `profiles/myprofile.json`:
{
"name": "myprofile",
"settings": {
"rate_limit": 0.8,
"min_confidence": 60,
"confirm_attempts": 3,
"fuzz_depth": 3,
"run_graphql_deep": true,
"idor_range": 50,
"idor_harvest": true,
"js_secrets": true,
"deep_discovery": true,
"discovery_depth": 3
},
"flows": ["ecommerce_checkout", "funds_transfer"],
"auto_flows": true,
"priority_modules": ["price_manipulation", "idor_bola", "race_condition"],
"skip_modules": ["account_enumeration", "parameter_pollution"],
"discovery": {
"business_tags": ["payment", "order", "refund"],
"no_wordlist": false,
"max_js_files": 50
}
}
### Persistent Database
Every scan writes to a local SQLite database. Duplicates are automatically filtered across sessions.
# Tag findings with a program handle
python blfinder.py -t https://target.com -T token \
--db ~/.blfinder.db --program target_h1
# Skip endpoints already confirmed vulnerable
python blfinder.py -t https://target.com -T token \
--db ~/.blfinder.db --no-repeat
# View history across all scans
python blfinder.py --show-history --db ~/.blfinder.db
# Search past findings by keyword
python blfinder.py --search "IDOR payment" --db ~/.blfinder.db
python blfinder.py --search "race condition" --db ~/.blfinder.db --program target_h1
**Database schema:**
scans ← scan_id, target, program, config, timestamps, finding_count
findings ← id, scan_id, title, severity, confirmed, confidence, status,
endpoint, evidence, poc, program, created_at
programs ← handle, scope, notes, created_at
**Finding lifecycle:** `new` → `exported` (after H1 submission) → `closed / duplicate / informative`
### HackerOne Integration
Push findings directly to HackerOne as draft reports. Drafts are created but **not** submitted — you review and submit manually.
# Auto-export new findings immediately after scan
python blfinder.py -t https://target.com -T token \
--db ~/.blfinder.db --program target_h1 \
--export-h1 target_h1 \
--h1-token yourusername:your_api_token
# Export from database only (no new scan)
python blfinder.py \
--export-h1 target_h1 \
--h1-token yourusername:your_api_token \
--db ~/.blfinder.db \
--program target_h1
Each exported report contains: title, CVSS, CWE, OWASP reference, step-by-step reproduction, real request/response pairs, and impact statement — all sourced from the live scan evidence.
Get your API token at: [hackerone.com/settings/api_token/edit](https://hackerone.com/settings/api_token/edit). Format: `username:api_token`.
### Live Dashboard
python blfinder.py -t https://target.com -T token --dashboard
python blfinder.py -t https://target.com -T token --dashboard --force-ansi
┌─ BLFinder v3.1 ──────────────────────────────────────────────────────┐
│ Target: https://api.target.com Scan #47 │
│ Endpoints: 22/126 scanned Requests: 847 429s: 3 Elapsed: 00:06:11 │
│ Current: /api/v1/orders/455 │
├─ Live Findings ───────────────────────────────────────────────────────┤
│ [CRITICAL ✓] IDOR — Path ID 456→455 returned different resource │
│ [CRITICAL ✓] Race Condition — 8/15 concurrent requests succeeded │
│ [HIGH] BOPLA — expand=all exposes 7 hidden fields │
│ [MEDIUM] GraphQL Introspection enabled in production │
├─ Rate — api.target.com ───────────────────────────────────────────────┤
│ delay=0.38s ok=843 429s=3 (auto-backing off) │
└──────────────────────── [p] Pause [q] Quit ─────────────────────────┘
Press **`p`** to pause mid-scan (inspect a finding before continuing), **`q`** to stop cleanly.
## 📱 Installation
### Termux (Android) — Recommended
# Step 1: Install Termux from F-Droid (NOT the Play Store — it's outdated there)
# https://f-droid.org/en/packages/com.termux/
# Step 2: Install dependencies
pkg update && pkg upgrade -y
pkg install python git -y
pip install aiohttp --break-system-packages
# Step 3: Clone the repository
git clone https://github.com/Steven5233/BLfinder.git ~/BLfinder
cd ~/BLfinder
# Step 4: Verify
python blfinder.py --help
# Optional: headless crawl support (~300MB Chromium)
pip install playwright --break-system-packages
playwright install chromium
### Linux / macOS
git clone https://github.com/Steven5233/BLfinder.git
cd BLfinder
pip install aiohttp
python blfinder.py --help
# Optional: headless crawl
pip install playwright && playwright install chromium
### Requirements
| Requirement | Version |
|---|---|
| Python | 3.10+ |
| aiohttp | Latest |
| Playwright | Optional (headless crawl only) |
| RAM | ~100 MB |
| Storage | ~5 MB (+ ~300 MB for Chromium if headless) |
No other mandatory dependencies. Runs on stock Python + aiohttp.
## ⚡ Quick Start
# 1 — Basic scan, smart discovery finds endpoints automatically
python blfinder.py -t https://api.target.com
# 2 — With auth token (Bearer injected automatically)
python blfinder.py -t https://api.target.com \
-T eyJhbGciOiJIUzI1NiJ9...
# 3 — Cookie-authenticated target (e.g. 1win.com)
python blfinder.py \
-t https://target.com \
--cookie "session_token=your-token-value" \
--cookie "cf_clearance=cloudflare-value" \
--skip-unauth \
--max-endpoints 3 \
--html -o ~/results
# 4 — Full IDOR confirmation (two accounts — highest-value flag)
python blfinder.py \
-t https://api.target.com \
-T user1_token -T2 user2_token \
-e endpoints.json \
--html --json --md -o ~/results -v
# 5 — Import from Burp, use profile, save to DB
python blfinder.py \
-t https://shop.target.com \
-T user1_token -T2 user2_token \
--import-burp traffic.xml \
--profile ecommerce \
--db ~/.blfinder.db --program target_h1 \
--html --md -o ~/results
# 6 — Full Phase 5+ professional scan
python blfinder.py \
-t https://api.target.com \
-T user1_token -T2 user2_token \
--import-burp traffic.xml \
--profile thorough \
--deep-discovery --wordlist-depth 3 \
--business-tags payment,order,subscription \
--db ~/.blfinder.db --program target_h1 \
--dashboard \
--html --json --md -o ~/results
# 7 — Discovery only — review before attacking
python blfinder.py \
-t https://api.target.com -T mytoken \
--deep-discovery --wordlist-depth 2 \
--save-discovery endpoints.json \
--no-scan
Open `~/results/report.html` for a full interactive report: 7 tabs per finding including side-by-side request comparison, field-level diff, impact assessment, and a HackerOne-ready submission.
## 📖 All CLI Flags
### Core
| Flag | Default | Description |
|------|---------|-------------|
| `-t`, `--target` | required | Target base URL |
| `-T`, `--token` | — | Auth token — User 1 (primary account). Pass raw token value only, no `Bearer` prefix |
| `-T2`, `--token2` | — | Auth token — User 2 (enables cross-user IDOR confirmation) |
| `-T3`, `--token3` | — | Auth token — User 3 (privilege chain testing) |
| `-e`, `--endpoints` | — | Endpoints JSON file |
| `-H`, `--header` | — | Extra request header, repeatable: `-H "X-Api-Key: abc"` |
| `-c`, `--cookie` | — | Extra cookie, repeatable: `-c "1w_token=abc"` |
| `--proxy` | — | HTTP proxy URL: `http://127.0.0.1:8080` |
| `-r`, `--rate` | `0.3` | Base delay between requests (seconds) |
| `--timeout` | `20` | Per-request timeout (seconds) |
| `--no-discover` | off | Disable smart endpoint discovery |
| `--no-ssl-verify` | off | Disable TLS certificate verification |
| `--fuzz-depth` | `2` | Nested JSON mutation depth |
| `--min-confidence` | `40` | Drop findings below this confidence % |
| `--confirm-attempts` | `2` | Re-verification attempts per finding |
| `--no-scan` | off | Run discovery only, skip all attack modules |
| `--skip-unauth` | off | Skip unauthenticated access probes (recommended on Cloudflare-protected targets) |
| `--max-endpoints` | `5` | Max endpoints processed concurrently (lower to 2–3 on Cloudflare targets) |
### Traffic Import
| Flag | Description |
|------|-------------|
| `--import-burp FILE` | Import Burp Suite XML or JSON export |
| `--import-har FILE` | Import browser HAR file |
| `--import-mitmproxy FILE` | Import mitmproxy flows file |
| `--import-filter REGEX` | Filter imported URLs by regex, e.g. `/api/` |
| `--import-save FILE` | Save generated endpoints JSON to this path |
### Profiles & Database
| Flag | Default | Description |
|------|---------|-------------|
| `--profile NAME` | — | Load settings profile (`ecommerce`, `fintech`, `saas`, `stealth`, `fast`, `graphql`, `api_only`, `thorough`) |
| `--db PATH` | `~/.blfinder.db` | SQLite database path |
| `--no-repeat` | off | Skip endpoints already confirmed vulnerable in DB |
| `--program HANDLE` | — | Tag findings with this HackerOne programme handle |
| `--export-h1 HANDLE` | — | Export new findings to HackerOne as drafts |
| `--h1-token TOKEN` | — | HackerOne API token (`username:api_token`) |
| `--show-history` | — | Print finding history from DB and exit |
| `--search QUERY` | — | Search past findings by keyword and exit |
### Dashboard
| Flag | Description |
|------|-------------|
| `--dashboard` | Enable live TUI dashboard during scan |
| `--force-ansi` | Force ANSI output (disable curses) |
### Deep Discovery Engine
| Flag | Default | Description |
|------|---------|-------------|
| `--deep-discovery` | off | Enable full multi-layer discovery pipeline |
| `--wordlist-depth N` | `2` | Wordlist depth: `1`=~200 paths … `5`=~10,000 paths |
| `--discovery-depth N` | `2` | Inner engine depth (mirrors `--wordlist-depth`) |
| `--no-robots` | off | Skip robots.txt / sitemap.xml |
| `--no-js-ast` | off | Skip JS AST extraction |
| `--no-openapi` | off | Skip OpenAPI/Swagger/Postman probing |
| `--no-version-permute` | off | Skip API version permutation |
| `--no-wordlist` | off | Skip wordlist layer entirely |
| `--openapi-path PATH` | — | Extra spec path to probe (repeatable) |
| `--proto-path FILE` | — | Local `.proto` file for gRPC extraction (repeatable) |
| `--business-tags TAGS` | — | Comma-separated tags: `payment,order,admin` |
| `--discovery-tags TAGS` | — | Alias for `--business-tags` (engine-level) |
| `--save-discovery FILE` | — | Save discovered endpoints JSON before scanning |
| `--use-headless` | off | Enable Playwright headless browser crawl |
| `--headless-interact` | off | Click buttons/forms during headless crawl |
| `--no-deep-discovery` | off | Disable engine; fall back to legacy regex crawl |
### Recon
| Flag | Default | Description |
|------|---------|-------------|
| `--recon` | off | Enable subdomain mapping + JS extraction before scan |
| `--recon-only` | off | Run recon only, save `targets.json`, and exit |
| `--js-secrets` | off | Enable JS file secret extraction |
| `--subdomain-size N` | `50` | Subdomain wordlist size |
| `--strict-validation` | off | Reject endpoints that don't return a real API response |
### Flows & Auth
| Flag | Default | Description |
|------|---------|-------------|
| `--flow TEMPLATE` | — | Run named flow template (repeatable) |
| `--flow-file FILE` | — | Load flow definitions from JSON file |
| `--auto-flows` | off | Auto-detect app type and run relevant flows |
| `--product-id N` | `1` | Product ID for e-commerce flow templates |
| `--product-price N` | `99.99` | Product price for e-commerce flow templates |
| `--oauth-url URL` | — | OAuth2 token endpoint |
| `--oauth-id ID` | — | OAuth2 client_id |
| `--oauth-secret SECRET` | — | OAuth2 client_secret |
| `--oauth-grant TYPE` | `client_credentials` | OAuth2 grant type |
| `--oauth-user USER` | — | Username for password grant |
| `--oauth-pass PASS` | — | Password for password grant |
| `--refresh-url URL` | — | Token refresh endpoint |
| `--refresh-token TOKEN` | — | Initial refresh token value |
| `--login-url URL` | — | Re-login URL (fallback for refresh) |
| `--login-body JSON` | — | Re-login body as JSON string |
| `--blind-idor` | off | Enable 5-oracle blind IDOR scanning |
| `--samples N` | `4` | Oracle sample count per test |
### Phase 4: Attack Surface
| Flag | Default | Description |
|------|---------|-------------|
| `--idor-range N` | `0` | Enable mass IDOR enumeration up to N IDs |
| `--idor-harvest` | off | Harvest IDs from baseline responses |
| `--idor-cross-endpoint` | off | Test harvested IDs against all endpoints |
| `--idor-batch-size N` | `20` | Concurrent requests per IDOR batch |
| `--websocket` | off | Enable WebSocket scanner |
| `--ws-url URL` | — | Override WebSocket URL |
| `--ws-race-count N` | `15` | Concurrent messages for WS race tests |
| `--graphql-deep` | off | Enable full GraphQL deep scan |
| `--version-scan` | off | Enable API version abuse scan |
| `--classify` | off | Print business context attack plan and exit |
### Output
| Flag | Default | Description |
|------|---------|-------------|
| `-o`, `--output` | `.` | Output directory |
| `--html` | off | Generate HTML report |
| `--json` | off | Generate JSON report |
| `--md` | off | Generate Markdown report |
| `-v`, `--verbose` | off | Print every request in real time |
| `--no-color` | off | Disable ANSI colours (for log files / CI) |
## 📋 Endpoints File Format
Build this with `--import-burp` / `--import-har` + `--import-save`. Manual format:
[
{
"url": "/api/v1/checkout",
"method": "POST",
"body": {
"product_id": 123,
"quantity": 1,
"price": 99.99,
"coupon_code": "SAVE10"
},
"params": {}
},
{
"url": "/api/v1/orders/456",
"method": "GET",
"body": {},
"params": {}
},
{
"url": "/api/v1/payments",
"method": "POST",
"body": {
"amount": 100,
"currency": "USD",
"payment_method": "card",
"order_id": 456
},
"params": {}
},
{
"url": "/api/v1/profile",
"method": "PUT",
"body": {
"user_id": 100,
"name": "Test User",
"email": "test@example.com"
},
"params": {}
}
]
All keys are passed directly to the attack modules. Include every field the real application sends — BLFinder uses the body structure to understand which fields to mutate.
## 🔄 Flow Templates
11 pre-built multi-step flow templates. Run with `--flow [](https://python.org) [](https://termux.dev) [](LICENSE) [](https://owasp.org/API-Security) [](https://hackerone.com) [](https://github.com/Steven5233/BLfinder) [](https://github.com/Steven5233/BLfinder)
**Built for hunters. Runs on a phone. Reports with proof. Remembers everything.**
*If BLFinder found you a bounty, a ⭐ on the repo is always appreciated.*
**[⭐ Star on GitHub](https://github.com/Steven5233/BLfinder) · [🐛 Issues](https://github.com/Steven5233/BLfinder/issues) · [🍴 Fork](https://github.com/Steven5233/BLfinder/fork)**
标签:CISA项目, Web安全, 业务逻辑漏洞, 加密, 漏洞扫描器, 特征检测, 蓝队分析, 计算机取证