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.
Files changed (224) hide show
  1. package/package.json +9 -7
  2. package/packaged-assets/.agents/skills/rt-active-recon/SKILL.md +767 -0
  3. package/packaged-assets/.agents/skills/rt-active-recon/workflow.md +68 -0
  4. package/packaged-assets/.agents/skills/rt-agent-breaker/SKILL.md +65 -0
  5. package/packaged-assets/.agents/skills/rt-agent-breaker/customize.toml +76 -0
  6. package/packaged-assets/.agents/skills/rt-agent-commander/SKILL.md +63 -0
  7. package/packaged-assets/.agents/skills/rt-agent-commander/customize.toml +67 -0
  8. package/packaged-assets/.agents/skills/rt-agent-ghost/SKILL.md +65 -0
  9. package/packaged-assets/.agents/skills/rt-agent-ghost/customize.toml +77 -0
  10. package/packaged-assets/.agents/skills/rt-agent-navigator/SKILL.md +62 -0
  11. package/packaged-assets/.agents/skills/rt-agent-navigator/customize.toml +61 -0
  12. package/packaged-assets/.agents/skills/rt-agent-phantom/SKILL.md +62 -0
  13. package/packaged-assets/.agents/skills/rt-agent-phantom/customize.toml +62 -0
  14. package/packaged-assets/.agents/skills/rt-agent-scout/SKILL.md +62 -0
  15. package/packaged-assets/.agents/skills/rt-agent-scout/customize.toml +61 -0
  16. package/packaged-assets/.agents/skills/rt-agent-scribe/SKILL.md +65 -0
  17. package/packaged-assets/.agents/skills/rt-agent-scribe/customize.toml +77 -0
  18. package/packaged-assets/.agents/skills/rt-attack-chain-builder/SKILL.md +476 -0
  19. package/packaged-assets/.agents/skills/rt-attack-chain-builder/workflow.md +68 -0
  20. package/packaged-assets/.agents/skills/rt-attack-surface-map/SKILL.md +1209 -0
  21. package/packaged-assets/.agents/skills/rt-attack-surface-map/template.md +62 -0
  22. package/packaged-assets/.agents/skills/rt-autodoc/SKILL.md +258 -0
  23. package/packaged-assets/.agents/skills/rt-c2-operations/SKILL.md +1072 -0
  24. package/packaged-assets/.agents/skills/rt-c2-operations/workflow.md +68 -0
  25. package/packaged-assets/.agents/skills/rt-compliance-mapper/SKILL.md +773 -0
  26. package/packaged-assets/.agents/skills/rt-create-sead/SKILL.md +74 -0
  27. package/packaged-assets/.agents/skills/rt-create-sead/template.md +89 -0
  28. package/packaged-assets/.agents/skills/rt-create-sead/workflow.md +68 -0
  29. package/packaged-assets/.agents/skills/rt-credential-access/SKILL.md +756 -0
  30. package/packaged-assets/.agents/skills/rt-credential-hunt/SKILL.md +856 -0
  31. package/packaged-assets/.agents/skills/rt-credential-hunt/workflow.md +68 -0
  32. package/packaged-assets/.agents/skills/rt-cvss-calculator/SKILL.md +542 -0
  33. package/packaged-assets/.agents/skills/rt-cvss-calculator/cvss4-matrix.csv +20 -0
  34. package/packaged-assets/.agents/skills/rt-data-exfiltration/SKILL.md +784 -0
  35. package/packaged-assets/.agents/skills/rt-defense-evasion/SKILL.md +987 -0
  36. package/packaged-assets/.agents/skills/rt-evidence-chain/SKILL.md +712 -0
  37. package/packaged-assets/.agents/skills/rt-evidence-chain/template.md +31 -0
  38. package/packaged-assets/.agents/skills/rt-executive-report/SKILL.md +718 -0
  39. package/packaged-assets/.agents/skills/rt-executive-report/template.md +38 -0
  40. package/packaged-assets/.agents/skills/rt-executive-report/workflow.md +68 -0
  41. package/packaged-assets/.agents/skills/rt-exploit-active-directory/SKILL.md +1078 -0
  42. package/packaged-assets/.agents/skills/rt-exploit-active-directory/ad-checklist.csv +12 -0
  43. package/packaged-assets/.agents/skills/rt-exploit-active-directory/workflow.md +68 -0
  44. package/packaged-assets/.agents/skills/rt-exploit-android/SKILL.md +1329 -0
  45. package/packaged-assets/.agents/skills/rt-exploit-android/masvs-checklist.csv +10 -0
  46. package/packaged-assets/.agents/skills/rt-exploit-android/workflow.md +68 -0
  47. package/packaged-assets/.agents/skills/rt-exploit-api/SKILL.md +1547 -0
  48. package/packaged-assets/.agents/skills/rt-exploit-api/workflow.md +68 -0
  49. package/packaged-assets/.agents/skills/rt-exploit-auth/SKILL.md +1949 -0
  50. package/packaged-assets/.agents/skills/rt-exploit-auth/workflow.md +68 -0
  51. package/packaged-assets/.agents/skills/rt-exploit-bec/SKILL.md +69 -0
  52. package/packaged-assets/.agents/skills/rt-exploit-cloud-aws/SKILL.md +865 -0
  53. package/packaged-assets/.agents/skills/rt-exploit-cloud-aws/workflow.md +68 -0
  54. package/packaged-assets/.agents/skills/rt-exploit-cloud-azure/SKILL.md +1258 -0
  55. package/packaged-assets/.agents/skills/rt-exploit-cloud-gcp/SKILL.md +981 -0
  56. package/packaged-assets/.agents/skills/rt-exploit-containers/SKILL.md +55 -0
  57. package/packaged-assets/.agents/skills/rt-exploit-databases/SKILL.md +1374 -0
  58. package/packaged-assets/.agents/skills/rt-exploit-desktop-mac/SKILL.md +834 -0
  59. package/packaged-assets/.agents/skills/rt-exploit-desktop-win/SKILL.md +903 -0
  60. package/packaged-assets/.agents/skills/rt-exploit-desktop-win/workflow.md +68 -0
  61. package/packaged-assets/.agents/skills/rt-exploit-dotnet/SKILL.md +945 -0
  62. package/packaged-assets/.agents/skills/rt-exploit-elasticsearch/SKILL.md +68 -0
  63. package/packaged-assets/.agents/skills/rt-exploit-electron/SKILL.md +1023 -0
  64. package/packaged-assets/.agents/skills/rt-exploit-electron/workflow.md +68 -0
  65. package/packaged-assets/.agents/skills/rt-exploit-file-upload/SKILL.md +1576 -0
  66. package/packaged-assets/.agents/skills/rt-exploit-file-upload/payloads/README.md +4 -0
  67. package/packaged-assets/.agents/skills/rt-exploit-file-upload/workflow.md +68 -0
  68. package/packaged-assets/.agents/skills/rt-exploit-firebase/SKILL.md +54 -0
  69. package/packaged-assets/.agents/skills/rt-exploit-frameworks/SKILL.md +967 -0
  70. package/packaged-assets/.agents/skills/rt-exploit-idor/SKILL.md +1693 -0
  71. package/packaged-assets/.agents/skills/rt-exploit-idor/workflow.md +68 -0
  72. package/packaged-assets/.agents/skills/rt-exploit-injection/SKILL.md +1860 -0
  73. package/packaged-assets/.agents/skills/rt-exploit-injection/payloads/sqlmap-tampers.txt +22 -0
  74. package/packaged-assets/.agents/skills/rt-exploit-injection/workflow.md +68 -0
  75. package/packaged-assets/.agents/skills/rt-exploit-ios/SKILL.md +1214 -0
  76. package/packaged-assets/.agents/skills/rt-exploit-ios/workflow.md +68 -0
  77. package/packaged-assets/.agents/skills/rt-exploit-iot/SKILL.md +91 -0
  78. package/packaged-assets/.agents/skills/rt-exploit-iot/workflow.md +68 -0
  79. package/packaged-assets/.agents/skills/rt-exploit-java/SKILL.md +1009 -0
  80. package/packaged-assets/.agents/skills/rt-exploit-jwt/SKILL.md +1327 -0
  81. package/packaged-assets/.agents/skills/rt-exploit-jwt/workflow.md +68 -0
  82. package/packaged-assets/.agents/skills/rt-exploit-mongodb/SKILL.md +67 -0
  83. package/packaged-assets/.agents/skills/rt-exploit-mssql/SKILL.md +52 -0
  84. package/packaged-assets/.agents/skills/rt-exploit-mysql/SKILL.md +53 -0
  85. package/packaged-assets/.agents/skills/rt-exploit-network/SKILL.md +118 -0
  86. package/packaged-assets/.agents/skills/rt-exploit-network/workflow.md +68 -0
  87. package/packaged-assets/.agents/skills/rt-exploit-nodejs/SKILL.md +852 -0
  88. package/packaged-assets/.agents/skills/rt-exploit-osticket/SKILL.md +63 -0
  89. package/packaged-assets/.agents/skills/rt-exploit-phishing/SKILL.md +173 -0
  90. package/packaged-assets/.agents/skills/rt-exploit-phishing/templates/README.md +4 -0
  91. package/packaged-assets/.agents/skills/rt-exploit-phishing/workflow.md +68 -0
  92. package/packaged-assets/.agents/skills/rt-exploit-php/SKILL.md +1119 -0
  93. package/packaged-assets/.agents/skills/rt-exploit-physical/SKILL.md +63 -0
  94. package/packaged-assets/.agents/skills/rt-exploit-physical/workflow.md +68 -0
  95. package/packaged-assets/.agents/skills/rt-exploit-postgresql/SKILL.md +67 -0
  96. package/packaged-assets/.agents/skills/rt-exploit-python/SKILL.md +986 -0
  97. package/packaged-assets/.agents/skills/rt-exploit-redis/SKILL.md +68 -0
  98. package/packaged-assets/.agents/skills/rt-exploit-ruby/SKILL.md +61 -0
  99. package/packaged-assets/.agents/skills/rt-exploit-scada/SKILL.md +1091 -0
  100. package/packaged-assets/.agents/skills/rt-exploit-ssrf/SKILL.md +1528 -0
  101. package/packaged-assets/.agents/skills/rt-exploit-ssrf/payloads.txt +23 -0
  102. package/packaged-assets/.agents/skills/rt-exploit-ssrf/workflow.md +68 -0
  103. package/packaged-assets/.agents/skills/rt-exploit-vishing/SKILL.md +121 -0
  104. package/packaged-assets/.agents/skills/rt-exploit-vishing/scripts.md +4 -0
  105. package/packaged-assets/.agents/skills/rt-exploit-web/SKILL.md +1902 -0
  106. package/packaged-assets/.agents/skills/rt-exploit-web/owasp-checklist.csv +14 -0
  107. package/packaged-assets/.agents/skills/rt-exploit-web/workflow.md +68 -0
  108. package/packaged-assets/.agents/skills/rt-exploit-wireless/SKILL.md +71 -0
  109. package/packaged-assets/.agents/skills/rt-exploit-wordpress/SKILL.md +1565 -0
  110. package/packaged-assets/.agents/skills/rt-exploit-wordpress/cves.csv +7 -0
  111. package/packaged-assets/.agents/skills/rt-exploit-wordpress/workflow.md +68 -0
  112. package/packaged-assets/.agents/skills/rt-exploit-xss/SKILL.md +1526 -0
  113. package/packaged-assets/.agents/skills/rt-exploit-xss/payloads.txt +18 -0
  114. package/packaged-assets/.agents/skills/rt-exploit-xss/workflow.md +68 -0
  115. package/packaged-assets/.agents/skills/rt-finding-document/SKILL.md +687 -0
  116. package/packaged-assets/.agents/skills/rt-finding-document/template.md +71 -0
  117. package/packaged-assets/.agents/skills/rt-finding-document/workflow.md +68 -0
  118. package/packaged-assets/.agents/skills/rt-finding-tracker/SKILL.md +216 -0
  119. package/packaged-assets/.agents/skills/rt-finding-tracker/workflow.md +68 -0
  120. package/packaged-assets/.agents/skills/rt-help/SKILL.md +292 -0
  121. package/packaged-assets/.agents/skills/rt-help/workflow.md +68 -0
  122. package/packaged-assets/.agents/skills/rt-js-analysis/SKILL.md +639 -0
  123. package/packaged-assets/.agents/skills/rt-js-analysis/patterns.txt +27 -0
  124. package/packaged-assets/.agents/skills/rt-js-analysis/workflow.md +68 -0
  125. package/packaged-assets/.agents/skills/rt-kill-chain-map/SKILL.md +393 -0
  126. package/packaged-assets/.agents/skills/rt-lateral-movement/SKILL.md +1032 -0
  127. package/packaged-assets/.agents/skills/rt-lateral-movement/workflow.md +68 -0
  128. package/packaged-assets/.agents/skills/rt-methodology-selector/SKILL.md +69 -0
  129. package/packaged-assets/.agents/skills/rt-methodology-selector/frameworks.csv +10 -0
  130. package/packaged-assets/.agents/skills/rt-methodology-selector/workflow.md +68 -0
  131. package/packaged-assets/.agents/skills/rt-mitre-map/SKILL.md +668 -0
  132. package/packaged-assets/.agents/skills/rt-mitre-map/tactics.csv +16 -0
  133. package/packaged-assets/.agents/skills/rt-mitre-map/workflow.md +68 -0
  134. package/packaged-assets/.agents/skills/rt-osint/SKILL.md +775 -0
  135. package/packaged-assets/.agents/skills/rt-osint/osint-sources.csv +12 -0
  136. package/packaged-assets/.agents/skills/rt-osint/workflow.md +68 -0
  137. package/packaged-assets/.agents/skills/rt-party-mode/SKILL.md +249 -0
  138. package/packaged-assets/.agents/skills/rt-party-mode/workflow.md +68 -0
  139. package/packaged-assets/.agents/skills/rt-persistence/SKILL.md +1146 -0
  140. package/packaged-assets/.agents/skills/rt-persistence/workflow.md +68 -0
  141. package/packaged-assets/.agents/skills/rt-poc-writer/SKILL.md +640 -0
  142. package/packaged-assets/.agents/skills/rt-post-exploitation/SKILL.md +998 -0
  143. package/packaged-assets/.agents/skills/rt-post-exploitation/linux-checklist.csv +10 -0
  144. package/packaged-assets/.agents/skills/rt-post-exploitation/windows-checklist.csv +10 -0
  145. package/packaged-assets/.agents/skills/rt-post-exploitation/workflow.md +68 -0
  146. package/packaged-assets/.agents/skills/rt-privilege-escalation/SKILL.md +1027 -0
  147. package/packaged-assets/.agents/skills/rt-privilege-escalation/linux-checklist.csv +10 -0
  148. package/packaged-assets/.agents/skills/rt-privilege-escalation/win-checklist.csv +10 -0
  149. package/packaged-assets/.agents/skills/rt-privilege-escalation/workflow.md +68 -0
  150. package/packaged-assets/.agents/skills/rt-remediation-roadmap/SKILL.md +665 -0
  151. package/packaged-assets/.agents/skills/rt-remediation-roadmap/template.md +28 -0
  152. package/packaged-assets/.agents/skills/rt-risk-matrix/SKILL.md +232 -0
  153. package/packaged-assets/.agents/skills/rt-rules-of-engagement/SKILL.md +62 -0
  154. package/packaged-assets/.agents/skills/rt-rules-of-engagement/workflow.md +68 -0
  155. package/packaged-assets/.agents/skills/rt-scenario-c001/SKILL.md +71 -0
  156. package/packaged-assets/.agents/skills/rt-scenario-c002/SKILL.md +69 -0
  157. package/packaged-assets/.agents/skills/rt-scenario-c003/SKILL.md +71 -0
  158. package/packaged-assets/.agents/skills/rt-scenario-c004/SKILL.md +71 -0
  159. package/packaged-assets/.agents/skills/rt-scenario-c005/SKILL.md +72 -0
  160. package/packaged-assets/.agents/skills/rt-scenario-d001/SKILL.md +378 -0
  161. package/packaged-assets/.agents/skills/rt-scenario-d002/SKILL.md +392 -0
  162. package/packaged-assets/.agents/skills/rt-scenario-d003/SKILL.md +522 -0
  163. package/packaged-assets/.agents/skills/rt-scenario-d004/SKILL.md +373 -0
  164. package/packaged-assets/.agents/skills/rt-scenario-d005/SKILL.md +458 -0
  165. package/packaged-assets/.agents/skills/rt-scenario-library/SKILL.md +292 -0
  166. package/packaged-assets/.agents/skills/rt-scenario-library/scenarios.csv +32 -0
  167. package/packaged-assets/.agents/skills/rt-scenario-m001/SKILL.md +796 -0
  168. package/packaged-assets/.agents/skills/rt-scenario-m002/SKILL.md +723 -0
  169. package/packaged-assets/.agents/skills/rt-scenario-m003/SKILL.md +463 -0
  170. package/packaged-assets/.agents/skills/rt-scenario-m004/SKILL.md +449 -0
  171. package/packaged-assets/.agents/skills/rt-scenario-m005/SKILL.md +505 -0
  172. package/packaged-assets/.agents/skills/rt-scenario-n001/SKILL.md +573 -0
  173. package/packaged-assets/.agents/skills/rt-scenario-n002/SKILL.md +112 -0
  174. package/packaged-assets/.agents/skills/rt-scenario-n003/SKILL.md +100 -0
  175. package/packaged-assets/.agents/skills/rt-scenario-n004/SKILL.md +90 -0
  176. package/packaged-assets/.agents/skills/rt-scenario-n005/SKILL.md +71 -0
  177. package/packaged-assets/.agents/skills/rt-scenario-w001/SKILL.md +635 -0
  178. package/packaged-assets/.agents/skills/rt-scenario-w002/SKILL.md +612 -0
  179. package/packaged-assets/.agents/skills/rt-scenario-w003/SKILL.md +449 -0
  180. package/packaged-assets/.agents/skills/rt-scenario-w004/SKILL.md +648 -0
  181. package/packaged-assets/.agents/skills/rt-scenario-w005/SKILL.md +479 -0
  182. package/packaged-assets/.agents/skills/rt-scenario-w006/SKILL.md +443 -0
  183. package/packaged-assets/.agents/skills/rt-scenario-w007/SKILL.md +494 -0
  184. package/packaged-assets/.agents/skills/rt-scenario-w008/SKILL.md +576 -0
  185. package/packaged-assets/.agents/skills/rt-scenario-w009/SKILL.md +518 -0
  186. package/packaged-assets/.agents/skills/rt-scenario-w010/SKILL.md +574 -0
  187. package/packaged-assets/.agents/skills/rt-scope-definition/SKILL.md +79 -0
  188. package/packaged-assets/.agents/skills/rt-scope-definition/workflow.md +68 -0
  189. package/packaged-assets/.agents/skills/rt-shodan-recon/SKILL.md +880 -0
  190. package/packaged-assets/.agents/skills/rt-status/SKILL.md +64 -0
  191. package/packaged-assets/.agents/skills/rt-subdomain-enum/SKILL.md +906 -0
  192. package/packaged-assets/.agents/skills/rt-subdomain-enum/workflow.md +68 -0
  193. package/packaged-assets/.agents/skills/rt-technical-report/SKILL.md +710 -0
  194. package/packaged-assets/.agents/skills/rt-technical-report/template.md +41 -0
  195. package/packaged-assets/.agents/skills/rt-technical-report/workflow.md +68 -0
  196. package/packaged-assets/.agents/skills/rt-threat-model/SKILL.md +59 -0
  197. package/packaged-assets/.agents/skills/rt-threat-model/template.md +32 -0
  198. package/packaged-assets/.agents/skills/rt-threat-model/workflow.md +68 -0
  199. package/packaged-assets/.agents/skills/rt-timeline/SKILL.md +338 -0
  200. package/packaged-assets/RTEXIT.md +127 -0
  201. package/tools/installer/commands/install.js +0 -1
  202. package/tools/installer/lib/asset-manifest.js +10 -5
  203. package/tools/installer/lib/banner.js +14 -6
  204. package/tools/installer/lib/copy-assets.js +5 -2
  205. package/tools/installer/lib/prompts.js +1 -11
  206. package/tools/installer/lib/write-config.js +8 -2
  207. /package/{_rtexit → packaged-assets/_rtexit}/config.toml +0 -0
  208. /package/{_rtexit → packaged-assets/_rtexit}/config.user.toml +0 -0
  209. /package/{_rtexit → packaged-assets/_rtexit}/custom/config.toml +0 -0
  210. /package/{_rtexit → packaged-assets/_rtexit}/scripts/autodoc_engine.py +0 -0
  211. /package/{_rtexit → packaged-assets/_rtexit}/scripts/finding_tracker.py +0 -0
  212. /package/{_rtexit → packaged-assets/_rtexit}/scripts/resolve_config.py +0 -0
  213. /package/{_rtexit → packaged-assets/_rtexit}/scripts/resolve_customization.py +0 -0
  214. /package/{resources → packaged-assets/resources}/certifications.md +0 -0
  215. /package/{resources → packaged-assets/resources}/payloads.md +0 -0
  216. /package/{resources → packaged-assets/resources}/tools.md +0 -0
  217. /package/{resources → packaged-assets/resources}/wordlists.md +0 -0
  218. /package/{templates → packaged-assets/templates}/attack-chain-template.md +0 -0
  219. /package/{templates → packaged-assets/templates}/executive-report-template.md +0 -0
  220. /package/{templates → packaged-assets/templates}/executive-report.md +0 -0
  221. /package/{templates → packaged-assets/templates}/finding-template.md +0 -0
  222. /package/{templates → packaged-assets/templates}/remediation-roadmap.md +0 -0
  223. /package/{templates → packaged-assets/templates}/sead-template.md +0 -0
  224. /package/{templates → packaged-assets/templates}/technical-report.md +0 -0
@@ -0,0 +1,712 @@
1
+ ---
2
+ name: rt-evidence-chain
3
+ description: "Document chain of custody for all evidence collected during engagement. SHA-256 hash each piece of evidence, log collection timestamp, collector identity, storage location, and access history. Creates tamper-evident custody log. Uses autodoc_engine.py custody command. Essential for legal admissibility and professional engagement conduct."
4
+ ---
5
+
6
+ # rt-evidence-chain
7
+
8
+ ## Overview
9
+
10
+ The evidence chain of custody is the backbone of professional engagement conduct. Every screenshot, HTTP response, terminal log, exported credential, and tool output artifact is evidence. Without a rigorous chain of custody, evidence can be challenged as tampered, misattributed, or fabricated — destroying the engagement's legal standing and the operator's credibility.
11
+
12
+ This skill documents the formal process for collecting, hashing, timestamping, and logging evidence throughout the engagement lifecycle. It must be executed continuously from first contact through final report delivery — not as a post-engagement cleanup task.
13
+
14
+ ### When This Skill Applies
15
+
16
+ - **Always.** Every piece of evidence collected during any phase (recon, exploitation, post-exploitation, lateral movement) must pass through this process.
17
+ - Immediately after collecting any artifact that will appear in the final report.
18
+ - Before sharing evidence externally (client portal, encrypted email, secure drop).
19
+ - When handing off evidence between operators on a team engagement.
20
+ - When evidence storage location changes (local operator machine → shared engagement vault).
21
+
22
+ ### Legal and Professional Context
23
+
24
+ A chain of custody log answers four questions that legal counsel, client security teams, and certification bodies will ask:
25
+
26
+ 1. **What** exactly was collected (filename, content description, SHA-256 hash)?
27
+ 2. **When** was it collected (UTC timestamp, precision to the second)?
28
+ 3. **Who** collected it (operator alias or full name as contracted)?
29
+ 4. **Where** is it stored (path, encryption status, access controls)?
30
+
31
+ Failure to maintain this log does not just fail audits — it can expose the operator and the client to legal liability if evidence is later contested in litigation or regulatory proceedings.
32
+
33
+ ### Position in the Engagement Lifecycle
34
+
35
+ ```
36
+ Scope Definition → ROE Signed → Reconnaissance → Exploitation → Post-Exploitation → Reporting
37
+ ↑ ↑ ↑ ↑ ↑
38
+ └──────────────────────────────────┴───────────────┴──────────────┴──────────────┘
39
+ rt-evidence-chain runs at EVERY arrow
40
+ ```
41
+
42
+ ---
43
+
44
+ ## Prerequisites
45
+
46
+ Before running this skill, confirm:
47
+
48
+ 1. Engagement is initialized: `python3 _rtexit/scripts/autodoc_engine.py init --ref ENG-2024-047 --client "Meridian Financial Group" --methodology ptes`
49
+ 2. Output directory structure exists: `_rtexit-output/docs/evidence/` must be present (created by `init`).
50
+ 3. You have an operator alias or name as it appears in the engagement contract.
51
+ 4. The evidence file you are logging already exists on disk at its final storage path.
52
+
53
+ ---
54
+
55
+ ## Step-by-Step Workflow
56
+
57
+ ### Step 1 — Collect and Save the Evidence File
58
+
59
+ Before logging, the evidence must exist on disk at its intended storage location. Do not log a temporary path — log the final destination.
60
+
61
+ ```bash
62
+ # Create the evidence directory for this finding
63
+ mkdir -p _rtexit-output/docs/evidence/screenshots
64
+ mkdir -p _rtexit-output/docs/evidence/terminal-logs
65
+ mkdir -p _rtexit-output/docs/evidence/http-logs
66
+ mkdir -p _rtexit-output/docs/evidence/exports
67
+
68
+ # Example: Save a screenshot of authenticated admin panel access
69
+ # (taken with your screen capture tool of choice, then moved here)
70
+ cp ~/Desktop/admin-panel-auth-bypass.png \
71
+ _rtexit-output/docs/evidence/screenshots/F-007-admin-panel-auth-bypass-2024-11-14T143022Z.png
72
+
73
+ # Example: Save terminal output showing privilege escalation
74
+ script -q -c "id && whoami && cat /etc/shadow | head -5" \
75
+ _rtexit-output/docs/evidence/terminal-logs/F-007-privesc-proof-2024-11-14T143105Z.txt
76
+
77
+ # Example: Save a Burp Suite HTTP log export
78
+ cp ~/burp-exports/sqli-proof.xml \
79
+ _rtexit-output/docs/evidence/http-logs/F-003-sqli-request-response-2024-11-14T091244Z.xml
80
+ ```
81
+
82
+ **Naming convention for evidence files:**
83
+
84
+ ```
85
+ {FINDING-ID}-{brief-description}-{YYYY-MM-DDTHHMMSZ}.{ext}
86
+
87
+ Examples:
88
+ F-007-admin-panel-auth-bypass-2024-11-14T143022Z.png
89
+ F-003-sqli-union-select-response-2024-11-14T091244Z.xml
90
+ F-012-lsass-dump-mimikatz-output-2024-11-14T161830Z.txt
91
+ F-019-s3-bucket-public-listing-2024-11-14T174501Z.json
92
+ ```
93
+
94
+ Never use spaces. Use UTC timestamps. Include the finding ID so custody records and findings tracker entries are trivially cross-referenced.
95
+
96
+ ---
97
+
98
+ ### Step 2 — Compute the SHA-256 Hash (Manual Verification)
99
+
100
+ The `autodoc_engine.py` script computes the hash automatically, but operators should also record it manually in their session notes so there is a second independent verification point.
101
+
102
+ ```bash
103
+ # Linux / macOS
104
+ sha256sum _rtexit-output/docs/evidence/screenshots/F-007-admin-panel-auth-bypass-2024-11-14T143022Z.png
105
+
106
+ # Windows PowerShell
107
+ Get-FileHash "_rtexit-output\docs\evidence\screenshots\F-007-admin-panel-auth-bypass-2024-11-14T143022Z.png" -Algorithm SHA256
108
+
109
+ # Python (cross-platform)
110
+ python3 -c "
111
+ import hashlib, sys
112
+ path = sys.argv[1]
113
+ h = hashlib.sha256()
114
+ with open(path, 'rb') as f:
115
+ for chunk in iter(lambda: f.read(8192), b''):
116
+ h.update(chunk)
117
+ print(h.hexdigest(), path)
118
+ " _rtexit-output/docs/evidence/screenshots/F-007-admin-panel-auth-bypass-2024-11-14T143022Z.png
119
+ ```
120
+
121
+ **Example output:**
122
+
123
+ ```
124
+ a3f8d291cc047e1b9f2c7a4e883d0912f5b67c9a1d3e2f4b6a8c0d7e9f1a2b3 F-007-admin-panel-auth-bypass-2024-11-14T143022Z.png
125
+ ```
126
+
127
+ Record this hash in your operator notes immediately. If the file is later modified (even by a file system operation), the hash will change and the discrepancy will be detectable.
128
+
129
+ ---
130
+
131
+ ### Step 3 — Log Evidence to the Custody Chain
132
+
133
+ Use `autodoc_engine.py custody` to append a tamper-evident entry to `_rtexit-output/docs/evidence/chain-of-custody.md`.
134
+
135
+ **Syntax:**
136
+
137
+ ```bash
138
+ python3 _rtexit/scripts/autodoc_engine.py custody \
139
+ --finding <FINDING-ID> \
140
+ --evidence <PATH-TO-EVIDENCE-FILE> \
141
+ --operator <OPERATOR-NAME>
142
+ ```
143
+
144
+ **Real examples:**
145
+
146
+ ```bash
147
+ # Log the admin panel screenshot for finding F-007
148
+ python3 _rtexit/scripts/autodoc_engine.py custody \
149
+ --finding F-007 \
150
+ --evidence "_rtexit-output/docs/evidence/screenshots/F-007-admin-panel-auth-bypass-2024-11-14T143022Z.png" \
151
+ --operator "Sarah Okonkwo"
152
+
153
+ # Log the SQLi HTTP log for finding F-003
154
+ python3 _rtexit/scripts/autodoc_engine.py custody \
155
+ --finding F-003 \
156
+ --evidence "_rtexit-output/docs/evidence/http-logs/F-003-sqli-request-response-2024-11-14T091244Z.xml" \
157
+ --operator "Sarah Okonkwo"
158
+
159
+ # Log a terminal log for a privilege escalation finding
160
+ python3 _rtexit/scripts/autodoc_engine.py custody \
161
+ --finding F-012 \
162
+ --evidence "_rtexit-output/docs/evidence/terminal-logs/F-012-lsass-dump-mimikatz-output-2024-11-14T161830Z.txt" \
163
+ --operator "Marcus Reyes"
164
+
165
+ # Log a non-file artifact (e.g., a URL screenshot described inline)
166
+ python3 _rtexit/scripts/autodoc_engine.py custody \
167
+ --finding F-019 \
168
+ --evidence "S3 bucket s3://meridian-backups-prod publicly accessible — listing confirmed via AWS CLI, no auth required" \
169
+ --operator "Sarah Okonkwo"
170
+ ```
171
+
172
+ **Expected output:**
173
+
174
+ ```
175
+ Evidence logged: F-007-admin-panel-auth-bypass-2024-11-14T143022Z.png
176
+ SHA-256: a3f8d291cc047e1b9f2c7a4e883d0912f5b67c9a1d3e2f4b6a8c0d7e9f1a2b3
177
+ ```
178
+
179
+ ---
180
+
181
+ ### Step 4 — Register the Finding in finding_tracker.py
182
+
183
+ Evidence without a linked finding is an orphan. Every custody entry should correspond to a tracked finding. If the finding does not yet exist in the tracker, add it now.
184
+
185
+ ```bash
186
+ # Add a new finding to the tracker
187
+ python3 _rtexit/scripts/finding_tracker.py add \
188
+ "Authentication Bypass on Admin Portal via Direct Object Reference" \
189
+ HIGH \
190
+ 8.1 \
191
+ "https://admin.meridianfinancial.com/dashboard" \
192
+ --cwe CWE-639 \
193
+ --mitre "T1078.003" \
194
+ --phase "exploitation" \
195
+ --operator "Sarah Okonkwo" \
196
+ --notes "Admin panel accessible by modifying user_id parameter. No server-side authorization check. Full account takeover of any user including org admins."
197
+
198
+ # Check the tracker to confirm the finding ID assigned
199
+ python3 _rtexit/scripts/finding_tracker.py list
200
+
201
+ # Example output:
202
+ # F-007 | HIGH | 8.1 | Authentication Bypass on Admin Portal via Direct Object Reference | https://admin.meridianfinancial.com/dashboard | exploitation | confirmed
203
+ ```
204
+
205
+ Use the assigned finding ID (e.g., `F-007`) in all subsequent custody log entries for that finding.
206
+
207
+ ---
208
+
209
+ ### Step 5 — Log the Activity to the Engagement Timeline
210
+
211
+ Every significant evidence collection event should also appear in the engagement timeline for chronological reconstruction.
212
+
213
+ ```bash
214
+ python3 _rtexit/scripts/autodoc_engine.py log \
215
+ --skill rt-evidence-chain \
216
+ --phase exploitation \
217
+ --finding F-007 \
218
+ --operator "Sarah Okonkwo" \
219
+ --note "Collected auth bypass proof screenshot and logged to chain of custody"
220
+ ```
221
+
222
+ ---
223
+
224
+ ### Step 6 — Verify the Custody Log
225
+
226
+ After logging, inspect the custody log to confirm the entry is correct.
227
+
228
+ ```bash
229
+ cat _rtexit-output/docs/evidence/chain-of-custody.md
230
+ ```
231
+
232
+ The log is append-only markdown. Do not edit existing rows. If an error was made, add a new correction row with a note in the evidence description field.
233
+
234
+ ---
235
+
236
+ ### Step 7 — Encrypt and Secure Evidence Storage
237
+
238
+ Raw evidence files must never sit in plaintext on an unencrypted disk. After logging custody, encrypt the evidence directory before any break in operator session.
239
+
240
+ ```bash
241
+ # Option A: GPG symmetric encryption of the entire evidence directory (quick)
242
+ tar -czf _rtexit-output/docs/evidence/evidence-bundle-2024-11-14.tar.gz \
243
+ _rtexit-output/docs/evidence/
244
+
245
+ gpg --symmetric \
246
+ --cipher-algo AES256 \
247
+ --compress-algo none \
248
+ _rtexit-output/docs/evidence/evidence-bundle-2024-11-14.tar.gz
249
+
250
+ # Store the passphrase in the engagement password vault (1Password / Bitwarden engagement item)
251
+ # Shred the unencrypted archive
252
+ shred -vzu _rtexit-output/docs/evidence/evidence-bundle-2024-11-14.tar.gz
253
+
254
+ # Option B: VeraCrypt container (recommended for long-running engagements)
255
+ # Mount the container before the session, dismount after.
256
+ # All _rtexit-output/docs/evidence/ writes go directly into the mounted container.
257
+
258
+ # Option C: Encrypted engagement repository (git-crypt or BlackBox)
259
+ # Already covered by engagement setup if git-crypt is initialized
260
+ ```
261
+
262
+ ---
263
+
264
+ ### Step 8 — Team Handoff (Multi-Operator Engagements)
265
+
266
+ When handing off evidence to another operator (shift change, specialization handoff):
267
+
268
+ ```bash
269
+ # 1. Export the current custody log state
270
+ cp _rtexit-output/docs/evidence/chain-of-custody.md \
271
+ _rtexit-output/docs/evidence/chain-of-custody-snapshot-2024-11-14T180000Z.md
272
+
273
+ # 2. Have the receiving operator verify file hashes independently
274
+ # (Receiving operator runs sha256sum on each file and compares to custody log)
275
+
276
+ # 3. Log the handoff event
277
+ python3 _rtexit/scripts/autodoc_engine.py custody \
278
+ --finding ALL \
279
+ --evidence "Evidence custody transferred from Sarah Okonkwo to Marcus Reyes at 2024-11-14T18:00:00Z. All files verified by hash comparison. Storage location: shared engagement vault /Volumes/ENG-2024-047-vault/evidence/" \
280
+ --operator "Sarah Okonkwo"
281
+ ```
282
+
283
+ ---
284
+
285
+ ## Templates
286
+
287
+ ### Template 1: Evidence Collection Session Log
288
+
289
+ Create this file at the start of any evidence collection session:
290
+
291
+ ```markdown
292
+ # Evidence Collection Session — ENG-2024-047
293
+ # File: _rtexit-output/docs/evidence/session-logs/session-2024-11-14-okonkwo.md
294
+
295
+ **Date:** 2024-11-14
296
+ **Operator:** Sarah Okonkwo (sarah.okonkwo@redteamops.io)
297
+ **Session Start:** 09:00 UTC
298
+ **Session End:** 18:30 UTC
299
+ **Engagement:** ENG-2024-047 — Meridian Financial Group External Penetration Test
300
+ **Phase:** Exploitation
301
+
302
+ ## Evidence Collected This Session
303
+
304
+ | Time (UTC) | Finding | File | SHA-256 (first 16 chars) | Notes |
305
+ |------------|---------|------|--------------------------|-------|
306
+ | 09:12:44 | F-003 | F-003-sqli-request-response-2024-11-14T091244Z.xml | a3f8d291cc047e1b | Burp export of UNION SELECT payload and full DB response |
307
+ | 11:34:07 | F-005 | F-005-ssrf-aws-metadata-2024-11-14T113407Z.txt | 7c2e94ab1f830d62 | curl output showing IMDSv1 access returning IAM credentials |
308
+ | 14:30:22 | F-007 | F-007-admin-panel-auth-bypass-2024-11-14T143022Z.png | d91e5fc2a847b013 | Screenshot: admin panel with user_id=1 showing org admin account |
309
+ | 16:18:30 | F-012 | F-012-lsass-dump-mimikatz-output-2024-11-14T161830Z.txt | 88f3a21cd490e7b5 | Mimikatz sekurlsa::logonpasswords output — 4 NTLM hashes extracted |
310
+
311
+ ## Storage Location
312
+ All evidence stored at: _rtexit-output/docs/evidence/
313
+ Encrypted bundle: engagement-vault:/ENG-2024-047/evidence/
314
+
315
+ ## Handoff Notes
316
+ Handed off to Marcus Reyes at 18:30 UTC. Vault passphrase delivered via Signal OTP channel.
317
+ ```
318
+
319
+ ---
320
+
321
+ ### Template 2: Per-Finding Evidence Block (for Report Appendix)
322
+
323
+ This block goes into the report appendix for each finding.
324
+
325
+ ```markdown
326
+ ## Evidence Block — F-007: Authentication Bypass on Admin Portal
327
+
328
+ **Finding ID:** F-007
329
+ **Severity:** HIGH (CVSS 8.1)
330
+ **Asset:** https://admin.meridianfinancial.com/dashboard
331
+ **Phase Discovered:** Exploitation — 2024-11-14
332
+
333
+ ### Artifact Registry
334
+
335
+ | Artifact | Type | SHA-256 Hash | Collected | Operator |
336
+ |----------|------|--------------|-----------|----------|
337
+ | F-007-admin-panel-auth-bypass-2024-11-14T143022Z.png | Screenshot | a3f8d291cc047e1b9f2c7a4e883d0912f5b67c9a1d3e2f4b6a8c0d7e9f1a2b3 | 2024-11-14T14:30:22Z | Sarah Okonkwo |
338
+ | F-007-idor-burp-request-2024-11-14T143315Z.xml | HTTP Request/Response | 7f1d3a82bc940e4c1a6b5f2d8e3c9070a1b4d7f2e5c8a0b3d6e9f2a5b8c1d4 | 2024-11-14T14:33:15Z | Sarah Okonkwo |
339
+ | F-007-account-list-dump-2024-11-14T143842Z.json | Data Export | 2b9e6d4a1c7f0e3b5a8d2f1c4e7a0b3d6c9f2a5b8e1d4c7f0a3b6d9e2c5f8 | 2024-11-14T14:38:42Z | Sarah Okonkwo |
340
+
341
+ ### Reproduction Evidence
342
+
343
+ **Request (from F-007-idor-burp-request-2024-11-14T143315Z.xml):**
344
+ ```
345
+ GET /api/v2/users/1/profile HTTP/1.1
346
+ Host: admin.meridianfinancial.com
347
+ Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjo4NzQsInJvbGUiOiJ2aWV3ZXIifQ.xK9mP3qR2sT7uV0w
348
+ Cookie: session=b3NlcjhoYXNub2lkZWE=
349
+ ```
350
+
351
+ **Response (truncated — see artifact for full response):**
352
+ ```json
353
+ {
354
+ "user_id": 1,
355
+ "email": "ceo@meridianfinancial.com",
356
+ "role": "org_admin",
357
+ "mfa_enabled": false,
358
+ "api_key": "mfg_live_sk_K7mNpQ2rS9tU4vW1xY6zA8bC3dE5fG0h"
359
+ }
360
+ ```
361
+
362
+ **Screenshot:** See F-007-admin-panel-auth-bypass-2024-11-14T143022Z.png — shows admin dashboard rendered for CEO account after IDOR parameter manipulation.
363
+
364
+ ### Chain of Custody Notes
365
+ All artifacts verified intact as of 2024-11-20T09:00:00Z prior to report delivery.
366
+ No modifications made after initial collection. Hash verification passed.
367
+ ```
368
+
369
+ ---
370
+
371
+ ### Template 3: Bulk Evidence Registration Script
372
+
373
+ Use this when you have collected many artifacts at once (e.g., after an automated scan phase) and need to log them all to the custody chain efficiently.
374
+
375
+ ```bash
376
+ #!/usr/bin/env bash
377
+ # bulk-custody-log.sh
378
+ # Logs all evidence files in a directory to the custody chain.
379
+ # Usage: bash bulk-custody-log.sh <finding-id> <evidence-dir> <operator-name>
380
+ #
381
+ # Example:
382
+ # bash bulk-custody-log.sh F-019 _rtexit-output/docs/evidence/exports "Sarah Okonkwo"
383
+
384
+ FINDING_ID="$1"
385
+ EVIDENCE_DIR="$2"
386
+ OPERATOR="$3"
387
+ SCRIPT="python3 _rtexit/scripts/autodoc_engine.py"
388
+
389
+ if [ -z "$FINDING_ID" ] || [ -z "$EVIDENCE_DIR" ] || [ -z "$OPERATOR" ]; then
390
+ echo "Usage: bash bulk-custody-log.sh <finding-id> <evidence-dir> <operator-name>"
391
+ exit 1
392
+ fi
393
+
394
+ echo "[*] Bulk custody logging for $FINDING_ID from $EVIDENCE_DIR"
395
+ echo "[*] Operator: $OPERATOR"
396
+ echo ""
397
+
398
+ file_count=0
399
+ for f in "$EVIDENCE_DIR"/*; do
400
+ [ -f "$f" ] || continue
401
+ echo "[+] Logging: $f"
402
+ $SCRIPT custody \
403
+ --finding "$FINDING_ID" \
404
+ --evidence "$f" \
405
+ --operator "$OPERATOR"
406
+ file_count=$((file_count + 1))
407
+ done
408
+
409
+ echo ""
410
+ echo "[*] Done. $file_count files logged to chain of custody."
411
+ echo "[*] Custody log: _rtexit-output/docs/evidence/chain-of-custody.md"
412
+ ```
413
+
414
+ ---
415
+
416
+ ## Integration with finding_tracker.py and autodoc_engine.py
417
+
418
+ ### Complete Workflow Integration Example
419
+
420
+ This shows the full sequence from discovery through custody logging for a real finding.
421
+
422
+ **Scenario:** Operator discovers an unauthenticated SSRF vulnerability on `https://api.meridianfinancial.com/v2/fetch` that reaches AWS IMDS and returns IAM credentials.
423
+
424
+ ```bash
425
+ # 1. Collect the evidence
426
+ mkdir -p _rtexit-output/docs/evidence/terminal-logs
427
+
428
+ # Run the exploit and capture output
429
+ curl -sk "https://api.meridianfinancial.com/v2/fetch?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/MeridianProd" \
430
+ > _rtexit-output/docs/evidence/terminal-logs/F-005-ssrf-iam-creds-2024-11-14T113407Z.txt
431
+
432
+ # Also capture the full HTTP exchange
433
+ curl -sk -v "https://api.meridianfinancial.com/v2/fetch?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/MeridianProd" \
434
+ 2>&1 > _rtexit-output/docs/evidence/http-logs/F-005-ssrf-full-exchange-2024-11-14T113512Z.txt
435
+
436
+ # 2. Register the finding in finding_tracker.py
437
+ python3 _rtexit/scripts/finding_tracker.py add \
438
+ "SSRF to AWS IMDS Exposes Production IAM Credentials" \
439
+ CRITICAL \
440
+ 9.8 \
441
+ "https://api.meridianfinancial.com/v2/fetch" \
442
+ --cwe CWE-918 \
443
+ --cve CVE-2019-SSRF-IMDS \
444
+ --mitre "T1552.005" \
445
+ --phase "exploitation" \
446
+ --operator "Sarah Okonkwo" \
447
+ --notes "SSRF via url parameter reaches IMDSv1. Returns AccessKeyId, SecretAccessKey, Token for role MeridianProd. Role has iam:CreateAccessKey and s3:* permissions — full AWS account compromise possible."
448
+
449
+ # Confirm finding ID
450
+ python3 _rtexit/scripts/finding_tracker.py list --severity CRITICAL
451
+ # Output: F-005 | CRITICAL | 9.8 | SSRF to AWS IMDS Exposes Production IAM Credentials | ...
452
+
453
+ # 3. Log evidence to chain of custody
454
+ python3 _rtexit/scripts/autodoc_engine.py custody \
455
+ --finding F-005 \
456
+ --evidence "_rtexit-output/docs/evidence/terminal-logs/F-005-ssrf-iam-creds-2024-11-14T113407Z.txt" \
457
+ --operator "Sarah Okonkwo"
458
+
459
+ python3 _rtexit/scripts/autodoc_engine.py custody \
460
+ --finding F-005 \
461
+ --evidence "_rtexit-output/docs/evidence/http-logs/F-005-ssrf-full-exchange-2024-11-14T113512Z.txt" \
462
+ --operator "Sarah Okonkwo"
463
+
464
+ # 4. Log the activity to the engagement timeline
465
+ python3 _rtexit/scripts/autodoc_engine.py log \
466
+ --skill rt-evidence-chain \
467
+ --phase exploitation \
468
+ --finding F-005 \
469
+ --operator "Sarah Okonkwo" \
470
+ --cmd "curl -sk 'https://api.meridianfinancial.com/v2/fetch?url=http://169.254.169.254/...'" \
471
+ --note "SSRF confirmed, IAM credentials obtained, chain of custody logged"
472
+
473
+ # 5. Check the current custody log
474
+ cat _rtexit-output/docs/evidence/chain-of-custody.md
475
+ ```
476
+
477
+ ### Verify Finding Stats Before Report
478
+
479
+ ```bash
480
+ # Get a finding summary before writing the report
481
+ python3 _rtexit/scripts/finding_tracker.py stats
482
+
483
+ # List all confirmed findings
484
+ python3 _rtexit/scripts/finding_tracker.py list --status confirmed
485
+
486
+ # Export findings to JSON for report generation
487
+ python3 _rtexit/scripts/finding_tracker.py export \
488
+ > _rtexit-output/docs/reports/findings-export-2024-11-20.json
489
+ ```
490
+
491
+ ---
492
+
493
+ ## Quality Checklist
494
+
495
+ Use this checklist before finalizing the evidence package for report delivery.
496
+
497
+ ### Evidence Collection Quality
498
+
499
+ - [ ] Every finding in `finding_tracker.py` has at least one custody entry in `chain-of-custody.md`
500
+ - [ ] Every custody entry references a real finding ID (no orphaned evidence)
501
+ - [ ] All evidence files follow the naming convention: `{FINDING-ID}-{description}-{TIMESTAMP}.{ext}`
502
+ - [ ] No evidence files have spaces in their names
503
+ - [ ] Timestamps in filenames are UTC (suffix `Z`)
504
+ - [ ] Screenshots show the full browser window including URL bar (not just a cropped element)
505
+ - [ ] Terminal output captures the full command AND full output (not truncated)
506
+ - [ ] HTTP logs include both the complete request and complete response headers and body
507
+ - [ ] For credential findings: the credential itself is partially redacted in the report but the full value is preserved in the encrypted evidence vault
508
+
509
+ ### Chain of Custody Quality
510
+
511
+ - [ ] `chain-of-custody.md` has no manually edited rows (only `autodoc_engine.py custody` output)
512
+ - [ ] Every row has a non-empty operator name (not `-`)
513
+ - [ ] Every row has a valid SHA-256 hash prefix (not `file-not-found`)
514
+ - [ ] SHA-256 hashes in custody log match manual `sha256sum` verification output
515
+ - [ ] No evidence files were modified after their custody entry was logged (verify with `sha256sum`)
516
+ - [ ] Handoff events are logged with explicit custody transfer entries
517
+ - [ ] Evidence storage location is documented in session logs
518
+
519
+ ### Finding Tracker Quality
520
+
521
+ - [ ] Every finding has a severity (`CRITICAL/HIGH/MEDIUM/LOW/INFO`)
522
+ - [ ] CVSS score is present and matches the severity band
523
+ - [ ] CWE is referenced for all technical findings
524
+ - [ ] MITRE ATT&CK technique is referenced where applicable
525
+ - [ ] Phase is recorded (`recon/exploitation/post-exploitation/lateral-movement`)
526
+ - [ ] Status is updated (`confirmed` — not left as default draft)
527
+ - [ ] Affected asset URL or IP is specific (not a wildcard)
528
+
529
+ ### Encryption and Storage Quality
530
+
531
+ - [ ] Evidence directory is encrypted before any session break
532
+ - [ ] Evidence bundle passphrase is stored in the engagement password vault (not in a text file)
533
+ - [ ] No evidence files remain in temporary locations (`/tmp`, `~/Desktop`, browser Downloads)
534
+ - [ ] `chain-of-custody.md` itself is included in the encrypted bundle
535
+
536
+ ---
537
+
538
+ ## Example Output — Finished Chain of Custody Log
539
+
540
+ This is what `_rtexit-output/docs/evidence/chain-of-custody.md` looks like for a real engagement after all evidence is logged:
541
+
542
+ ```markdown
543
+ # Chain of Custody Log
544
+
545
+ | Timestamp | Finding | Evidence | SHA-256 Hash | Operator |
546
+ |-----------|---------|----------|--------------|----------|
547
+ | 2024-11-12T08:44:17 | - | Engagement initialized: ENG-2024-047 Meridian Financial Group | `1a2b3c4d5e6f7a8b` | Sarah Okonkwo |
548
+ | 2024-11-13T10:22:05 | F-001 | F-001-exposed-env-file-2024-11-13T102205Z.txt | `e4f5a6b7c8d9e0f1` | Sarah Okonkwo |
549
+ | 2024-11-13T10:22:05 | F-001 | F-001-env-file-screenshot-2024-11-13T102355Z.png | `2c3d4e5f6a7b8c9d` | Sarah Okonkwo |
550
+ | 2024-11-13T14:17:33 | F-002 | F-002-directory-listing-backup-files-2024-11-13T141733Z.txt | `9b0c1d2e3f4a5b6c` | Sarah Okonkwo |
551
+ | 2024-11-14T09:12:44 | F-003 | F-003-sqli-request-response-2024-11-14T091244Z.xml | `a3f8d291cc047e1b` | Sarah Okonkwo |
552
+ | 2024-11-14T09:58:01 | F-003 | F-003-sqli-db-dump-users-table-2024-11-14T095801Z.csv | `7f2e1d4c9a8b5e3f` | Sarah Okonkwo |
553
+ | 2024-11-14T11:34:07 | F-005 | F-005-ssrf-iam-creds-2024-11-14T113407Z.txt | `7c2e94ab1f830d62` | Sarah Okonkwo |
554
+ | 2024-11-14T11:35:12 | F-005 | F-005-ssrf-full-exchange-2024-11-14T113512Z.txt | `3a9d7f2b4e1c8a5d` | Sarah Okonkwo |
555
+ | 2024-11-14T14:30:22 | F-007 | F-007-admin-panel-auth-bypass-2024-11-14T143022Z.png | `d91e5fc2a847b013` | Sarah Okonkwo |
556
+ | 2024-11-14T14:33:15 | F-007 | F-007-idor-burp-request-2024-11-14T143315Z.xml | `7f1d3a82bc940e4c` | Sarah Okonkwo |
557
+ | 2024-11-14T14:38:42 | F-007 | F-007-account-list-dump-2024-11-14T143842Z.json | `2b9e6d4a1c7f0e3b` | Sarah Okonkwo |
558
+ | 2024-11-14T16:18:30 | F-012 | F-012-lsass-dump-mimikatz-output-2024-11-14T161830Z.txt | `88f3a21cd490e7b5` | Sarah Okonkwo |
559
+ | 2024-11-14T16:45:00 | F-012 | F-012-ntlm-hashes-crack-results-2024-11-14T164500Z.txt | `4c5d6e7f8a9b0c1d` | Marcus Reyes |
560
+ | 2024-11-14T18:00:00 | ALL | Evidence custody transferred from Sarah Okonkwo to Marcus Reyes at 2024-11-14T18:00:00Z. All files verified by hash comparison. Storage: engagement-vault:/ENG-2024-047/evidence/ | `custody-transfer-event` | Sarah Okonkwo |
561
+ | 2024-11-15T09:04:11 | F-015 | F-015-stored-xss-payload-execution-2024-11-15T090411Z.png | `1e2f3a4b5c6d7e8f` | Marcus Reyes |
562
+ | 2024-11-15T09:08:33 | F-015 | F-015-xss-cookie-theft-poc-2024-11-15T090833Z.html | `9f0a1b2c3d4e5f6a` | Marcus Reyes |
563
+ | 2024-11-19T11:00:00 | ALL | Pre-report hash verification pass completed. All 16 evidence files verified intact. No discrepancies. Verified by: Sarah Okonkwo | `verification-event` | Sarah Okonkwo |
564
+ ```
565
+
566
+ ---
567
+
568
+ ## Common Mistakes to Avoid
569
+
570
+ ### Mistake 1: Logging Evidence After the Fact
571
+
572
+ **Wrong approach:** Collecting evidence during the engagement and logging it all to the custody chain the day before report delivery.
573
+
574
+ **Why it fails:** If asked when evidence was collected, the custody timestamps will not match your session notes or tool output timestamps. This discrepancy can be used to challenge the evidence's authenticity.
575
+
576
+ **Correct approach:** Log every artifact within 15 minutes of collecting it. Make it a habit — collect, save, hash, log, continue.
577
+
578
+ ---
579
+
580
+ ### Mistake 2: Using Temporary or Generic Filenames
581
+
582
+ **Wrong:** `screenshot1.png`, `output.txt`, `burp-export.xml`
583
+
584
+ **Why it fails:** Provides no context for which finding the evidence relates to, when it was collected, or what it shows. Tracing custody becomes impossible without cross-referencing multiple logs.
585
+
586
+ **Correct:** `F-007-admin-panel-auth-bypass-2024-11-14T143022Z.png`
587
+
588
+ ---
589
+
590
+ ### Mistake 3: Modifying Evidence After Logging
591
+
592
+ **Wrong:** Taking a screenshot, logging it to custody, then cropping out a sensitive watermark or redacting a client name from the image before adding it to the report.
593
+
594
+ **Why it fails:** The SHA-256 hash logged in the custody chain will no longer match the modified file. This constitutes evidence tampering.
595
+
596
+ **Correct approach:** Keep the original file unmodified in evidence storage. Create a separate copy for the report with `F-007-admin-panel-auth-bypass-REDACTED-for-report.png` and note this in the report appendix. Log the original to custody; keep the redacted copy labeled clearly as a report artifact, not an evidence artifact.
597
+
598
+ ---
599
+
600
+ ### Mistake 4: Not Including the Full Command and Context in Terminal Logs
601
+
602
+ **Wrong terminal log:**
603
+ ```
604
+ sekurlsa::logonpasswords
605
+ ...output truncated...
606
+ ```
607
+
608
+ **Why it fails:** No timestamp, no system context, no proof of which target this was run on.
609
+
610
+ **Correct terminal log:**
611
+ ```
612
+ [2024-11-14 16:18:30 UTC] Operator: Marcus Reyes
613
+ [2024-11-14 16:18:30 UTC] Target: 10.20.30.41 (MFGDC01.meridianfinancial.local)
614
+ [2024-11-14 16:18:30 UTC] Command: privilege::debug && sekurlsa::logonpasswords
615
+
616
+ .#####. mimikatz 2.2.0 (x64) #19041 Sep 19 2022 17:44:08
617
+ .## ^ ##. "A La Vie, A L'Amour" - (oe.eo)
618
+ ## / \ ## /*** Benjamin DELPY `gentilkiwi` ( benjamin@gentilkiwi.com )
619
+ ## \ / ## > https://blog.gentilkiwi.com/mimikatz
620
+ '## v ##' Vincent LE TOUX ( vincent.letoux@gmail.com )
621
+ '#####' > https://pingcastle.com / https://mysmartlogon.com ***/
622
+
623
+ Authentication Id : 0 ; 1823994 (00000000:001bd2fa)
624
+ Session : Interactive from 2
625
+ User Name : svc_backup
626
+ Domain : MERIDIANFINANCIAL
627
+ Logon Server : MFGDC01
628
+ Logon Time : 2024-11-14 15:30:12
629
+ SID : S-1-5-21-3847261920-1482476501-2308754932-1108
630
+ msv :
631
+ [00000003] Primary
632
+ * Username : svc_backup
633
+ * Domain : MERIDIANFINANCIAL
634
+ * NTLM : 4d6f72656e6f4861736849744e6f576f
635
+ * SHA1 : 3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c
636
+ ```
637
+
638
+ ---
639
+
640
+ ### Mistake 5: Orphaned Evidence (No Corresponding Finding)
641
+
642
+ **Wrong:** Logging evidence to custody with `--finding F-999` when F-999 does not exist in `finding_tracker.py`.
643
+
644
+ **Why it fails:** During report review, the scribe or project manager cannot correlate the custody entry with a tracked finding. The evidence may be omitted from the report entirely.
645
+
646
+ **Correct approach:** Always run `python3 _rtexit/scripts/finding_tracker.py list` to confirm the finding ID exists before using it in a custody log entry.
647
+
648
+ ---
649
+
650
+ ### Mistake 6: Skipping Custody for "Minor" or "Informational" Findings
651
+
652
+ **Wrong:** Only logging custody for CRITICAL and HIGH findings because INFO and LOW findings "don't matter for legal."
653
+
654
+ **Why it fails:** Informational findings sometimes become critical during client debrief when the client provides additional context. If you did not log custody at collection time, you cannot retroactively prove when or how you collected the evidence.
655
+
656
+ **Correct approach:** Log custody for every finding at every severity level. The cost of running one command is negligible. The cost of missing evidence in a disputed engagement is not.
657
+
658
+ ---
659
+
660
+ ### Mistake 7: Storing Evidence in Cleartext Outside the Engagement Vault
661
+
662
+ **Wrong:** Leaving `F-005-ssrf-iam-creds-2024-11-14T113407Z.txt` containing live AWS IAM credentials in `~/Downloads/` or an unencrypted project folder.
663
+
664
+ **Why it fails:** Exposes real client credentials outside a controlled storage environment. Violates engagement confidentiality obligations and potentially applicable data protection regulations (GDPR, CCPA, SOC 2 requirements for MSP/security firms).
665
+
666
+ **Correct approach:** Move every evidence file into the encrypted engagement vault within 15 minutes of collection. Never let evidence persist in temporary locations overnight.
667
+
668
+ ---
669
+
670
+ ## Output Directory Structure
671
+
672
+ ```
673
+ _rtexit-output/docs/evidence/
674
+ ├── chain-of-custody.md ← Master custody log (append-only)
675
+ ├── screenshots/
676
+ │ ├── F-003-sqli-error-disclosure-2024-11-13T142201Z.png
677
+ │ ├── F-007-admin-panel-auth-bypass-2024-11-14T143022Z.png
678
+ │ └── F-015-stored-xss-payload-execution-2024-11-15T090411Z.png
679
+ ├── terminal-logs/
680
+ │ ├── F-005-ssrf-iam-creds-2024-11-14T113407Z.txt
681
+ │ ├── F-012-lsass-dump-mimikatz-output-2024-11-14T161830Z.txt
682
+ │ └── 20241114_rt-evidence-chain_2024-11-14T180000Z.txt ← autodoc_engine log files
683
+ ├── http-logs/
684
+ │ ├── F-003-sqli-request-response-2024-11-14T091244Z.xml
685
+ │ ├── F-005-ssrf-full-exchange-2024-11-14T113512Z.txt
686
+ │ └── F-007-idor-burp-request-2024-11-14T143315Z.xml
687
+ ├── exports/
688
+ │ ├── F-003-sqli-db-dump-users-table-2024-11-14T095801Z.csv
689
+ │ ├── F-007-account-list-dump-2024-11-14T143842Z.json
690
+ │ └── F-019-s3-bucket-public-listing-2024-11-14T174501Z.json
691
+ └── session-logs/
692
+ ├── session-2024-11-13-okonkwo.md
693
+ ├── session-2024-11-14-okonkwo.md
694
+ └── session-2024-11-14-reyes.md
695
+ ```
696
+
697
+ ---
698
+
699
+ ## Tools Referenced
700
+
701
+ | Tool | Purpose |
702
+ |------|---------|
703
+ | `autodoc_engine.py custody` | Primary custody logging — SHA-256 hashing and chain-of-custody append |
704
+ | `autodoc_engine.py log` | Engagement timeline logging for activity context |
705
+ | `finding_tracker.py add` | Register findings so custody entries have a valid finding ID to reference |
706
+ | `finding_tracker.py list` | Verify finding IDs before custody logging |
707
+ | `sha256sum` / `Get-FileHash` | Manual hash verification independent of autodoc_engine |
708
+ | `gpg --symmetric` | Evidence bundle encryption for transit and storage |
709
+ | `shred` | Secure deletion of cleartext temporary files |
710
+ | `script` | Terminal session capture with timestamps |
711
+ | Burp Suite | HTTP request/response logging and export |
712
+ | EyeWitness / gowitness | Screenshot capture for web evidence |