@blamejs/exceptd-skills 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/AGENTS.md +232 -0
  2. package/ARCHITECTURE.md +267 -0
  3. package/CHANGELOG.md +616 -0
  4. package/CONTEXT.md +203 -0
  5. package/LICENSE +200 -0
  6. package/NOTICE +82 -0
  7. package/README.md +307 -0
  8. package/SECURITY.md +73 -0
  9. package/agents/README.md +81 -0
  10. package/agents/report-generator.md +156 -0
  11. package/agents/skill-updater.md +102 -0
  12. package/agents/source-validator.md +119 -0
  13. package/agents/threat-researcher.md +149 -0
  14. package/bin/exceptd.js +183 -0
  15. package/data/_indexes/_meta.json +88 -0
  16. package/data/_indexes/activity-feed.json +362 -0
  17. package/data/_indexes/catalog-summaries.json +229 -0
  18. package/data/_indexes/chains.json +7135 -0
  19. package/data/_indexes/currency.json +359 -0
  20. package/data/_indexes/did-ladders.json +451 -0
  21. package/data/_indexes/frequency.json +2072 -0
  22. package/data/_indexes/handoff-dag.json +476 -0
  23. package/data/_indexes/jurisdiction-clocks.json +967 -0
  24. package/data/_indexes/jurisdiction-map.json +536 -0
  25. package/data/_indexes/recipes.json +319 -0
  26. package/data/_indexes/section-offsets.json +3656 -0
  27. package/data/_indexes/stale-content.json +14 -0
  28. package/data/_indexes/summary-cards.json +1736 -0
  29. package/data/_indexes/theater-fingerprints.json +381 -0
  30. package/data/_indexes/token-budget.json +2137 -0
  31. package/data/_indexes/trigger-table.json +1374 -0
  32. package/data/_indexes/xref.json +818 -0
  33. package/data/atlas-ttps.json +282 -0
  34. package/data/cve-catalog.json +496 -0
  35. package/data/cwe-catalog.json +1017 -0
  36. package/data/d3fend-catalog.json +738 -0
  37. package/data/dlp-controls.json +1039 -0
  38. package/data/exploit-availability.json +67 -0
  39. package/data/framework-control-gaps.json +1255 -0
  40. package/data/global-frameworks.json +2913 -0
  41. package/data/rfc-references.json +324 -0
  42. package/data/zeroday-lessons.json +377 -0
  43. package/keys/public.pem +3 -0
  44. package/lib/framework-gap.js +328 -0
  45. package/lib/job-queue.js +195 -0
  46. package/lib/lint-skills.js +536 -0
  47. package/lib/prefetch.js +372 -0
  48. package/lib/refresh-external.js +713 -0
  49. package/lib/schemas/cve-catalog.schema.json +151 -0
  50. package/lib/schemas/manifest.schema.json +106 -0
  51. package/lib/schemas/skill-frontmatter.schema.json +113 -0
  52. package/lib/scoring.js +149 -0
  53. package/lib/sign.js +197 -0
  54. package/lib/ttp-mapper.js +80 -0
  55. package/lib/validate-catalog-meta.js +198 -0
  56. package/lib/validate-cve-catalog.js +213 -0
  57. package/lib/validate-indexes.js +83 -0
  58. package/lib/validate-package.js +162 -0
  59. package/lib/validate-vendor.js +85 -0
  60. package/lib/verify.js +216 -0
  61. package/lib/worker-pool.js +84 -0
  62. package/manifest-snapshot.json +1833 -0
  63. package/manifest.json +2108 -0
  64. package/orchestrator/README.md +124 -0
  65. package/orchestrator/dispatcher.js +140 -0
  66. package/orchestrator/event-bus.js +146 -0
  67. package/orchestrator/index.js +874 -0
  68. package/orchestrator/pipeline.js +201 -0
  69. package/orchestrator/scanner.js +327 -0
  70. package/orchestrator/scheduler.js +137 -0
  71. package/package.json +113 -0
  72. package/sbom.cdx.json +158 -0
  73. package/scripts/audit-cross-skill.js +261 -0
  74. package/scripts/audit-perf.js +160 -0
  75. package/scripts/bootstrap.js +205 -0
  76. package/scripts/build-indexes.js +721 -0
  77. package/scripts/builders/activity-feed.js +79 -0
  78. package/scripts/builders/catalog-summaries.js +67 -0
  79. package/scripts/builders/currency.js +109 -0
  80. package/scripts/builders/cwe-chains.js +105 -0
  81. package/scripts/builders/did-ladders.js +149 -0
  82. package/scripts/builders/frequency.js +89 -0
  83. package/scripts/builders/jurisdiction-clocks.js +126 -0
  84. package/scripts/builders/recipes.js +159 -0
  85. package/scripts/builders/section-offsets.js +162 -0
  86. package/scripts/builders/stale-content.js +171 -0
  87. package/scripts/builders/summary-cards.js +166 -0
  88. package/scripts/builders/theater-fingerprints.js +198 -0
  89. package/scripts/builders/token-budget.js +96 -0
  90. package/scripts/check-manifest-snapshot.js +217 -0
  91. package/scripts/predeploy.js +267 -0
  92. package/scripts/refresh-manifest-snapshot.js +57 -0
  93. package/scripts/refresh-sbom.js +222 -0
  94. package/skills/age-gates-child-safety/skill.md +456 -0
  95. package/skills/ai-attack-surface/skill.md +282 -0
  96. package/skills/ai-c2-detection/skill.md +440 -0
  97. package/skills/ai-risk-management/skill.md +311 -0
  98. package/skills/api-security/skill.md +287 -0
  99. package/skills/attack-surface-pentest/skill.md +381 -0
  100. package/skills/cloud-security/skill.md +384 -0
  101. package/skills/compliance-theater/skill.md +365 -0
  102. package/skills/container-runtime-security/skill.md +379 -0
  103. package/skills/coordinated-vuln-disclosure/skill.md +473 -0
  104. package/skills/defensive-countermeasure-mapping/skill.md +300 -0
  105. package/skills/dlp-gap-analysis/skill.md +337 -0
  106. package/skills/email-security-anti-phishing/skill.md +206 -0
  107. package/skills/exploit-scoring/skill.md +331 -0
  108. package/skills/framework-gap-analysis/skill.md +374 -0
  109. package/skills/fuzz-testing-strategy/skill.md +313 -0
  110. package/skills/global-grc/skill.md +564 -0
  111. package/skills/identity-assurance/skill.md +272 -0
  112. package/skills/incident-response-playbook/skill.md +546 -0
  113. package/skills/kernel-lpe-triage/skill.md +303 -0
  114. package/skills/mcp-agent-trust/skill.md +326 -0
  115. package/skills/mlops-security/skill.md +325 -0
  116. package/skills/ot-ics-security/skill.md +340 -0
  117. package/skills/policy-exception-gen/skill.md +437 -0
  118. package/skills/pqc-first/skill.md +546 -0
  119. package/skills/rag-pipeline-security/skill.md +294 -0
  120. package/skills/researcher/skill.md +310 -0
  121. package/skills/sector-energy/skill.md +409 -0
  122. package/skills/sector-federal-government/skill.md +302 -0
  123. package/skills/sector-financial/skill.md +398 -0
  124. package/skills/sector-healthcare/skill.md +373 -0
  125. package/skills/security-maturity-tiers/skill.md +464 -0
  126. package/skills/skill-update-loop/skill.md +463 -0
  127. package/skills/supply-chain-integrity/skill.md +318 -0
  128. package/skills/threat-model-currency/skill.md +404 -0
  129. package/skills/threat-modeling-methodology/skill.md +312 -0
  130. package/skills/webapp-security/skill.md +281 -0
  131. package/skills/zeroday-gap-learn/skill.md +350 -0
  132. package/vendor/blamejs/LICENSE +201 -0
  133. package/vendor/blamejs/README.md +54 -0
  134. package/vendor/blamejs/_PROVENANCE.json +54 -0
  135. package/vendor/blamejs/retry.js +335 -0
  136. package/vendor/blamejs/worker-pool.js +418 -0
@@ -0,0 +1,440 @@
1
+ ---
2
+ name: ai-c2-detection
3
+ version: "1.0.0"
4
+ description: Detect adversary use of AI APIs as covert C2 — SesameOp pattern, PROMPTFLUX/PROMPTSTEAL behavioral signatures, response playbook
5
+ triggers:
6
+ - ai c2
7
+ - ai command and control
8
+ - sesameop
9
+ - promptflux
10
+ - promptsteal
11
+ - ai api abuse
12
+ - llm c2
13
+ - covert channel ai
14
+ - aml.t0096
15
+ data_deps:
16
+ - atlas-ttps.json
17
+ - cve-catalog.json
18
+ - framework-control-gaps.json
19
+ atlas_refs:
20
+ - AML.T0096
21
+ - AML.T0017
22
+ attack_refs:
23
+ - T1071
24
+ - T1102
25
+ - T1568
26
+ framework_gaps:
27
+ - NIST-800-53-SI-3
28
+ - NIST-800-53-SC-7
29
+ - ISO-27001-2022-A.8.16
30
+ - SOC2-CC7-anomaly-detection
31
+ rfc_refs:
32
+ - RFC-8446
33
+ - RFC-9180
34
+ - RFC-9458
35
+ - RFC-9421
36
+ - RFC-9114
37
+ - RFC-9000
38
+ d3fend_refs:
39
+ - D3-CA
40
+ - D3-CSPP
41
+ - D3-DA
42
+ - D3-IOPR
43
+ - D3-NI
44
+ - D3-NTA
45
+ - D3-NTPM
46
+ last_threat_review: "2026-05-01"
47
+ ---
48
+
49
+ # AI C2 Detection
50
+
51
+ ## Threat Context (mid-2026)
52
+
53
+ ### SesameOp — AI APIs as Covert C2 (ATLAS AML.T0096)
54
+
55
+ The SesameOp campaign documented a technique that has since been replicated and expanded: adversaries repurposing legitimate AI agent APIs as covert command-and-control channels.
56
+
57
+ **Technical pattern:**
58
+ ```
59
+ Compromised host Attacker
60
+ | |
61
+ | POST /v1/messages |
62
+ | {"messages": [ |
63
+ | {"role": "user", |
64
+ | "content": "b64:<cmd>"} | ← Command encoded in prompt
65
+ | ]} |
66
+ | |
67
+ | {"choices": [{ |
68
+ | "message": { |
69
+ | "content": "b64:<data>"} | ← Exfiltrated data in completion
70
+ | }]} |
71
+ | |
72
+ ```
73
+
74
+ The malware on the compromised host:
75
+ 1. Encodes commands/exfiltrated data as base64 or other encoding within semantically valid text
76
+ 2. Sends "legitimate-looking" API calls to OpenAI, Anthropic, Google, or Azure AI endpoints
77
+ 3. Receives attacker instructions encoded in the AI's response
78
+ 4. The AI API is simply relaying encoded content — it is not the attacker's infrastructure, it's the transport
79
+
80
+ **Why traditional C2 detection fails:**
81
+ - No DGA (domain generation algorithm): the endpoint is a legitimate, well-known AI service
82
+ - No unusual TLS certificates: certs belong to OpenAI/Anthropic/Google
83
+ - No beaconing pattern: AI API calls are bursty and aperiodic, indistinguishable from legitimate developer usage
84
+ - No payload size anomaly in the traffic layer: prompt + completion sizes vary widely for legitimate workloads
85
+ - No protocol anomaly: standard HTTPS REST API calls
86
+ - No reputation signal: blocking the endpoint blocks legitimate AI usage
87
+
88
+ The only detection surfaces are:
89
+ 1. Behavioral: does this host/process/user normally make AI API calls? Is the pattern consistent with legitimate usage?
90
+ 2. Content: is the prompt/completion content encoded or high-entropy? (requires TLS inspection)
91
+ 3. Correlation: do AI API calls correlate with file access, lateral movement, or other attack-indicative activity?
92
+ 4. Process: what process is making the AI API call? Is it expected to use AI APIs?
93
+
94
+ ---
95
+
96
+ ### PROMPTFLUX Malware Family
97
+
98
+ PROMPTFLUX is a malware family that queries public LLMs during execution to generate novel evasion code in real-time.
99
+
100
+ **Execution pattern:**
101
+ 1. Initial compromise via standard delivery (phishing, exploit)
102
+ 2. Malware runs, hits an AV/EDR detection signal
103
+ 3. Queries a public LLM: "Generate functionally equivalent code to [detected snippet] using different variable names and control flow that doesn't match common malware patterns"
104
+ 4. LLM returns new variant
105
+ 5. Malware re-deploys with new variant, bypassing static signatures
106
+ 6. Repeat indefinitely
107
+
108
+ **Detection signature (behavioral, not content):**
109
+ - A process making repeated AI API calls during or immediately after security product alerts
110
+ - AI API calls from processes that are not known AI-using applications (e.g., a Chrome extension making calls to OpenAI, or a background service with no UI making API calls)
111
+ - LLM query content containing: code snippets, function names, API patterns that would be unusual for conversational use
112
+
113
+ **Why SI-3 (Malicious Code Protection) fails:**
114
+ SI-3 requires malicious code protection mechanisms that "detect and eradicate malicious code." PROMPTFLUX generates unique code per detection event. There is no signature to detect, because every variant is novel. SI-3 provides zero protection against AI-generated dynamic evasion.
115
+
116
+ ---
117
+
118
+ ### PROMPTSTEAL Malware Family
119
+
120
+ PROMPTSTEAL uses LLMs as live intelligence analysts for exfiltration targeting.
121
+
122
+ **Execution pattern:**
123
+ 1. Compromise host, gain access to credential stores, user files, and email
124
+ 2. Query LLM: "Given this list of files and email subjects, which files are most likely to contain credentials or sensitive business information?"
125
+ 3. LLM prioritizes the exfiltration target list
126
+ 4. Exfiltrate prioritized targets
127
+ 5. Query LLM: "Given these captured credentials for [company], what systems are most likely accessible with these credentials?"
128
+ 6. LLM provides lateral movement guidance
129
+
130
+ **PROMPTSTEAL turns a commodity compromise into a targeted, prioritized attack** without requiring any attacker-side human intelligence work. The LLM is doing the targeting, prioritization, and strategy work.
131
+
132
+ **Detection:**
133
+ - AI API calls from processes with access to sensitive file paths or credential stores
134
+ - AI prompts containing filenames, email subjects, or data that could be used for targeting
135
+ - Unusual AI API usage from processes associated with file scanning or credential access patterns
136
+
137
+ ---
138
+
139
+ ## Framework Lag Declaration
140
+
141
+ | Framework | Control | Why It Fails |
142
+ |---|---|---|
143
+ | NIST 800-53 SI-3 | Malicious Code Protection | Signature/behavioral detection for known malware. AI-generated dynamic evasion (PROMPTFLUX) produces unique code per execution. Zero signature coverage. |
144
+ | NIST 800-53 SC-7 | Boundary Protection | Egress controls block unauthorized destinations. AI API endpoints (api.openai.com, api.anthropic.com, generativelanguage.googleapis.com) are not unauthorized — they are commonly whitelisted for legitimate use. SC-7 cannot distinguish C2 traffic from legitimate AI API usage at the network layer. |
145
+ | NIST 800-53 SI-4 | System Monitoring | Monitor for attacks and indicators of attack. Current SI-4 implementations don't baseline AI API usage per process or alert on high-entropy prompt content. |
146
+ | ISO 27001:2022 A.8.16 | Monitoring Activities | Monitoring of systems, networks, and applications. No guidance for AI API behavioral baseline, no mention of AI traffic as a monitoring concern. |
147
+ | SOC 2 CC7 | System Operations (Anomaly Detection) | Detect and respond to security events. CC7 implementations baseline network traffic and system events. AI API calls are typically in the same anomaly detection blind spot as other SaaS traffic. |
148
+ | ATT&CK T1071 | Application Layer Protocol | ATT&CK documents C2 over application protocols. AI API as C2 fits the technique but detection guidance doesn't address legitimate-endpoint C2 specifically. |
149
+
150
+ ---
151
+
152
+ ## Detection Architecture
153
+
154
+ ### Layer 1: Process-Level Behavioral Baseline
155
+
156
+ Build a model of which processes are expected to make AI API calls on each host type.
157
+
158
+ **Expected AI API callers by host type:**
159
+
160
+ | Host Type | Expected AI API Callers |
161
+ |---|---|
162
+ | Developer workstation | IDE processes (cursor, code), terminal sessions, browser |
163
+ | CI/CD runner | Build tools if AI-assisted (specific known tools only) |
164
+ | Production server | Application processes if AI features are deployed (specific, named) |
165
+ | User workstation (non-dev) | Browser, Office productivity suite (if AI features enabled) |
166
+ | Database server | None expected |
167
+ | Network device | None expected |
168
+
169
+ **Alert conditions:**
170
+ - AI API calls from processes not on the expected list for that host type
171
+ - AI API calls from system services or background processes
172
+ - AI API calls at unusual hours relative to the user's normal working pattern
173
+ - Spike in AI API call frequency from a single process (PROMPTFLUX's rapid querying pattern)
174
+
175
+ ### Layer 2: Behavioral Correlation
176
+
177
+ Correlate AI API calls with other security-relevant events on the same host:
178
+
179
+ ```
180
+ AI API call + file_access(sensitive_path) within 5 minutes → ALERT
181
+ AI API call + credential_access event within 5 minutes → ALERT
182
+ AI API call + network_scan event within 10 minutes → ALERT
183
+ AI API call + security_alert event within 1 minute → HIGH ALERT (PROMPTFLUX pattern)
184
+ AI API call + large_file_transfer within 10 minutes → ALERT (PROMPTSTEAL exfil)
185
+ ```
186
+
187
+ ### Layer 3: Traffic Content Analysis (requires TLS inspection)
188
+
189
+ If TLS inspection is deployed at the boundary:
190
+
191
+ **High-entropy content detection:**
192
+ - Calculate entropy of the `content` field in AI API requests/responses
193
+ - Flag: entropy > 6.5 bits/byte in prompt content (suggests encoding)
194
+ - Flag: base64 patterns in prompt/completion content that aren't image data
195
+ - Flag: prompt content containing recognizable file paths, usernames, or credential patterns
196
+
197
+ **Prompt pattern matching:**
198
+ - Flag: prompts containing code snippets + requests for "equivalent" or "alternative" implementations
199
+ - Flag: prompts listing filenames, email subjects, or asking for prioritization of sensitive data
200
+ - Flag: prompts requesting "code that avoids detection" or equivalent phrasing
201
+
202
+ ### Layer 4: Response Monitoring
203
+
204
+ Monitor AI API responses for anomalous patterns:
205
+ - Responses containing executable code when the calling application has no known code-generation use case
206
+ - Responses containing lateral movement guidance (lists of systems, exploitation advice)
207
+ - Large response volumes from processes that normally produce small queries
208
+
209
+ ---
210
+
211
+ ## Incident Response Playbook — AI C2
212
+
213
+ ### Detection trigger
214
+
215
+ Any of these triggers:
216
+ - Process-level anomaly: unexpected process making AI API calls
217
+ - Behavioral correlation: AI API call + security-relevant event correlation
218
+ - Content alert: high-entropy or encoded content in AI API traffic
219
+ - Threat intel match: C2 infrastructure or campaign IOC matches observed AI API destination
220
+
221
+ ### Triage (0–30 minutes)
222
+
223
+ 1. Identify the process making AI API calls
224
+ 2. Check process legitimacy: is this a known application? Signed binary? Expected on this host?
225
+ 3. Review call timing: when did these calls start? What changed on the host before?
226
+ 4. Pull the last 100 API calls (prompt + response content if TLS inspection is available)
227
+ 5. Check for file access and credential access events correlated in time
228
+
229
+ ### Investigation (30 minutes – 4 hours)
230
+
231
+ 1. If TLS inspection available: export prompt/response content for analysis
232
+ - Decode any base64 or encoded content
233
+ - Check prompts for: code rewrite requests (PROMPTFLUX), targeting/prioritization requests (PROMPTSTEAL), encoded commands (SesameOp)
234
+ 2. Timeline reconstruction: what did this process do before and after AI API calls?
235
+ 3. Lateral movement check: have other hosts shown AI API behavioral anomalies?
236
+ 4. Exfiltration check: did any data leave the network via AI API responses?
237
+
238
+ ### Containment
239
+
240
+ 1. Block AI API destinations at the boundary for the affected host/process (scoped to minimize business disruption)
241
+ 2. Preserve: full packet capture of AI API traffic from affected host, process memory dump if feasible, file system timeline
242
+ 3. Rotate: credentials that may have been accessed by PROMPTSTEAL pattern
243
+ 4. Isolate: host if lateral movement is confirmed or suspected
244
+
245
+ ### Evidence Handling
246
+
247
+ AI API traffic logs (prompt + response) are primary evidence. Preserve:
248
+ - Network flow records (timestamps, volumes, endpoints)
249
+ - TLS inspection logs (full content if captured)
250
+ - Process execution logs
251
+ - File access logs correlated with AI API call timeline
252
+ - Credential access events
253
+
254
+ ### Attribution
255
+
256
+ Map observed TTPs to:
257
+ - SesameOp campaign indicators if C2 pattern matches
258
+ - PROMPTFLUX indicators if code rewrite requests observed
259
+ - PROMPTSTEAL indicators if targeting/prioritization pattern observed
260
+ - Novel campaign if pattern doesn't match known families — document as new indicator
261
+
262
+ ---
263
+
264
+ ## Detection Rule Examples
265
+
266
+ ### Sigma-style rule — PROMPTFLUX
267
+
268
+ ```yaml
269
+ title: PROMPTFLUX Pattern - AI API Call Following Security Alert
270
+ status: experimental
271
+ logsource:
272
+ product: endpoint
273
+ service: process
274
+ detection:
275
+ condition: ai_api_call and security_alert within 60s
276
+ ai_api_call:
277
+ TargetHostname|contains:
278
+ - 'api.openai.com'
279
+ - 'api.anthropic.com'
280
+ - 'generativelanguage.googleapis.com'
281
+ - 'api.cohere.ai'
282
+ security_alert:
283
+ EventID: [1116, 1117] # Windows Defender alert example
284
+ timeframe: 60s
285
+ falsepositives:
286
+ - Developer using AI assistant to investigate security alert (verify by user identity)
287
+ level: high
288
+ ```
289
+
290
+ ### Sigma-style rule — Unexpected AI API Origin
291
+
292
+ ```yaml
293
+ title: AI API Call from Unexpected Process
294
+ status: experimental
295
+ logsource:
296
+ product: network
297
+ service: dns
298
+ detection:
299
+ condition: ai_domain and not expected_process
300
+ ai_domain:
301
+ dns_query|contains:
302
+ - 'api.openai.com'
303
+ - 'api.anthropic.com'
304
+ expected_process:
305
+ ProcessName|contains:
306
+ - 'Code.exe'
307
+ - 'Cursor.exe'
308
+ - 'chrome.exe'
309
+ - 'msedge.exe'
310
+ falsepositives:
311
+ - New AI-using applications deployed — update allowlist
312
+ level: medium
313
+ ```
314
+
315
+ ---
316
+
317
+ ## TTP Mapping (MITRE ATLAS v5.1.0 + MITRE ATT&CK)
318
+
319
+ | ID | Source | Technique | C2 Relevance | Gap Flag — Which Detection Control Fails |
320
+ |---|---|---|---|---|
321
+ | AML.T0096 | ATLAS v5.1.0 | LLM API as covert C2 / LLM Integration Abuse | Direct: SesameOp encodes commands and exfiltrated data in prompt and completion fields against api.openai.com, api.anthropic.com, generativelanguage.googleapis.com. AI provider domain is the relay, not the attacker C2 endpoint. | NIST-800-53-SC-7 (Boundary Protection) — AI provider domains are allowlisted in most enterprise egress for legitimate developer and product use, so boundary inspection cannot distinguish benign developer prompts from C2-encoded prompts. See SC-7 entry in `data/framework-control-gaps.json` — real requirement is SDK-level prompt logging with identity binding, anomaly detection on prompt-shape and token-volume, and an allowlist that enumerates the sanctioned business reason per identity. Boundary-only SC-7 evidence is incomplete for any org with AI API access in production. |
322
+ | AML.T0017 | ATLAS v5.1.0 | Develop Capabilities — including adversary use of inference APIs to develop/refine attack capability (and model exfiltration via inference API where applicable) | PROMPTFLUX queries public LLMs to generate per-execution evasion code; PROMPTSTEAL uses LLMs to prioritise exfiltration targets. The inference API is doing capability-development work for the adversary in real time. | NIST-800-53-SI-3 fails — there is no static signature for code generated per-event by a public LLM. NIST-800-53-SI-4 fails as commonly deployed — no AI-API behavioural baseline per process/identity. |
323
+ | T1071 | ATT&CK | Application Layer Protocol (C2) | AI C2 traffic is standard HTTPS REST to api.openai.com or equivalent. Application-protocol C2 detection that looks for DGA, unusual TLS, or beaconing does not fire. | SC-7 boundary control sees only the destination domain (allowlisted) — no protocol anomaly to alert on. Detection requires identity-bound prompt content inspection, which SC-7 as written does not require. |
324
+ | T1102 | ATT&CK | Web Service (C2 via legitimate web service) | AI API endpoints are exactly the "legitimate web service used as C2" pattern that T1102 describes — but at scale and pre-allowlisted in nearly every enterprise. | SOC 2 CC7 anomaly-detection control: AI API traffic shares the SaaS blind spot — typically not baselined per process or identity. ISO 27001 A.8.16 monitoring activities: no guidance for AI-API-shaped traffic. |
325
+ | T1568 | ATT&CK | Dynamic Resolution | AI provider responses can carry encoded instructions that dynamically determine the next-hop behaviour for the malware (effectively model-mediated dynamic resolution of the next attacker instruction). | No standard DNS-tunnelling or DGA detection applies — the "resolution" happens inside an HTTPS payload to a trusted endpoint. SC-7 cannot see it without SDK-level prompt + response logging. |
326
+
327
+ ---
328
+
329
+ ## Exploit Availability Matrix
330
+
331
+ The threats in this skill are adversary TTPs and malware families rather than vendor vulnerabilities, so they carry no CVE IDs in `data/cve-catalog.json`. Public incident reports and ATLAS `real_world_instances` are the primary evidence base.
332
+
333
+ | Threat | CVE? | Public Incident Reporting / PoC | CISA KEV? | AI-Accelerated? | EDR / SIEM Detection Support (mid-2026) | AI Provider Abuse Signal Available? |
334
+ |---|---|---|---|---|---|---|
335
+ | SesameOp (AML.T0096) | No — adversary TTP, not vendor vuln | Yes — public campaign write-ups; ATLAS AML.T0096 lists SesameOp under `real_world_instances` | No (technique class; KEV catalogs vendor vulns only) | Yes — the entire technique is AI-API-mediated | Minimal — most EDR and SIEM products do not baseline AI API calls per process/identity or inspect prompt/response content. A handful of vendors ship experimental rules; coverage is fragmentary. | Partial — OpenAI, Anthropic, and Google publish aggregate abuse and policy-violation reports; per-tenant, per-request abuse telemetry that an enterprise SOC can subscribe to is not generally available as of 2026-05. |
336
+ | PROMPTFLUX | No — adversary malware family | Yes — public reporting documenting LLM-mediated evasion code generation per execution | No | Yes — every variant is AI-generated; the technique is AI by definition | Minimal at signature layer (zero signatures by design). Behavioural detection (AI API call within 60s of an AV/EDR alert from an unexpected process) is feasible but not shipped out-of-the-box in major EDRs. | None enterprise-subscribable; AI provider abuse teams act on their own telemetry. |
337
+ | PROMPTSTEAL | No — adversary malware family | Yes — public reporting on LLM-assisted exfiltration prioritisation and lateral-movement guidance | No | Yes — LLM is acting as the adversary's live intelligence analyst | Minimal — requires correlation of AI API calls with credential-access and file-access events. Possible to build in a SIEM; not a default rule pack. | None enterprise-subscribable. |
338
+ | AI C2 — generic (T1071 / T1102 / T1568 over AI APIs) | No | Yes — research and red-team demonstrations across all major AI providers | No | Yes | Minimal — boundary controls treat AI provider domains as allowlisted SaaS; content-layer inspection requires TLS interception plus SDK-level prompt logging, which most orgs do not run. | Partial / inconsistent across providers. |
339
+
340
+ **Interpretation:** there is no patch to apply because there is no vendor CVE. Mitigation is detection-architectural: SDK-level prompt logging with identity binding, AI-API behavioural baselining per process, correlation with credential/file/scan events, and an explicit allowlist that enumerates the sanctioned business reason per identity (per the SC-7 real_requirement in `data/framework-control-gaps.json`).
341
+
342
+ ### RFC Transport Reality
343
+
344
+ AI provider egress is TLS 1.3 (RFC 8446) terminated at the provider, so boundary inspection at the enterprise edge does not yield prompt content; Encrypted Client Hello uses RFC 9180 (HPKE), and for ECH-enabled connections even the destination hostname is hidden from boundary inspection. Oblivious HTTP (RFC 9458, January 2024) is a published-standard covert-channel candidate — every AI request gets relayed, so the visible destination is the relay rather than the AI provider, and SC-7 boundary tooling vendors are 12–18 months behind on detection guidance for this class. AI providers increasingly serve over HTTP/3 (RFC 9114) on QUIC (RFC 9000); enterprise NGFW HTTP/3 inspection coverage as of mid-2026 is uneven, with many boundary stacks default-denying QUIC or falling back to passive observation. HTTP Message Signatures (RFC 9421) are how AI providers publish abuse signals via webhook, and subscribing requires verifying these signatures. See `data/rfc-references.json` for the canonical entries rather than restating content here.
345
+
346
+ ---
347
+
348
+ ## Analysis Procedure
349
+
350
+ ### Step 1: Enumerate AI API egress destinations from the last 30 days
351
+
352
+ Pull from the boundary or SaaS-egress logs all connections to:
353
+ - `api.openai.com`, `api.anthropic.com`, `generativelanguage.googleapis.com`, `api.cohere.ai`, regional Azure OpenAI endpoints (`*.openai.azure.com`), AWS Bedrock endpoints (`bedrock-runtime.*.amazonaws.com`), and any internal AI gateway.
354
+
355
+ For each destination, record: source identity (user, service account, machine account), source process where available, request volume, request times, and whether the calling host is a developer workstation, a CI runner, a production server, or another class.
356
+
357
+ ### Step 2: Cross-reference each calling identity against a sanctioned business reason
358
+
359
+ For each identity making AI API calls, answer: is there a documented business reason for this identity to call AI APIs? Examples of sanctioned reasons: named developer using an AI IDE, named product using a named AI feature, named CI tool with an AI-assist component. Identities making AI API calls without a sanctioned business reason are the first investigation tier — they map directly to the SC-7 gap (allowlist without per-identity business reason is theater).
360
+
361
+ ### Step 3: Flag prompts with anomalous shape
362
+
363
+ Requires SDK-level prompt logging or TLS inspection. For each request, compute:
364
+ - Token volume vs. that identity's rolling baseline. Outliers above the 99th percentile are flagged.
365
+ - Time-of-day vs. that identity's documented working pattern. Off-hours calls from human-developer identities are flagged.
366
+ - Linguistic shape: prompts that are not natural language (high entropy, base64, hex, or structured token streams that do not match a known schema) are flagged. PROMPTFLUX and SesameOp both produce non-conversational prompt shapes.
367
+ - Repeated identical or near-identical prompt structures from the same identity over short windows — consistent with automated C2 polling.
368
+
369
+ ### Step 4: Check for SesameOp signature shape
370
+
371
+ Specifically inspect for the SesameOp pattern: OpenAI Assistants API used with a deterministic system-prompt pattern and prompt/completion bodies carrying encoded payloads. Indicators include: a fixed system prompt that does not vary across sessions, completions containing base64 or other encodings exceeding 64 bytes, and a request cadence that is bursty but persistent across hours/days without an obvious developer-session correlation. Cross-reference identity from Step 2 — SesameOp on a service account with no sanctioned AI use is a high-confidence finding.
372
+
373
+ ### Step 5: Verify SDK-level prompt logging is enabled
374
+
375
+ If SDK-level prompt logging is off, the org cannot detect AI C2 at all — Steps 3 and 4 produce empty results regardless of whether C2 is occurring. Confirm, per AI SDK in use:
376
+ - Is full prompt content logged with identity binding?
377
+ - Is full completion content logged with identity binding?
378
+ - Are logs retained long enough for incident investigation (minimum 90 days)?
379
+ - Are logs forwarded to the SIEM or detection platform?
380
+
381
+ If any answer is "no," the org's AI-C2 detection coverage is structurally zero for that SDK, and that finding is itself the most important output of this analysis.
382
+
383
+ ### Step 6: Correlate AI API calls with security-relevant host events
384
+
385
+ For each flagged identity from Steps 2–4, pull the corresponding host-event timeline from EDR/sysmon: file access (especially credential stores and sensitive paths), process creation, network scans, lateral movement indicators, AV/EDR alerts. Apply the correlation windows from the Detection Architecture section (file access within 5 minutes, security alert within 1 minute — PROMPTFLUX pattern, large transfer within 10 minutes — PROMPTSTEAL pattern).
386
+
387
+ ### Step 7: Produce findings
388
+
389
+ For every identity flagged in Step 2, every prompt flagged in Step 3, every SesameOp shape match in Step 4, and every correlation in Step 6, write a finding mapped to AML.T0096 / AML.T0017 / T1071 / T1102 / T1568 with the specific evidence and the SC-7 / SI-3 / SI-4 / CC7 / A.8.16 gap that allowed it to land.
390
+
391
+ ---
392
+
393
+ ## Compliance Theater Check
394
+
395
+ > "Your SC-7 boundary-protection evidence shows AI provider domains — `api.openai.com`, `api.anthropic.com`, `generativelanguage.googleapis.com`, Azure OpenAI endpoints, Bedrock endpoints — on the egress allowlist, with NetFlow or Zeek records demonstrating that egress is monitored. Now answer two questions. First: for each AI provider domain on the allowlist, does the allowlist entry enumerate the specific sanctioned business reason and the identities or services entitled to use it, or is the entry a blanket allow for the domain? Second: do you have SDK-level prompt and completion logging, bound to identity, retained for at least 90 days, and forwarded to the SIEM, for every place AI APIs are called in production? If the allowlist is a blanket domain allow and SDK-level prompt logging is absent, the SC-7 control is theater for AI C2 — boundary inspection of an allowlisted domain cannot distinguish a developer prompt from a SesameOp-encoded C2 prompt, and you have no content-layer evidence to fall back on. SC-7 evidence is structurally incomplete for any org using AI APIs in production unless both an identity-bound business-reason allowlist and SDK-level prompt logging are in place. The control gap is recorded in `data/framework-control-gaps.json` under NIST-800-53-SC-7 — the real requirement names exactly these components."
396
+
397
+ ---
398
+
399
+ ## Output Format
400
+
401
+ ```
402
+ ## AI C2 Detection Assessment
403
+
404
+ **Date:** YYYY-MM-DD
405
+ **Scope:** [hosts / network segments assessed]
406
+
407
+ ### Current Detection Coverage
408
+ | Detection Layer | Deployed | Coverage |
409
+ |---|---|---|
410
+ | Process-level AI API baseline | Yes/No | [% of host types covered] |
411
+ | Behavioral correlation (AI + file/cred/scan) | Yes/No | [configured correlations] |
412
+ | TLS inspection for AI traffic | Yes/No | [% of AI API traffic] |
413
+ | Response monitoring | Yes/No | [coverage] |
414
+
415
+ ### Coverage Gaps
416
+ [What's missing from the detection architecture]
417
+
418
+ ### Active Indicators
419
+ [If this is a live investigation: current IOCs, correlated events]
420
+
421
+ ### Detection Rule Recommendations
422
+ [Specific rules to add, tuned for the org's AI tooling inventory]
423
+
424
+ ### Framework Gap Declaration
425
+ [Per framework: what monitoring control exists, why it doesn't address AI C2]
426
+ ```
427
+
428
+ ---
429
+
430
+ ## Hand-Off / Related Skills
431
+
432
+ After producing the AI C2 detection assessment, the operator should chain into the following skills. Each entry is specific to a finding class this skill produces.
433
+
434
+ - **`dlp-gap-analysis`** — AI-API-as-C2 is a DLP egress channel. The same SDK-level prompt logging recommended above (identity-bound, retained 90+ days, forwarded to SIEM) is the exact instrumentation that detects DLP egress through prompts. Treat the AI API endpoint as a sanctioned-SaaS DLP surface and apply prompt-content classifiers, not just file/email classifiers. A SesameOp-encoded payload is a DLP event the moment the prompt leaves the host.
435
+ - **`defensive-countermeasure-mapping`** — map AI C2 findings to D3FEND: D3-NTA / D3-NTPM (network traffic analysis plus policy mapping for AI provider egress, including the QUIC / HTTP/3 path called out in the RFC Transport Reality section), D3-IOPR (prompt-shape profiling per identity baseline), D3-CSPP (client-server payload profiling on prompt and completion bodies when TLS-inspected). The Layer 1–4 detection architecture maps directly to these counters.
436
+ - **`mcp-agent-trust`** — AI-API-mediated C2 frequently routes through MCP tools whose privilege scope exceeds the documented business reason. When PROMPTSTEAL-pattern correlations surface (AI API call + credential-store access + large-egress), pivot into MCP trust assessment as a compensating control: tightening MCP tool allowlists and removing shell/process-execution-capable servers reduces the blast radius of the AI agent that the C2 is steering.
437
+ - **`attack-surface-pentest`** — AI-API egress channels must be enumerated in attack-surface management and exercised in adversary-emulation engagements. Most pen-test scopes test for outbound DNS / generic HTTPS C2 and do not specifically exercise legitimate-AI-SaaS-as-C2. Without this, the SesameOp / PROMPTFLUX / PROMPTSTEAL signature shapes are detected only post-incident.
438
+ - **`compliance-theater`** — test whether the org's SC-7 boundary-protection claim is satisfied by domain allowlisting alone. It is theater: see the SC-7 entry the project added in v0.3.0 of `data/framework-control-gaps.json`, which names the real requirement (identity-bound business-reason allowlist plus SDK-level prompt logging). Boundary inspection of an allowlisted AI provider domain cannot distinguish a developer prompt from a C2-encoded prompt.
439
+
440
+ For ephemeral / serverless workloads (per AGENTS.md rule #9): per-host EDR-side correlation (Layer 2) is architecturally impossible when the host's lifetime is shorter than the correlation window. The scoped alternative is identity-bound prompt logging at the SDK layer combined with workload-identity correlation in the SIEM (e.g., correlate AI API calls by IAM role / service-account identity rather than by host), which preserves the SesameOp / PROMPTFLUX / PROMPTSTEAL signature shapes across short-lived function invocations.