--- name: evidence-locker description: Evidence management — Structured proof artifacts, HTTP request/response capture, screenshots, tool output storage, and evidence-to-finding linking. Use when collecting evidence, capturing proof, organizing test results, or linking evidence to findings. --- # EVIDENCE LOCKER **Every finding needs proof. Every proof needs a home.** --- ## 1. EVIDENCE TYPES ``` ┌─────────────────────────────────────────────────────────┐ │ EVIDENCE TYPES │ ├──────────────────┬──────────────────────────────────────┤ │ HTTP Evidence │ Raw requests, responses, headers │ │ Tool Output │ Nuclei, sqlmap, nmap, ffuf results │ │ Screenshots │ Visual proof of exploitation │ │ Code Snippets │ PoC scripts, exploit code │ │ Timestamps │ When evidence was collected │ │ Hashes │ Integrity verification │ └──────────────────┴──────────────────────────────────────┘ ``` --- ## 2. EVIDENCE TEMPLATE ```markdown ## Evidence: EVD-001 **ID:** EVD-001 **Type:** HTTP Request/Response **Related Finding:** FND-001 (IDOR) **Collected:** 2026-01-16 14:32:00 UTC **Integrity:** sha256:a1b2c3d4... ### Description HTTP request showing IDOR — accessing another user's profile with attacker's token. ### HTTP Request ```http GET /api/users/12345 HTTP/1.1 Host: api.example.com Authorization: Bearer eyJhbGciOiJIUzI1NiIs... Content-Type: application/json ``` ### HTTP Response ```http HTTP/1.1 200 OK Content-Type: application/json { "id": 12345, "email": "victim@example.com", "name": "John Doe", "phone": "+1-555-0123", "ssn": "123-45-6789" } ``` ### Analysis - Attacker token belongs to user ID 67890 - Response contains data for user ID 12345 - Sensitive PII exposed (email, phone, SSN) - Reproducible with different user IDs ### Reproduction Command ```bash curl -s -H "Authorization: Bearer ATTACKER_TOKEN" \ "https://api.example.com/api/users/VICTIM_ID" | jq . ``` ``` --- ## 3. EVIDENCE COLLECTION PATTERNS ### HTTP Request/Response ```bash # Capture with curl verbose curl -v -s "https://target.com/api/users/123" \ -H "Authorization: Bearer TOKEN" 2>&1 | tee evidence/EVD-XXX.txt # Capture with httpie http --print=hHbB GET "https://target.com/api/users/123" \ "Authorization: Bearer TOKEN" > evidence/EVD-XXX.txt # Capture full request with timestamps curl -v -s -w "\n--- Timing ---\nDNS: %{time_namelookup}s\nConnect: %{time_connect}s\nTLS: %{time_appconnect}s\nTotal: %{time_total}s\n" \ "https://target.com/api/users/123" > evidence/EVD-XXX.txt ``` ### Tool Output ```bash # Nuclei with JSON output nuclei -u https://target.com -t ~/nuclei-templates/ -json -o evidence/nuclei-XXX.json # sqlmap output sqlmap -u "https://target.com/?id=1" --batch --output-dir=evidence/sqlmap-XXX/ # nmap output nmap -sV -sC -oX evidence/nmap-XXX.xml -oN evidence/nmap-XXX.txt target.com # ffuf output ffuf -u https://target.com/FUZZ -w wordlist.txt -o evidence/ffuf-XXX.json -of json ``` ### Screenshots ```bash # Using playwright (if available) npx playwright screenshot "https://target.com/vuln-page" evidence/screenshot-XXX.png # Using cutycapt (if available) cutycapt --url="https://target.com/vuln-page" --out=evidence/screenshot-XXX.png # Using Firefox headless firefox --headless --screenshot=evidence/screenshot-XXX.png "https://target.com/vuln-page" ``` ### PoC Scripts ```bash # Save PoC as executable script cat > evidence/poc-XXX.py << 'EOF' #!/usr/bin/env python3 """PoC for FND-XXX: [Vuln Type] in [Endpoint]""" import requests TARGET = "https://example.com" ATTACKER_TOKEN = "eyJ..." VICTIM_ID = 12345 # Step 1: Access victim's data with attacker's token resp = requests.get( f"{TARGET}/api/users/{VICTIM_ID}", headers={"Authorization": f"Bearer {ATTACKER_TOKEN}"} ) print(f"Status: {resp.status_code}") print(f"Response: {resp.json()}") # Verify impact data = resp.json() assert data["id"] == VICTIM_ID, "IDOR confirmed — accessed different user's data" print("[+] IDOR CONFIRMED — accessed user data with wrong token") EOF chmod +x evidence/poc-XXX.py ``` --- ## 4. EVIDENCE STRUCTURE ``` evidence/ ├── EVD-001-idor-request.txt # HTTP request/response ├── EVD-001-idor-screenshot.png # Visual proof ├── EVD-002-sqli-error.txt # SQL error message ├── EVD-002-sqli-extract.txt # Data extraction output ├── EVD-003-xss-poc.html # XSS proof page ├── poc-001-idor.py # PoC script ├── poc-002-sqli.py # PoC script ├── nuclei-results.json # Scanner output ├── nmap-results.xml # Port scan └── MANIFEST.md # Evidence index ``` --- ## 5. EVIDENCE MANIFEST Track all evidence in a manifest: ```markdown ## Evidence Manifest — example.com Pentest | ID | Type | Finding | Collected | Description | |----|------|---------|-----------|-------------| | EVD-001 | HTTP | FND-001 (IDOR) | 2026-01-16 14:32 | Accessing victim's profile with attacker token | | EVD-002 | HTTP | FND-002 (SQLi) | 2026-01-16 15:45 | SQL error on /search endpoint | | EVD-003 | Tool | FND-002 (SQLi) | 2026-01-16 16:00 | sqlmap data extraction output | | EVD-004 | Screenshot | FND-003 (XSS) | 2026-01-17 09:15 | XSS alert box execution | | EVD-005 | HTTP | FND-005 (SSRF) | 2026-01-17 10:30 | Cloud metadata access | ### Integrity Hashes - EVD-001: sha256:a1b2c3d4... - EVD-002: sha256:e5f6g7h8... - EVD-003: sha256:i9j0k1l2... ``` --- ## 6. EVIDENCE-TO-FINDING LINKING Every finding must reference its evidence: ```markdown ## FINDING: IDOR in /api/users/{id} ### Evidence - **EVD-001**: HTTP request showing access to victim's data (request/response) - **EVD-002**: Screenshot of admin panel showing user data (visual proof) - **EVD-003**: PoC script `poc-001-idor.py` (reproduction) ### Evidence Chain 1. EVD-001 proves the vulnerability exists 2. EVD-002 proves the data is sensitive 3. EVD-003 proves it's reproducible → All three together = reportable finding ``` --- ## 7. EVIDENCE BEST PRACTICES ``` DO: ✓ Collect evidence BEFORE exploiting ✓ Include timestamps in all evidence ✓ Save raw HTTP requests/responses ✓ Hash evidence for integrity verification ✓ Link evidence to findings ✓ Keep evidence organized by finding ✓ Include reproduction steps ✓ Capture both request AND response DON'T: ✗ Modify evidence after collection ✗ Delete evidence (even for rejected findings) ✗ Store evidence without timestamps ✗ Report findings without evidence ✗ Mix evidence from different findings ✗ Forget to capture headers ``` --- ## 8. QUICK COMMANDS ```bash # Add text evidence /evidence add "HTTP response shows SQL error: You have an error in your SQL syntax" # Import file as evidence /evidence import evidence/captured-response.txt # List all evidence /evidence list # Link evidence to finding /evidence link EVD-001 FND-001 # Generate evidence manifest /evidence manifest ``` --- ## 9. FIXTURES AND CONTROLS — EVIDENCE MUST INCLUDE THE NEGATIVE A single exploit response is half an evidence set. Triagers close reports whose proof cannot distinguish "the control failed" from "the control was never there." For every finding, the locker should hold a matched set: | Artifact | Why it belongs in the locker | | --- | --- | | Fixture record | How the test objects were created: which controlled account owns them, what synthetic canary value they contain, creation timestamps | | Entitled control | The owner performing the same operation successfully — proves the fixture and the operation are real | | Non-entitled test | The second account (or anonymous session) performing the identical operation | | Negative control | The same operation correctly denied on a comparable protected object — proves a control exists and this path bypasses it | | Repeat | A second, independent capture of the test, ideally minutes later — proves the result is not a cache artifact or a one-off race | | Session-validity proof | Each account reaching its own expected resource at capture time — rules out "your session was expired/stale" triage | Label every artifact with the actor, the fixture, and the exchange ID at capture time. An unlabeled response body is not evidence; it is a claim. Store the canary value itself (synthetic, disposable) rather than a description of it, so the reviewer can match bytes exactly. ## 10. WORKED EXAMPLE — A COMPLETE EVIDENCE SET Finding: cross-account read of a private invoice (BOLA). ``` EVD-101 fixture.json Account A (owner) creates invoice INV-TEST-01 containing canary string CANARY-A-7741 EVD-102 control-owner.http A GETs /api/invoices/INV-TEST-01 → 200, canary present EVD-103 test-peer.http B GETs /api/invoices/INV-TEST-01 → 200, canary present ← the bug EVD-104 control-deny.http B GETs /api/invoices/INV-TEST-02 (a second A-owned invoice behind a correctly-checked route) → 403 EVD-105 repeat.http B repeats EVD-103 after 10 minutes → 200, canary present EVD-106 sessions.http A and B each GET /api/me → both sessions valid, distinct IDs ``` Six small artifacts, and the report writes itself: the policy, the fixture, the control, the bypass, the denial that proves the control exists elsewhere, and the repeat. Compare with the common failure mode — one screenshot of a 200 response — which forces the triager to guess at every row above and usually earns a request for information instead of a bounty. ## 11. FALSE-POSITIVE TRAPS IN EVIDENCE - **Screenshots as sole proof.** A screenshot shows a rendering, not a request. It hides the actor, the URL, and whether the data came from cache. Pair every screenshot with the raw exchange that produced it. - **Redacted-then-claimed.** Masking the canary or the protected field in the only capture destroys the proof. Redact real user data; never redact your own synthetic canary — it exists precisely to be shown. - **Token leakage in artifacts.** Raw captures contain your own session tokens and sometimes third-party data swept into a response. Scrub credentials before submission, note the scrub in the manifest, and keep the unscrubbed original hashed in the locker. - **Timestamps that disagree.** Client clock, server `Date` header, and tool logs in different zones make a clean reproduction look fabricated. Record UTC everywhere and note the server offset once in the manifest. - **Edited PoCs.** A PoC "cleaned up" after the run may no longer match the captured traffic. Hash the PoC as-run; edit a copy for readability and submit both. - **Evidence of a different bug.** Scanner output proving a header issue attached to an authorization finding dilutes both. One finding, one chain of artifacts, one invariant. ## 12. REPORTING CHECKLIST ``` [ ] Every finding links at least: fixture record, entitled control, non-entitled test, negative control, independent repeat [ ] Each artifact labeled with actor, fixture ID, UTC timestamp, hash [ ] Canary values synthetic, disposable, and visible in the captures [ ] Real user data minimized; own credentials scrubbed, scrub noted [ ] Manifest lists all artifacts, including evidence for rejected candidates (kept, marked rejected — never deleted) [ ] PoC as-run preserved byte-for-byte alongside any readable version [ ] Evidence chain in the report maps each artifact to the claim it proves ```