Traditional DAST scanners test endpoints in isolation — they fire a GET request, see a 403, and move on. They are architecturally incapable of detecting BOLA because BOLA requires a stateful, multi-step test:
- User A creates a resource → gets an object ID
- User B (a different account) tries to access that same object ID
- If User B succeeds, that's BOLA
APIGhost automates this entirely. It builds the cross-user chain automatically, fills every request field with schema-valid values so input validation doesn't block the test before the authorization check, and scores each finding with four independent signals to minimize false positives.
flowchart:
OpenAPI / HAR / Burp XML / Crawler
↓
Chain Builder ←── Layer 1: path parameter matching
↓ ←── Layer 2: JSON schema field matching
Value Resolution Engine (Spec → Heuristics → Live prefetch)
↓
Stateful Executor
User A: POST /orders → {orderId: 4821}
User A: GET /orders/4821 → baseline response
User B: GET /orders/4821 → attacker response ← the actual test
User A: DELETE /orders/4821 → teardown
↓
Verdict Engine (4 signals → confidence score 0.0–1.0)
↓
Report: JSON / HTML / Markdown / SARIF
pip install git+https://github.com/Arul-AGC/APIGhost.gitWindows users: double-click
run.batfor an interactive menu with no terminal knowledge required.
apighost scan https://api.example.com \
--spec openapi.json \
--token-a "UserA_JWT" \
--token-b "UserB_JWT" \
--output report.html \
--format html# Step 1: discover and map the API
apighost crawl https://api.example.com wordlists/common_endpoints.txt \
--token "UserA_JWT" \
--output spec.json
# Step 2: scan with the inferred spec
apighost scan https://api.example.com \
--spec spec.json \
--token-a "UserA_JWT" \
--token-b "UserB_JWT"apighost scan https://api.example.com --spec openapi.json \
--token-a "..." --token-b "..." \
--dry-run# Exit code: 0 = secure, 1 = BOLA found, 2 = error
apighost scan $API_URL --spec spec.json \
--token-a $TOKEN_A --token-b $TOKEN_B \
--output results.sarif --format sarif| Mode | Flag | Example |
|---|---|---|
| Bearer token (default) | --auth-mode bearer |
Authorization: Bearer <token> |
| API key header | --auth-mode api_key --auth-header X-API-Key |
X-API-Key: <token> |
| Cookie | --auth-mode cookie --auth-header session |
Cookie: session=<token> |
| HTTP Basic | --auth-mode basic |
Authorization: Basic <base64> |
| Custom header | --auth-mode custom --auth-header X-Auth-Token |
X-Auth-Token: <token> |
Token refresh for long scans:
apighost scan ... --refresh-cmd "python get_new_token.py"| OWASP API Top 10 (2023) | Supported |
|---|---|
| API1: Broken Object Level Authorization (BOLA/IDOR) | ✅ READ, UPDATE, DELETE chains |
| API3: Broken Object Property Level Authorization (Mass Assignment) | ✅ |
| API3: Excessive Data Exposure | ✅ |
| API5: Broken Function Level Authorization (BFLA) | ✅ |
| API4: Unrestricted Resource Consumption (rate limiting) | ✅ bypass testing |
| API8: Security Misconfiguration (injection) | ✅ SSTI / SQLi fuzzing |
APIGhost generates four report formats from the same scan:
--format json # Machine-readable, CI/CD friendly
--format html # Self-contained, browser-viewable
--format md # Markdown (for GitHub issues or wikis)
--format sarif # SARIF 2.1.0 (GitHub Code Scanning, VS Code)To reproduce the evaluation results from our ISSTA 2027 tool paper:
# 1. Clone this repo
git clone https://github.com/Arul-AGC/APIGhost.git
cd APIGhost
# 2. Spin up the three intentionally vulnerable testbeds
docker compose -f testbed/docker-compose.yml up -d
# 3. Wait ~30s for services, then run the evaluation
python testbed/run_evaluation.py
# 4. Run statistical significance tests
python stats/significance_tests.pyAll raw per-chain detection logs are in testbed/results/.
Expected runtime: under 30 minutes on an 8-core / 16 GB machine.
- Architecture & Engine Details
- Vulnerability Coverage & Bypass Techniques
- Contributing Guidelines
- Changelog
APIGhost is intended for authorized security testing only.
Always obtain explicit written permission from the target system's owner before scanning.
The authors are not responsible for misuse.
MIT — see LICENSE.
If you use APIGhost in academic work, please cite:
@software{apighost2026,
author = {Arul Guru Chandiran P R, and Arun A, and Kapil M, and Kishore R},
title = {{APIGhost}: Automated BOLA Detection via Dual-Layer Cross-User Chain Resolution},
year = {2026},
url = {https://github.com/Arul-AGC/APIGhost},
version = {0.1.0}
}