muaddib-scanner 2.2.26 → 2.2.28
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/package.json +1 -1
- package/src/monitor.js +81 -18
- package/src/response/playbooks.js +387 -346
- package/src/rules/index.js +1136 -1038
- package/src/scanner/ast-detectors.js +237 -0
- package/src/scanner/ast.js +19 -1
package/src/rules/index.js
CHANGED
|
@@ -1,1039 +1,1137 @@
|
|
|
1
|
-
const RULES = {
|
|
2
|
-
// AST detections
|
|
3
|
-
sensitive_string: {
|
|
4
|
-
id: 'MUADDIB-AST-001',
|
|
5
|
-
name: 'Sensitive String Reference',
|
|
6
|
-
severity: 'HIGH',
|
|
7
|
-
confidence: 'medium',
|
|
8
|
-
description: 'Reference a un chemin ou identifiant sensible (.npmrc, .ssh, tokens)',
|
|
9
|
-
references: [
|
|
10
|
-
'https://blog.phylum.io/shai-hulud-npm-worm',
|
|
11
|
-
'https://www.wiz.io/blog/shai-hulud-npm-supply-chain-attack'
|
|
12
|
-
],
|
|
13
|
-
mitre: 'T1552.001'
|
|
14
|
-
},
|
|
15
|
-
env_access: {
|
|
16
|
-
id: 'MUADDIB-AST-002',
|
|
17
|
-
name: 'Sensitive Environment Variable Access',
|
|
18
|
-
severity: 'HIGH',
|
|
19
|
-
confidence: 'high',
|
|
20
|
-
description: 'Acces a une variable d\'environnement sensible (GITHUB_TOKEN, NPM_TOKEN, AWS_*)',
|
|
21
|
-
references: [
|
|
22
|
-
'https://blog.phylum.io/shai-hulud-npm-worm',
|
|
23
|
-
'https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions'
|
|
24
|
-
],
|
|
25
|
-
mitre: 'T1552.001'
|
|
26
|
-
},
|
|
27
|
-
dangerous_call_exec: {
|
|
28
|
-
id: 'MUADDIB-AST-003',
|
|
29
|
-
name: 'Dangerous Function Call',
|
|
30
|
-
severity: 'MEDIUM',
|
|
31
|
-
confidence: 'medium',
|
|
32
|
-
description: 'Appel a une fonction dangereuse (exec, spawn, eval, Function)',
|
|
33
|
-
references: [
|
|
34
|
-
'https://owasp.org/www-community/attacks/Command_Injection'
|
|
35
|
-
],
|
|
36
|
-
mitre: 'T1059'
|
|
37
|
-
},
|
|
38
|
-
dangerous_call_eval: {
|
|
39
|
-
id: 'MUADDIB-AST-004',
|
|
40
|
-
name: 'Eval Usage',
|
|
41
|
-
severity: 'HIGH',
|
|
42
|
-
confidence: 'high',
|
|
43
|
-
description: 'Utilisation de eval() ou new Function() - execution de code dynamique',
|
|
44
|
-
references: [
|
|
45
|
-
'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#never_use_eval!'
|
|
46
|
-
],
|
|
47
|
-
mitre: 'T1059.007'
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
// Shell detections
|
|
51
|
-
curl_exec: {
|
|
52
|
-
id: 'MUADDIB-SHELL-001',
|
|
53
|
-
name: 'Remote Code Execution via Curl',
|
|
54
|
-
severity: 'CRITICAL',
|
|
55
|
-
confidence: 'high',
|
|
56
|
-
description: 'Telecharge et execute du code distant via curl | sh',
|
|
57
|
-
references: [
|
|
58
|
-
'https://blog.phylum.io/shai-hulud-npm-worm'
|
|
59
|
-
],
|
|
60
|
-
mitre: 'T1105'
|
|
61
|
-
},
|
|
62
|
-
reverse_shell: {
|
|
63
|
-
id: 'MUADDIB-SHELL-002',
|
|
64
|
-
name: 'Reverse Shell',
|
|
65
|
-
severity: 'CRITICAL',
|
|
66
|
-
confidence: 'high',
|
|
67
|
-
description: 'Tentative de connexion reverse shell',
|
|
68
|
-
references: [
|
|
69
|
-
'https://attack.mitre.org/techniques/T1059/004/'
|
|
70
|
-
],
|
|
71
|
-
mitre: 'T1059.004'
|
|
72
|
-
},
|
|
73
|
-
home_deletion: {
|
|
74
|
-
id: 'MUADDIB-SHELL-003',
|
|
75
|
-
name: 'Dead Man\'s Switch',
|
|
76
|
-
severity: 'CRITICAL',
|
|
77
|
-
confidence: 'high',
|
|
78
|
-
description: 'Suppression du repertoire home - dead man\'s switch de Shai-Hulud',
|
|
79
|
-
references: [
|
|
80
|
-
'https://www.wiz.io/blog/shai-hulud-npm-supply-chain-attack'
|
|
81
|
-
],
|
|
82
|
-
mitre: 'T1485'
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
// Package detections
|
|
86
|
-
lifecycle_script: {
|
|
87
|
-
id: 'MUADDIB-PKG-001',
|
|
88
|
-
name: 'Suspicious Lifecycle Script',
|
|
89
|
-
severity: 'MEDIUM',
|
|
90
|
-
confidence: 'medium',
|
|
91
|
-
description: 'Script preinstall/postinstall suspect dans package.json',
|
|
92
|
-
references: [
|
|
93
|
-
'https://blog.npmjs.org/post/141577284765/kik-left-pad-and-npm'
|
|
94
|
-
],
|
|
95
|
-
mitre: 'T1195.002'
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
// Obfuscation detections
|
|
99
|
-
obfuscation_detected: {
|
|
100
|
-
id: 'MUADDIB-OBF-001',
|
|
101
|
-
name: 'Code Obfuscation Detected',
|
|
102
|
-
severity: 'HIGH',
|
|
103
|
-
confidence: 'medium',
|
|
104
|
-
description: 'Code fortement obfusque detecte - probablement malveillant',
|
|
105
|
-
references: [
|
|
106
|
-
'https://blog.phylum.io/shai-hulud-npm-worm'
|
|
107
|
-
],
|
|
108
|
-
mitre: 'T1027'
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
// Dependency detections
|
|
112
|
-
known_malicious_package: {
|
|
113
|
-
id: 'MUADDIB-DEP-001',
|
|
114
|
-
name: 'Known Malicious Package',
|
|
115
|
-
severity: 'CRITICAL',
|
|
116
|
-
confidence: 'high',
|
|
117
|
-
description: 'Package present dans la base IOC de packages malveillants connus',
|
|
118
|
-
references: [
|
|
119
|
-
'https://socket.dev/npm/issue'
|
|
120
|
-
],
|
|
121
|
-
mitre: 'T1195.002'
|
|
122
|
-
},
|
|
123
|
-
pypi_malicious_package: {
|
|
124
|
-
id: 'MUADDIB-PYPI-001',
|
|
125
|
-
name: 'Malicious PyPI Package',
|
|
126
|
-
severity: 'CRITICAL',
|
|
127
|
-
confidence: 'high',
|
|
128
|
-
description: 'Package PyPI present dans la base IOC de packages malveillants connus (source: OSV)',
|
|
129
|
-
references: [
|
|
130
|
-
'https://osv.dev/',
|
|
131
|
-
'https://pypi.org/'
|
|
132
|
-
],
|
|
133
|
-
mitre: 'T1195.002'
|
|
134
|
-
},
|
|
135
|
-
pypi_typosquat_detected: {
|
|
136
|
-
id: 'MUADDIB-PYPI-002',
|
|
137
|
-
name: 'PyPI Typosquatting Detected',
|
|
138
|
-
severity: 'HIGH',
|
|
139
|
-
confidence: 'medium',
|
|
140
|
-
description: 'Dependance PyPI suspecte de typosquatting d\'un package populaire (Levenshtein)',
|
|
141
|
-
references: [
|
|
142
|
-
'https://pypi.org/',
|
|
143
|
-
'https://blog.phylum.io/typosquatting-pypi'
|
|
144
|
-
],
|
|
145
|
-
mitre: 'T1195.002'
|
|
146
|
-
},
|
|
147
|
-
suspicious_file: {
|
|
148
|
-
id: 'MUADDIB-DEP-002',
|
|
149
|
-
name: 'Suspicious File in Dependency',
|
|
150
|
-
severity: 'CRITICAL',
|
|
151
|
-
confidence: 'high',
|
|
152
|
-
description: 'Fichier suspect detecte dans une dependance (setup_bun.js, etc.)',
|
|
153
|
-
references: [
|
|
154
|
-
'https://blog.phylum.io/shai-hulud-npm-worm'
|
|
155
|
-
],
|
|
156
|
-
mitre: 'T1195.002'
|
|
157
|
-
},
|
|
158
|
-
shai_hulud_marker: {
|
|
159
|
-
id: 'MUADDIB-DEP-003',
|
|
160
|
-
name: 'Shai-Hulud Marker Detected',
|
|
161
|
-
severity: 'CRITICAL',
|
|
162
|
-
confidence: 'high',
|
|
163
|
-
description: 'Marqueur Shai-Hulud detecte dans le code',
|
|
164
|
-
references: [
|
|
165
|
-
'https://blog.phylum.io/shai-hulud-npm-worm',
|
|
166
|
-
'https://www.wiz.io/blog/shai-hulud-npm-supply-chain-attack'
|
|
167
|
-
],
|
|
168
|
-
mitre: 'T1195.002'
|
|
169
|
-
},
|
|
170
|
-
lifecycle_script_dependency: {
|
|
171
|
-
id: 'MUADDIB-DEP-004',
|
|
172
|
-
name: 'Lifecycle Script in Dependency',
|
|
173
|
-
severity: 'MEDIUM',
|
|
174
|
-
confidence: 'low',
|
|
175
|
-
description: 'Une dependance a un script preinstall/postinstall',
|
|
176
|
-
references: [
|
|
177
|
-
'https://docs.npmjs.com/cli/v9/using-npm/scripts#life-cycle-scripts'
|
|
178
|
-
],
|
|
179
|
-
mitre: 'T1195.002'
|
|
180
|
-
},
|
|
181
|
-
|
|
182
|
-
// Hash detections
|
|
183
|
-
known_malicious_hash: {
|
|
184
|
-
id: 'MUADDIB-HASH-001',
|
|
185
|
-
name: 'Known Malicious File Hash',
|
|
186
|
-
severity: 'CRITICAL',
|
|
187
|
-
confidence: 'high',
|
|
188
|
-
description: 'Hash SHA256 correspond a un fichier malveillant connu',
|
|
189
|
-
references: [
|
|
190
|
-
'https://www.virustotal.com'
|
|
191
|
-
],
|
|
192
|
-
mitre: 'T1195.002'
|
|
193
|
-
},
|
|
194
|
-
|
|
195
|
-
// Dataflow detections
|
|
196
|
-
suspicious_dataflow: {
|
|
197
|
-
id: 'MUADDIB-FLOW-001',
|
|
198
|
-
name: 'Suspicious Data Flow',
|
|
199
|
-
severity: 'CRITICAL',
|
|
200
|
-
confidence: 'high',
|
|
201
|
-
description: 'Flux de donnees suspect: lecture de credentials puis envoi reseau',
|
|
202
|
-
references: [
|
|
203
|
-
'https://blog.phylum.io/shai-hulud-npm-worm'
|
|
204
|
-
],
|
|
205
|
-
mitre: 'T1041'
|
|
206
|
-
},
|
|
207
|
-
|
|
208
|
-
typosquat_detected: {
|
|
209
|
-
id: 'MUADDIB-TYPO-001',
|
|
210
|
-
name: 'Typosquatting Detected',
|
|
211
|
-
severity: 'HIGH',
|
|
212
|
-
confidence: 'high',
|
|
213
|
-
description: 'Package avec un nom tres similaire a un package populaire. Possible typosquatting.',
|
|
214
|
-
references: [
|
|
215
|
-
'https://blog.npmjs.org/post/163723642530/crossenv-malware-on-the-npm-registry',
|
|
216
|
-
'https://snyk.io/blog/typosquatting-attacks/'
|
|
217
|
-
],
|
|
218
|
-
mitre: 'T1195.002'
|
|
219
|
-
},
|
|
220
|
-
|
|
221
|
-
// Package.json script patterns
|
|
222
|
-
curl_pipe_sh: {
|
|
223
|
-
id: 'MUADDIB-PKG-002',
|
|
224
|
-
name: 'Curl Pipe to Shell in Script',
|
|
225
|
-
severity: 'CRITICAL',
|
|
226
|
-
confidence: 'high',
|
|
227
|
-
description: 'Script lifecycle execute curl | sh - telechargement et execution de code distant',
|
|
228
|
-
references: ['https://blog.phylum.io/shai-hulud-npm-worm'],
|
|
229
|
-
mitre: 'T1105'
|
|
230
|
-
},
|
|
231
|
-
wget_pipe_sh: {
|
|
232
|
-
id: 'MUADDIB-PKG-003',
|
|
233
|
-
name: 'Wget Pipe to Shell in Script',
|
|
234
|
-
severity: 'CRITICAL',
|
|
235
|
-
confidence: 'high',
|
|
236
|
-
description: 'Script lifecycle execute wget | sh - telechargement et execution de code distant',
|
|
237
|
-
references: ['https://blog.phylum.io/shai-hulud-npm-worm'],
|
|
238
|
-
mitre: 'T1105'
|
|
239
|
-
},
|
|
240
|
-
eval_usage: {
|
|
241
|
-
id: 'MUADDIB-PKG-004',
|
|
242
|
-
name: 'Eval in Lifecycle Script',
|
|
243
|
-
severity: 'HIGH',
|
|
244
|
-
confidence: 'medium',
|
|
245
|
-
description: 'Utilisation de eval() dans un script lifecycle - execution de code dynamique',
|
|
246
|
-
references: ['https://owasp.org/www-community/attacks/Command_Injection'],
|
|
247
|
-
mitre: 'T1059.007'
|
|
248
|
-
},
|
|
249
|
-
child_process: {
|
|
250
|
-
id: 'MUADDIB-PKG-005',
|
|
251
|
-
name: 'Child Process in Lifecycle Script',
|
|
252
|
-
severity: 'HIGH',
|
|
253
|
-
confidence: 'medium',
|
|
254
|
-
description: 'Reference a child_process dans un script lifecycle',
|
|
255
|
-
references: ['https://owasp.org/www-community/attacks/Command_Injection'],
|
|
256
|
-
mitre: 'T1059'
|
|
257
|
-
},
|
|
258
|
-
npmrc_access: {
|
|
259
|
-
id: 'MUADDIB-PKG-006',
|
|
260
|
-
name: 'npmrc Access',
|
|
261
|
-
severity: 'HIGH',
|
|
262
|
-
confidence: 'high',
|
|
263
|
-
description: 'Acces au fichier .npmrc detecte - risque de vol de token npm',
|
|
264
|
-
references: ['https://blog.phylum.io/shai-hulud-npm-worm'],
|
|
265
|
-
mitre: 'T1552.001'
|
|
266
|
-
},
|
|
267
|
-
github_token_access: {
|
|
268
|
-
id: 'MUADDIB-PKG-007',
|
|
269
|
-
name: 'GitHub Token Access',
|
|
270
|
-
severity: 'HIGH',
|
|
271
|
-
confidence: 'high',
|
|
272
|
-
description: 'Acces au GITHUB_TOKEN detecte',
|
|
273
|
-
references: ['https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions'],
|
|
274
|
-
mitre: 'T1552.001'
|
|
275
|
-
},
|
|
276
|
-
aws_credential_access: {
|
|
277
|
-
id: 'MUADDIB-PKG-008',
|
|
278
|
-
name: 'AWS Credential Access',
|
|
279
|
-
severity: 'HIGH',
|
|
280
|
-
confidence: 'high',
|
|
281
|
-
description: 'Acces aux credentials AWS detecte',
|
|
282
|
-
references: ['https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html'],
|
|
283
|
-
mitre: 'T1552.001'
|
|
284
|
-
},
|
|
285
|
-
base64_encoding: {
|
|
286
|
-
id: 'MUADDIB-PKG-009',
|
|
287
|
-
name: 'Base64 Encoding in Script',
|
|
288
|
-
severity: 'MEDIUM',
|
|
289
|
-
confidence: 'low',
|
|
290
|
-
description: 'Encodage base64 dans un script lifecycle - souvent utilise pour obfusquer du code malveillant',
|
|
291
|
-
references: ['https://attack.mitre.org/techniques/T1027/'],
|
|
292
|
-
mitre: 'T1027'
|
|
293
|
-
},
|
|
294
|
-
|
|
295
|
-
// Shell script patterns
|
|
296
|
-
curl_pipe_shell: {
|
|
297
|
-
id: 'MUADDIB-SHELL-004',
|
|
298
|
-
name: 'Curl Pipe to Shell',
|
|
299
|
-
severity: 'CRITICAL',
|
|
300
|
-
confidence: 'high',
|
|
301
|
-
description: 'Telechargement et execution via curl | sh dans un script shell',
|
|
302
|
-
references: ['https://blog.phylum.io/shai-hulud-npm-worm'],
|
|
303
|
-
mitre: 'T1105'
|
|
304
|
-
},
|
|
305
|
-
wget_chmod_exec: {
|
|
306
|
-
id: 'MUADDIB-SHELL-005',
|
|
307
|
-
name: 'Wget Download and Execute',
|
|
308
|
-
severity: 'CRITICAL',
|
|
309
|
-
confidence: 'high',
|
|
310
|
-
description: 'Telechargement et execution de binaire via wget + chmod',
|
|
311
|
-
references: ['https://blog.phylum.io/shai-hulud-npm-worm'],
|
|
312
|
-
mitre: 'T1105'
|
|
313
|
-
},
|
|
314
|
-
netcat_shell: {
|
|
315
|
-
id: 'MUADDIB-SHELL-006',
|
|
316
|
-
name: 'Netcat Shell',
|
|
317
|
-
severity: 'CRITICAL',
|
|
318
|
-
confidence: 'high',
|
|
319
|
-
description: 'Shell netcat detecte - acces distant non autorise',
|
|
320
|
-
references: ['https://attack.mitre.org/techniques/T1059/004/'],
|
|
321
|
-
mitre: 'T1059.004'
|
|
322
|
-
},
|
|
323
|
-
shred_home: {
|
|
324
|
-
id: 'MUADDIB-SHELL-007',
|
|
325
|
-
name: 'Home Directory Destruction',
|
|
326
|
-
severity: 'CRITICAL',
|
|
327
|
-
confidence: 'high',
|
|
328
|
-
description: 'Destruction de donnees (shred $HOME) - dead man\'s switch de Shai-Hulud',
|
|
329
|
-
references: ['https://www.wiz.io/blog/shai-hulud-npm-supply-chain-attack'],
|
|
330
|
-
mitre: 'T1485'
|
|
331
|
-
},
|
|
332
|
-
curl_exfiltration: {
|
|
333
|
-
id: 'MUADDIB-SHELL-008',
|
|
334
|
-
name: 'Data Exfiltration via Curl',
|
|
335
|
-
severity: 'HIGH',
|
|
336
|
-
confidence: 'high',
|
|
337
|
-
description: 'Exfiltration de donnees via curl POST',
|
|
338
|
-
references: ['https://attack.mitre.org/techniques/T1041/'],
|
|
339
|
-
mitre: 'T1041'
|
|
340
|
-
},
|
|
341
|
-
ssh_access: {
|
|
342
|
-
id: 'MUADDIB-SHELL-009',
|
|
343
|
-
name: 'SSH Key Access',
|
|
344
|
-
severity: 'HIGH',
|
|
345
|
-
confidence: 'high',
|
|
346
|
-
description: 'Acces aux cles SSH detecte',
|
|
347
|
-
references: ['https://attack.mitre.org/techniques/T1552/004/'],
|
|
348
|
-
mitre: 'T1552.004'
|
|
349
|
-
},
|
|
350
|
-
python_reverse_shell: {
|
|
351
|
-
id: 'MUADDIB-SHELL-010',
|
|
352
|
-
name: 'Python Reverse Shell',
|
|
353
|
-
severity: 'CRITICAL',
|
|
354
|
-
confidence: 'high',
|
|
355
|
-
description: 'Reverse shell via python -c import socket detecte',
|
|
356
|
-
references: ['https://attack.mitre.org/techniques/T1059/004/'],
|
|
357
|
-
mitre: 'T1059.006'
|
|
358
|
-
},
|
|
359
|
-
perl_reverse_shell: {
|
|
360
|
-
id: 'MUADDIB-SHELL-011',
|
|
361
|
-
name: 'Perl Reverse Shell',
|
|
362
|
-
severity: 'CRITICAL',
|
|
363
|
-
confidence: 'high',
|
|
364
|
-
description: 'Reverse shell via perl -e socket detecte',
|
|
365
|
-
references: ['https://attack.mitre.org/techniques/T1059/004/'],
|
|
366
|
-
mitre: 'T1059.006'
|
|
367
|
-
},
|
|
368
|
-
fifo_reverse_shell: {
|
|
369
|
-
id: 'MUADDIB-SHELL-012',
|
|
370
|
-
name: 'FIFO Reverse Shell',
|
|
371
|
-
severity: 'CRITICAL',
|
|
372
|
-
confidence: 'high',
|
|
373
|
-
description: 'Reverse shell via mkfifo /dev/tcp detecte',
|
|
374
|
-
references: ['https://attack.mitre.org/techniques/T1059/004/'],
|
|
375
|
-
mitre: 'T1059.004'
|
|
376
|
-
},
|
|
377
|
-
|
|
378
|
-
// AST additional patterns
|
|
379
|
-
possible_obfuscation: {
|
|
380
|
-
id: 'MUADDIB-OBF-002',
|
|
381
|
-
name: 'Possible Code Obfuscation',
|
|
382
|
-
severity: 'MEDIUM',
|
|
383
|
-
confidence: 'low',
|
|
384
|
-
description: 'Fichier potentiellement obfusque (parse echoue, code dense)',
|
|
385
|
-
references: ['https://attack.mitre.org/techniques/T1027/'],
|
|
386
|
-
mitre: 'T1027'
|
|
387
|
-
},
|
|
388
|
-
dynamic_require: {
|
|
389
|
-
id: 'MUADDIB-AST-006',
|
|
390
|
-
name: 'Dynamic Require with Concatenation',
|
|
391
|
-
severity: 'HIGH',
|
|
392
|
-
confidence: 'high',
|
|
393
|
-
description: 'require() avec concatenation de chaines — technique d\'obfuscation pour masquer le nom du module',
|
|
394
|
-
references: ['https://attack.mitre.org/techniques/T1027/'],
|
|
395
|
-
mitre: 'T1027'
|
|
396
|
-
},
|
|
397
|
-
dangerous_exec: {
|
|
398
|
-
id: 'MUADDIB-AST-007',
|
|
399
|
-
name: 'Dangerous Shell Command Execution',
|
|
400
|
-
severity: 'CRITICAL',
|
|
401
|
-
confidence: 'high',
|
|
402
|
-
description: 'exec() avec commande shell dangereuse (pipe to shell, reverse shell, netcat)',
|
|
403
|
-
references: ['https://owasp.org/www-community/attacks/Command_Injection'],
|
|
404
|
-
mitre: 'T1059.004'
|
|
405
|
-
},
|
|
406
|
-
staged_payload: {
|
|
407
|
-
id: 'MUADDIB-FLOW-002',
|
|
408
|
-
name: 'Staged Payload Execution',
|
|
409
|
-
severity: 'CRITICAL',
|
|
410
|
-
confidence: 'high',
|
|
411
|
-
description: 'Telechargement reseau + eval() dans le meme fichier — execution de payload distant',
|
|
412
|
-
references: ['https://attack.mitre.org/techniques/T1105/'],
|
|
413
|
-
mitre: 'T1105'
|
|
414
|
-
},
|
|
415
|
-
network_require: {
|
|
416
|
-
id: 'MUADDIB-PKG-006',
|
|
417
|
-
name: 'Network Module in Lifecycle Script',
|
|
418
|
-
severity: 'HIGH',
|
|
419
|
-
confidence: 'high',
|
|
420
|
-
description: 'require(https/http) dans un script lifecycle — telechargement au moment de l\'installation',
|
|
421
|
-
references: ['https://blog.phylum.io/shai-hulud-npm-worm'],
|
|
422
|
-
mitre: 'T1105'
|
|
423
|
-
},
|
|
424
|
-
node_inline_exec: {
|
|
425
|
-
id: 'MUADDIB-PKG-007',
|
|
426
|
-
name: 'Node Inline Execution in Lifecycle Script',
|
|
427
|
-
severity: 'HIGH',
|
|
428
|
-
confidence: 'high',
|
|
429
|
-
description: 'node -e dans un script lifecycle — execution de code inline au moment de l\'installation',
|
|
430
|
-
references: ['https://owasp.org/www-community/attacks/Command_Injection'],
|
|
431
|
-
mitre: 'T1059.007'
|
|
432
|
-
},
|
|
433
|
-
dynamic_import: {
|
|
434
|
-
id: 'MUADDIB-AST-008',
|
|
435
|
-
name: 'Dynamic import() of Dangerous Module',
|
|
436
|
-
severity: 'HIGH',
|
|
437
|
-
confidence: 'high',
|
|
438
|
-
description: 'import() dynamique pour charger un module dangereux ou avec argument calcule — technique d\'evasion pour eviter la detection de require()',
|
|
439
|
-
references: ['https://attack.mitre.org/techniques/T1027/'],
|
|
440
|
-
mitre: 'T1027'
|
|
441
|
-
},
|
|
442
|
-
env_proxy_intercept: {
|
|
443
|
-
id: 'MUADDIB-AST-009',
|
|
444
|
-
name: 'Environment Variable Proxy Interception',
|
|
445
|
-
severity: 'CRITICAL',
|
|
446
|
-
confidence: 'high',
|
|
447
|
-
description: 'new Proxy(process.env) detecte — intercepte silencieusement tous les acces aux variables d\'environnement pour exfiltration',
|
|
448
|
-
references: ['https://attack.mitre.org/techniques/T1552/001/'],
|
|
449
|
-
mitre: 'T1552.001'
|
|
450
|
-
},
|
|
451
|
-
dynamic_require_exec: {
|
|
452
|
-
id: 'MUADDIB-AST-010',
|
|
453
|
-
name: 'Command Execution via Dynamic Require',
|
|
454
|
-
severity: 'CRITICAL',
|
|
455
|
-
confidence: 'high',
|
|
456
|
-
description: 'exec/execSync appele sur un module charge dynamiquement (require obfusque) — execution de commandes dissimulees',
|
|
457
|
-
references: ['https://attack.mitre.org/techniques/T1059/007/'],
|
|
458
|
-
mitre: 'T1059.007'
|
|
459
|
-
},
|
|
460
|
-
sandbox_evasion: {
|
|
461
|
-
id: 'MUADDIB-AST-011',
|
|
462
|
-
name: 'Sandbox/Container Evasion',
|
|
463
|
-
severity: 'HIGH',
|
|
464
|
-
confidence: 'high',
|
|
465
|
-
description: 'Detection de sandbox/container (/.dockerenv, /proc/cgroup) — technique anti-analyse pour eviter la detection en environnement controle',
|
|
466
|
-
references: ['https://attack.mitre.org/techniques/T1497/001/'],
|
|
467
|
-
mitre: 'T1497.001'
|
|
468
|
-
},
|
|
469
|
-
detached_process: {
|
|
470
|
-
id: 'MUADDIB-AST-012',
|
|
471
|
-
name: 'Detached Background Process',
|
|
472
|
-
severity: 'HIGH',
|
|
473
|
-
confidence: 'high',
|
|
474
|
-
description: 'spawn/fork avec {detached: true} — le processus survit a la fin de npm install et execute le payload en arriere-plan',
|
|
475
|
-
references: ['https://attack.mitre.org/techniques/T1036/009/'],
|
|
476
|
-
mitre: 'T1036.009'
|
|
477
|
-
},
|
|
478
|
-
dangerous_call_function: {
|
|
479
|
-
id: 'MUADDIB-AST-005',
|
|
480
|
-
name: 'new Function() Constructor',
|
|
481
|
-
severity: 'HIGH',
|
|
482
|
-
confidence: 'high',
|
|
483
|
-
description: 'Appel new Function() detecte - equivalent a eval()',
|
|
484
|
-
references: ['https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/Function'],
|
|
485
|
-
mitre: 'T1059.007'
|
|
486
|
-
},
|
|
487
|
-
|
|
488
|
-
credential_command_exec: {
|
|
489
|
-
id: 'MUADDIB-AST-014',
|
|
490
|
-
name: 'Credential Theft via CLI Tool',
|
|
491
|
-
severity: 'CRITICAL',
|
|
492
|
-
confidence: 'high',
|
|
493
|
-
description: 'exec/execSync appelle un outil CLI legitime pour voler des tokens d\'authentification (gh auth token, gcloud auth, aws sts). Technique s1ngularity/Nx.',
|
|
494
|
-
references: [
|
|
495
|
-
'https://snyk.io/blog/malicious-npm-packages-abuse-ai-agents/',
|
|
496
|
-
'https://attack.mitre.org/techniques/T1059/'
|
|
497
|
-
],
|
|
498
|
-
mitre: 'T1059'
|
|
499
|
-
},
|
|
500
|
-
workflow_write: {
|
|
501
|
-
id: 'MUADDIB-AST-015',
|
|
502
|
-
name: 'GitHub Actions Workflow Write',
|
|
503
|
-
severity: 'CRITICAL',
|
|
504
|
-
confidence: 'high',
|
|
505
|
-
description: 'fs.writeFileSync cree un fichier dans .github/workflows — injection de workflow GitHub Actions pour persistence. Technique Shai-Hulud 2.0.',
|
|
506
|
-
references: [
|
|
507
|
-
'https://www.wiz.io/blog/shai-hulud-npm-supply-chain-attack',
|
|
508
|
-
'https://attack.mitre.org/techniques/T1195/002/'
|
|
509
|
-
],
|
|
510
|
-
mitre: 'T1195.002'
|
|
511
|
-
},
|
|
512
|
-
binary_dropper: {
|
|
513
|
-
id: 'MUADDIB-AST-016',
|
|
514
|
-
name: 'Binary Dropper Pattern',
|
|
515
|
-
severity: 'CRITICAL',
|
|
516
|
-
confidence: 'high',
|
|
517
|
-
description: 'fs.chmodSync avec permissions executables (0o755/0o777) — pattern de dropper binaire: telecharge, ecrit, chmod, execute.',
|
|
518
|
-
references: [
|
|
519
|
-
'https://www.sonatype.com/blog/phantomraven-supply-chain-attack',
|
|
520
|
-
'https://attack.mitre.org/techniques/T1105/'
|
|
521
|
-
],
|
|
522
|
-
mitre: 'T1105'
|
|
523
|
-
},
|
|
524
|
-
prototype_hook: {
|
|
525
|
-
id: 'MUADDIB-AST-017',
|
|
526
|
-
name: 'Native API Prototype Hooking',
|
|
527
|
-
severity: 'HIGH',
|
|
528
|
-
confidence: 'high',
|
|
529
|
-
description: 'Modification du prototype ou remplacement de fonctions natives du navigateur/Node.js (fetch, XMLHttpRequest, http.request). Technique chalk/debug (Sygnia, sept 2025) pour intercepter du trafic.',
|
|
530
|
-
references: [
|
|
531
|
-
'https://www.sygnia.co/blog/malicious-chalk-debug-npm-packages/',
|
|
532
|
-
'https://attack.mitre.org/techniques/T1557/'
|
|
533
|
-
],
|
|
534
|
-
mitre: 'T1557'
|
|
535
|
-
},
|
|
536
|
-
|
|
537
|
-
ai_config_injection: {
|
|
538
|
-
id: 'MUADDIB-AICONF-001',
|
|
539
|
-
name: 'AI Config Prompt Injection',
|
|
540
|
-
severity: 'HIGH',
|
|
541
|
-
confidence: 'high',
|
|
542
|
-
description: 'Fichier de configuration d\'agent IA (.cursorrules, CLAUDE.md, copilot-instructions.md) contient des instructions d\'execution de commandes shell ou d\'acces a des credentials. Technique ToxicSkills/Clinejection.',
|
|
543
|
-
references: [
|
|
544
|
-
'https://snyk.io/blog/toxicskills-prompt-injection-ai-agents/',
|
|
545
|
-
'https://snyk.io/blog/clinejection-ai-config-prompt-injection/',
|
|
546
|
-
'https://arxiv.org/abs/2601.17548'
|
|
547
|
-
],
|
|
548
|
-
mitre: 'T1059'
|
|
549
|
-
},
|
|
550
|
-
ai_config_injection_critical: {
|
|
551
|
-
id: 'MUADDIB-AICONF-002',
|
|
552
|
-
name: 'AI Config Prompt Injection (Critical)',
|
|
553
|
-
severity: 'CRITICAL',
|
|
554
|
-
confidence: 'high',
|
|
555
|
-
description: 'Fichier de configuration d\'agent IA contient des commandes d\'exfiltration (curl POST vers un domaine externe, pipe vers shell) ou une combinaison commande shell + acces credentials. Attaque confirmee.',
|
|
556
|
-
references: [
|
|
557
|
-
'https://snyk.io/blog/toxicskills-prompt-injection-ai-agents/',
|
|
558
|
-
'https://snyk.io/blog/clinejection-ai-config-prompt-injection/',
|
|
559
|
-
'https://arxiv.org/abs/2601.17548',
|
|
560
|
-
'https://developer.nvidia.com/blog/ai-agent-security-guidance/'
|
|
561
|
-
],
|
|
562
|
-
mitre: 'T1059'
|
|
563
|
-
},
|
|
564
|
-
|
|
565
|
-
require_cache_poison: {
|
|
566
|
-
id: 'MUADDIB-AST-019',
|
|
567
|
-
name: 'Require Cache Poisoning',
|
|
568
|
-
severity: 'CRITICAL',
|
|
569
|
-
confidence: 'high',
|
|
570
|
-
description: 'Acces a require.cache pour remplacer ou hijacker des modules Node.js charges. Technique de cache poisoning pour intercepter du trafic ou injecter du code.',
|
|
571
|
-
references: [
|
|
572
|
-
'https://attack.mitre.org/techniques/T1574/006/'
|
|
573
|
-
],
|
|
574
|
-
mitre: 'T1574.006'
|
|
575
|
-
},
|
|
576
|
-
staged_binary_payload: {
|
|
577
|
-
id: 'MUADDIB-AST-020',
|
|
578
|
-
name: 'Staged Binary Payload Execution',
|
|
579
|
-
severity: 'HIGH',
|
|
580
|
-
confidence: 'high',
|
|
581
|
-
description: 'Reference a un fichier binaire (.png/.jpg/.wasm) combinee avec eval() dans le meme fichier. Possible execution de payload steganographique cache dans une image.',
|
|
582
|
-
references: [
|
|
583
|
-
'https://attack.mitre.org/techniques/T1027/003/'
|
|
584
|
-
],
|
|
585
|
-
mitre: 'T1027.003'
|
|
586
|
-
},
|
|
587
|
-
|
|
588
|
-
staged_eval_decode: {
|
|
589
|
-
id: 'MUADDIB-AST-021',
|
|
590
|
-
name: 'Staged Eval Decode',
|
|
591
|
-
severity: 'CRITICAL',
|
|
592
|
-
confidence: 'high',
|
|
593
|
-
description: 'eval() ou Function() recoit un argument decode (atob ou Buffer.from base64). Pattern classique de staged payload: le code malveillant est encode en base64 puis decode et execute dynamiquement.',
|
|
594
|
-
references: [
|
|
595
|
-
'https://attack.mitre.org/techniques/T1140/',
|
|
596
|
-
'https://attack.mitre.org/techniques/T1059/007/'
|
|
597
|
-
],
|
|
598
|
-
mitre: 'T1140'
|
|
599
|
-
},
|
|
600
|
-
|
|
601
|
-
env_charcode_reconstruction: {
|
|
602
|
-
id: 'MUADDIB-AST-018',
|
|
603
|
-
name: 'Environment Variable Key Reconstruction',
|
|
604
|
-
severity: 'HIGH',
|
|
605
|
-
confidence: 'high',
|
|
606
|
-
description: 'process.env accede avec une cle reconstruite dynamiquement via String.fromCharCode. Technique d\'obfuscation pour eviter la detection statique des noms de variables sensibles (GITHUB_TOKEN, etc.).',
|
|
607
|
-
references: [
|
|
608
|
-
'https://attack.mitre.org/techniques/T1027/',
|
|
609
|
-
'https://attack.mitre.org/techniques/T1552/001/'
|
|
610
|
-
],
|
|
611
|
-
mitre: 'T1027'
|
|
612
|
-
},
|
|
613
|
-
|
|
614
|
-
lifecycle_shell_pipe: {
|
|
615
|
-
id: 'MUADDIB-PKG-010',
|
|
616
|
-
name: 'Lifecycle Script Pipes to Shell',
|
|
617
|
-
severity: 'CRITICAL',
|
|
618
|
-
confidence: 'high',
|
|
619
|
-
description: 'Script lifecycle (preinstall/install/postinstall) execute curl | sh ou wget | bash — telecharge et execute du code distant au moment de npm install.',
|
|
620
|
-
references: [
|
|
621
|
-
'https://blog.phylum.io/shai-hulud-npm-worm',
|
|
622
|
-
'https://socket.dev/blog/2025-supply-chain-report'
|
|
623
|
-
],
|
|
624
|
-
mitre: 'T1195.002'
|
|
625
|
-
},
|
|
626
|
-
|
|
627
|
-
cross_file_dataflow: {
|
|
628
|
-
id: 'MUADDIB-FLOW-004',
|
|
629
|
-
name: 'Cross-File Data Exfiltration',
|
|
630
|
-
severity: 'CRITICAL',
|
|
631
|
-
confidence: 'high',
|
|
632
|
-
description: 'Un module lit des credentials (fs.readFileSync, process.env) et les exporte vers un autre module qui les envoie sur le reseau (fetch, https.request). Exfiltration inter-fichiers confirmee.',
|
|
633
|
-
references: [
|
|
634
|
-
'https://blog.phylum.io/shai-hulud-npm-worm',
|
|
635
|
-
'https://attack.mitre.org/techniques/T1041/'
|
|
636
|
-
],
|
|
637
|
-
mitre: 'T1041'
|
|
638
|
-
},
|
|
639
|
-
|
|
640
|
-
credential_tampering: {
|
|
641
|
-
id: 'MUADDIB-FLOW-003',
|
|
642
|
-
name: 'Credential/Cache Tampering',
|
|
643
|
-
severity: 'CRITICAL',
|
|
644
|
-
confidence: 'high',
|
|
645
|
-
description: 'Ecriture dans un chemin sensible (cache npm _cacache, cache yarn, credentials). Possible cache poisoning: injection de code malveillant dans des packages caches.',
|
|
646
|
-
references: [
|
|
647
|
-
'https://attack.mitre.org/techniques/T1565/001/'
|
|
648
|
-
],
|
|
649
|
-
mitre: 'T1565.001'
|
|
650
|
-
},
|
|
651
|
-
|
|
652
|
-
crypto_decipher: {
|
|
653
|
-
id: 'MUADDIB-AST-022',
|
|
654
|
-
name: 'Encrypted Payload Decryption',
|
|
655
|
-
severity: 'HIGH',
|
|
656
|
-
confidence: 'high',
|
|
657
|
-
description: 'crypto.createDecipher/createDecipheriv detecte. Dechiffrement runtime de payload embarque. Pattern canonique de flatmap-stream/event-stream.',
|
|
658
|
-
references: [
|
|
659
|
-
'https://snyk.io/blog/malicious-code-found-in-npm-package-event-stream/',
|
|
660
|
-
'https://attack.mitre.org/techniques/T1140/'
|
|
661
|
-
],
|
|
662
|
-
mitre: 'T1140'
|
|
663
|
-
},
|
|
664
|
-
|
|
665
|
-
module_compile: {
|
|
666
|
-
id: 'MUADDIB-AST-023',
|
|
667
|
-
name: 'Module Compile Execution',
|
|
668
|
-
severity: 'CRITICAL',
|
|
669
|
-
confidence: 'high',
|
|
670
|
-
description: 'module._compile() detecte. Execution de code arbitraire a partir d\'une chaine dans le contexte module. Technique cle de flatmap-stream.',
|
|
671
|
-
references: [
|
|
672
|
-
'https://blog.npmjs.org/post/180565383195/details-about-the-event-stream-incident',
|
|
673
|
-
'https://attack.mitre.org/techniques/T1059/007/'
|
|
674
|
-
],
|
|
675
|
-
mitre: 'T1059'
|
|
676
|
-
},
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
id: 'MUADDIB-AST-
|
|
680
|
-
name: '
|
|
681
|
-
severity: 'CRITICAL',
|
|
682
|
-
confidence: 'high',
|
|
683
|
-
description: '
|
|
684
|
-
references: [
|
|
685
|
-
'https://
|
|
686
|
-
'https://
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
id: 'MUADDIB-
|
|
742
|
-
name: '
|
|
743
|
-
severity: 'HIGH',
|
|
744
|
-
confidence: '
|
|
745
|
-
description: '
|
|
746
|
-
references: [
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
id: 'MUADDIB-
|
|
778
|
-
name: '
|
|
779
|
-
severity: 'CRITICAL',
|
|
780
|
-
confidence: 'high',
|
|
781
|
-
description: '
|
|
782
|
-
references: [
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
],
|
|
807
|
-
mitre: '
|
|
808
|
-
},
|
|
809
|
-
|
|
810
|
-
//
|
|
811
|
-
|
|
812
|
-
id: 'MUADDIB-
|
|
813
|
-
name: '
|
|
814
|
-
severity: 'CRITICAL',
|
|
815
|
-
confidence: 'high',
|
|
816
|
-
description: '
|
|
817
|
-
references: [
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
],
|
|
845
|
-
mitre: '
|
|
846
|
-
},
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
'https://
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
'https://blog.
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
id: 'MUADDIB-
|
|
949
|
-
name: '
|
|
950
|
-
severity: '
|
|
951
|
-
confidence: 'high',
|
|
952
|
-
description: '
|
|
953
|
-
references: [
|
|
954
|
-
'https://blog.
|
|
955
|
-
'https://
|
|
956
|
-
],
|
|
957
|
-
mitre: 'T1195.002'
|
|
958
|
-
},
|
|
959
|
-
|
|
960
|
-
id: 'MUADDIB-
|
|
961
|
-
name: '
|
|
962
|
-
severity: '
|
|
963
|
-
confidence: 'medium',
|
|
964
|
-
description: '
|
|
965
|
-
references: [
|
|
966
|
-
'https://blog.
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
severity: '
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1
|
+
const RULES = {
|
|
2
|
+
// AST detections
|
|
3
|
+
sensitive_string: {
|
|
4
|
+
id: 'MUADDIB-AST-001',
|
|
5
|
+
name: 'Sensitive String Reference',
|
|
6
|
+
severity: 'HIGH',
|
|
7
|
+
confidence: 'medium',
|
|
8
|
+
description: 'Reference a un chemin ou identifiant sensible (.npmrc, .ssh, tokens)',
|
|
9
|
+
references: [
|
|
10
|
+
'https://blog.phylum.io/shai-hulud-npm-worm',
|
|
11
|
+
'https://www.wiz.io/blog/shai-hulud-npm-supply-chain-attack'
|
|
12
|
+
],
|
|
13
|
+
mitre: 'T1552.001'
|
|
14
|
+
},
|
|
15
|
+
env_access: {
|
|
16
|
+
id: 'MUADDIB-AST-002',
|
|
17
|
+
name: 'Sensitive Environment Variable Access',
|
|
18
|
+
severity: 'HIGH',
|
|
19
|
+
confidence: 'high',
|
|
20
|
+
description: 'Acces a une variable d\'environnement sensible (GITHUB_TOKEN, NPM_TOKEN, AWS_*)',
|
|
21
|
+
references: [
|
|
22
|
+
'https://blog.phylum.io/shai-hulud-npm-worm',
|
|
23
|
+
'https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions'
|
|
24
|
+
],
|
|
25
|
+
mitre: 'T1552.001'
|
|
26
|
+
},
|
|
27
|
+
dangerous_call_exec: {
|
|
28
|
+
id: 'MUADDIB-AST-003',
|
|
29
|
+
name: 'Dangerous Function Call',
|
|
30
|
+
severity: 'MEDIUM',
|
|
31
|
+
confidence: 'medium',
|
|
32
|
+
description: 'Appel a une fonction dangereuse (exec, spawn, eval, Function)',
|
|
33
|
+
references: [
|
|
34
|
+
'https://owasp.org/www-community/attacks/Command_Injection'
|
|
35
|
+
],
|
|
36
|
+
mitre: 'T1059'
|
|
37
|
+
},
|
|
38
|
+
dangerous_call_eval: {
|
|
39
|
+
id: 'MUADDIB-AST-004',
|
|
40
|
+
name: 'Eval Usage',
|
|
41
|
+
severity: 'HIGH',
|
|
42
|
+
confidence: 'high',
|
|
43
|
+
description: 'Utilisation de eval() ou new Function() - execution de code dynamique',
|
|
44
|
+
references: [
|
|
45
|
+
'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#never_use_eval!'
|
|
46
|
+
],
|
|
47
|
+
mitre: 'T1059.007'
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
// Shell detections
|
|
51
|
+
curl_exec: {
|
|
52
|
+
id: 'MUADDIB-SHELL-001',
|
|
53
|
+
name: 'Remote Code Execution via Curl',
|
|
54
|
+
severity: 'CRITICAL',
|
|
55
|
+
confidence: 'high',
|
|
56
|
+
description: 'Telecharge et execute du code distant via curl | sh',
|
|
57
|
+
references: [
|
|
58
|
+
'https://blog.phylum.io/shai-hulud-npm-worm'
|
|
59
|
+
],
|
|
60
|
+
mitre: 'T1105'
|
|
61
|
+
},
|
|
62
|
+
reverse_shell: {
|
|
63
|
+
id: 'MUADDIB-SHELL-002',
|
|
64
|
+
name: 'Reverse Shell',
|
|
65
|
+
severity: 'CRITICAL',
|
|
66
|
+
confidence: 'high',
|
|
67
|
+
description: 'Tentative de connexion reverse shell',
|
|
68
|
+
references: [
|
|
69
|
+
'https://attack.mitre.org/techniques/T1059/004/'
|
|
70
|
+
],
|
|
71
|
+
mitre: 'T1059.004'
|
|
72
|
+
},
|
|
73
|
+
home_deletion: {
|
|
74
|
+
id: 'MUADDIB-SHELL-003',
|
|
75
|
+
name: 'Dead Man\'s Switch',
|
|
76
|
+
severity: 'CRITICAL',
|
|
77
|
+
confidence: 'high',
|
|
78
|
+
description: 'Suppression du repertoire home - dead man\'s switch de Shai-Hulud',
|
|
79
|
+
references: [
|
|
80
|
+
'https://www.wiz.io/blog/shai-hulud-npm-supply-chain-attack'
|
|
81
|
+
],
|
|
82
|
+
mitre: 'T1485'
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
// Package detections
|
|
86
|
+
lifecycle_script: {
|
|
87
|
+
id: 'MUADDIB-PKG-001',
|
|
88
|
+
name: 'Suspicious Lifecycle Script',
|
|
89
|
+
severity: 'MEDIUM',
|
|
90
|
+
confidence: 'medium',
|
|
91
|
+
description: 'Script preinstall/postinstall suspect dans package.json',
|
|
92
|
+
references: [
|
|
93
|
+
'https://blog.npmjs.org/post/141577284765/kik-left-pad-and-npm'
|
|
94
|
+
],
|
|
95
|
+
mitre: 'T1195.002'
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
// Obfuscation detections
|
|
99
|
+
obfuscation_detected: {
|
|
100
|
+
id: 'MUADDIB-OBF-001',
|
|
101
|
+
name: 'Code Obfuscation Detected',
|
|
102
|
+
severity: 'HIGH',
|
|
103
|
+
confidence: 'medium',
|
|
104
|
+
description: 'Code fortement obfusque detecte - probablement malveillant',
|
|
105
|
+
references: [
|
|
106
|
+
'https://blog.phylum.io/shai-hulud-npm-worm'
|
|
107
|
+
],
|
|
108
|
+
mitre: 'T1027'
|
|
109
|
+
},
|
|
110
|
+
|
|
111
|
+
// Dependency detections
|
|
112
|
+
known_malicious_package: {
|
|
113
|
+
id: 'MUADDIB-DEP-001',
|
|
114
|
+
name: 'Known Malicious Package',
|
|
115
|
+
severity: 'CRITICAL',
|
|
116
|
+
confidence: 'high',
|
|
117
|
+
description: 'Package present dans la base IOC de packages malveillants connus',
|
|
118
|
+
references: [
|
|
119
|
+
'https://socket.dev/npm/issue'
|
|
120
|
+
],
|
|
121
|
+
mitre: 'T1195.002'
|
|
122
|
+
},
|
|
123
|
+
pypi_malicious_package: {
|
|
124
|
+
id: 'MUADDIB-PYPI-001',
|
|
125
|
+
name: 'Malicious PyPI Package',
|
|
126
|
+
severity: 'CRITICAL',
|
|
127
|
+
confidence: 'high',
|
|
128
|
+
description: 'Package PyPI present dans la base IOC de packages malveillants connus (source: OSV)',
|
|
129
|
+
references: [
|
|
130
|
+
'https://osv.dev/',
|
|
131
|
+
'https://pypi.org/'
|
|
132
|
+
],
|
|
133
|
+
mitre: 'T1195.002'
|
|
134
|
+
},
|
|
135
|
+
pypi_typosquat_detected: {
|
|
136
|
+
id: 'MUADDIB-PYPI-002',
|
|
137
|
+
name: 'PyPI Typosquatting Detected',
|
|
138
|
+
severity: 'HIGH',
|
|
139
|
+
confidence: 'medium',
|
|
140
|
+
description: 'Dependance PyPI suspecte de typosquatting d\'un package populaire (Levenshtein)',
|
|
141
|
+
references: [
|
|
142
|
+
'https://pypi.org/',
|
|
143
|
+
'https://blog.phylum.io/typosquatting-pypi'
|
|
144
|
+
],
|
|
145
|
+
mitre: 'T1195.002'
|
|
146
|
+
},
|
|
147
|
+
suspicious_file: {
|
|
148
|
+
id: 'MUADDIB-DEP-002',
|
|
149
|
+
name: 'Suspicious File in Dependency',
|
|
150
|
+
severity: 'CRITICAL',
|
|
151
|
+
confidence: 'high',
|
|
152
|
+
description: 'Fichier suspect detecte dans une dependance (setup_bun.js, etc.)',
|
|
153
|
+
references: [
|
|
154
|
+
'https://blog.phylum.io/shai-hulud-npm-worm'
|
|
155
|
+
],
|
|
156
|
+
mitre: 'T1195.002'
|
|
157
|
+
},
|
|
158
|
+
shai_hulud_marker: {
|
|
159
|
+
id: 'MUADDIB-DEP-003',
|
|
160
|
+
name: 'Shai-Hulud Marker Detected',
|
|
161
|
+
severity: 'CRITICAL',
|
|
162
|
+
confidence: 'high',
|
|
163
|
+
description: 'Marqueur Shai-Hulud detecte dans le code',
|
|
164
|
+
references: [
|
|
165
|
+
'https://blog.phylum.io/shai-hulud-npm-worm',
|
|
166
|
+
'https://www.wiz.io/blog/shai-hulud-npm-supply-chain-attack'
|
|
167
|
+
],
|
|
168
|
+
mitre: 'T1195.002'
|
|
169
|
+
},
|
|
170
|
+
lifecycle_script_dependency: {
|
|
171
|
+
id: 'MUADDIB-DEP-004',
|
|
172
|
+
name: 'Lifecycle Script in Dependency',
|
|
173
|
+
severity: 'MEDIUM',
|
|
174
|
+
confidence: 'low',
|
|
175
|
+
description: 'Une dependance a un script preinstall/postinstall',
|
|
176
|
+
references: [
|
|
177
|
+
'https://docs.npmjs.com/cli/v9/using-npm/scripts#life-cycle-scripts'
|
|
178
|
+
],
|
|
179
|
+
mitre: 'T1195.002'
|
|
180
|
+
},
|
|
181
|
+
|
|
182
|
+
// Hash detections
|
|
183
|
+
known_malicious_hash: {
|
|
184
|
+
id: 'MUADDIB-HASH-001',
|
|
185
|
+
name: 'Known Malicious File Hash',
|
|
186
|
+
severity: 'CRITICAL',
|
|
187
|
+
confidence: 'high',
|
|
188
|
+
description: 'Hash SHA256 correspond a un fichier malveillant connu',
|
|
189
|
+
references: [
|
|
190
|
+
'https://www.virustotal.com'
|
|
191
|
+
],
|
|
192
|
+
mitre: 'T1195.002'
|
|
193
|
+
},
|
|
194
|
+
|
|
195
|
+
// Dataflow detections
|
|
196
|
+
suspicious_dataflow: {
|
|
197
|
+
id: 'MUADDIB-FLOW-001',
|
|
198
|
+
name: 'Suspicious Data Flow',
|
|
199
|
+
severity: 'CRITICAL',
|
|
200
|
+
confidence: 'high',
|
|
201
|
+
description: 'Flux de donnees suspect: lecture de credentials puis envoi reseau',
|
|
202
|
+
references: [
|
|
203
|
+
'https://blog.phylum.io/shai-hulud-npm-worm'
|
|
204
|
+
],
|
|
205
|
+
mitre: 'T1041'
|
|
206
|
+
},
|
|
207
|
+
|
|
208
|
+
typosquat_detected: {
|
|
209
|
+
id: 'MUADDIB-TYPO-001',
|
|
210
|
+
name: 'Typosquatting Detected',
|
|
211
|
+
severity: 'HIGH',
|
|
212
|
+
confidence: 'high',
|
|
213
|
+
description: 'Package avec un nom tres similaire a un package populaire. Possible typosquatting.',
|
|
214
|
+
references: [
|
|
215
|
+
'https://blog.npmjs.org/post/163723642530/crossenv-malware-on-the-npm-registry',
|
|
216
|
+
'https://snyk.io/blog/typosquatting-attacks/'
|
|
217
|
+
],
|
|
218
|
+
mitre: 'T1195.002'
|
|
219
|
+
},
|
|
220
|
+
|
|
221
|
+
// Package.json script patterns
|
|
222
|
+
curl_pipe_sh: {
|
|
223
|
+
id: 'MUADDIB-PKG-002',
|
|
224
|
+
name: 'Curl Pipe to Shell in Script',
|
|
225
|
+
severity: 'CRITICAL',
|
|
226
|
+
confidence: 'high',
|
|
227
|
+
description: 'Script lifecycle execute curl | sh - telechargement et execution de code distant',
|
|
228
|
+
references: ['https://blog.phylum.io/shai-hulud-npm-worm'],
|
|
229
|
+
mitre: 'T1105'
|
|
230
|
+
},
|
|
231
|
+
wget_pipe_sh: {
|
|
232
|
+
id: 'MUADDIB-PKG-003',
|
|
233
|
+
name: 'Wget Pipe to Shell in Script',
|
|
234
|
+
severity: 'CRITICAL',
|
|
235
|
+
confidence: 'high',
|
|
236
|
+
description: 'Script lifecycle execute wget | sh - telechargement et execution de code distant',
|
|
237
|
+
references: ['https://blog.phylum.io/shai-hulud-npm-worm'],
|
|
238
|
+
mitre: 'T1105'
|
|
239
|
+
},
|
|
240
|
+
eval_usage: {
|
|
241
|
+
id: 'MUADDIB-PKG-004',
|
|
242
|
+
name: 'Eval in Lifecycle Script',
|
|
243
|
+
severity: 'HIGH',
|
|
244
|
+
confidence: 'medium',
|
|
245
|
+
description: 'Utilisation de eval() dans un script lifecycle - execution de code dynamique',
|
|
246
|
+
references: ['https://owasp.org/www-community/attacks/Command_Injection'],
|
|
247
|
+
mitre: 'T1059.007'
|
|
248
|
+
},
|
|
249
|
+
child_process: {
|
|
250
|
+
id: 'MUADDIB-PKG-005',
|
|
251
|
+
name: 'Child Process in Lifecycle Script',
|
|
252
|
+
severity: 'HIGH',
|
|
253
|
+
confidence: 'medium',
|
|
254
|
+
description: 'Reference a child_process dans un script lifecycle',
|
|
255
|
+
references: ['https://owasp.org/www-community/attacks/Command_Injection'],
|
|
256
|
+
mitre: 'T1059'
|
|
257
|
+
},
|
|
258
|
+
npmrc_access: {
|
|
259
|
+
id: 'MUADDIB-PKG-006',
|
|
260
|
+
name: 'npmrc Access',
|
|
261
|
+
severity: 'HIGH',
|
|
262
|
+
confidence: 'high',
|
|
263
|
+
description: 'Acces au fichier .npmrc detecte - risque de vol de token npm',
|
|
264
|
+
references: ['https://blog.phylum.io/shai-hulud-npm-worm'],
|
|
265
|
+
mitre: 'T1552.001'
|
|
266
|
+
},
|
|
267
|
+
github_token_access: {
|
|
268
|
+
id: 'MUADDIB-PKG-007',
|
|
269
|
+
name: 'GitHub Token Access',
|
|
270
|
+
severity: 'HIGH',
|
|
271
|
+
confidence: 'high',
|
|
272
|
+
description: 'Acces au GITHUB_TOKEN detecte',
|
|
273
|
+
references: ['https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions'],
|
|
274
|
+
mitre: 'T1552.001'
|
|
275
|
+
},
|
|
276
|
+
aws_credential_access: {
|
|
277
|
+
id: 'MUADDIB-PKG-008',
|
|
278
|
+
name: 'AWS Credential Access',
|
|
279
|
+
severity: 'HIGH',
|
|
280
|
+
confidence: 'high',
|
|
281
|
+
description: 'Acces aux credentials AWS detecte',
|
|
282
|
+
references: ['https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html'],
|
|
283
|
+
mitre: 'T1552.001'
|
|
284
|
+
},
|
|
285
|
+
base64_encoding: {
|
|
286
|
+
id: 'MUADDIB-PKG-009',
|
|
287
|
+
name: 'Base64 Encoding in Script',
|
|
288
|
+
severity: 'MEDIUM',
|
|
289
|
+
confidence: 'low',
|
|
290
|
+
description: 'Encodage base64 dans un script lifecycle - souvent utilise pour obfusquer du code malveillant',
|
|
291
|
+
references: ['https://attack.mitre.org/techniques/T1027/'],
|
|
292
|
+
mitre: 'T1027'
|
|
293
|
+
},
|
|
294
|
+
|
|
295
|
+
// Shell script patterns
|
|
296
|
+
curl_pipe_shell: {
|
|
297
|
+
id: 'MUADDIB-SHELL-004',
|
|
298
|
+
name: 'Curl Pipe to Shell',
|
|
299
|
+
severity: 'CRITICAL',
|
|
300
|
+
confidence: 'high',
|
|
301
|
+
description: 'Telechargement et execution via curl | sh dans un script shell',
|
|
302
|
+
references: ['https://blog.phylum.io/shai-hulud-npm-worm'],
|
|
303
|
+
mitre: 'T1105'
|
|
304
|
+
},
|
|
305
|
+
wget_chmod_exec: {
|
|
306
|
+
id: 'MUADDIB-SHELL-005',
|
|
307
|
+
name: 'Wget Download and Execute',
|
|
308
|
+
severity: 'CRITICAL',
|
|
309
|
+
confidence: 'high',
|
|
310
|
+
description: 'Telechargement et execution de binaire via wget + chmod',
|
|
311
|
+
references: ['https://blog.phylum.io/shai-hulud-npm-worm'],
|
|
312
|
+
mitre: 'T1105'
|
|
313
|
+
},
|
|
314
|
+
netcat_shell: {
|
|
315
|
+
id: 'MUADDIB-SHELL-006',
|
|
316
|
+
name: 'Netcat Shell',
|
|
317
|
+
severity: 'CRITICAL',
|
|
318
|
+
confidence: 'high',
|
|
319
|
+
description: 'Shell netcat detecte - acces distant non autorise',
|
|
320
|
+
references: ['https://attack.mitre.org/techniques/T1059/004/'],
|
|
321
|
+
mitre: 'T1059.004'
|
|
322
|
+
},
|
|
323
|
+
shred_home: {
|
|
324
|
+
id: 'MUADDIB-SHELL-007',
|
|
325
|
+
name: 'Home Directory Destruction',
|
|
326
|
+
severity: 'CRITICAL',
|
|
327
|
+
confidence: 'high',
|
|
328
|
+
description: 'Destruction de donnees (shred $HOME) - dead man\'s switch de Shai-Hulud',
|
|
329
|
+
references: ['https://www.wiz.io/blog/shai-hulud-npm-supply-chain-attack'],
|
|
330
|
+
mitre: 'T1485'
|
|
331
|
+
},
|
|
332
|
+
curl_exfiltration: {
|
|
333
|
+
id: 'MUADDIB-SHELL-008',
|
|
334
|
+
name: 'Data Exfiltration via Curl',
|
|
335
|
+
severity: 'HIGH',
|
|
336
|
+
confidence: 'high',
|
|
337
|
+
description: 'Exfiltration de donnees via curl POST',
|
|
338
|
+
references: ['https://attack.mitre.org/techniques/T1041/'],
|
|
339
|
+
mitre: 'T1041'
|
|
340
|
+
},
|
|
341
|
+
ssh_access: {
|
|
342
|
+
id: 'MUADDIB-SHELL-009',
|
|
343
|
+
name: 'SSH Key Access',
|
|
344
|
+
severity: 'HIGH',
|
|
345
|
+
confidence: 'high',
|
|
346
|
+
description: 'Acces aux cles SSH detecte',
|
|
347
|
+
references: ['https://attack.mitre.org/techniques/T1552/004/'],
|
|
348
|
+
mitre: 'T1552.004'
|
|
349
|
+
},
|
|
350
|
+
python_reverse_shell: {
|
|
351
|
+
id: 'MUADDIB-SHELL-010',
|
|
352
|
+
name: 'Python Reverse Shell',
|
|
353
|
+
severity: 'CRITICAL',
|
|
354
|
+
confidence: 'high',
|
|
355
|
+
description: 'Reverse shell via python -c import socket detecte',
|
|
356
|
+
references: ['https://attack.mitre.org/techniques/T1059/004/'],
|
|
357
|
+
mitre: 'T1059.006'
|
|
358
|
+
},
|
|
359
|
+
perl_reverse_shell: {
|
|
360
|
+
id: 'MUADDIB-SHELL-011',
|
|
361
|
+
name: 'Perl Reverse Shell',
|
|
362
|
+
severity: 'CRITICAL',
|
|
363
|
+
confidence: 'high',
|
|
364
|
+
description: 'Reverse shell via perl -e socket detecte',
|
|
365
|
+
references: ['https://attack.mitre.org/techniques/T1059/004/'],
|
|
366
|
+
mitre: 'T1059.006'
|
|
367
|
+
},
|
|
368
|
+
fifo_reverse_shell: {
|
|
369
|
+
id: 'MUADDIB-SHELL-012',
|
|
370
|
+
name: 'FIFO Reverse Shell',
|
|
371
|
+
severity: 'CRITICAL',
|
|
372
|
+
confidence: 'high',
|
|
373
|
+
description: 'Reverse shell via mkfifo /dev/tcp detecte',
|
|
374
|
+
references: ['https://attack.mitre.org/techniques/T1059/004/'],
|
|
375
|
+
mitre: 'T1059.004'
|
|
376
|
+
},
|
|
377
|
+
|
|
378
|
+
// AST additional patterns
|
|
379
|
+
possible_obfuscation: {
|
|
380
|
+
id: 'MUADDIB-OBF-002',
|
|
381
|
+
name: 'Possible Code Obfuscation',
|
|
382
|
+
severity: 'MEDIUM',
|
|
383
|
+
confidence: 'low',
|
|
384
|
+
description: 'Fichier potentiellement obfusque (parse echoue, code dense)',
|
|
385
|
+
references: ['https://attack.mitre.org/techniques/T1027/'],
|
|
386
|
+
mitre: 'T1027'
|
|
387
|
+
},
|
|
388
|
+
dynamic_require: {
|
|
389
|
+
id: 'MUADDIB-AST-006',
|
|
390
|
+
name: 'Dynamic Require with Concatenation',
|
|
391
|
+
severity: 'HIGH',
|
|
392
|
+
confidence: 'high',
|
|
393
|
+
description: 'require() avec concatenation de chaines — technique d\'obfuscation pour masquer le nom du module',
|
|
394
|
+
references: ['https://attack.mitre.org/techniques/T1027/'],
|
|
395
|
+
mitre: 'T1027'
|
|
396
|
+
},
|
|
397
|
+
dangerous_exec: {
|
|
398
|
+
id: 'MUADDIB-AST-007',
|
|
399
|
+
name: 'Dangerous Shell Command Execution',
|
|
400
|
+
severity: 'CRITICAL',
|
|
401
|
+
confidence: 'high',
|
|
402
|
+
description: 'exec() avec commande shell dangereuse (pipe to shell, reverse shell, netcat)',
|
|
403
|
+
references: ['https://owasp.org/www-community/attacks/Command_Injection'],
|
|
404
|
+
mitre: 'T1059.004'
|
|
405
|
+
},
|
|
406
|
+
staged_payload: {
|
|
407
|
+
id: 'MUADDIB-FLOW-002',
|
|
408
|
+
name: 'Staged Payload Execution',
|
|
409
|
+
severity: 'CRITICAL',
|
|
410
|
+
confidence: 'high',
|
|
411
|
+
description: 'Telechargement reseau + eval() dans le meme fichier — execution de payload distant',
|
|
412
|
+
references: ['https://attack.mitre.org/techniques/T1105/'],
|
|
413
|
+
mitre: 'T1105'
|
|
414
|
+
},
|
|
415
|
+
network_require: {
|
|
416
|
+
id: 'MUADDIB-PKG-006',
|
|
417
|
+
name: 'Network Module in Lifecycle Script',
|
|
418
|
+
severity: 'HIGH',
|
|
419
|
+
confidence: 'high',
|
|
420
|
+
description: 'require(https/http) dans un script lifecycle — telechargement au moment de l\'installation',
|
|
421
|
+
references: ['https://blog.phylum.io/shai-hulud-npm-worm'],
|
|
422
|
+
mitre: 'T1105'
|
|
423
|
+
},
|
|
424
|
+
node_inline_exec: {
|
|
425
|
+
id: 'MUADDIB-PKG-007',
|
|
426
|
+
name: 'Node Inline Execution in Lifecycle Script',
|
|
427
|
+
severity: 'HIGH',
|
|
428
|
+
confidence: 'high',
|
|
429
|
+
description: 'node -e dans un script lifecycle — execution de code inline au moment de l\'installation',
|
|
430
|
+
references: ['https://owasp.org/www-community/attacks/Command_Injection'],
|
|
431
|
+
mitre: 'T1059.007'
|
|
432
|
+
},
|
|
433
|
+
dynamic_import: {
|
|
434
|
+
id: 'MUADDIB-AST-008',
|
|
435
|
+
name: 'Dynamic import() of Dangerous Module',
|
|
436
|
+
severity: 'HIGH',
|
|
437
|
+
confidence: 'high',
|
|
438
|
+
description: 'import() dynamique pour charger un module dangereux ou avec argument calcule — technique d\'evasion pour eviter la detection de require()',
|
|
439
|
+
references: ['https://attack.mitre.org/techniques/T1027/'],
|
|
440
|
+
mitre: 'T1027'
|
|
441
|
+
},
|
|
442
|
+
env_proxy_intercept: {
|
|
443
|
+
id: 'MUADDIB-AST-009',
|
|
444
|
+
name: 'Environment Variable Proxy Interception',
|
|
445
|
+
severity: 'CRITICAL',
|
|
446
|
+
confidence: 'high',
|
|
447
|
+
description: 'new Proxy(process.env) detecte — intercepte silencieusement tous les acces aux variables d\'environnement pour exfiltration',
|
|
448
|
+
references: ['https://attack.mitre.org/techniques/T1552/001/'],
|
|
449
|
+
mitre: 'T1552.001'
|
|
450
|
+
},
|
|
451
|
+
dynamic_require_exec: {
|
|
452
|
+
id: 'MUADDIB-AST-010',
|
|
453
|
+
name: 'Command Execution via Dynamic Require',
|
|
454
|
+
severity: 'CRITICAL',
|
|
455
|
+
confidence: 'high',
|
|
456
|
+
description: 'exec/execSync appele sur un module charge dynamiquement (require obfusque) — execution de commandes dissimulees',
|
|
457
|
+
references: ['https://attack.mitre.org/techniques/T1059/007/'],
|
|
458
|
+
mitre: 'T1059.007'
|
|
459
|
+
},
|
|
460
|
+
sandbox_evasion: {
|
|
461
|
+
id: 'MUADDIB-AST-011',
|
|
462
|
+
name: 'Sandbox/Container Evasion',
|
|
463
|
+
severity: 'HIGH',
|
|
464
|
+
confidence: 'high',
|
|
465
|
+
description: 'Detection de sandbox/container (/.dockerenv, /proc/cgroup) — technique anti-analyse pour eviter la detection en environnement controle',
|
|
466
|
+
references: ['https://attack.mitre.org/techniques/T1497/001/'],
|
|
467
|
+
mitre: 'T1497.001'
|
|
468
|
+
},
|
|
469
|
+
detached_process: {
|
|
470
|
+
id: 'MUADDIB-AST-012',
|
|
471
|
+
name: 'Detached Background Process',
|
|
472
|
+
severity: 'HIGH',
|
|
473
|
+
confidence: 'high',
|
|
474
|
+
description: 'spawn/fork avec {detached: true} — le processus survit a la fin de npm install et execute le payload en arriere-plan',
|
|
475
|
+
references: ['https://attack.mitre.org/techniques/T1036/009/'],
|
|
476
|
+
mitre: 'T1036.009'
|
|
477
|
+
},
|
|
478
|
+
dangerous_call_function: {
|
|
479
|
+
id: 'MUADDIB-AST-005',
|
|
480
|
+
name: 'new Function() Constructor',
|
|
481
|
+
severity: 'HIGH',
|
|
482
|
+
confidence: 'high',
|
|
483
|
+
description: 'Appel new Function() detecte - equivalent a eval()',
|
|
484
|
+
references: ['https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/Function'],
|
|
485
|
+
mitre: 'T1059.007'
|
|
486
|
+
},
|
|
487
|
+
|
|
488
|
+
credential_command_exec: {
|
|
489
|
+
id: 'MUADDIB-AST-014',
|
|
490
|
+
name: 'Credential Theft via CLI Tool',
|
|
491
|
+
severity: 'CRITICAL',
|
|
492
|
+
confidence: 'high',
|
|
493
|
+
description: 'exec/execSync appelle un outil CLI legitime pour voler des tokens d\'authentification (gh auth token, gcloud auth, aws sts). Technique s1ngularity/Nx.',
|
|
494
|
+
references: [
|
|
495
|
+
'https://snyk.io/blog/malicious-npm-packages-abuse-ai-agents/',
|
|
496
|
+
'https://attack.mitre.org/techniques/T1059/'
|
|
497
|
+
],
|
|
498
|
+
mitre: 'T1059'
|
|
499
|
+
},
|
|
500
|
+
workflow_write: {
|
|
501
|
+
id: 'MUADDIB-AST-015',
|
|
502
|
+
name: 'GitHub Actions Workflow Write',
|
|
503
|
+
severity: 'CRITICAL',
|
|
504
|
+
confidence: 'high',
|
|
505
|
+
description: 'fs.writeFileSync cree un fichier dans .github/workflows — injection de workflow GitHub Actions pour persistence. Technique Shai-Hulud 2.0.',
|
|
506
|
+
references: [
|
|
507
|
+
'https://www.wiz.io/blog/shai-hulud-npm-supply-chain-attack',
|
|
508
|
+
'https://attack.mitre.org/techniques/T1195/002/'
|
|
509
|
+
],
|
|
510
|
+
mitre: 'T1195.002'
|
|
511
|
+
},
|
|
512
|
+
binary_dropper: {
|
|
513
|
+
id: 'MUADDIB-AST-016',
|
|
514
|
+
name: 'Binary Dropper Pattern',
|
|
515
|
+
severity: 'CRITICAL',
|
|
516
|
+
confidence: 'high',
|
|
517
|
+
description: 'fs.chmodSync avec permissions executables (0o755/0o777) — pattern de dropper binaire: telecharge, ecrit, chmod, execute.',
|
|
518
|
+
references: [
|
|
519
|
+
'https://www.sonatype.com/blog/phantomraven-supply-chain-attack',
|
|
520
|
+
'https://attack.mitre.org/techniques/T1105/'
|
|
521
|
+
],
|
|
522
|
+
mitre: 'T1105'
|
|
523
|
+
},
|
|
524
|
+
prototype_hook: {
|
|
525
|
+
id: 'MUADDIB-AST-017',
|
|
526
|
+
name: 'Native API Prototype Hooking',
|
|
527
|
+
severity: 'HIGH',
|
|
528
|
+
confidence: 'high',
|
|
529
|
+
description: 'Modification du prototype ou remplacement de fonctions natives du navigateur/Node.js (fetch, XMLHttpRequest, http.request). Technique chalk/debug (Sygnia, sept 2025) pour intercepter du trafic.',
|
|
530
|
+
references: [
|
|
531
|
+
'https://www.sygnia.co/blog/malicious-chalk-debug-npm-packages/',
|
|
532
|
+
'https://attack.mitre.org/techniques/T1557/'
|
|
533
|
+
],
|
|
534
|
+
mitre: 'T1557'
|
|
535
|
+
},
|
|
536
|
+
|
|
537
|
+
ai_config_injection: {
|
|
538
|
+
id: 'MUADDIB-AICONF-001',
|
|
539
|
+
name: 'AI Config Prompt Injection',
|
|
540
|
+
severity: 'HIGH',
|
|
541
|
+
confidence: 'high',
|
|
542
|
+
description: 'Fichier de configuration d\'agent IA (.cursorrules, CLAUDE.md, copilot-instructions.md) contient des instructions d\'execution de commandes shell ou d\'acces a des credentials. Technique ToxicSkills/Clinejection.',
|
|
543
|
+
references: [
|
|
544
|
+
'https://snyk.io/blog/toxicskills-prompt-injection-ai-agents/',
|
|
545
|
+
'https://snyk.io/blog/clinejection-ai-config-prompt-injection/',
|
|
546
|
+
'https://arxiv.org/abs/2601.17548'
|
|
547
|
+
],
|
|
548
|
+
mitre: 'T1059'
|
|
549
|
+
},
|
|
550
|
+
ai_config_injection_critical: {
|
|
551
|
+
id: 'MUADDIB-AICONF-002',
|
|
552
|
+
name: 'AI Config Prompt Injection (Critical)',
|
|
553
|
+
severity: 'CRITICAL',
|
|
554
|
+
confidence: 'high',
|
|
555
|
+
description: 'Fichier de configuration d\'agent IA contient des commandes d\'exfiltration (curl POST vers un domaine externe, pipe vers shell) ou une combinaison commande shell + acces credentials. Attaque confirmee.',
|
|
556
|
+
references: [
|
|
557
|
+
'https://snyk.io/blog/toxicskills-prompt-injection-ai-agents/',
|
|
558
|
+
'https://snyk.io/blog/clinejection-ai-config-prompt-injection/',
|
|
559
|
+
'https://arxiv.org/abs/2601.17548',
|
|
560
|
+
'https://developer.nvidia.com/blog/ai-agent-security-guidance/'
|
|
561
|
+
],
|
|
562
|
+
mitre: 'T1059'
|
|
563
|
+
},
|
|
564
|
+
|
|
565
|
+
require_cache_poison: {
|
|
566
|
+
id: 'MUADDIB-AST-019',
|
|
567
|
+
name: 'Require Cache Poisoning',
|
|
568
|
+
severity: 'CRITICAL',
|
|
569
|
+
confidence: 'high',
|
|
570
|
+
description: 'Acces a require.cache pour remplacer ou hijacker des modules Node.js charges. Technique de cache poisoning pour intercepter du trafic ou injecter du code.',
|
|
571
|
+
references: [
|
|
572
|
+
'https://attack.mitre.org/techniques/T1574/006/'
|
|
573
|
+
],
|
|
574
|
+
mitre: 'T1574.006'
|
|
575
|
+
},
|
|
576
|
+
staged_binary_payload: {
|
|
577
|
+
id: 'MUADDIB-AST-020',
|
|
578
|
+
name: 'Staged Binary Payload Execution',
|
|
579
|
+
severity: 'HIGH',
|
|
580
|
+
confidence: 'high',
|
|
581
|
+
description: 'Reference a un fichier binaire (.png/.jpg/.wasm) combinee avec eval() dans le meme fichier. Possible execution de payload steganographique cache dans une image.',
|
|
582
|
+
references: [
|
|
583
|
+
'https://attack.mitre.org/techniques/T1027/003/'
|
|
584
|
+
],
|
|
585
|
+
mitre: 'T1027.003'
|
|
586
|
+
},
|
|
587
|
+
|
|
588
|
+
staged_eval_decode: {
|
|
589
|
+
id: 'MUADDIB-AST-021',
|
|
590
|
+
name: 'Staged Eval Decode',
|
|
591
|
+
severity: 'CRITICAL',
|
|
592
|
+
confidence: 'high',
|
|
593
|
+
description: 'eval() ou Function() recoit un argument decode (atob ou Buffer.from base64). Pattern classique de staged payload: le code malveillant est encode en base64 puis decode et execute dynamiquement.',
|
|
594
|
+
references: [
|
|
595
|
+
'https://attack.mitre.org/techniques/T1140/',
|
|
596
|
+
'https://attack.mitre.org/techniques/T1059/007/'
|
|
597
|
+
],
|
|
598
|
+
mitre: 'T1140'
|
|
599
|
+
},
|
|
600
|
+
|
|
601
|
+
env_charcode_reconstruction: {
|
|
602
|
+
id: 'MUADDIB-AST-018',
|
|
603
|
+
name: 'Environment Variable Key Reconstruction',
|
|
604
|
+
severity: 'HIGH',
|
|
605
|
+
confidence: 'high',
|
|
606
|
+
description: 'process.env accede avec une cle reconstruite dynamiquement via String.fromCharCode. Technique d\'obfuscation pour eviter la detection statique des noms de variables sensibles (GITHUB_TOKEN, etc.).',
|
|
607
|
+
references: [
|
|
608
|
+
'https://attack.mitre.org/techniques/T1027/',
|
|
609
|
+
'https://attack.mitre.org/techniques/T1552/001/'
|
|
610
|
+
],
|
|
611
|
+
mitre: 'T1027'
|
|
612
|
+
},
|
|
613
|
+
|
|
614
|
+
lifecycle_shell_pipe: {
|
|
615
|
+
id: 'MUADDIB-PKG-010',
|
|
616
|
+
name: 'Lifecycle Script Pipes to Shell',
|
|
617
|
+
severity: 'CRITICAL',
|
|
618
|
+
confidence: 'high',
|
|
619
|
+
description: 'Script lifecycle (preinstall/install/postinstall) execute curl | sh ou wget | bash — telecharge et execute du code distant au moment de npm install.',
|
|
620
|
+
references: [
|
|
621
|
+
'https://blog.phylum.io/shai-hulud-npm-worm',
|
|
622
|
+
'https://socket.dev/blog/2025-supply-chain-report'
|
|
623
|
+
],
|
|
624
|
+
mitre: 'T1195.002'
|
|
625
|
+
},
|
|
626
|
+
|
|
627
|
+
cross_file_dataflow: {
|
|
628
|
+
id: 'MUADDIB-FLOW-004',
|
|
629
|
+
name: 'Cross-File Data Exfiltration',
|
|
630
|
+
severity: 'CRITICAL',
|
|
631
|
+
confidence: 'high',
|
|
632
|
+
description: 'Un module lit des credentials (fs.readFileSync, process.env) et les exporte vers un autre module qui les envoie sur le reseau (fetch, https.request). Exfiltration inter-fichiers confirmee.',
|
|
633
|
+
references: [
|
|
634
|
+
'https://blog.phylum.io/shai-hulud-npm-worm',
|
|
635
|
+
'https://attack.mitre.org/techniques/T1041/'
|
|
636
|
+
],
|
|
637
|
+
mitre: 'T1041'
|
|
638
|
+
},
|
|
639
|
+
|
|
640
|
+
credential_tampering: {
|
|
641
|
+
id: 'MUADDIB-FLOW-003',
|
|
642
|
+
name: 'Credential/Cache Tampering',
|
|
643
|
+
severity: 'CRITICAL',
|
|
644
|
+
confidence: 'high',
|
|
645
|
+
description: 'Ecriture dans un chemin sensible (cache npm _cacache, cache yarn, credentials). Possible cache poisoning: injection de code malveillant dans des packages caches.',
|
|
646
|
+
references: [
|
|
647
|
+
'https://attack.mitre.org/techniques/T1565/001/'
|
|
648
|
+
],
|
|
649
|
+
mitre: 'T1565.001'
|
|
650
|
+
},
|
|
651
|
+
|
|
652
|
+
crypto_decipher: {
|
|
653
|
+
id: 'MUADDIB-AST-022',
|
|
654
|
+
name: 'Encrypted Payload Decryption',
|
|
655
|
+
severity: 'HIGH',
|
|
656
|
+
confidence: 'high',
|
|
657
|
+
description: 'crypto.createDecipher/createDecipheriv detecte. Dechiffrement runtime de payload embarque. Pattern canonique de flatmap-stream/event-stream.',
|
|
658
|
+
references: [
|
|
659
|
+
'https://snyk.io/blog/malicious-code-found-in-npm-package-event-stream/',
|
|
660
|
+
'https://attack.mitre.org/techniques/T1140/'
|
|
661
|
+
],
|
|
662
|
+
mitre: 'T1140'
|
|
663
|
+
},
|
|
664
|
+
|
|
665
|
+
module_compile: {
|
|
666
|
+
id: 'MUADDIB-AST-023',
|
|
667
|
+
name: 'Module Compile Execution',
|
|
668
|
+
severity: 'CRITICAL',
|
|
669
|
+
confidence: 'high',
|
|
670
|
+
description: 'module._compile() detecte. Execution de code arbitraire a partir d\'une chaine dans le contexte module. Technique cle de flatmap-stream.',
|
|
671
|
+
references: [
|
|
672
|
+
'https://blog.npmjs.org/post/180565383195/details-about-the-event-stream-incident',
|
|
673
|
+
'https://attack.mitre.org/techniques/T1059/007/'
|
|
674
|
+
],
|
|
675
|
+
mitre: 'T1059'
|
|
676
|
+
},
|
|
677
|
+
|
|
678
|
+
zlib_inflate_eval: {
|
|
679
|
+
id: 'MUADDIB-AST-024',
|
|
680
|
+
name: 'Obfuscated Payload via Zlib Inflate',
|
|
681
|
+
severity: 'CRITICAL',
|
|
682
|
+
confidence: 'high',
|
|
683
|
+
description: 'Payload obfusque: zlib inflate + decodage base64 + execution dynamique (eval/Function/Module._compile) dans le meme fichier. Aucun package legitime n\'utilise ce pattern. Technique SANDWORM_MODE (fev. 2026).',
|
|
684
|
+
references: [
|
|
685
|
+
'https://socket.dev/blog/sandworm-mode-campaign',
|
|
686
|
+
'https://attack.mitre.org/techniques/T1027/002/'
|
|
687
|
+
],
|
|
688
|
+
mitre: 'T1027.002'
|
|
689
|
+
},
|
|
690
|
+
|
|
691
|
+
module_compile_dynamic: {
|
|
692
|
+
id: 'MUADDIB-AST-025',
|
|
693
|
+
name: 'Dynamic Module Compile Execution',
|
|
694
|
+
severity: 'CRITICAL',
|
|
695
|
+
confidence: 'high',
|
|
696
|
+
description: 'Module._compile() avec argument dynamique (non-literal). Execution de code en memoire sans ecriture sur disque. Technique d\'evasion malware courante.',
|
|
697
|
+
references: [
|
|
698
|
+
'https://blog.npmjs.org/post/180565383195/details-about-the-event-stream-incident',
|
|
699
|
+
'https://attack.mitre.org/techniques/T1059/007/'
|
|
700
|
+
],
|
|
701
|
+
mitre: 'T1059'
|
|
702
|
+
},
|
|
703
|
+
|
|
704
|
+
write_execute_delete: {
|
|
705
|
+
id: 'MUADDIB-AST-026',
|
|
706
|
+
name: 'Anti-Forensics Write-Execute-Delete',
|
|
707
|
+
severity: 'HIGH',
|
|
708
|
+
confidence: 'high',
|
|
709
|
+
description: 'Anti-forensique: ecriture dans un repertoire temporaire, execution, puis suppression. Pattern typique de staging malware pour eviter la detection post-mortem.',
|
|
710
|
+
references: [
|
|
711
|
+
'https://attack.mitre.org/techniques/T1070/004/'
|
|
712
|
+
],
|
|
713
|
+
mitre: 'T1070.004'
|
|
714
|
+
},
|
|
715
|
+
|
|
716
|
+
mcp_config_injection: {
|
|
717
|
+
id: 'MUADDIB-AST-027',
|
|
718
|
+
name: 'MCP Config Injection',
|
|
719
|
+
severity: 'CRITICAL',
|
|
720
|
+
confidence: 'high',
|
|
721
|
+
description: 'Injection de configuration MCP: ecriture dans les fichiers de configuration d\'assistants IA (.claude/, .cursor/, .continue/, .vscode/, .windsurf/). Technique SANDWORM_MODE pour empoisonner la chaine d\'outils IA.',
|
|
722
|
+
references: [
|
|
723
|
+
'https://attack.mitre.org/techniques/T1546/016/'
|
|
724
|
+
],
|
|
725
|
+
mitre: 'T1546.016'
|
|
726
|
+
},
|
|
727
|
+
|
|
728
|
+
git_hooks_injection: {
|
|
729
|
+
id: 'MUADDIB-AST-028',
|
|
730
|
+
name: 'Git Hooks Injection',
|
|
731
|
+
severity: 'HIGH',
|
|
732
|
+
confidence: 'high',
|
|
733
|
+
description: 'Injection de hooks Git: ecriture dans .git/hooks/ ou modification de git config init.templateDir. Technique de persistence via hooks pre-commit, pre-push, post-checkout.',
|
|
734
|
+
references: [
|
|
735
|
+
'https://attack.mitre.org/techniques/T1546/004/'
|
|
736
|
+
],
|
|
737
|
+
mitre: 'T1546.004'
|
|
738
|
+
},
|
|
739
|
+
|
|
740
|
+
env_harvesting_dynamic: {
|
|
741
|
+
id: 'MUADDIB-AST-029',
|
|
742
|
+
name: 'Dynamic Environment Variable Harvesting',
|
|
743
|
+
severity: 'HIGH',
|
|
744
|
+
confidence: 'high',
|
|
745
|
+
description: 'Collecte dynamique de variables d\'environnement via Object.entries/keys/values(process.env) avec filtrage par patterns sensibles (TOKEN, SECRET, KEY, PASSWORD, AWS, SSH). Technique de vol de credentials.',
|
|
746
|
+
references: [
|
|
747
|
+
'https://attack.mitre.org/techniques/T1552/001/'
|
|
748
|
+
],
|
|
749
|
+
mitre: 'T1552.001'
|
|
750
|
+
},
|
|
751
|
+
|
|
752
|
+
dns_chunk_exfiltration: {
|
|
753
|
+
id: 'MUADDIB-AST-030',
|
|
754
|
+
name: 'DNS Chunk Exfiltration',
|
|
755
|
+
severity: 'HIGH',
|
|
756
|
+
confidence: 'high',
|
|
757
|
+
description: 'Exfiltration DNS: donnees encodees en base64 dans les requetes DNS. Canal covert pour contourner les firewalls. Pattern: dns.resolve + Buffer.from().toString("base64").',
|
|
758
|
+
references: [
|
|
759
|
+
'https://attack.mitre.org/techniques/T1048/003/'
|
|
760
|
+
],
|
|
761
|
+
mitre: 'T1048.003'
|
|
762
|
+
},
|
|
763
|
+
|
|
764
|
+
llm_api_key_harvesting: {
|
|
765
|
+
id: 'MUADDIB-AST-031',
|
|
766
|
+
name: 'LLM API Key Harvesting',
|
|
767
|
+
severity: 'MEDIUM',
|
|
768
|
+
confidence: 'medium',
|
|
769
|
+
description: 'Collecte de cles API LLM: acces a 3+ variables d\'environnement de providers IA (OPENAI_API_KEY, ANTHROPIC_API_KEY, GOOGLE_API_KEY, etc.). Vecteur de monetisation.',
|
|
770
|
+
references: [
|
|
771
|
+
'https://attack.mitre.org/techniques/T1552/001/'
|
|
772
|
+
],
|
|
773
|
+
mitre: 'T1552.001'
|
|
774
|
+
},
|
|
775
|
+
|
|
776
|
+
ai_agent_abuse: {
|
|
777
|
+
id: 'MUADDIB-AST-013',
|
|
778
|
+
name: 'AI Agent Weaponization',
|
|
779
|
+
severity: 'CRITICAL',
|
|
780
|
+
confidence: 'high',
|
|
781
|
+
description: 'Invocation d\'un agent IA (Claude, Gemini, Q, Aider) avec des flags qui desactivent les controles de securite (--dangerously-skip-permissions, --yolo, --trust-all-tools). Technique s1ngularity/Nx (aout 2025).',
|
|
782
|
+
references: [
|
|
783
|
+
'https://snyk.io/blog/malicious-npm-packages-abuse-ai-agents/',
|
|
784
|
+
'https://stepsecurity.io/blog/ai-agent-weaponization-supply-chain',
|
|
785
|
+
'https://attack.mitre.org/techniques/T1059/'
|
|
786
|
+
],
|
|
787
|
+
mitre: 'T1059'
|
|
788
|
+
},
|
|
789
|
+
|
|
790
|
+
// GitHub Actions patterns
|
|
791
|
+
shai_hulud_backdoor: {
|
|
792
|
+
id: 'MUADDIB-GHA-001',
|
|
793
|
+
name: 'Shai-Hulud GitHub Actions Backdoor',
|
|
794
|
+
severity: 'CRITICAL',
|
|
795
|
+
confidence: 'high',
|
|
796
|
+
description: 'Backdoor Shai-Hulud dans GitHub Actions via workflow discussion.yaml sur self-hosted runner',
|
|
797
|
+
references: ['https://www.wiz.io/blog/shai-hulud-npm-supply-chain-attack'],
|
|
798
|
+
mitre: 'T1195.002'
|
|
799
|
+
},
|
|
800
|
+
workflow_injection: {
|
|
801
|
+
id: 'MUADDIB-GHA-002',
|
|
802
|
+
name: 'GitHub Actions Workflow Injection',
|
|
803
|
+
severity: 'HIGH',
|
|
804
|
+
confidence: 'high',
|
|
805
|
+
description: 'Injection potentielle dans GitHub Actions via input non sanitise sur self-hosted runner',
|
|
806
|
+
references: ['https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions'],
|
|
807
|
+
mitre: 'T1195.002'
|
|
808
|
+
},
|
|
809
|
+
|
|
810
|
+
// Sandbox detections
|
|
811
|
+
sandbox_sensitive_file_read: {
|
|
812
|
+
id: 'MUADDIB-SANDBOX-001',
|
|
813
|
+
name: 'Sandbox: Sensitive File Read',
|
|
814
|
+
severity: 'CRITICAL',
|
|
815
|
+
confidence: 'high',
|
|
816
|
+
description: 'Package reads sensitive credential files during install',
|
|
817
|
+
references: ['https://blog.phylum.io/shai-hulud-npm-worm'],
|
|
818
|
+
mitre: 'T1552.001'
|
|
819
|
+
},
|
|
820
|
+
sandbox_sensitive_file_write: {
|
|
821
|
+
id: 'MUADDIB-SANDBOX-002',
|
|
822
|
+
name: 'Sandbox: Sensitive File Write',
|
|
823
|
+
severity: 'CRITICAL',
|
|
824
|
+
confidence: 'high',
|
|
825
|
+
description: 'Package writes to sensitive credential files during install',
|
|
826
|
+
references: ['https://blog.phylum.io/shai-hulud-npm-worm'],
|
|
827
|
+
mitre: 'T1565.001'
|
|
828
|
+
},
|
|
829
|
+
sandbox_suspicious_filesystem: {
|
|
830
|
+
id: 'MUADDIB-SANDBOX-003',
|
|
831
|
+
name: 'Sandbox: Suspicious Filesystem Change',
|
|
832
|
+
severity: 'HIGH',
|
|
833
|
+
confidence: 'high',
|
|
834
|
+
description: 'Package creates files in suspicious system locations during install',
|
|
835
|
+
references: ['https://attack.mitre.org/techniques/T1543/'],
|
|
836
|
+
mitre: 'T1543'
|
|
837
|
+
},
|
|
838
|
+
sandbox_suspicious_dns: {
|
|
839
|
+
id: 'MUADDIB-SANDBOX-004',
|
|
840
|
+
name: 'Sandbox: Suspicious DNS Query',
|
|
841
|
+
severity: 'HIGH',
|
|
842
|
+
confidence: 'medium',
|
|
843
|
+
description: 'Package resolves non-registry domain during install',
|
|
844
|
+
references: ['https://attack.mitre.org/techniques/T1071/'],
|
|
845
|
+
mitre: 'T1071'
|
|
846
|
+
},
|
|
847
|
+
sandbox_suspicious_connection: {
|
|
848
|
+
id: 'MUADDIB-SANDBOX-005',
|
|
849
|
+
name: 'Sandbox: Suspicious Network Connection',
|
|
850
|
+
severity: 'HIGH',
|
|
851
|
+
confidence: 'medium',
|
|
852
|
+
description: 'Package makes TCP connection to non-registry host during install',
|
|
853
|
+
references: ['https://attack.mitre.org/techniques/T1071/'],
|
|
854
|
+
mitre: 'T1071'
|
|
855
|
+
},
|
|
856
|
+
sandbox_suspicious_process: {
|
|
857
|
+
id: 'MUADDIB-SANDBOX-006',
|
|
858
|
+
name: 'Sandbox: Dangerous Process Spawned',
|
|
859
|
+
severity: 'CRITICAL',
|
|
860
|
+
confidence: 'high',
|
|
861
|
+
description: 'Package spawns dangerous command during install (curl, wget, nc, etc.)',
|
|
862
|
+
references: ['https://attack.mitre.org/techniques/T1059/'],
|
|
863
|
+
mitre: 'T1059'
|
|
864
|
+
},
|
|
865
|
+
sandbox_unknown_process: {
|
|
866
|
+
id: 'MUADDIB-SANDBOX-007',
|
|
867
|
+
name: 'Sandbox: Unknown Process Spawned',
|
|
868
|
+
severity: 'MEDIUM',
|
|
869
|
+
confidence: 'low',
|
|
870
|
+
description: 'Package spawns unrecognized process during install',
|
|
871
|
+
references: ['https://attack.mitre.org/techniques/T1059/'],
|
|
872
|
+
mitre: 'T1059'
|
|
873
|
+
},
|
|
874
|
+
sandbox_timeout: {
|
|
875
|
+
id: 'MUADDIB-SANDBOX-008',
|
|
876
|
+
name: 'Sandbox: Container Timeout',
|
|
877
|
+
severity: 'CRITICAL',
|
|
878
|
+
confidence: 'high',
|
|
879
|
+
description: 'Package install exceeded sandbox timeout - possible infinite loop or resource exhaustion',
|
|
880
|
+
references: ['https://attack.mitre.org/techniques/T1499/'],
|
|
881
|
+
mitre: 'T1499'
|
|
882
|
+
},
|
|
883
|
+
|
|
884
|
+
// Entropy detections
|
|
885
|
+
high_entropy_string: {
|
|
886
|
+
id: 'MUADDIB-ENTROPY-001',
|
|
887
|
+
name: 'High Entropy String',
|
|
888
|
+
severity: 'MEDIUM',
|
|
889
|
+
confidence: 'medium',
|
|
890
|
+
description: 'Chaine a haute entropie detectee (base64, hex, payload chiffre). Souvent signe d\'obfuscation ou de donnees encodees.',
|
|
891
|
+
references: ['https://attack.mitre.org/techniques/T1027/'],
|
|
892
|
+
mitre: 'T1027'
|
|
893
|
+
},
|
|
894
|
+
js_obfuscation_pattern: {
|
|
895
|
+
id: 'MUADDIB-ENTROPY-003',
|
|
896
|
+
name: 'JS Obfuscation Pattern',
|
|
897
|
+
severity: 'HIGH',
|
|
898
|
+
confidence: 'high',
|
|
899
|
+
description: 'Pattern d\'obfuscation JS detecte: variables _0x*, tableaux de strings encodes, eval/Function avec contenu haute entropie, ou long payload base64. Signature de javascript-obfuscator et malwares npm connus.',
|
|
900
|
+
references: [
|
|
901
|
+
'https://attack.mitre.org/techniques/T1027/002/',
|
|
902
|
+
'https://attack.mitre.org/techniques/T1027/010/',
|
|
903
|
+
'https://blog.phylum.io/shai-hulud-npm-worm'
|
|
904
|
+
],
|
|
905
|
+
mitre: 'T1027.002'
|
|
906
|
+
},
|
|
907
|
+
|
|
908
|
+
// Temporal analysis detections
|
|
909
|
+
lifecycle_added_critical: {
|
|
910
|
+
id: 'MUADDIB-TEMPORAL-001',
|
|
911
|
+
name: 'Sudden Lifecycle Script Added (Critical)',
|
|
912
|
+
severity: 'CRITICAL',
|
|
913
|
+
confidence: 'high',
|
|
914
|
+
description: 'Script preinstall/install/postinstall ajoute dans la derniere version. Vecteur d\'attaque #1 des supply chain attacks (Shai-Hulud, ua-parser-js, coa).',
|
|
915
|
+
references: [
|
|
916
|
+
'https://blog.phylum.io/shai-hulud-npm-worm',
|
|
917
|
+
'https://blog.npmjs.org/post/180565383195/details-about-the-event-stream-incident',
|
|
918
|
+
'https://github.com/nicedayfor/yargs-parser/security/advisories'
|
|
919
|
+
],
|
|
920
|
+
mitre: 'T1195.002'
|
|
921
|
+
},
|
|
922
|
+
lifecycle_added_high: {
|
|
923
|
+
id: 'MUADDIB-TEMPORAL-002',
|
|
924
|
+
name: 'Sudden Lifecycle Script Added',
|
|
925
|
+
severity: 'HIGH',
|
|
926
|
+
confidence: 'medium',
|
|
927
|
+
description: 'Script lifecycle (prepare, prepack, etc.) ajoute dans la derniere version. Potentiellement suspect si non justifie.',
|
|
928
|
+
references: [
|
|
929
|
+
'https://docs.npmjs.com/cli/v9/using-npm/scripts#life-cycle-scripts',
|
|
930
|
+
'https://blog.phylum.io/shai-hulud-npm-worm'
|
|
931
|
+
],
|
|
932
|
+
mitre: 'T1195.002'
|
|
933
|
+
},
|
|
934
|
+
lifecycle_modified: {
|
|
935
|
+
id: 'MUADDIB-TEMPORAL-003',
|
|
936
|
+
name: 'Lifecycle Script Modified',
|
|
937
|
+
severity: 'MEDIUM',
|
|
938
|
+
confidence: 'medium',
|
|
939
|
+
description: 'Script lifecycle modifie entre les deux dernieres versions. Verifier si le changement est legitime.',
|
|
940
|
+
references: [
|
|
941
|
+
'https://docs.npmjs.com/cli/v9/using-npm/scripts#life-cycle-scripts'
|
|
942
|
+
],
|
|
943
|
+
mitre: 'T1195.002'
|
|
944
|
+
},
|
|
945
|
+
|
|
946
|
+
// Temporal AST diff detections
|
|
947
|
+
dangerous_api_added_critical: {
|
|
948
|
+
id: 'MUADDIB-TEMPORAL-AST-001',
|
|
949
|
+
name: 'Dangerous API Added (Critical)',
|
|
950
|
+
severity: 'CRITICAL',
|
|
951
|
+
confidence: 'high',
|
|
952
|
+
description: 'API dangereuse (child_process, eval, Function, net.connect) apparue dans la derniere version. Absente de la version precedente.',
|
|
953
|
+
references: [
|
|
954
|
+
'https://blog.phylum.io/shai-hulud-npm-worm',
|
|
955
|
+
'https://blog.npmjs.org/post/180565383195/details-about-the-event-stream-incident'
|
|
956
|
+
],
|
|
957
|
+
mitre: 'T1195.002'
|
|
958
|
+
},
|
|
959
|
+
dangerous_api_added_high: {
|
|
960
|
+
id: 'MUADDIB-TEMPORAL-AST-002',
|
|
961
|
+
name: 'Dangerous API Added (High)',
|
|
962
|
+
severity: 'HIGH',
|
|
963
|
+
confidence: 'medium',
|
|
964
|
+
description: 'API suspecte (process.env, fetch, http/https) apparue dans la derniere version. Absente de la version precedente.',
|
|
965
|
+
references: [
|
|
966
|
+
'https://blog.phylum.io/shai-hulud-npm-worm',
|
|
967
|
+
'https://docs.npmjs.com/cli/v9/using-npm/scripts#life-cycle-scripts'
|
|
968
|
+
],
|
|
969
|
+
mitre: 'T1195.002'
|
|
970
|
+
},
|
|
971
|
+
dangerous_api_added_medium: {
|
|
972
|
+
id: 'MUADDIB-TEMPORAL-AST-003',
|
|
973
|
+
name: 'Dangerous API Added (Medium)',
|
|
974
|
+
severity: 'MEDIUM',
|
|
975
|
+
confidence: 'medium',
|
|
976
|
+
description: 'API potentiellement suspecte (dns.lookup, fs.readFile sur chemin sensible) apparue dans la derniere version.',
|
|
977
|
+
references: [
|
|
978
|
+
'https://docs.npmjs.com/cli/v9/using-npm/scripts#life-cycle-scripts'
|
|
979
|
+
],
|
|
980
|
+
mitre: 'T1195.002'
|
|
981
|
+
},
|
|
982
|
+
|
|
983
|
+
// Publish frequency anomaly detections
|
|
984
|
+
publish_burst: {
|
|
985
|
+
id: 'MUADDIB-PUBLISH-001',
|
|
986
|
+
name: 'Publish Burst Detected',
|
|
987
|
+
severity: 'HIGH',
|
|
988
|
+
confidence: 'high',
|
|
989
|
+
description: 'Multiple versions publiees en moins de 24h. Possible compromission de compte ou attaque automatisee.',
|
|
990
|
+
references: [
|
|
991
|
+
'https://blog.phylum.io/shai-hulud-npm-worm',
|
|
992
|
+
'https://blog.npmjs.org/post/180565383195/details-about-the-event-stream-incident'
|
|
993
|
+
],
|
|
994
|
+
mitre: 'T1195.002'
|
|
995
|
+
},
|
|
996
|
+
dormant_spike: {
|
|
997
|
+
id: 'MUADDIB-PUBLISH-002',
|
|
998
|
+
name: 'Dormant Package Spike',
|
|
999
|
+
severity: 'HIGH',
|
|
1000
|
+
confidence: 'medium',
|
|
1001
|
+
description: 'Package inactif depuis 6+ mois avec une nouvelle version soudaine. Possible changement de mainteneur ou compromission.',
|
|
1002
|
+
references: [
|
|
1003
|
+
'https://blog.npmjs.org/post/180565383195/details-about-the-event-stream-incident',
|
|
1004
|
+
'https://snyk.io/blog/a]]malicious-npm-packages-targeting-developers/'
|
|
1005
|
+
],
|
|
1006
|
+
mitre: 'T1195.002'
|
|
1007
|
+
},
|
|
1008
|
+
rapid_succession: {
|
|
1009
|
+
id: 'MUADDIB-PUBLISH-003',
|
|
1010
|
+
name: 'Rapid Version Succession',
|
|
1011
|
+
severity: 'MEDIUM',
|
|
1012
|
+
confidence: 'medium',
|
|
1013
|
+
description: 'Versions publiees en succession rapide (moins d\'1h). Possible attaque automatisee ou CI/CD compromis.',
|
|
1014
|
+
references: [
|
|
1015
|
+
'https://docs.npmjs.com/cli/v9/using-npm/scripts#life-cycle-scripts'
|
|
1016
|
+
],
|
|
1017
|
+
mitre: 'T1195.002'
|
|
1018
|
+
},
|
|
1019
|
+
|
|
1020
|
+
// Maintainer change detections
|
|
1021
|
+
new_maintainer: {
|
|
1022
|
+
id: 'MUADDIB-MAINTAINER-001',
|
|
1023
|
+
name: 'New Maintainer Added',
|
|
1024
|
+
severity: 'HIGH',
|
|
1025
|
+
confidence: 'high',
|
|
1026
|
+
description: 'Un nouveau maintainer a ete ajoute au package entre les deux dernieres versions. Verifier si le changement est legitime.',
|
|
1027
|
+
references: [
|
|
1028
|
+
'https://blog.npmjs.org/post/180565383195/details-about-the-event-stream-incident',
|
|
1029
|
+
'https://snyk.io/blog/malicious-npm-packages-targeting-developers/'
|
|
1030
|
+
],
|
|
1031
|
+
mitre: 'T1195.002'
|
|
1032
|
+
},
|
|
1033
|
+
suspicious_maintainer: {
|
|
1034
|
+
id: 'MUADDIB-MAINTAINER-002',
|
|
1035
|
+
name: 'Suspicious Maintainer Detected',
|
|
1036
|
+
severity: 'CRITICAL',
|
|
1037
|
+
confidence: 'high',
|
|
1038
|
+
description: 'Maintainer avec un nom suspect (generique, auto-genere, tres court). Risque eleve de compromission de compte.',
|
|
1039
|
+
references: [
|
|
1040
|
+
'https://blog.npmjs.org/post/180565383195/details-about-the-event-stream-incident',
|
|
1041
|
+
'https://blog.phylum.io/shai-hulud-npm-worm'
|
|
1042
|
+
],
|
|
1043
|
+
mitre: 'T1195.002'
|
|
1044
|
+
},
|
|
1045
|
+
sole_maintainer_change: {
|
|
1046
|
+
id: 'MUADDIB-MAINTAINER-003',
|
|
1047
|
+
name: 'Sole Maintainer Changed',
|
|
1048
|
+
severity: 'HIGH',
|
|
1049
|
+
confidence: 'high',
|
|
1050
|
+
description: 'Le seul maintainer du package a change. Indicateur fort de compromission de compte (event-stream attack pattern).',
|
|
1051
|
+
references: [
|
|
1052
|
+
'https://blog.npmjs.org/post/180565383195/details-about-the-event-stream-incident',
|
|
1053
|
+
'https://snyk.io/blog/malicious-npm-packages-targeting-developers/'
|
|
1054
|
+
],
|
|
1055
|
+
mitre: 'T1195.002'
|
|
1056
|
+
},
|
|
1057
|
+
new_publisher: {
|
|
1058
|
+
id: 'MUADDIB-MAINTAINER-004',
|
|
1059
|
+
name: 'New Publisher Detected',
|
|
1060
|
+
severity: 'MEDIUM',
|
|
1061
|
+
confidence: 'medium',
|
|
1062
|
+
description: 'La derniere version a ete publiee par un utilisateur different de la version precedente. Verifier la legitimite.',
|
|
1063
|
+
references: [
|
|
1064
|
+
'https://blog.npmjs.org/post/180565383195/details-about-the-event-stream-incident'
|
|
1065
|
+
],
|
|
1066
|
+
mitre: 'T1195.002'
|
|
1067
|
+
},
|
|
1068
|
+
|
|
1069
|
+
// Canary token detections
|
|
1070
|
+
canary_exfiltration: {
|
|
1071
|
+
id: 'MUADDIB-CANARY-001',
|
|
1072
|
+
name: 'Canary Token Exfiltration',
|
|
1073
|
+
severity: 'CRITICAL',
|
|
1074
|
+
confidence: 'high',
|
|
1075
|
+
description: 'Le package a tente d\'exfiltrer des honey tokens (faux secrets) injectes dans le sandbox. Comportement malveillant confirme.',
|
|
1076
|
+
references: [
|
|
1077
|
+
'https://canarytokens.org/generate',
|
|
1078
|
+
'https://blog.phylum.io/shai-hulud-npm-worm'
|
|
1079
|
+
],
|
|
1080
|
+
mitre: 'T1552.001'
|
|
1081
|
+
},
|
|
1082
|
+
};
|
|
1083
|
+
|
|
1084
|
+
function getRule(type) {
|
|
1085
|
+
if (RULES[type]) return RULES[type];
|
|
1086
|
+
if (PARANOID_RULES[type]) return PARANOID_RULES[type];
|
|
1087
|
+
return {
|
|
1088
|
+
id: 'MUADDIB-UNK-001',
|
|
1089
|
+
name: 'Unknown Threat',
|
|
1090
|
+
severity: 'MEDIUM',
|
|
1091
|
+
confidence: 'low',
|
|
1092
|
+
description: 'Menace non categorisee',
|
|
1093
|
+
references: [],
|
|
1094
|
+
mitre: null
|
|
1095
|
+
};
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
// Paranoid rules (ultra-strict)
|
|
1099
|
+
const PARANOID_RULES = {
|
|
1100
|
+
network_access: {
|
|
1101
|
+
id: 'MUADDIB-PARANOID-001',
|
|
1102
|
+
severity: 'HIGH',
|
|
1103
|
+
patterns: ['fetch', 'axios', 'http.request', 'https.request', 'net.connect', 'XMLHttpRequest'],
|
|
1104
|
+
message: 'Network access detected (paranoid mode)',
|
|
1105
|
+
mitre: 'T1071'
|
|
1106
|
+
},
|
|
1107
|
+
sensitive_file_access: {
|
|
1108
|
+
id: 'MUADDIB-PARANOID-002',
|
|
1109
|
+
severity: 'HIGH',
|
|
1110
|
+
patterns: ['.env', '.npmrc', '.ssh', '.git', 'id_rsa', 'credentials', 'secrets'],
|
|
1111
|
+
message: 'Sensitive file access detected (paranoid mode)',
|
|
1112
|
+
mitre: 'T1552.001'
|
|
1113
|
+
},
|
|
1114
|
+
dynamic_execution: {
|
|
1115
|
+
id: 'MUADDIB-PARANOID-003',
|
|
1116
|
+
severity: 'CRITICAL',
|
|
1117
|
+
patterns: ['eval', 'Function', 'vm.runInContext'],
|
|
1118
|
+
message: 'Dynamic code execution detected (paranoid mode)',
|
|
1119
|
+
mitre: 'T1059'
|
|
1120
|
+
},
|
|
1121
|
+
subprocess: {
|
|
1122
|
+
id: 'MUADDIB-PARANOID-004',
|
|
1123
|
+
severity: 'CRITICAL',
|
|
1124
|
+
patterns: ['child_process', 'spawn', 'exec', 'execSync', 'spawnSync', 'fork'],
|
|
1125
|
+
message: 'Subprocess execution detected (paranoid mode)',
|
|
1126
|
+
mitre: 'T1059.004'
|
|
1127
|
+
},
|
|
1128
|
+
env_access: {
|
|
1129
|
+
id: 'MUADDIB-PARANOID-005',
|
|
1130
|
+
severity: 'MEDIUM',
|
|
1131
|
+
patterns: ['process.env'],
|
|
1132
|
+
message: 'Environment variable access detected (paranoid mode)',
|
|
1133
|
+
mitre: 'T1552.001'
|
|
1134
|
+
}
|
|
1135
|
+
};
|
|
1136
|
+
|
|
1039
1137
|
module.exports = { RULES, getRule, PARANOID_RULES };
|