@gendigital/sage-opencode 0.11.0 → 0.13.0

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 (44) hide show
  1. package/README.md +1 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +255 -74
  4. package/dist/index.js.map +1 -1
  5. package/dist/mcp-server.cjs +230 -96
  6. package/dist/mcp-server.cjs.map +4 -4
  7. package/dist/plugin-discovery.d.ts +1 -0
  8. package/dist/plugin-discovery.d.ts.map +1 -1
  9. package/dist/plugin-discovery.js +27 -1
  10. package/dist/plugin-discovery.js.map +1 -1
  11. package/dist/startup-scan.d.ts +11 -3
  12. package/dist/startup-scan.d.ts.map +1 -1
  13. package/dist/startup-scan.js +59 -21
  14. package/dist/startup-scan.js.map +1 -1
  15. package/dist/tool-handler.d.ts +2 -1
  16. package/dist/tool-handler.d.ts.map +1 -1
  17. package/dist/tool-handler.js +17 -4
  18. package/dist/tool-handler.js.map +1 -1
  19. package/package.json +3 -3
  20. package/resources/threats/_macros.yaml +193 -0
  21. package/resources/threats/agent-layer.yaml +19 -1
  22. package/resources/threats/commands.yaml +165 -31
  23. package/resources/threats/credentials.yaml +24 -4
  24. package/resources/threats/dummy.yaml +52 -17
  25. package/resources/threats/files.yaml +38 -0
  26. package/resources/threats/mac-commands.yaml +118 -27
  27. package/resources/threats/mac-credentials.yaml +34 -8
  28. package/resources/threats/mac-files.yaml +20 -0
  29. package/resources/threats/mac-obfuscation.yaml +28 -6
  30. package/resources/threats/mac-persistence.yaml +30 -4
  31. package/resources/threats/mac-supply-chain.yaml +12 -3
  32. package/resources/threats/mitre.yaml +325 -62
  33. package/resources/threats/obfuscation.yaml +33 -8
  34. package/resources/threats/persistence.yaml +40 -5
  35. package/resources/threats/prompt-injection.yaml +58 -0
  36. package/resources/threats/self-defense.yaml +15 -2
  37. package/resources/threats/supply_chain.yaml +6 -1
  38. package/resources/threats/urls.yaml +10 -0
  39. package/resources/threats/win-commands.yaml +294 -60
  40. package/resources/threats/win-credentials.yaml +68 -9
  41. package/resources/threats/win-files.yaml +20 -0
  42. package/resources/threats/win-obfuscation.yaml +56 -8
  43. package/resources/threats/win-persistence.yaml +45 -7
  44. package/resources/threats/win-supply-chain.yaml +5 -1
@@ -7,10 +7,13 @@
7
7
 
8
8
  # osascript -e 'do shell script' (AppleScript shell execution)
9
9
  - id: "CLT-MAC-CMD-001"
10
+ version: 1
11
+ detection_name: "CMD:SageMacOSCommand-A [Heur]"
10
12
  category: tool
11
13
  severity: critical
12
14
  confidence: 0.95
13
- pattern: "\\bosascript\\b.*-e.*do shell script"
15
+ # {{CMD_POS}} + {{NOT_FILENAME}}, same shape as CLT-CMD-009.
16
+ pattern: "{{CMD_POS}}osascript{{NOT_FILENAME}}.*-e.*do shell script"
14
17
  case_insensitive: true
15
18
  match_on: command
16
19
  title: "AppleScript shell execution via osascript -e"
@@ -19,10 +22,13 @@
19
22
 
20
23
  # osascript -l JavaScript (JXA execution)
21
24
  - id: "CLT-MAC-CMD-002"
25
+ version: 1
26
+ detection_name: "CMD:SageMacOSCommand-B [Heur]"
22
27
  category: tool
23
28
  severity: critical
24
29
  confidence: 0.90
25
- pattern: "\\bosascript\\b.*-l\\s+JavaScript"
30
+ # {{CMD_POS}} + {{NOT_FILENAME}}, same shape as CLT-CMD-009.
31
+ pattern: "{{CMD_POS}}osascript{{NOT_FILENAME}}.*-l\\s+JavaScript"
26
32
  case_insensitive: true
27
33
  match_on: command
28
34
  title: "JavaScript for Automation (JXA) execution via osascript"
@@ -31,10 +37,15 @@
31
37
 
32
38
  # Pipe to osascript (stdin AppleScript execution)
33
39
  - id: "CLT-MAC-CMD-003"
40
+ version: 1
41
+ detection_name: "CMD:SageMacOSCommand-C [Heur]"
34
42
  category: tool
35
43
  severity: critical
36
44
  confidence: 0.90
37
- pattern: "\\|\\s*osascript"
45
+ # {{NOT_FILENAME}} rejects a longer identifier (`osascriptable-formatter`);
46
+ # the pipe itself is already a real command-position boundary, so a full
47
+ # {{CMD_POS}} isn't needed here.
48
+ pattern: "\\|\\s*osascript{{NOT_FILENAME}}"
38
49
  match_on: command
39
50
  title: "Piped input to osascript (stdin AppleScript execution)"
40
51
  expires_at: null
@@ -42,10 +53,17 @@
42
53
 
43
54
  # osascript loading script file from remote download
44
55
  - id: "CLT-MAC-CMD-004"
56
+ version: 1
57
+ detection_name: "CMD:SageMacOSCommand-D [Heur]"
45
58
  category: tool
46
59
  severity: critical
47
60
  confidence: 0.90
48
- pattern: "(curl|wget).*\\|.*osascript|osascript.*(curl|wget)"
61
+ # {{CMD_POS}} + {{NOT_FILENAME}} on both leading AND trailing identifiers of
62
+ # each alternative, same shape as CLT-CMD-009. Had no boundary at all. The
63
+ # trailing {{NOT_FILENAME}} matters here too -- without it, "osascript" and
64
+ # "curl"/"wget" match as substrings of longer identifiers
65
+ # (osascriptable-tool, start_curling_service).
66
+ pattern: "{{CMD_POS}}(curl|wget){{NOT_FILENAME}}.*\\|.*osascript{{NOT_FILENAME}}|{{CMD_POS}}osascript{{NOT_FILENAME}}.*(curl|wget){{NOT_FILENAME}}"
49
67
  case_insensitive: true
50
68
  match_on: command
51
69
  title: "Remote script download piped to osascript"
@@ -56,10 +74,13 @@
56
74
 
57
75
  # open -a Terminal (launch Terminal with script)
58
76
  - id: "CLT-MAC-CMD-005"
77
+ version: 1
78
+ detection_name: "CMD:SageMacOSCommand-E [Heur]"
59
79
  category: tool
60
80
  severity: warning
61
81
  confidence: 0.60
62
- pattern: "\\bopen\\s+-a\\s+Terminal"
82
+ # {{CMD_POS}} + {{NOT_FILENAME}}, same shape as CLT-CMD-009.
83
+ pattern: "{{CMD_POS}}open{{NOT_FILENAME}}\\s+-a\\s+Terminal"
63
84
  match_on: command
64
85
  title: "Launch Terminal application via open -a"
65
86
  expires_at: null
@@ -67,10 +88,13 @@
67
88
 
68
89
  # open with hidden/background flags
69
90
  - id: "CLT-MAC-CMD-006"
91
+ version: 1
92
+ detection_name: "CMD:SageMacOSCommand-F [Heur]"
70
93
  category: tool
71
94
  severity: warning
72
95
  confidence: 0.60
73
- pattern: "\\bopen\\s+(-[jg]|--hide|--background)"
96
+ # {{CMD_POS}} + {{NOT_FILENAME}}, same shape as CLT-MAC-CMD-005.
97
+ pattern: "{{CMD_POS}}open{{NOT_FILENAME}}\\s+(-[jg]|--hide|--background)"
74
98
  match_on: command
75
99
  title: "Launch application hidden/background via open"
76
100
  expires_at: null
@@ -80,10 +104,13 @@
80
104
 
81
105
  # dscl user/group manipulation
82
106
  - id: "CLT-MAC-CMD-007"
107
+ version: 1
108
+ detection_name: "CMD:SageMacOSCommand-G [Heur]"
83
109
  category: tool
84
110
  severity: warning
85
111
  confidence: 0.60
86
- pattern: "\\bdscl\\b.*(-create|-delete|-passwd|-append)"
112
+ # {{CMD_POS}} + {{NOT_FILENAME}}, same shape as CLT-CMD-009.
113
+ pattern: "{{CMD_POS}}dscl{{NOT_FILENAME}}.*(-create|-delete|-passwd|-append)"
87
114
  match_on: command
88
115
  title: "Directory Services user/group manipulation via dscl"
89
116
  expires_at: null
@@ -91,10 +118,13 @@
91
118
 
92
119
  # networksetup proxy/DNS manipulation
93
120
  - id: "CLT-MAC-CMD-008"
121
+ version: 1
122
+ detection_name: "CMD:SageMacOSCommand-H [Heur]"
94
123
  category: tool
95
124
  severity: warning
96
125
  confidence: 0.60
97
- pattern: "\\bnetworksetup\\b.*(-setwebproxy|-setsocksfirewallproxy|-setdnsservers|-setautoproxyurl)"
126
+ # {{CMD_POS}} + {{NOT_FILENAME}}, same shape as CLT-CMD-009.
127
+ pattern: "{{CMD_POS}}networksetup{{NOT_FILENAME}}.*(-setwebproxy|-setsocksfirewallproxy|-setdnsservers|-setautoproxyurl)"
98
128
  case_insensitive: true
99
129
  match_on: command
100
130
  title: "Network proxy/DNS manipulation via networksetup"
@@ -103,10 +133,13 @@
103
133
 
104
134
  # systemsetup enabling remote access
105
135
  - id: "CLT-MAC-CMD-009"
136
+ version: 1
137
+ detection_name: "CMD:SageMacOSCommand-I [Heur]"
106
138
  category: tool
107
139
  severity: critical
108
140
  confidence: 0.90
109
- pattern: "\\bsystemsetup\\b.*(-setremotelogin\\s+on|-setwakeonnetworkaccess\\s+on)"
141
+ # {{CMD_POS}} + {{NOT_FILENAME}}, same shape as CLT-CMD-009.
142
+ pattern: "{{CMD_POS}}systemsetup{{NOT_FILENAME}}.*(-setremotelogin\\s+on|-setwakeonnetworkaccess\\s+on)"
110
143
  case_insensitive: true
111
144
  match_on: command
112
145
  title: "Enable remote login/wake via systemsetup"
@@ -115,10 +148,14 @@
115
148
 
116
149
  # kickstart ARD remote management
117
150
  - id: "CLT-MAC-CMD-010"
151
+ version: 1
152
+ detection_name: "CMD:SageMacOSCommand-J [Heur]"
118
153
  category: tool
119
154
  severity: critical
120
155
  confidence: 0.90
121
- pattern: "kickstart.*-activate.*-configure"
156
+ # {{CMD_POS}} + {{NOT_FILENAME}}, same shape as CLT-CMD-009. Had no
157
+ # boundary at all.
158
+ pattern: "{{CMD_POS}}kickstart{{NOT_FILENAME}}.*-activate.*-configure"
122
159
  case_insensitive: true
123
160
  match_on: command
124
161
  title: "Apple Remote Desktop activation via kickstart"
@@ -127,10 +164,13 @@
127
164
 
128
165
  # installer -pkg -target / (silent package install)
129
166
  - id: "CLT-MAC-CMD-011"
167
+ version: 1
168
+ detection_name: "CMD:SageMacOSCommand-K [Heur]"
130
169
  category: tool
131
170
  severity: warning
132
171
  confidence: 0.60
133
- pattern: "\\binstaller\\b.*-pkg.*-target"
172
+ # {{CMD_POS}} + {{NOT_FILENAME}}, same shape as CLT-CMD-009.
173
+ pattern: "{{CMD_POS}}installer{{NOT_FILENAME}}.*-pkg.*-target"
134
174
  case_insensitive: true
135
175
  match_on: command
136
176
  title: "Silent package install via installer command"
@@ -139,10 +179,13 @@
139
179
 
140
180
  # hdiutil mount remote DMG
141
181
  - id: "CLT-MAC-CMD-012"
182
+ version: 1
183
+ detection_name: "CMD:SageMacOSCommand-L [Heur]"
142
184
  category: tool
143
185
  severity: warning
144
186
  confidence: 0.60
145
- pattern: "\\bhdiutil\\b.*\\b(attach|mount)\\b.*https?://"
187
+ # {{CMD_POS}} + {{NOT_FILENAME}}, same shape as CLT-CMD-009.
188
+ pattern: "{{CMD_POS}}hdiutil{{NOT_FILENAME}}.*\\b(attach|mount)\\b.*https?://"
146
189
  case_insensitive: true
147
190
  match_on: command
148
191
  title: "Mount remote DMG via hdiutil"
@@ -151,10 +194,13 @@
151
194
 
152
195
  # pkgutil --forget (package receipt manipulation)
153
196
  - id: "CLT-MAC-CMD-013"
197
+ version: 1
198
+ detection_name: "CMD:SageMacOSCommand-M [Heur]"
154
199
  category: tool
155
200
  severity: warning
156
201
  confidence: 0.60
157
- pattern: "\\bpkgutil\\b.*--forget"
202
+ # {{CMD_POS}} + {{NOT_FILENAME}}, same shape as CLT-CMD-009.
203
+ pattern: "{{CMD_POS}}pkgutil{{NOT_FILENAME}}.*--forget"
158
204
  match_on: command
159
205
  title: "Package receipt removal via pkgutil --forget"
160
206
  expires_at: null
@@ -164,10 +210,13 @@
164
210
 
165
211
  # diskutil eraseDisk
166
212
  - id: "CLT-MAC-CMD-014"
213
+ version: 1
214
+ detection_name: "CMD:SageMacOSCommand-N [Heur]"
167
215
  category: tool
168
216
  severity: critical
169
217
  confidence: 0.95
170
- pattern: "\\bdiskutil\\b.*\\b(eraseDisk|partitionDisk|secureErase)\\b"
218
+ # {{CMD_POS}} + {{NOT_FILENAME}}, same shape as CLT-CMD-009.
219
+ pattern: "{{CMD_POS}}diskutil{{NOT_FILENAME}}.*\\b(eraseDisk|partitionDisk|secureErase)\\b"
171
220
  match_on: command
172
221
  title: "Disk erase/partition via diskutil"
173
222
  expires_at: null
@@ -175,10 +224,13 @@
175
224
 
176
225
  # tmutil delete (Time Machine backup deletion — ransomware indicator)
177
226
  - id: "CLT-MAC-CMD-015"
227
+ version: 1
228
+ detection_name: "CMD:SageMacOSCommand-O [Heur]"
178
229
  category: tool
179
230
  severity: critical
180
231
  confidence: 0.95
181
- pattern: "\\btmutil\\b.*\\b(delete|disable)\\b"
232
+ # {{CMD_POS}} + {{NOT_FILENAME}}, same shape as CLT-CMD-009.
233
+ pattern: "{{CMD_POS}}tmutil{{NOT_FILENAME}}.*\\b(delete|disable)\\b"
182
234
  match_on: command
183
235
  title: "Time Machine backup deletion/disable via tmutil (ransomware indicator)"
184
236
  expires_at: null
@@ -188,10 +240,13 @@
188
240
 
189
241
  # spctl --master-disable (Gatekeeper disable)
190
242
  - id: "CLT-MAC-CMD-016"
243
+ version: 1
244
+ detection_name: "CMD:SageMacOSCommand-P [Heur]"
191
245
  category: tool
192
246
  severity: critical
193
247
  confidence: 0.95
194
- pattern: "\\bspctl\\b.*--master-disable"
248
+ # {{CMD_POS}} + {{NOT_FILENAME}}, same shape as CLT-CMD-009.
249
+ pattern: "{{CMD_POS}}spctl{{NOT_FILENAME}}.*--master-disable"
195
250
  match_on: command
196
251
  title: "Gatekeeper disable via spctl --master-disable"
197
252
  expires_at: null
@@ -199,10 +254,13 @@
199
254
 
200
255
  # csrutil disable (SIP disable)
201
256
  - id: "CLT-MAC-CMD-017"
257
+ version: 1
258
+ detection_name: "CMD:SageMacOSCommand-Q [Heur]"
202
259
  category: tool
203
260
  severity: critical
204
261
  confidence: 0.95
205
- pattern: "\\bcsrutil\\b.*\\bdisable\\b"
262
+ # {{CMD_POS}} + {{NOT_FILENAME}}, same shape as CLT-CMD-009.
263
+ pattern: "{{CMD_POS}}csrutil{{NOT_FILENAME}}.*\\bdisable\\b"
206
264
  match_on: command
207
265
  title: "System Integrity Protection disable via csrutil"
208
266
  expires_at: null
@@ -210,10 +268,15 @@
210
268
 
211
269
  # defaults write LSQuarantine (quarantine flag disable)
212
270
  - id: "CLT-MAC-CMD-018"
271
+ version: 1
272
+ detection_name: "CMD:SageMacOSCommand-R [Heur]"
213
273
  category: tool
214
274
  severity: critical
215
275
  confidence: 0.90
216
- pattern: "\\bdefaults\\b.*\\bwrite\\b.*LSQuarantine"
276
+ # {{CMD_POS}} + {{NOT_FILENAME}} on `defaults`, same shape as CLT-CMD-009.
277
+ # The inner `\bwrite\b` is left as bare -- only reachable once `defaults`
278
+ # has already matched at command position.
279
+ pattern: "{{CMD_POS}}defaults{{NOT_FILENAME}}.*\\bwrite\\b.*LSQuarantine"
217
280
  case_insensitive: true
218
281
  match_on: command
219
282
  title: "Quarantine flag disable via defaults write LSQuarantine"
@@ -222,10 +285,13 @@
222
285
 
223
286
  # xattr -d com.apple.quarantine (quarantine removal)
224
287
  - id: "CLT-MAC-CMD-019"
288
+ version: 1
289
+ detection_name: "CMD:SageMacOSCommand-S [Heur]"
225
290
  category: tool
226
291
  severity: warning
227
292
  confidence: 0.60
228
- pattern: "\\bxattr\\b.*-d.*com\\.apple\\.quarantine"
293
+ # {{CMD_POS}} + {{NOT_FILENAME}}, same shape as CLT-CMD-009.
294
+ pattern: "{{CMD_POS}}xattr{{NOT_FILENAME}}.*-d.*com\\.apple\\.quarantine"
229
295
  match_on: command
230
296
  title: "Quarantine attribute removal via xattr"
231
297
  expires_at: null
@@ -233,10 +299,13 @@
233
299
 
234
300
  # pfctl -d (packet filter / firewall disable)
235
301
  - id: "CLT-MAC-CMD-020"
302
+ version: 1
303
+ detection_name: "CMD:SageMacOSCommand-T [Heur]"
236
304
  category: tool
237
305
  severity: critical
238
306
  confidence: 0.90
239
- pattern: "\\bpfctl\\b.*\\s-d\\b"
307
+ # {{CMD_POS}} + {{NOT_FILENAME}}, same shape as CLT-CMD-009.
308
+ pattern: "{{CMD_POS}}pfctl{{NOT_FILENAME}}.*\\s-d\\b"
240
309
  match_on: command
241
310
  title: "Packet filter (firewall) disable via pfctl -d"
242
311
  expires_at: null
@@ -244,10 +313,13 @@
244
313
 
245
314
  # tccutil reset (TCC privacy permissions reset)
246
315
  - id: "CLT-MAC-CMD-021"
316
+ version: 1
317
+ detection_name: "CMD:SageMacOSCommand-U [Heur]"
247
318
  category: tool
248
319
  severity: critical
249
320
  confidence: 0.90
250
- pattern: "\\btccutil\\b.*\\breset\\b"
321
+ # {{CMD_POS}} + {{NOT_FILENAME}}, same shape as CLT-CMD-009.
322
+ pattern: "{{CMD_POS}}tccutil{{NOT_FILENAME}}.*\\breset\\b"
251
323
  match_on: command
252
324
  title: "TCC privacy permissions reset via tccutil"
253
325
  expires_at: null
@@ -255,10 +327,13 @@
255
327
 
256
328
  # launchctl unload security daemons
257
329
  - id: "CLT-MAC-CMD-022"
330
+ version: 1
331
+ detection_name: "CMD:SageMacOSCommand-V [Heur]"
258
332
  category: tool
259
333
  severity: critical
260
334
  confidence: 0.90
261
- pattern: "\\blaunchctl\\b.*\\b(unload|bootout)\\b.*(com\\.apple\\.MRT|com\\.apple\\.XProtect|com\\.apple\\.security)"
335
+ # {{CMD_POS}} + {{NOT_FILENAME}}, same shape as CLT-CMD-009.
336
+ pattern: "{{CMD_POS}}launchctl{{NOT_FILENAME}}.*\\b(unload|bootout)\\b.*(com\\.apple\\.MRT|com\\.apple\\.XProtect|com\\.apple\\.security)"
262
337
  case_insensitive: true
263
338
  match_on: command
264
339
  title: "Unload macOS security daemon via launchctl"
@@ -267,10 +342,13 @@
267
342
 
268
343
  # defaults write to disable macOS security features
269
344
  - id: "CLT-MAC-CMD-023"
345
+ version: 1
346
+ detection_name: "CMD:SageMacOSCommand-W [Heur]"
270
347
  category: tool
271
348
  severity: critical
272
349
  confidence: 0.90
273
- pattern: "\\bdefaults\\b.*\\bwrite\\b.*(com\\.apple\\.Finder\\s+AppleShowAllFiles|com\\.apple\\.LaunchServices\\s+LSQuarantine|com\\.apple\\.loginwindow)"
350
+ # {{CMD_POS}} + {{NOT_FILENAME}}, same shape as CLT-MAC-CMD-018.
351
+ pattern: "{{CMD_POS}}defaults{{NOT_FILENAME}}.*\\bwrite\\b.*(com\\.apple\\.Finder\\s+AppleShowAllFiles|com\\.apple\\.LaunchServices\\s+LSQuarantine|com\\.apple\\.loginwindow)"
274
352
  case_insensitive: true
275
353
  match_on: command
276
354
  title: "Modify macOS security-related defaults"
@@ -281,10 +359,13 @@
281
359
 
282
360
  # dscl . -passwd (change user password)
283
361
  - id: "CLT-MAC-CMD-024"
362
+ version: 1
363
+ detection_name: "CMD:SageMacOSCommand-X [Heur]"
284
364
  category: tool
285
365
  severity: critical
286
366
  confidence: 0.90
287
- pattern: "\\bdscl\\b.*\\s-passwd\\b"
367
+ # {{CMD_POS}} + {{NOT_FILENAME}}, same shape as CLT-MAC-CMD-007.
368
+ pattern: "{{CMD_POS}}dscl{{NOT_FILENAME}}.*\\s-passwd\\b"
288
369
  match_on: command
289
370
  title: "User password change via dscl"
290
371
  expires_at: null
@@ -292,10 +373,13 @@
292
373
 
293
374
  # dseditgroup add user to admin
294
375
  - id: "CLT-MAC-CMD-025"
376
+ version: 1
377
+ detection_name: "CMD:SageMacOSCommand-Y [Heur]"
295
378
  category: tool
296
379
  severity: critical
297
380
  confidence: 0.95
298
- pattern: "\\bdseditgroup\\b.*-o\\s+edit.*-a.*admin"
381
+ # {{CMD_POS}} + {{NOT_FILENAME}}, same shape as CLT-CMD-009.
382
+ pattern: "{{CMD_POS}}dseditgroup{{NOT_FILENAME}}.*-o\\s+edit.*-a.*admin"
299
383
  match_on: command
300
384
  title: "Add user to admin group via dseditgroup"
301
385
  expires_at: null
@@ -303,10 +387,14 @@
303
387
 
304
388
  # createhomedir — create home directory for arbitrary user
305
389
  - id: "CLT-MAC-CMD-026"
390
+ version: 1
391
+ detection_name: "CMD:SageMacOSCommand-Z [Heur]"
306
392
  category: tool
307
393
  severity: warning
308
394
  confidence: 0.60
309
- pattern: "\\bcreatehomedir\\b"
395
+ # {{CMD_POS}} requires command position; {{HAS_ARG}} drops a bare mention,
396
+ # since createhomedir with no flags just prints usage.
397
+ pattern: "{{CMD_POS}}createhomedir{{NOT_FILENAME}}{{HAS_ARG}}"
310
398
  match_on: command
311
399
  title: "Create home directory for user via createhomedir"
312
400
  expires_at: null
@@ -318,10 +406,13 @@
318
406
 
319
407
  # screencapture to remote or hidden location
320
408
  - id: "CLT-MAC-CMD-027"
409
+ version: 1
410
+ detection_name: "CMD:SageMacOSCommand-AA [Heur]"
321
411
  category: tool
322
412
  severity: warning
323
413
  confidence: 0.60
324
- pattern: "\\bscreencapture\\b.*(-x|-C)"
414
+ # {{CMD_POS}} + {{NOT_FILENAME}}, same shape as CLT-CMD-009.
415
+ pattern: "{{CMD_POS}}screencapture{{NOT_FILENAME}}.*(-x|-C)"
325
416
  match_on: command
326
417
  title: "Silent screen capture via screencapture"
327
418
  expires_at: null
@@ -4,10 +4,15 @@
4
4
 
5
5
  # Keychain password extraction (find-generic-password)
6
6
  - id: "CLT-MAC-CRED-001"
7
+ version: 1
8
+ detection_name: "CMD:SageMacOSCredential-A [Heur]"
7
9
  category: secrets
8
10
  severity: critical
9
11
  confidence: 0.95
10
- pattern: "\\bsecurity\\b.*\\bfind-generic-password\\b.*-w"
12
+ # {{CMD_POS}} + {{NOT_FILENAME}} on `security`, same shape as CLT-CMD-009.
13
+ # The inner `\bfind-generic-password\b` is left as bare -- only reachable
14
+ # once `security` has already matched at command position.
15
+ pattern: "{{CMD_POS}}security{{NOT_FILENAME}}.*\\bfind-generic-password\\b.*-w"
11
16
  match_on: command
12
17
  title: "Keychain password extraction via security find-generic-password"
13
18
  expires_at: null
@@ -15,10 +20,13 @@
15
20
 
16
21
  # Keychain internet password extraction
17
22
  - id: "CLT-MAC-CRED-002"
23
+ version: 1
24
+ detection_name: "CMD:SageMacOSCredential-B [Heur]"
18
25
  category: secrets
19
26
  severity: critical
20
27
  confidence: 0.95
21
- pattern: "\\bsecurity\\b.*\\bfind-internet-password\\b.*-w"
28
+ # {{CMD_POS}} + {{NOT_FILENAME}} on `security`, same shape as CLT-CMD-009.
29
+ pattern: "{{CMD_POS}}security{{NOT_FILENAME}}.*\\bfind-internet-password\\b.*-w"
22
30
  match_on: command
23
31
  title: "Keychain internet password extraction via security find-internet-password"
24
32
  expires_at: null
@@ -26,10 +34,13 @@
26
34
 
27
35
  # Keychain dump
28
36
  - id: "CLT-MAC-CRED-003"
37
+ version: 1
38
+ detection_name: "CMD:SageMacOSCredential-C [Heur]"
29
39
  category: secrets
30
40
  severity: critical
31
41
  confidence: 0.95
32
- pattern: "\\bsecurity\\b.*\\bdump-keychain\\b"
42
+ # {{CMD_POS}} + {{NOT_FILENAME}} on `security`, same shape as CLT-CMD-009.
43
+ pattern: "{{CMD_POS}}security{{NOT_FILENAME}}.*\\bdump-keychain\\b"
33
44
  match_on: command
34
45
  title: "Full keychain dump via security dump-keychain"
35
46
  expires_at: null
@@ -37,10 +48,13 @@
37
48
 
38
49
  # Keychain unlock with plaintext password
39
50
  - id: "CLT-MAC-CRED-004"
51
+ version: 1
52
+ detection_name: "CMD:SageMacOSCredential-D [Heur]"
40
53
  category: secrets
41
54
  severity: critical
42
55
  confidence: 0.90
43
- pattern: "\\bsecurity\\b.*\\bunlock-keychain\\b.*-p"
56
+ # {{CMD_POS}} + {{NOT_FILENAME}} on `security`, same shape as CLT-CMD-009.
57
+ pattern: "{{CMD_POS}}security{{NOT_FILENAME}}.*\\bunlock-keychain\\b.*-p"
44
58
  match_on: command
45
59
  title: "Keychain unlock with plaintext password"
46
60
  expires_at: null
@@ -48,10 +62,13 @@
48
62
 
49
63
  # Keychain export
50
64
  - id: "CLT-MAC-CRED-005"
65
+ version: 1
66
+ detection_name: "CMD:SageMacOSCredential-E [Heur]"
51
67
  category: secrets
52
68
  severity: warning
53
69
  confidence: 0.60
54
- pattern: "\\bsecurity\\b.*\\bexport\\b.*-k"
70
+ # {{CMD_POS}} + {{NOT_FILENAME}} on `security`, same shape as CLT-CMD-009.
71
+ pattern: "{{CMD_POS}}security{{NOT_FILENAME}}.*\\bexport\\b.*-k"
55
72
  match_on: command
56
73
  title: "Keychain item export via security export"
57
74
  expires_at: null
@@ -59,10 +76,13 @@
59
76
 
60
77
  # Keychain deletion
61
78
  - id: "CLT-MAC-CRED-006"
79
+ version: 1
80
+ detection_name: "CMD:SageMacOSCredential-F [Heur]"
62
81
  category: secrets
63
82
  severity: critical
64
83
  confidence: 0.90
65
- pattern: "\\bsecurity\\b.*\\bdelete-keychain\\b"
84
+ # {{CMD_POS}} + {{NOT_FILENAME}} on `security`, same shape as CLT-CMD-009.
85
+ pattern: "{{CMD_POS}}security{{NOT_FILENAME}}.*\\bdelete-keychain\\b"
66
86
  match_on: command
67
87
  title: "Keychain deletion via security delete-keychain"
68
88
  expires_at: null
@@ -70,10 +90,13 @@
70
90
 
71
91
  # Directory Services auth data read
72
92
  - id: "CLT-MAC-CRED-007"
93
+ version: 1
94
+ detection_name: "CMD:SageMacOSCredential-G [Heur]"
73
95
  category: secrets
74
96
  severity: warning
75
97
  confidence: 0.60
76
- pattern: "\\bdscl\\b.*-read.*(AuthenticationAuthority|Password|ShadowHash)"
98
+ # {{CMD_POS}} + {{NOT_FILENAME}}, same shape as CLT-CMD-009.
99
+ pattern: "{{CMD_POS}}dscl{{NOT_FILENAME}}.*-read.*(AuthenticationAuthority|Password|ShadowHash)"
77
100
  match_on: command
78
101
  title: "Read user authentication data via dscl"
79
102
  expires_at: null
@@ -81,10 +104,13 @@
81
104
 
82
105
  # Direct Keychain SQLite access
83
106
  - id: "CLT-MAC-CRED-008"
107
+ version: 1
108
+ detection_name: "CMD:SageMacOSCredential-H [Heur]"
84
109
  category: secrets
85
110
  severity: critical
86
111
  confidence: 0.90
87
- pattern: "\\bsqlite3\\b.*(/Library/Keychains/|login\\.keychain)"
112
+ # {{CMD_POS}} + {{NOT_FILENAME}}, same shape as CLT-CMD-009.
113
+ pattern: "{{CMD_POS}}sqlite3{{NOT_FILENAME}}.*(/Library/Keychains/|login\\.keychain)"
88
114
  match_on: command
89
115
  title: "Direct Keychain database access via sqlite3"
90
116
  expires_at: null
@@ -5,6 +5,8 @@
5
5
 
6
6
  # LaunchAgent/LaunchDaemon plist (migrated from files.yaml CLT-FILE-005)
7
7
  - id: "CLT-MAC-FILE-001"
8
+ version: 1
9
+ detection_name: "FN:SageMacOSFile-A [Heur]"
8
10
  category: tool
9
11
  severity: warning
10
12
  confidence: 0.90
@@ -16,6 +18,8 @@
16
18
 
17
19
  # TCC privacy permissions database
18
20
  - id: "CLT-MAC-FILE-002"
21
+ version: 1
22
+ detection_name: "FN:SageMacOSFile-B [Heur]"
19
23
  category: secrets
20
24
  severity: critical
21
25
  confidence: 0.95
@@ -27,6 +31,8 @@
27
31
 
28
32
  # Authorization database
29
33
  - id: "CLT-MAC-FILE-003"
34
+ version: 1
35
+ detection_name: "FN:SageMacOSFile-C [Heur]"
30
36
  category: secrets
31
37
  severity: critical
32
38
  confidence: 0.95
@@ -38,6 +44,8 @@
38
44
 
39
45
  # Kernel extensions
40
46
  - id: "CLT-MAC-FILE-004"
47
+ version: 1
48
+ detection_name: "FN:SageMacOSFile-D [Heur]"
41
49
  category: tool
42
50
  severity: critical
43
51
  confidence: 0.90
@@ -49,6 +57,8 @@
49
57
 
50
58
  # Security Agent Plugins
51
59
  - id: "CLT-MAC-FILE-005"
60
+ version: 1
61
+ detection_name: "FN:SageMacOSFile-E [Heur]"
52
62
  category: tool
53
63
  severity: critical
54
64
  confidence: 0.90
@@ -60,6 +70,8 @@
60
70
 
61
71
  # Periodic scripts directory
62
72
  - id: "CLT-MAC-FILE-006"
73
+ version: 1
74
+ detection_name: "FN:SageMacOSFile-F [Heur]"
63
75
  category: tool
64
76
  severity: warning
65
77
  confidence: 0.60
@@ -71,6 +83,8 @@
71
83
 
72
84
  # Emond rules directory
73
85
  - id: "CLT-MAC-FILE-007"
86
+ version: 1
87
+ detection_name: "FN:SageMacOSFile-G [Heur]"
74
88
  category: tool
75
89
  severity: critical
76
90
  confidence: 0.90
@@ -82,6 +96,8 @@
82
96
 
83
97
  # Safari credential/cookie stores
84
98
  - id: "CLT-MAC-FILE-008"
99
+ version: 1
100
+ detection_name: "FN:SageMacOSFile-H [Heur]"
85
101
  category: secrets
86
102
  severity: critical
87
103
  confidence: 0.90
@@ -93,6 +109,8 @@
93
109
 
94
110
  # Managed Preferences (MDM profiles)
95
111
  - id: "CLT-MAC-FILE-009"
112
+ version: 1
113
+ detection_name: "FN:SageMacOSFile-I [Heur]"
96
114
  category: tool
97
115
  severity: warning
98
116
  confidence: 0.60
@@ -104,6 +122,8 @@
104
122
 
105
123
  # Keychain files
106
124
  - id: "CLT-MAC-FILE-010"
125
+ version: 1
126
+ detection_name: "FN:SageMacOSFile-J [Heur]"
107
127
  category: secrets
108
128
  severity: critical
109
129
  confidence: 0.90