<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->
<!-- NERF is a trademark of defconxt. -->
# CVE Exploit Chain Analysis — API Reference

## NVD API v2.0

```bash
# Get CVE by ID
curl -s "https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2024-6387" \
  -H "apiKey: $NVD_API_KEY" | jq '.vulnerabilities[0].cve'

# Search by CWE
curl -s "https://services.nvd.nist.gov/rest/json/cves/2.0?cweId=CWE-918" \
  -H "apiKey: $NVD_API_KEY" | jq '.vulnerabilities[].cve.id'

# Search by keyword
curl -s "https://services.nvd.nist.gov/rest/json/cves/2.0?keywordSearch=ssrf" \
  -H "apiKey: $NVD_API_KEY"

# Search by date range
curl -s "https://services.nvd.nist.gov/rest/json/cves/2.0?pubStartDate=2026-01-01T00:00:00.000&pubEndDate=2026-03-17T00:00:00.000" \
  -H "apiKey: $NVD_API_KEY"
```

## Exploit-DB / SearchSploit

```bash
# Search for exploits by CVE
searchsploit "CVE-2024-6387"
searchsploit --json "openssh" | jq '.RESULTS_EXPLOIT[]'

# Download exploit
searchsploit -m exploits/linux/remote/51234.py
```

## GitHub Advisory Database

```bash
# Search GitHub for PoCs
curl -s "https://api.github.com/search/repositories?q=CVE-2024-6387+poc&sort=stars" | \
  jq '.items[:5] | .[] | {name: .full_name, stars: .stargazers_count}'

# GitHub Security Advisories
curl -s "https://api.github.com/advisories?cve_id=CVE-2024-6387" \
  -H "Accept: application/vnd.github+json"
```

## Chain Analysis Reference

| CWE | Chain Role | Commonly Chains With |
|-----|-----------|---------------------|
| CWE-918 (SSRF) | Initial Access | CWE-284, CWE-522 |
| CWE-89 (SQLi) | Initial Access | CWE-78, CWE-434 |
| CWE-287 (Auth Bypass) | Initial Access | CWE-269, CWE-862 |
| CWE-200 (Info Disclosure) | Enabler | CWE-522, CWE-287 |
| CWE-269 (Privilege Escalation) | Impact | Terminal step |
| CWE-78 (OS Command Injection) | Impact | Terminal step |
