rtexit-method 0.1.0 → 0.1.2
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 +9 -7
- 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/commands/install.js +0 -1
- package/tools/installer/lib/asset-manifest.js +10 -5
- package/tools/installer/lib/banner.js +14 -6
- package/tools/installer/lib/copy-assets.js +5 -2
- package/tools/installer/lib/prompts.js +1 -11
- package/tools/installer/lib/write-config.js +8 -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,710 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rt-technical-report
|
|
3
|
+
description: "Generate complete technical penetration testing report for security engineers. Includes: engagement details, methodology, findings summary table, detailed findings (one section per finding), attack chain diagrams, MITRE ATT&CK coverage, technical remediation steps, and appendices (tool output, PoC code, compliance mapping). Professional quality for client delivery."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# rt-technical-report — Technical Penetration Testing Report Generator
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
This skill produces the complete technical report artifact that is delivered to the client's security engineering team at the end of an engagement. It is the last required step before engagement close and is the primary deliverable that justifies every hour logged.
|
|
11
|
+
|
|
12
|
+
The technical report is distinct from the executive report (which is audience-targeted at C-suite). This document is written for the people who will actually fix the findings: developers, security engineers, DevOps leads, and system administrators. It must be reproducible, evidence-backed, and actionable at the command-line level.
|
|
13
|
+
|
|
14
|
+
### Where This Skill Fits in the Engagement Lifecycle
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
1. Scope Definition (rt-scope-definition)
|
|
18
|
+
2. Reconnaissance (rt-active-recon, rt-osint, rt-subdomain-enum)
|
|
19
|
+
3. Exploitation (rt-exploit-*, rt-lateral-movement)
|
|
20
|
+
4. Post-Exploitation (rt-post-exploitation, rt-credential-hunt)
|
|
21
|
+
↓
|
|
22
|
+
5. FINDINGS DOCUMENTED (rt-agent-scribe → FD per finding)
|
|
23
|
+
↓
|
|
24
|
+
6. THIS SKILL: rt-technical-report ← you are here
|
|
25
|
+
↓
|
|
26
|
+
7. Executive summary attached (rt-agent-scribe → ER)
|
|
27
|
+
8. Client delivery
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
This skill should not be run until all findings are confirmed, documented in finding MD files, and present in `findings-master.csv`. Running it early produces an incomplete report.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Prerequisites Checklist
|
|
35
|
+
|
|
36
|
+
Before generating the report, verify the following are true:
|
|
37
|
+
|
|
38
|
+
- [ ] All findings are in `_rtexit-output/docs/findings/findings-master.csv` with status `CONFIRMED`
|
|
39
|
+
- [ ] Each finding has a corresponding `F-NNN.md` file with Description, Evidence, and Reproduction Steps filled in
|
|
40
|
+
- [ ] `_rtexit-output/docs/engagement/scope.md` exists and is complete
|
|
41
|
+
- [ ] `_rtexit-output/docs/engagement/engagement-info.json` has `ref`, `client`, `start`, and `methodology` set
|
|
42
|
+
- [ ] `_rtexit-output/docs/engagement/timeline.md` has entries covering the full engagement period
|
|
43
|
+
- [ ] At least one MITRE ATT&CK technique is mapped per finding
|
|
44
|
+
- [ ] Chain of custody is logged for all critical and high severity evidence
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Step-by-Step Workflow
|
|
49
|
+
|
|
50
|
+
### Step 1 — Pull Current Finding State
|
|
51
|
+
|
|
52
|
+
Run the finding tracker to get a full picture of what will be included in the report:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
python3 {project-root}/_rtexit/scripts/finding_tracker.py stats
|
|
56
|
+
python3 {project-root}/_rtexit/scripts/finding_tracker.py list
|
|
57
|
+
python3 {project-root}/_rtexit/scripts/finding_tracker.py export --format md
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Expected output before starting:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
=== Finding Statistics ===
|
|
64
|
+
🔴 CRITICAL : 2 ██
|
|
65
|
+
🟠 HIGH : 5 █████
|
|
66
|
+
🟡 MEDIUM : 4 ████
|
|
67
|
+
🔵 LOW : 3 ███
|
|
68
|
+
⚪ INFO : 1 █
|
|
69
|
+
|
|
70
|
+
TOTAL : 15
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
If findings are missing or their CVSS/MITRE fields are empty, stop and complete those finding files first.
|
|
74
|
+
|
|
75
|
+
### Step 2 — Assemble Engagement Metadata
|
|
76
|
+
|
|
77
|
+
Read these files to populate report headers:
|
|
78
|
+
|
|
79
|
+
- `_rtexit-output/docs/engagement/engagement-info.json` — ref, client, dates, methodology, scope type
|
|
80
|
+
- `_rtexit-output/docs/engagement/scope.md` — in-scope targets and exclusions
|
|
81
|
+
- `_rtexit-output/docs/engagement/timeline.md` — engagement activity log
|
|
82
|
+
|
|
83
|
+
### Step 3 — Build the Report Structure
|
|
84
|
+
|
|
85
|
+
Compose the report in the following fixed order. Do not skip or reorder sections. Each section has specific content requirements described below.
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
1. Cover Page
|
|
89
|
+
2. Document Control
|
|
90
|
+
3. Table of Contents
|
|
91
|
+
4. Executive Summary (brief — 1 paragraph for engineers)
|
|
92
|
+
5. Engagement Details
|
|
93
|
+
6. Scope & Rules of Engagement
|
|
94
|
+
7. Methodology
|
|
95
|
+
8. Findings Summary Table
|
|
96
|
+
9. Detailed Findings (one full section per finding, CRITICAL first)
|
|
97
|
+
10. Attack Chain Diagrams
|
|
98
|
+
11. MITRE ATT&CK Coverage Matrix
|
|
99
|
+
12. Remediation Roadmap
|
|
100
|
+
13. Appendix A — Tool Output Excerpts
|
|
101
|
+
14. Appendix B — Proof-of-Concept Code
|
|
102
|
+
15. Appendix C — Compliance Mapping
|
|
103
|
+
16. Appendix D — Glossary
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Step 4 — Write Each Finding Section
|
|
107
|
+
|
|
108
|
+
For every finding in severity order (CRITICAL → HIGH → MEDIUM → LOW → INFO), produce a full section using the finding template in this skill. Do not summarize or abbreviate findings that are CRITICAL or HIGH severity.
|
|
109
|
+
|
|
110
|
+
Each finding section must include:
|
|
111
|
+
- Finding ID, title, severity badge, CVSS score and vector string
|
|
112
|
+
- One-paragraph description (what is it, why does it exist)
|
|
113
|
+
- Business impact statement (what an attacker can do, in business terms)
|
|
114
|
+
- Exact reproduction steps (copy-paste ready)
|
|
115
|
+
- Evidence block (actual command output, HTTP request/response, or screenshot reference)
|
|
116
|
+
- MITRE ATT&CK technique mapping with tactic and technique name
|
|
117
|
+
- Remediation: immediate action, short-term fix, long-term fix
|
|
118
|
+
- References (CVE if applicable, CWE, vendor advisory)
|
|
119
|
+
|
|
120
|
+
### Step 5 — Draw Attack Chain Diagrams
|
|
121
|
+
|
|
122
|
+
For any finding that was part of a multi-step attack chain (e.g., SSRF used to reach internal Redis, then credential exfiltration), draw a Mermaid diagram. Include one diagram per distinct attack path.
|
|
123
|
+
|
|
124
|
+
### Step 6 — Build MITRE ATT&CK Coverage Table
|
|
125
|
+
|
|
126
|
+
Aggregate all MITRE ATT&CK techniques from finding MD files. Group by tactic. Show which findings map to each technique.
|
|
127
|
+
|
|
128
|
+
### Step 7 — Write Remediation Roadmap
|
|
129
|
+
|
|
130
|
+
Order all remediations by risk priority (CVSS score descending). Group into three tracks: immediate (0–7 days), short-term (8–30 days), long-term (31–90 days). Include effort estimate (hours) and responsible party for each item.
|
|
131
|
+
|
|
132
|
+
### Step 8 — Populate Appendices
|
|
133
|
+
|
|
134
|
+
**Appendix A** — Copy key tool output excerpts from terminal logs in `_rtexit-output/docs/evidence/terminal-logs/`. Include only the most probative output for each finding (not full verbose logs).
|
|
135
|
+
|
|
136
|
+
**Appendix B** — Include all PoC code written during the engagement. Each PoC should have: finding reference, language, description, code block, and expected output.
|
|
137
|
+
|
|
138
|
+
**Appendix C** — Pull compliance mapping from the finding MD files. Produce a table showing which findings violate which controls across PCI-DSS, GDPR, and ISO 27001.
|
|
139
|
+
|
|
140
|
+
### Step 9 — Log Report Generation
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
python3 {project-root}/_rtexit/scripts/autodoc_engine.py log \
|
|
144
|
+
--skill rt-technical-report \
|
|
145
|
+
--phase reporting \
|
|
146
|
+
--note "Technical report generated — {finding_count} findings"
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Save the report to:
|
|
150
|
+
`_rtexit-output/docs/reports/technical-report-{engagement_ref}.md`
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Report Templates
|
|
155
|
+
|
|
156
|
+
### Cover Page
|
|
157
|
+
|
|
158
|
+
```markdown
|
|
159
|
+
---
|
|
160
|
+
CONFIDENTIAL — RESTRICTED DISTRIBUTION
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
# Penetration Testing Technical Report
|
|
164
|
+
|
|
165
|
+
**Client:** Meridian Financial Services Ltd.
|
|
166
|
+
**Engagement Reference:** MFS-RT-WEB-2026-003
|
|
167
|
+
**Report Version:** 1.0
|
|
168
|
+
**Report Date:** 2026-05-31
|
|
169
|
+
**Classification:** Confidential — For Security Team Use Only
|
|
170
|
+
**Prepared By:** Red Team Operations
|
|
171
|
+
**Operator:** Ahmed Al-Rashidi | m.hegazy@elunic.net
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
**Distribution List:**
|
|
176
|
+
- CISO: Hassan Al-Mansoori
|
|
177
|
+
- Head of Security Engineering: Dina Khalifa
|
|
178
|
+
- DevOps Lead: Tariq Yousef
|
|
179
|
+
|
|
180
|
+
**Do not forward this document outside the distribution list without written authorization.**
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Document Control
|
|
184
|
+
|
|
185
|
+
```markdown
|
|
186
|
+
## Document Control
|
|
187
|
+
|
|
188
|
+
| Version | Date | Author | Changes |
|
|
189
|
+
|---------|------------|-----------------|--------------------------------|
|
|
190
|
+
| 0.1 | 2026-05-20 | Ahmed Al-Rashidi | Initial draft — findings draft |
|
|
191
|
+
| 0.2 | 2026-05-28 | Ahmed Al-Rashidi | Evidence review complete |
|
|
192
|
+
| 1.0 | 2026-05-31 | Ahmed Al-Rashidi | Final delivery |
|
|
193
|
+
|
|
194
|
+
**Engagement Period:** 2026-05-05 to 2026-05-24 (15 business days)
|
|
195
|
+
**Testing Window:** 09:00–18:00 GST, Monday–Friday
|
|
196
|
+
**Methodology:** PTES (Penetration Testing Execution Standard)
|
|
197
|
+
**Scope Type:** Grey-box — application source code not provided; internal architecture diagrams shared
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Engagement Details Section
|
|
201
|
+
|
|
202
|
+
```markdown
|
|
203
|
+
## Engagement Details
|
|
204
|
+
|
|
205
|
+
### Objectives
|
|
206
|
+
|
|
207
|
+
This assessment was commissioned to evaluate the security posture of Meridian Financial Services' customer-facing web application (`portal.meridian-fs.com`) and its underlying API layer. The engagement simulated an external attacker with no prior credentials and an authenticated customer-level user, following a grey-box methodology.
|
|
208
|
+
|
|
209
|
+
Primary objectives:
|
|
210
|
+
1. Identify vulnerabilities that could lead to unauthorized access to customer financial data
|
|
211
|
+
2. Assess the application's resilience against OWASP Top 10 attack classes
|
|
212
|
+
3. Evaluate API endpoint authorization controls
|
|
213
|
+
4. Test session management and authentication mechanisms
|
|
214
|
+
|
|
215
|
+
### Engagement Team
|
|
216
|
+
|
|
217
|
+
| Role | Name | Areas Covered |
|
|
218
|
+
|--------------------|-------------------|----------------------------------------|
|
|
219
|
+
| Lead Operator | Ahmed Al-Rashidi | API testing, authentication, SSRF |
|
|
220
|
+
| Web Specialist | Karim Mansour | Injection, XSS, file upload |
|
|
221
|
+
| Recon Specialist | Nour Ibrahim | OSINT, subdomain enum, infrastructure |
|
|
222
|
+
|
|
223
|
+
### Testing Environment
|
|
224
|
+
|
|
225
|
+
- **Primary Target:** `https://portal.meridian-fs.com` (Production — read-only constraint applied)
|
|
226
|
+
- **API Base:** `https://api.meridian-fs.com/v2`
|
|
227
|
+
- **Admin Panel:** `https://portal.meridian-fs.com/admin` (out of scope for destructive testing)
|
|
228
|
+
- **Mobile App:** Not in scope for this engagement
|
|
229
|
+
- **Test Account Provided:** `testuser@meridian-test.com` (Customer tier, no admin rights)
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Findings Summary Table
|
|
233
|
+
|
|
234
|
+
```markdown
|
|
235
|
+
## Findings Summary
|
|
236
|
+
|
|
237
|
+
| ID | Severity | CVSS | Title | Asset | Status |
|
|
238
|
+
|-------|-----------|-------|------------------------------------------------|---------------------------------|-----------|
|
|
239
|
+
| F-001 | 🔴 CRITICAL | 9.8 | SQL Injection in Customer Search API | api.meridian-fs.com/v2/search | CONFIRMED |
|
|
240
|
+
| F-002 | 🔴 CRITICAL | 9.1 | Authentication Bypass via JWT Algorithm Confusion | portal.meridian-fs.com/login | CONFIRMED |
|
|
241
|
+
| F-003 | 🟠 HIGH | 8.6 | SSRF in Document Export Function | portal.meridian-fs.com/export | CONFIRMED |
|
|
242
|
+
| F-004 | 🟠 HIGH | 8.1 | Insecure Direct Object Reference — Account Data | api.meridian-fs.com/v2/account | CONFIRMED |
|
|
243
|
+
| F-005 | 🟠 HIGH | 7.5 | Stored XSS in Transaction Comments | portal.meridian-fs.com/txn | CONFIRMED |
|
|
244
|
+
| F-006 | 🟡 MEDIUM | 6.5 | Verbose Error Messages Exposing Stack Traces | api.meridian-fs.com | CONFIRMED |
|
|
245
|
+
| F-007 | 🟡 MEDIUM | 5.8 | Missing Rate Limiting on Login Endpoint | portal.meridian-fs.com/login | CONFIRMED |
|
|
246
|
+
| F-008 | 🔵 LOW | 3.1 | Cookies Missing Secure and HttpOnly Flags | portal.meridian-fs.com | CONFIRMED |
|
|
247
|
+
|
|
248
|
+
**Risk Summary:**
|
|
249
|
+
- Critical: 2 | High: 3 | Medium: 2 | Low: 1 | Total: 8
|
|
250
|
+
- Overall Risk Rating: **CRITICAL** — immediate remediation required before next production deployment
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Individual Finding Section Template (with example content)
|
|
254
|
+
|
|
255
|
+
```markdown
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## F-001 — SQL Injection in Customer Search API
|
|
259
|
+
|
|
260
|
+
**Severity:** 🔴 CRITICAL
|
|
261
|
+
**CVSS Score:** 9.8
|
|
262
|
+
**CVSS Vector:** `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
|
|
263
|
+
**CWE:** CWE-89 — Improper Neutralization of Special Elements used in an SQL Command
|
|
264
|
+
**CVE:** N/A (configuration-specific)
|
|
265
|
+
**MITRE ATT&CK:** T1190 — Exploit Public-Facing Application
|
|
266
|
+
**Asset:** `https://api.meridian-fs.com/v2/customers/search`
|
|
267
|
+
**Phase Discovered:** Exploitation (Day 3)
|
|
268
|
+
**Date:** 2026-05-08
|
|
269
|
+
|
|
270
|
+
### Description
|
|
271
|
+
|
|
272
|
+
The customer search API endpoint at `/v2/customers/search` passes the `q` query parameter directly into a SQL query without sanitization or parameterized queries. An unauthenticated attacker can inject arbitrary SQL to read, modify, or delete data in the underlying PostgreSQL database, which stores all customer financial records.
|
|
273
|
+
|
|
274
|
+
The vulnerability exists because the search handler concatenates user input directly into the query string:
|
|
275
|
+
|
|
276
|
+
```python
|
|
277
|
+
# Vulnerable code pattern (reconstructed from error messages)
|
|
278
|
+
query = f"SELECT * FROM customers WHERE name LIKE '%{user_input}%'"
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
### Business Impact
|
|
282
|
+
|
|
283
|
+
An unauthenticated attacker can exfiltrate the complete customer database, including names, account numbers, transaction histories, and hashed passwords. They can also modify account balances, delete records, or escalate to OS-level command execution via PostgreSQL's `COPY TO/FROM` or `pg_read_file` functions if the database user has elevated permissions.
|
|
284
|
+
|
|
285
|
+
**Worst-case scenario:** Complete breach of all 47,000 customer records, regulatory fines under GDPR Article 83 (up to 4% of global annual turnover), and mandatory customer notification within 72 hours of discovery.
|
|
286
|
+
|
|
287
|
+
### Reproduction Steps
|
|
288
|
+
|
|
289
|
+
1. Identify the search endpoint:
|
|
290
|
+
```
|
|
291
|
+
GET https://api.meridian-fs.com/v2/customers/search?q=ahmed
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
2. Confirm SQL injection with a single quote:
|
|
295
|
+
```
|
|
296
|
+
GET https://api.meridian-fs.com/v2/customers/search?q=ahmed'
|
|
297
|
+
```
|
|
298
|
+
Response: HTTP 500 with PostgreSQL error in body (evidence of unhandled exception).
|
|
299
|
+
|
|
300
|
+
3. Extract database version with UNION injection:
|
|
301
|
+
```
|
|
302
|
+
GET https://api.meridian-fs.com/v2/customers/search?q=ahmed' UNION SELECT version(),null,null,null,null--
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
4. Enumerate tables:
|
|
306
|
+
```
|
|
307
|
+
GET /v2/customers/search?q=' UNION SELECT table_name,null,null,null,null FROM information_schema.tables WHERE table_schema='public'--
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
5. Dump customer records (limited to 5 rows for PoC):
|
|
311
|
+
```
|
|
312
|
+
GET /v2/customers/search?q=' UNION SELECT id,email,account_number,balance,password_hash FROM customers LIMIT 5--
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
6. Automated extraction using sqlmap (engagement-authorized):
|
|
316
|
+
```bash
|
|
317
|
+
sqlmap -u "https://api.meridian-fs.com/v2/customers/search?q=test" \
|
|
318
|
+
--dbms=postgresql \
|
|
319
|
+
--level=3 \
|
|
320
|
+
--risk=2 \
|
|
321
|
+
--dump -T customers \
|
|
322
|
+
--batch
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
### Technical Evidence
|
|
326
|
+
|
|
327
|
+
```
|
|
328
|
+
HTTP Request:
|
|
329
|
+
GET /v2/customers/search?q=ahmed'%20UNION%20SELECT%20version(),null,null,null,null-- HTTP/1.1
|
|
330
|
+
Host: api.meridian-fs.com
|
|
331
|
+
Authorization: (none)
|
|
332
|
+
|
|
333
|
+
HTTP Response:
|
|
334
|
+
HTTP/1.1 200 OK
|
|
335
|
+
Content-Type: application/json
|
|
336
|
+
|
|
337
|
+
{
|
|
338
|
+
"results": [
|
|
339
|
+
{
|
|
340
|
+
"id": "PostgreSQL 14.7 on x86_64-pc-linux-gnu, compiled by gcc 11.3.0, 64-bit",
|
|
341
|
+
"email": null,
|
|
342
|
+
"account_number": null,
|
|
343
|
+
"balance": null,
|
|
344
|
+
"name": null
|
|
345
|
+
}
|
|
346
|
+
],
|
|
347
|
+
"count": 1
|
|
348
|
+
}
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
Screenshot reference: `_rtexit-output/docs/evidence/screenshots/F-001-sqli-version-dump.png`
|
|
352
|
+
Terminal log: `_rtexit-output/docs/evidence/terminal-logs/20260508_rt-exploit-api_*.txt`
|
|
353
|
+
|
|
354
|
+
### MITRE ATT&CK Mapping
|
|
355
|
+
|
|
356
|
+
| Tactic | Technique | ID |
|
|
357
|
+
|---------------------|------------------------------------|-------|
|
|
358
|
+
| Initial Access | Exploit Public-Facing Application | T1190 |
|
|
359
|
+
| Collection | Data from Information Repositories | T1213 |
|
|
360
|
+
| Exfiltration | Exfiltration Over C2 Channel | T1041 |
|
|
361
|
+
|
|
362
|
+
### Remediation
|
|
363
|
+
|
|
364
|
+
#### Immediate (0–7 days)
|
|
365
|
+
- Deploy a WAF rule blocking SQL metacharacters (`'`, `--`, `UNION`, `SELECT`) in the `q` parameter as a temporary control.
|
|
366
|
+
- Restrict the database user used by the API to `SELECT` only on the `customers` table. Remove any `COPY`, `pg_read_file`, or superuser privileges.
|
|
367
|
+
- Enable PostgreSQL query logging and alert on error rate spikes.
|
|
368
|
+
|
|
369
|
+
#### Short-term (8–30 days)
|
|
370
|
+
- Rewrite all database queries in the application to use parameterized queries or prepared statements:
|
|
371
|
+
```python
|
|
372
|
+
# Secure pattern
|
|
373
|
+
cursor.execute("SELECT * FROM customers WHERE name LIKE %s", (f"%{user_input}%",))
|
|
374
|
+
```
|
|
375
|
+
- Conduct a full code review of all database-touching functions using a SAST tool (e.g., Semgrep rule `python.lang.security.audit.sqli`).
|
|
376
|
+
- Implement input validation: reject inputs containing SQL keywords when used outside expected character classes.
|
|
377
|
+
|
|
378
|
+
#### Long-term (31–90 days)
|
|
379
|
+
- Adopt an ORM (SQLAlchemy, Django ORM) that abstracts raw SQL construction entirely.
|
|
380
|
+
- Add SQL injection test cases to the CI/CD pipeline using DAST (OWASP ZAP or Nuclei templates).
|
|
381
|
+
- Conduct developer training on secure query construction.
|
|
382
|
+
|
|
383
|
+
### References
|
|
384
|
+
|
|
385
|
+
- [CWE-89 — SQL Injection](https://cwe.mitre.org/data/definitions/89.html)
|
|
386
|
+
- [OWASP — SQL Injection Prevention Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.html)
|
|
387
|
+
- [MITRE ATT&CK T1190](https://attack.mitre.org/techniques/T1190/)
|
|
388
|
+
- [PostgreSQL Security Hardening](https://www.postgresql.org/docs/current/security.html)
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
---
|
|
392
|
+
|
|
393
|
+
## Attack Chain Diagram Template
|
|
394
|
+
|
|
395
|
+
Use this for multi-step attack paths. Produce one diagram per distinct chain. Use Mermaid syntax.
|
|
396
|
+
|
|
397
|
+
```markdown
|
|
398
|
+
## Attack Chain: External Attacker to Customer Data Exfiltration
|
|
399
|
+
|
|
400
|
+
The following diagram shows how findings F-001 and F-003 can be combined by an attacker starting with no credentials.
|
|
401
|
+
|
|
402
|
+
```mermaid
|
|
403
|
+
flowchart LR
|
|
404
|
+
A["External Attacker\n(No credentials)"]
|
|
405
|
+
B["F-007: No Rate Limiting\non /login\n→ Credential Stuffing"]
|
|
406
|
+
C["Low-privilege\nCustomer Session"]
|
|
407
|
+
D["F-003: SSRF via\n/export endpoint\n→ Probe internal network"]
|
|
408
|
+
E["Internal Metadata\nService 169.254.169.254\n→ AWS IAM credentials"]
|
|
409
|
+
F["F-001: SQLi via\n/v2/customers/search\n→ DB dump (unauthenticated)"]
|
|
410
|
+
G["47,000 Customer\nRecords Exfiltrated"]
|
|
411
|
+
|
|
412
|
+
A -->|"Step 1"| B
|
|
413
|
+
B -->|"Step 2"| C
|
|
414
|
+
C -->|"Step 3"| D
|
|
415
|
+
D -->|"Step 4"| E
|
|
416
|
+
A -->|"Parallel path"| F
|
|
417
|
+
F -->|"Step 5"| G
|
|
418
|
+
E -->|"Step 5 (alt)"| G
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
**Attack Chain Summary:**
|
|
422
|
+
- Path 1 (Unauthenticated): F-001 directly → full DB exfiltration. No login required.
|
|
423
|
+
- Path 2 (Authenticated): Credential stuffing (F-007) → session → SSRF (F-003) → AWS metadata → privilege escalation.
|
|
424
|
+
- Both paths converge at customer data exfiltration.
|
|
425
|
+
- Combined CVSS (chained): 9.9 (Critical)
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
---
|
|
429
|
+
|
|
430
|
+
## MITRE ATT&CK Coverage Matrix Template
|
|
431
|
+
|
|
432
|
+
```markdown
|
|
433
|
+
## MITRE ATT&CK Coverage
|
|
434
|
+
|
|
435
|
+
| Tactic | Technique | ID | Findings |
|
|
436
|
+
|---------------------|-------------------------------------------|-----------|---------------|
|
|
437
|
+
| Reconnaissance | Active Scanning: Vulnerability Scanning | T1595.002 | — |
|
|
438
|
+
| Initial Access | Exploit Public-Facing Application | T1190 | F-001, F-003 |
|
|
439
|
+
| Initial Access | Phishing: Spearphishing via Service | T1566.003 | — |
|
|
440
|
+
| Credential Access | Brute Force: Password Spraying | T1110.003 | F-007 |
|
|
441
|
+
| Defense Evasion | Exploitation for Defense Evasion | T1211 | F-002 |
|
|
442
|
+
| Collection | Data from Information Repositories | T1213 | F-001, F-004 |
|
|
443
|
+
| Lateral Movement | Exploitation of Remote Services | T1210 | F-003 |
|
|
444
|
+
| Exfiltration | Exfiltration Over Web Service | T1567 | F-001, F-004 |
|
|
445
|
+
|
|
446
|
+
**Tactics Coverage:** Initial Access, Credential Access, Collection, Exfiltration
|
|
447
|
+
**Notable Gap:** No persistence mechanisms were tested (out of scope for this engagement).
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
---
|
|
451
|
+
|
|
452
|
+
## Remediation Roadmap Template
|
|
453
|
+
|
|
454
|
+
```markdown
|
|
455
|
+
## Remediation Roadmap
|
|
456
|
+
|
|
457
|
+
Remediations are ordered by risk priority (CVSS descending). Time estimates assume a team of 2 developers with security experience.
|
|
458
|
+
|
|
459
|
+
### Track 1 — Immediate (0–7 days)
|
|
460
|
+
|
|
461
|
+
| Priority | Finding | Action | Effort | Owner |
|
|
462
|
+
|----------|---------|-----------------------------------------------------|--------|--------------|
|
|
463
|
+
| 1 | F-001 | Deploy WAF rule for SQL metacharacters | 2h | DevOps |
|
|
464
|
+
| 2 | F-001 | Revoke DB user superuser/COPY privileges | 1h | DBA |
|
|
465
|
+
| 3 | F-002 | Force `alg: RS256` in JWT library config; reject `none` and `HS256` | 1h | Backend Dev |
|
|
466
|
+
| 4 | F-003 | Block outbound HTTP from app servers to 169.254.x.x (IMDS) | 2h | DevOps |
|
|
467
|
+
| 5 | F-004 | Add server-side authorization check on all `/account/{id}` endpoints | 4h | Backend Dev |
|
|
468
|
+
|
|
469
|
+
### Track 2 — Short-term (8–30 days)
|
|
470
|
+
|
|
471
|
+
| Priority | Finding | Action | Effort | Owner |
|
|
472
|
+
|----------|---------|-----------------------------------------------------|--------|--------------|
|
|
473
|
+
| 6 | F-001 | Refactor all raw SQL queries to parameterized queries | 3 days | Backend Dev |
|
|
474
|
+
| 7 | F-005 | Implement output encoding on all user-generated content | 2 days | Frontend Dev |
|
|
475
|
+
| 8 | F-007 | Implement rate limiting: 5 attempts / 15 min / IP | 4h | Backend Dev |
|
|
476
|
+
| 9 | F-006 | Disable verbose error responses in production; log internally only | 2h | Backend Dev |
|
|
477
|
+
|
|
478
|
+
### Track 3 — Long-term (31–90 days)
|
|
479
|
+
|
|
480
|
+
| Priority | Finding | Action | Effort | Owner |
|
|
481
|
+
|----------|---------|-----------------------------------------------------|--------|--------------|
|
|
482
|
+
| 10 | F-001 | Adopt ORM for all database access | 2 weeks | Backend Dev |
|
|
483
|
+
| 11 | All | Integrate DAST (OWASP ZAP) into CI/CD pipeline | 3 days | DevOps |
|
|
484
|
+
| 12 | All | Developer security training — OWASP Top 10 focus | 1 day | All Devs |
|
|
485
|
+
| 13 | F-008 | Enforce `Secure; HttpOnly; SameSite=Strict` on all cookies | 2h | Backend Dev |
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
---
|
|
489
|
+
|
|
490
|
+
## Integration with finding_tracker.py and autodoc_engine.py
|
|
491
|
+
|
|
492
|
+
### Pulling Finding Data for the Report
|
|
493
|
+
|
|
494
|
+
```bash
|
|
495
|
+
# Get formatted findings table for insertion into report
|
|
496
|
+
python3 {project-root}/_rtexit/scripts/finding_tracker.py export --format md
|
|
497
|
+
|
|
498
|
+
# Get JSON for programmatic processing
|
|
499
|
+
python3 {project-root}/_rtexit/scripts/finding_tracker.py export --format json
|
|
500
|
+
|
|
501
|
+
# Check that no findings are in UNCONFIRMED status before final report
|
|
502
|
+
python3 {project-root}/_rtexit/scripts/finding_tracker.py list --status UNCONFIRMED
|
|
503
|
+
# Should return: "No findings found."
|
|
504
|
+
|
|
505
|
+
# Read individual finding MD files for full content
|
|
506
|
+
# Files are at: {project-root}/_rtexit-output/docs/findings/F-NNN.md
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
### Logging Report Generation Activity
|
|
510
|
+
|
|
511
|
+
```bash
|
|
512
|
+
# Log that reporting phase started
|
|
513
|
+
python3 {project-root}/_rtexit/scripts/autodoc_engine.py log \
|
|
514
|
+
--skill rt-technical-report \
|
|
515
|
+
--phase reporting \
|
|
516
|
+
--note "Technical report generation started"
|
|
517
|
+
|
|
518
|
+
# Log that draft is complete
|
|
519
|
+
python3 {project-root}/_rtexit/scripts/autodoc_engine.py log \
|
|
520
|
+
--skill rt-technical-report \
|
|
521
|
+
--phase reporting \
|
|
522
|
+
--note "Technical report draft complete — 8 findings documented"
|
|
523
|
+
|
|
524
|
+
# Log final delivery
|
|
525
|
+
python3 {project-root}/_rtexit/scripts/autodoc_engine.py log \
|
|
526
|
+
--skill rt-technical-report \
|
|
527
|
+
--phase reporting \
|
|
528
|
+
--note "Technical report v1.0 delivered to client"
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
### Adding Evidence to Chain of Custody Before Report
|
|
532
|
+
|
|
533
|
+
For every screenshot or terminal log referenced in the report, ensure it is logged:
|
|
534
|
+
|
|
535
|
+
```bash
|
|
536
|
+
python3 {project-root}/_rtexit/scripts/autodoc_engine.py custody \
|
|
537
|
+
--finding F-001 \
|
|
538
|
+
--evidence "_rtexit-output/docs/evidence/screenshots/F-001-sqli-version-dump.png" \
|
|
539
|
+
--operator "Ahmed Al-Rashidi"
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
### Output Path
|
|
543
|
+
|
|
544
|
+
Save the finished report to:
|
|
545
|
+
```
|
|
546
|
+
{project-root}/_rtexit-output/docs/reports/technical-report-{engagement.ref}.md
|
|
547
|
+
```
|
|
548
|
+
|
|
549
|
+
Example:
|
|
550
|
+
```
|
|
551
|
+
_rtexit-output/docs/reports/technical-report-MFS-RT-WEB-2026-003.md
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
---
|
|
555
|
+
|
|
556
|
+
## Compliance Mapping (Appendix C)
|
|
557
|
+
|
|
558
|
+
```markdown
|
|
559
|
+
## Appendix C — Compliance Mapping
|
|
560
|
+
|
|
561
|
+
### PCI-DSS v4.0
|
|
562
|
+
|
|
563
|
+
| Requirement | Control | Findings Violated |
|
|
564
|
+
|------------------------------------------|--------------------------------------|-------------------|
|
|
565
|
+
| 6.3.1 — Security vulnerabilities identified | Vulnerability management process | F-001, F-003 |
|
|
566
|
+
| 6.4.1 — Public-facing web app protection | WAF or code review | F-001, F-005 |
|
|
567
|
+
| 8.3.1 — Authentication factors | MFA / strong auth | F-002 |
|
|
568
|
+
| 10.2.1 — Audit logs | Log all access to CHD | F-006 |
|
|
569
|
+
|
|
570
|
+
### GDPR (Regulation EU 2016/679)
|
|
571
|
+
|
|
572
|
+
| Article | Requirement | Findings Violated |
|
|
573
|
+
|---------|-----------------------------------------|-------------------|
|
|
574
|
+
| Art. 5 | Integrity and confidentiality | F-001, F-004 |
|
|
575
|
+
| Art. 25 | Data protection by design and default | F-001, F-007 |
|
|
576
|
+
| Art. 32 | Security of processing | F-001, F-002, F-003|
|
|
577
|
+
| Art. 83 | Administrative fines (up to 4% turnover)| All critical/high |
|
|
578
|
+
|
|
579
|
+
### ISO/IEC 27001:2022
|
|
580
|
+
|
|
581
|
+
| Control | Domain | Findings Violated |
|
|
582
|
+
|---------|-----------------------------------------|-------------------|
|
|
583
|
+
| A.8.24 | Use of cryptography | F-002 |
|
|
584
|
+
| A.8.28 | Secure coding | F-001, F-005 |
|
|
585
|
+
| A.8.8 | Management of technical vulnerabilities | F-001, F-003, F-004|
|
|
586
|
+
| A.9.4.1 | Information access restriction | F-004 |
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
---
|
|
590
|
+
|
|
591
|
+
## Quality Checklist — Good Findings and Reports
|
|
592
|
+
|
|
593
|
+
### Per-Finding Quality Gates
|
|
594
|
+
|
|
595
|
+
A finding is report-ready when all of these are true:
|
|
596
|
+
|
|
597
|
+
- [ ] **Reproducible:** Reproduction steps can be followed by a junior engineer with no prior context and produce the same result
|
|
598
|
+
- [ ] **Evidence-backed:** At least one evidence block (HTTP response, command output, or screenshot) is included and referenced
|
|
599
|
+
- [ ] **CVSS is justified:** The score matches the vector string. If AV is Network, the finding must actually be exploitable remotely.
|
|
600
|
+
- [ ] **Business impact is specific:** Not "attacker could access data" — instead "attacker can read all 47,000 customer records including account numbers and password hashes"
|
|
601
|
+
- [ ] **Remediation is actionable:** Each remediation item names a specific fix, not "fix the vulnerability". Includes code examples where relevant.
|
|
602
|
+
- [ ] **MITRE mapped:** At least one tactic + technique pair is listed
|
|
603
|
+
- [ ] **No placeholders remain:** No `[INSERT]`, `[TBD]`, or `TODO` text anywhere in the finding
|
|
604
|
+
|
|
605
|
+
### Report-Level Quality Gates
|
|
606
|
+
|
|
607
|
+
- [ ] All sections are present and filled — no empty sections
|
|
608
|
+
- [ ] Finding IDs in the summary table match the IDs in the detailed sections
|
|
609
|
+
- [ ] CVSS scores in the summary table match the scores in the finding sections
|
|
610
|
+
- [ ] Attack chain diagrams cover all multi-step exploitation paths
|
|
611
|
+
- [ ] MITRE coverage table is complete and consistent with per-finding mappings
|
|
612
|
+
- [ ] Remediation roadmap covers every finding (including LOW and INFO)
|
|
613
|
+
- [ ] Compliance mapping covers the frameworks specified in `_rtexit/config.toml` (pci_dss, gdpr, iso27001 by default)
|
|
614
|
+
- [ ] Evidence files referenced in the report actually exist in `_rtexit-output/docs/evidence/`
|
|
615
|
+
- [ ] No real credentials, production data, or PII appears in the report body (use redacted forms: `passw***`, `acc-XXXX`)
|
|
616
|
+
- [ ] Chain of custody log is complete for all CRITICAL and HIGH evidence
|
|
617
|
+
- [ ] Report is version-controlled in Document Control table
|
|
618
|
+
|
|
619
|
+
---
|
|
620
|
+
|
|
621
|
+
## Example Output — Finished Report Header
|
|
622
|
+
|
|
623
|
+
The following shows what the first 50 lines of a finished, delivery-ready report look like. This is the standard to aim for.
|
|
624
|
+
|
|
625
|
+
```markdown
|
|
626
|
+
---
|
|
627
|
+
CONFIDENTIAL — RESTRICTED DISTRIBUTION
|
|
628
|
+
---
|
|
629
|
+
|
|
630
|
+
# Penetration Testing Technical Report
|
|
631
|
+
## Meridian Financial Services Ltd.
|
|
632
|
+
|
|
633
|
+
**Engagement Reference:** MFS-RT-WEB-2026-003
|
|
634
|
+
**Report Version:** 1.0 — Final
|
|
635
|
+
**Report Date:** 2026-05-31
|
|
636
|
+
**Classification:** Confidential
|
|
637
|
+
**Prepared By:** Ahmed Al-Rashidi, Red Team Operations, elunic
|
|
638
|
+
|
|
639
|
+
---
|
|
640
|
+
|
|
641
|
+
## Document Control
|
|
642
|
+
|
|
643
|
+
| Version | Date | Author | Changes |
|
|
644
|
+
|---------|------------|-----------------|---------------------------------|
|
|
645
|
+
| 0.1 | 2026-05-20 | Ahmed Al-Rashidi | Initial draft |
|
|
646
|
+
| 1.0 | 2026-05-31 | Ahmed Al-Rashidi | Final — approved for delivery |
|
|
647
|
+
|
|
648
|
+
---
|
|
649
|
+
|
|
650
|
+
## Executive Summary (Engineering Brief)
|
|
651
|
+
|
|
652
|
+
The assessment of `portal.meridian-fs.com` and `api.meridian-fs.com` identified **8 vulnerabilities**, including **2 Critical** and **3 High** severity findings. The most severe finding (F-001, CVSS 9.8) allows an unauthenticated attacker to dump the complete customer database via SQL injection with no credentials required. A second Critical finding (F-002, CVSS 9.1) allows authentication bypass for any account via JWT algorithm confusion. Together these two findings represent an unacceptable risk to production systems and require immediate remediation before the next release.
|
|
653
|
+
|
|
654
|
+
The full attack surface covered: authentication, session management, API authorization, input validation, SSRF, and client-side injection. Mobile and infrastructure were not in scope.
|
|
655
|
+
|
|
656
|
+
**Recommended immediate actions:**
|
|
657
|
+
1. Take `/v2/customers/search` offline or behind IP allowlist until F-001 is patched.
|
|
658
|
+
2. Patch JWT library to reject `alg: none` and `alg: HS256` within 24 hours (F-002).
|
|
659
|
+
3. Brief engineering team on this report within 48 hours.
|
|
660
|
+
|
|
661
|
+
---
|
|
662
|
+
|
|
663
|
+
## Findings Summary
|
|
664
|
+
|
|
665
|
+
| ID | Severity | CVSS | Title |
|
|
666
|
+
|-------|------------|------|------------------------------------------------|
|
|
667
|
+
| F-001 | 🔴 CRITICAL | 9.8 | SQL Injection in Customer Search API |
|
|
668
|
+
| F-002 | 🔴 CRITICAL | 9.1 | Authentication Bypass via JWT Algorithm Confusion |
|
|
669
|
+
| F-003 | 🟠 HIGH | 8.6 | SSRF in Document Export Function |
|
|
670
|
+
...
|
|
671
|
+
```
|
|
672
|
+
|
|
673
|
+
---
|
|
674
|
+
|
|
675
|
+
## Common Mistakes to Avoid
|
|
676
|
+
|
|
677
|
+
### Mistakes That Kill Report Quality
|
|
678
|
+
|
|
679
|
+
**1. Writing vague impact statements**
|
|
680
|
+
- Bad: "An attacker could access sensitive information."
|
|
681
|
+
- Good: "An unauthenticated attacker can extract all rows from the `customers` table, including full name, national ID number, account balance, and bcrypt-hashed password for all 47,000 registered customers."
|
|
682
|
+
|
|
683
|
+
**2. Reproduction steps that skip prerequisites**
|
|
684
|
+
- Bad: "Send a malicious request to the endpoint."
|
|
685
|
+
- Good: Include the full HTTP request, headers, parameter encoding, and the exact response that confirms exploitation.
|
|
686
|
+
|
|
687
|
+
**3. Assigning CVSS scores that do not match the vector**
|
|
688
|
+
- If you score AV:N (Network) but the vulnerability requires local access, the score is wrong. Verify each component of the vector string matches the actual conditions of exploitation.
|
|
689
|
+
|
|
690
|
+
**4. Referencing evidence that does not exist**
|
|
691
|
+
- Every screenshot path and terminal log reference must be to a file that is present in `_rtexit-output/docs/evidence/`. Verify before finalizing.
|
|
692
|
+
|
|
693
|
+
**5. Writing remediations that are not actionable**
|
|
694
|
+
- Bad: "Implement proper input validation."
|
|
695
|
+
- Good: "Replace raw SQL concatenation with parameterized queries using the `psycopg2` library. Example: `cursor.execute('SELECT * FROM customers WHERE name = %s', (user_input,))`."
|
|
696
|
+
|
|
697
|
+
**6. Missing the MITRE mapping**
|
|
698
|
+
- Every finding must have at least one MITRE ATT&CK technique. If you cannot find a match, use T1190 (Exploit Public-Facing Application) as a baseline for web vulnerabilities, but look for a more specific technique first.
|
|
699
|
+
|
|
700
|
+
**7. Including unredacted sensitive data**
|
|
701
|
+
- Do not paste real customer names, real passwords, or real account numbers into the report body. Use redacted forms or describe what the data type was (e.g., "first row returned: email ending in @meridian-fs.com, 8-digit account number, bcrypt hash beginning with `$2b$12$`").
|
|
702
|
+
|
|
703
|
+
**8. Running this skill before all findings are confirmed**
|
|
704
|
+
- Running the report before all F-NNN.md files are complete produces a skeleton report. Always run `finding_tracker.py list --status UNCONFIRMED` first and resolve any unconfirmed findings.
|
|
705
|
+
|
|
706
|
+
**9. Forgetting the attack chain section for multi-step exploits**
|
|
707
|
+
- If two or more findings can be chained (SSRF + metadata service + privilege escalation), you must draw the chain. Single-finding thinking underestimates the real risk.
|
|
708
|
+
|
|
709
|
+
**10. No version in Document Control**
|
|
710
|
+
- Every report delivered to a client must have a version number and date. Draft versions are 0.x. Final delivery is 1.0. Revisions after client feedback are 1.1, 1.2, etc.
|