muaddib-scanner 1.0.21 → 1.1.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.
- package/README.fr.md +339 -325
- package/README.md +363 -350
- package/bin/muaddib.js +169 -33
- package/data/iocs.json +1 -1
- package/package.json +8 -2
- package/src/safe-install.js +163 -0
package/README.md
CHANGED
|
@@ -1,350 +1,363 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<img src="MUADDIBLOGO.png" alt="MUAD'DIB Logo" width="200">
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
|
-
<h1 align="center">MUAD'DIB</h1>
|
|
6
|
-
|
|
7
|
-
<p align="center">
|
|
8
|
-
<strong>Supply-chain threat detection and response for npm</strong>
|
|
9
|
-
</p>
|
|
10
|
-
|
|
11
|
-
<p align="center">
|
|
12
|
-
<img src="https://img.shields.io/npm/v/muaddib-scanner" alt="npm version">
|
|
13
|
-
<img src="https://img.shields.io/badge/license-MIT-green" alt="License">
|
|
14
|
-
<img src="https://img.shields.io/badge/node-%3E%3D18-brightgreen" alt="Node">
|
|
15
|
-
<img src="https://img.shields.io/badge/IOCs-930%2B-red" alt="IOCs">
|
|
16
|
-
</p>
|
|
17
|
-
|
|
18
|
-
<p align="center">
|
|
19
|
-
<a href="#installation">Installation</a> |
|
|
20
|
-
<a href="#usage">Usage</a> |
|
|
21
|
-
<a href="#features">Features</a> |
|
|
22
|
-
<a href="#vs-code">VS Code</a> |
|
|
23
|
-
<a href="#ci-cd">CI/CD</a>
|
|
24
|
-
</p>
|
|
25
|
-
|
|
26
|
-
<p align="center">
|
|
27
|
-
<a href="README.fr.md">Version francaise</a>
|
|
28
|
-
</p>
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## Why MUAD'DIB?
|
|
33
|
-
|
|
34
|
-
npm supply-chain attacks are exploding. Shai-Hulud compromised 25K+ repos in 2025. Existing tools detect threats but don't help you respond.
|
|
35
|
-
|
|
36
|
-
MUAD'DIB detects AND guides your response.
|
|
37
|
-
|
|
38
|
-
| Feature | MUAD'DIB | Socket | Snyk | Opengrep |
|
|
39
|
-
|---------|----------|--------|------|----------|
|
|
40
|
-
| IOC Detection | Yes | Yes | Yes | No |
|
|
41
|
-
| AST Analysis | Yes | Yes | Yes | Yes |
|
|
42
|
-
| Dataflow Analysis | Yes | No | No | Yes |
|
|
43
|
-
| Typosquatting Detection | Yes | Yes | Yes | No |
|
|
44
|
-
| Response Playbooks | Yes | No | No | No |
|
|
45
|
-
| Risk Score | Yes | Yes | Yes | No |
|
|
46
|
-
| SARIF / GitHub Security | Yes | Yes | Yes | Yes |
|
|
47
|
-
| MITRE ATT&CK Mapping | Yes | No | No | No |
|
|
48
|
-
| Discord/Slack Webhooks | Yes | No | No | No |
|
|
49
|
-
| VS Code Extension | Yes | Yes | Yes | No |
|
|
50
|
-
| Paranoid Mode | Yes | No | No | No |
|
|
51
|
-
| Daemon Mode | Yes | No | No | No |
|
|
52
|
-
| 100% Open Source | Yes | No | No | Yes |
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
## Installation
|
|
57
|
-
|
|
58
|
-
### npm (recommended)
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
npm install -g muaddib-scanner
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
### From source
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
git clone https://github.com/
|
|
68
|
-
cd muad-dib
|
|
69
|
-
npm install
|
|
70
|
-
npm link
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
## Usage
|
|
76
|
-
|
|
77
|
-
### Basic scan
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
muaddib scan .
|
|
81
|
-
muaddib scan /path/to/project
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
muaddib scan . --
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
muaddib scan . --
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
muaddib
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
###
|
|
152
|
-
|
|
153
|
-
```bash
|
|
154
|
-
muaddib
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
###
|
|
158
|
-
|
|
159
|
-
```bash
|
|
160
|
-
muaddib
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
|
210
|
-
|
|
211
|
-
|
|
|
212
|
-
|
|
|
213
|
-
|
|
|
214
|
-
|
|
|
215
|
-
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
---
|
|
341
|
-
|
|
342
|
-
##
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
---
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="MUADDIBLOGO.png" alt="MUAD'DIB Logo" width="200">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">MUAD'DIB</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<strong>Supply-chain threat detection and response for npm</strong>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<img src="https://img.shields.io/npm/v/muaddib-scanner" alt="npm version">
|
|
13
|
+
<img src="https://img.shields.io/badge/license-MIT-green" alt="License">
|
|
14
|
+
<img src="https://img.shields.io/badge/node-%3E%3D18-brightgreen" alt="Node">
|
|
15
|
+
<img src="https://img.shields.io/badge/IOCs-930%2B-red" alt="IOCs">
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<p align="center">
|
|
19
|
+
<a href="#installation">Installation</a> |
|
|
20
|
+
<a href="#usage">Usage</a> |
|
|
21
|
+
<a href="#features">Features</a> |
|
|
22
|
+
<a href="#vs-code">VS Code</a> |
|
|
23
|
+
<a href="#ci-cd">CI/CD</a>
|
|
24
|
+
</p>
|
|
25
|
+
|
|
26
|
+
<p align="center">
|
|
27
|
+
<a href="README.fr.md">Version francaise</a>
|
|
28
|
+
</p>
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Why MUAD'DIB?
|
|
33
|
+
|
|
34
|
+
npm supply-chain attacks are exploding. Shai-Hulud compromised 25K+ repos in 2025. Existing tools detect threats but don't help you respond.
|
|
35
|
+
|
|
36
|
+
MUAD'DIB detects AND guides your response.
|
|
37
|
+
|
|
38
|
+
| Feature | MUAD'DIB | Socket | Snyk | Opengrep |
|
|
39
|
+
|---------|----------|--------|------|----------|
|
|
40
|
+
| IOC Detection | Yes | Yes | Yes | No |
|
|
41
|
+
| AST Analysis | Yes | Yes | Yes | Yes |
|
|
42
|
+
| Dataflow Analysis | Yes | No | No | Yes |
|
|
43
|
+
| Typosquatting Detection | Yes | Yes | Yes | No |
|
|
44
|
+
| Response Playbooks | Yes | No | No | No |
|
|
45
|
+
| Risk Score | Yes | Yes | Yes | No |
|
|
46
|
+
| SARIF / GitHub Security | Yes | Yes | Yes | Yes |
|
|
47
|
+
| MITRE ATT&CK Mapping | Yes | No | No | No |
|
|
48
|
+
| Discord/Slack Webhooks | Yes | No | No | No |
|
|
49
|
+
| VS Code Extension | Yes | Yes | Yes | No |
|
|
50
|
+
| Paranoid Mode | Yes | No | No | No |
|
|
51
|
+
| Daemon Mode | Yes | No | No | No |
|
|
52
|
+
| 100% Open Source | Yes | No | No | Yes |
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Installation
|
|
57
|
+
|
|
58
|
+
### npm (recommended)
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npm install -g muaddib-scanner
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### From source
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
git clone https://github.com/DNSZLSK/muad-dib
|
|
68
|
+
cd muad-dib
|
|
69
|
+
npm install
|
|
70
|
+
npm link
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Usage
|
|
76
|
+
|
|
77
|
+
### Basic scan
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
muaddib scan .
|
|
81
|
+
muaddib scan /path/to/project
|
|
82
|
+
```
|
|
83
|
+
### Interactive mode
|
|
84
|
+
```bash
|
|
85
|
+
muaddib
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Launches an interactive menu to guide you through all features.
|
|
89
|
+
|
|
90
|
+
### Safe install
|
|
91
|
+
```bash
|
|
92
|
+
muaddib install <package>
|
|
93
|
+
muaddib install lodash axios --save-dev
|
|
94
|
+
muaddib i express -g
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Scans packages for threats BEFORE installing. Blocks known malicious packages.
|
|
98
|
+
|
|
99
|
+
### Risk score
|
|
100
|
+
|
|
101
|
+
Each scan displays a 0-100 risk score:
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
[SCORE] 58/100 [***********---------] HIGH
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Explain mode (full details)
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
muaddib scan . --explain
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Shows for each detection:
|
|
114
|
+
- Rule ID
|
|
115
|
+
- MITRE ATT&CK technique
|
|
116
|
+
- References (articles, CVEs)
|
|
117
|
+
- Response playbook
|
|
118
|
+
|
|
119
|
+
### Export
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
muaddib scan . --json > results.json # JSON
|
|
123
|
+
muaddib scan . --html report.html # HTML
|
|
124
|
+
muaddib scan . --sarif results.sarif # SARIF (GitHub Security)
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Severity threshold
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
muaddib scan . --fail-on critical # Fail only on CRITICAL
|
|
131
|
+
muaddib scan . --fail-on high # Fail on HIGH and CRITICAL (default)
|
|
132
|
+
muaddib scan . --fail-on medium # Fail on MEDIUM, HIGH, CRITICAL
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Paranoid mode
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
muaddib scan . --paranoid
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Ultra-strict detection with lower tolerance. Useful for critical projects. Detects any network access, subprocess execution, dynamic code evaluation, and sensitive file access.
|
|
142
|
+
|
|
143
|
+
### Discord/Slack webhook
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
muaddib scan . --webhook "https://discord.com/api/webhooks/..."
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Sends an alert with score and threats to Discord or Slack.
|
|
150
|
+
|
|
151
|
+
### Real-time monitoring
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
muaddib watch .
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Daemon mode
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
muaddib daemon
|
|
161
|
+
muaddib daemon --webhook "https://discord.com/api/webhooks/..."
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Automatically monitors all `npm install` commands and scans new packages.
|
|
165
|
+
|
|
166
|
+
### Update IOCs
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
muaddib update
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Scrape new IOCs
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
muaddib scrape
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Fetches latest malicious packages from multiple threat intelligence sources:
|
|
179
|
+
- Shai-Hulud 2.0 Detector (GitHub)
|
|
180
|
+
- Datadog Security Labs
|
|
181
|
+
- OSV.dev
|
|
182
|
+
- Socket.dev reports
|
|
183
|
+
- Phylum Research
|
|
184
|
+
- AlienVault OTX
|
|
185
|
+
- Aikido Intel
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## Features
|
|
190
|
+
|
|
191
|
+
### Typosquatting detection
|
|
192
|
+
|
|
193
|
+
MUAD'DIB detects packages with names similar to popular packages:
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
[HIGH] Package "lodahs" looks like "lodash" (swapped_chars). Possible typosquatting.
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### Dataflow analysis
|
|
200
|
+
|
|
201
|
+
Detects when code reads credentials AND sends them over the network:
|
|
202
|
+
|
|
203
|
+
```
|
|
204
|
+
[CRITICAL] Suspicious flow: credential read (readFileSync, GITHUB_TOKEN) + network send (fetch)
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Detected attacks
|
|
208
|
+
|
|
209
|
+
| Campaign | Packages | Status |
|
|
210
|
+
|----------|----------|--------|
|
|
211
|
+
| Shai-Hulud v1 (Sept 2025) | @ctrl/tinycolor, ng2-file-upload | Detected |
|
|
212
|
+
| Shai-Hulud v2 (Nov 2025) | @asyncapi/specs, posthog-node, kill-port | Detected |
|
|
213
|
+
| Shai-Hulud v3 (Dec 2025) | @vietmoney/react-big-calendar | Detected |
|
|
214
|
+
| event-stream (2018) | flatmap-stream, event-stream | Detected |
|
|
215
|
+
| eslint-scope (2018) | eslint-scope | Detected |
|
|
216
|
+
| Protestware | node-ipc, colors, faker | Detected |
|
|
217
|
+
| Typosquats | crossenv, mongose, babelcli | Detected |
|
|
218
|
+
|
|
219
|
+
### Detected techniques
|
|
220
|
+
|
|
221
|
+
| Technique | MITRE | Detection |
|
|
222
|
+
|-----------|-------|-----------|
|
|
223
|
+
| Credential theft (.npmrc, .ssh) | T1552.001 | AST |
|
|
224
|
+
| Env var exfiltration | T1552.001 | AST |
|
|
225
|
+
| Remote code execution | T1105 | Pattern |
|
|
226
|
+
| Reverse shell | T1059.004 | Pattern |
|
|
227
|
+
| Dead man's switch | T1485 | Pattern |
|
|
228
|
+
| Obfuscated code | T1027 | Heuristics |
|
|
229
|
+
| Typosquatting | T1195.002 | Levenshtein |
|
|
230
|
+
| Supply chain compromise | T1195.002 | IOC matching |
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## VS Code
|
|
235
|
+
|
|
236
|
+
The VS Code extension automatically scans your npm projects.
|
|
237
|
+
|
|
238
|
+
### Installation
|
|
239
|
+
|
|
240
|
+
search "MUAD'DIB" in Extensions VS Code, or :
|
|
241
|
+
```bash
|
|
242
|
+
marketplace.visualstudio.com/items?itemName=dnszlsk.muaddib-vscode
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Commands
|
|
246
|
+
|
|
247
|
+
- `MUAD'DIB: Scan Project` - Scan entire project
|
|
248
|
+
- `MUAD'DIB: Scan Current File` - Scan current file
|
|
249
|
+
|
|
250
|
+
### Settings
|
|
251
|
+
|
|
252
|
+
- `muaddib.autoScan` - Auto-scan on project open (default: true)
|
|
253
|
+
- `muaddib.webhookUrl` - Discord/Slack webhook URL
|
|
254
|
+
- `muaddib.failLevel` - Alert level (critical/high/medium/low)
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## CI/CD
|
|
259
|
+
|
|
260
|
+
### GitHub Actions
|
|
261
|
+
|
|
262
|
+
```yaml
|
|
263
|
+
name: Security Scan
|
|
264
|
+
|
|
265
|
+
on: [push, pull_request]
|
|
266
|
+
|
|
267
|
+
jobs:
|
|
268
|
+
scan:
|
|
269
|
+
runs-on: ubuntu-latest
|
|
270
|
+
permissions:
|
|
271
|
+
security-events: write
|
|
272
|
+
contents: read
|
|
273
|
+
steps:
|
|
274
|
+
- uses: actions/checkout@v4
|
|
275
|
+
- uses: actions/setup-node@v4
|
|
276
|
+
with:
|
|
277
|
+
node-version: '20'
|
|
278
|
+
- run: npm install -g muaddib-scanner
|
|
279
|
+
- run: muaddib scan . --sarif results.sarif
|
|
280
|
+
- uses: github/codeql-action/upload-sarif@v3
|
|
281
|
+
with:
|
|
282
|
+
sarif_file: results.sarif
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
Alerts appear in Security > Code scanning alerts.
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## Architecture
|
|
290
|
+
|
|
291
|
+
```
|
|
292
|
+
MUAD'DIB Scanner
|
|
293
|
+
|
|
|
294
|
+
+-- IOC Match (930+ packages, YAML/JSON DB)
|
|
295
|
+
+-- AST Parse (acorn)
|
|
296
|
+
+-- Pattern Matching (shell, scripts)
|
|
297
|
+
+-- Typosquat Detection (Levenshtein)
|
|
298
|
+
+-- Paranoid Mode (ultra-strict)
|
|
299
|
+
|
|
|
300
|
+
v
|
|
301
|
+
Dataflow Analysis (credential read -> network send)
|
|
302
|
+
|
|
|
303
|
+
v
|
|
304
|
+
Threat Enrichment (rules, MITRE ATT&CK, playbooks)
|
|
305
|
+
|
|
|
306
|
+
v
|
|
307
|
+
Output (CLI, JSON, HTML, SARIF, Webhook)
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
---
|
|
311
|
+
|
|
312
|
+
## Contributing
|
|
313
|
+
|
|
314
|
+
### Add IOCs
|
|
315
|
+
|
|
316
|
+
Edit YAML files in `iocs/`:
|
|
317
|
+
|
|
318
|
+
```yaml
|
|
319
|
+
- id: NEW-MALWARE-001
|
|
320
|
+
name: "malicious-package"
|
|
321
|
+
version: "*"
|
|
322
|
+
severity: critical
|
|
323
|
+
confidence: high
|
|
324
|
+
source: community
|
|
325
|
+
description: "Threat description"
|
|
326
|
+
references:
|
|
327
|
+
- https://example.com/article
|
|
328
|
+
mitre: T1195.002
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
### Development
|
|
332
|
+
|
|
333
|
+
```bash
|
|
334
|
+
git clone https://github.com/DNSZLSK/muad-dib
|
|
335
|
+
cd muad-dib
|
|
336
|
+
npm install
|
|
337
|
+
npm test
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
## Community
|
|
343
|
+
|
|
344
|
+
- Discord: https://discord.gg/y8zxSmue
|
|
345
|
+
|
|
346
|
+
---
|
|
347
|
+
|
|
348
|
+
## Documentation
|
|
349
|
+
|
|
350
|
+
- [Threat Model](docs/threat-model.md) - What MUAD'DIB detects and doesn't detect
|
|
351
|
+
- [IOCs YAML](iocs/) - Threat database
|
|
352
|
+
|
|
353
|
+
---
|
|
354
|
+
|
|
355
|
+
## License
|
|
356
|
+
|
|
357
|
+
MIT
|
|
358
|
+
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
<p align="center">
|
|
362
|
+
<strong>The spice must flow. The worms must die.</strong>
|
|
363
|
+
</p>
|