blitzstrike 2.4.62 → 2.4.64
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/CHANGELOG.md +34 -0
- package/dist/index.js +323 -148
- package/intelligence/variants.json +352 -0
- package/package.json +1 -1
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "blitzstrike-variants-v1",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"_comment": "Variant corpus \u2014 concrete real-world code shapes per detector class. Each variant is a shape that MUST fire its class's detector. The verification harness sweeps every variant and reports per-class coverage, so a detector that misses a shape surfaces as a false negative. Shapes are generic (language-idiomatic), with no vendor/product framing.",
|
|
5
|
+
"variants": [
|
|
6
|
+
{
|
|
7
|
+
"class": "sql_injection",
|
|
8
|
+
"code": "$wpdb->query(\"DELETE FROM t WHERE id=\" . $row['id']);",
|
|
9
|
+
"note": "raw string concat into query"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"class": "sql_injection",
|
|
13
|
+
"code": "$r = $db->query(\"SELECT * FROM users WHERE name='\" . $name . \"'\");",
|
|
14
|
+
"note": "interpolated SELECT"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"class": "sql_injection",
|
|
18
|
+
"code": "mysqli_query($c, \"UPDATE t SET x='\" . $x . \"' WHERE id=\" . $id);",
|
|
19
|
+
"note": "mysqli raw concat"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"class": "sql_injection",
|
|
23
|
+
"code": "knex('users').whereRaw('id = ' + userId)",
|
|
24
|
+
"note": "ORM raw clause"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"class": "ssrf",
|
|
28
|
+
"code": "$ch = curl_init($_GET['url']); curl_exec($ch);",
|
|
29
|
+
"note": "curl to request URL"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"class": "ssrf",
|
|
33
|
+
"code": "$r = file_get_contents($_POST['target']);",
|
|
34
|
+
"note": "file_get_contents request URL"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"class": "ssrf",
|
|
38
|
+
"code": "requests.get(request.args.get('url'))",
|
|
39
|
+
"note": "python requests request URL"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"class": "ssrf",
|
|
43
|
+
"code": "axios.get(req.body.url)",
|
|
44
|
+
"note": "node axios request URL"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"class": "ssti",
|
|
48
|
+
"code": "return jinja2.from_string($_GET['tpl']).render()",
|
|
49
|
+
"note": "jinja from_string request input"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"class": "ssti",
|
|
53
|
+
"code": "$twig->render($_GET['tpl']);",
|
|
54
|
+
"note": "twig render request input"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"class": "ssti",
|
|
58
|
+
"code": "return render_template_string(request.args['tpl'])",
|
|
59
|
+
"note": "flask render_template_string request input"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"class": "ssti",
|
|
63
|
+
"code": "new Template($_GET['template'])",
|
|
64
|
+
"note": "freemarker template request input"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"class": "xxe",
|
|
68
|
+
"code": "$xml = $_POST['xml'];\n$x = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOENT);",
|
|
69
|
+
"note": "simplexml with entity substitution enabled"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"class": "xxe",
|
|
73
|
+
"code": "$xml = $_POST['xml'];\n$x = new SimpleXMLElement($xml, LIBXML_NOENT);",
|
|
74
|
+
"note": "SimpleXMLElement with NOENT"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"class": "xxe",
|
|
78
|
+
"code": "DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(request.getParameter('xml'))",
|
|
79
|
+
"note": "java DOM parse without disabling entities"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"class": "deserialization",
|
|
83
|
+
"code": "$o = unserialize($_COOKIE['data']);\nclass A { function __destruct() { system($this->c); } }",
|
|
84
|
+
"note": "unserialize cookie"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"class": "deserialization",
|
|
88
|
+
"code": "obj = pickle.loads(request.data)",
|
|
89
|
+
"note": "pickle.loads request data"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"class": "deserialization",
|
|
93
|
+
"code": "data = yaml.load(request.data)",
|
|
94
|
+
"note": "unsafe yaml.load"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"class": "deserialization",
|
|
98
|
+
"code": "new ObjectInputStream(request.getInputStream()).readObject()",
|
|
99
|
+
"note": "java readObject"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"class": "type_juggling",
|
|
103
|
+
"code": "if ($_POST['token'] == md5($secret)) { login(); }",
|
|
104
|
+
"note": "loose compare vs md5"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"class": "type_juggling",
|
|
108
|
+
"code": "if ($_GET['pwd'] != $stored_hash) { die('no'); }",
|
|
109
|
+
"note": "loose compare vs hash"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"class": "type_juggling",
|
|
113
|
+
"code": "if (strcmp($_POST['pwd'], $hash) == 0) { login(); }",
|
|
114
|
+
"note": "strcmp array coercion"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"class": "mass_assignment",
|
|
118
|
+
"code": "extract($_REQUEST);",
|
|
119
|
+
"note": "extract request"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"class": "mass_assignment",
|
|
123
|
+
"code": "parse_str(file_get_contents('php://input'), $data);",
|
|
124
|
+
"note": "parse_str raw body"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"class": "mass_assignment",
|
|
128
|
+
"code": "foreach ($_POST as $k => $v) { $this->$k = $v; }",
|
|
129
|
+
"note": "dynamic field binding"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"class": "mass_assignment",
|
|
133
|
+
"code": "User.create(req.body)",
|
|
134
|
+
"note": "model create without allowlist"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"class": "prototype_pollution",
|
|
138
|
+
"code": "_.merge(target, req.body)",
|
|
139
|
+
"note": "lodash merge request body"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"class": "prototype_pollution",
|
|
143
|
+
"code": "Object.assign(obj, req.body)",
|
|
144
|
+
"note": "Object.assign request body"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"class": "prototype_pollution",
|
|
148
|
+
"code": "$.extend(true, {}, req.body)",
|
|
149
|
+
"note": "jquery deep extend request body"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"class": "crlf_injection",
|
|
153
|
+
"code": "header(\"Location: \" . $_GET['url']);",
|
|
154
|
+
"note": "header location request input"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"class": "crlf_injection",
|
|
158
|
+
"code": "setcookie('name', $_GET['v']);",
|
|
159
|
+
"note": "setcookie request value"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"class": "crlf_injection",
|
|
163
|
+
"code": "res.setHeader('Location', req.query.url)",
|
|
164
|
+
"note": "node setHeader request input"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"class": "path_confusion",
|
|
168
|
+
"code": "include($_GET['page']);",
|
|
169
|
+
"note": "include request path"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"class": "path_confusion",
|
|
173
|
+
"code": "$c = file_get_contents($_GET['file']);",
|
|
174
|
+
"note": "file_get_contents request path"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"class": "path_confusion",
|
|
178
|
+
"code": "readFile(path.join(base, req.query.file))",
|
|
179
|
+
"note": "node readFile joined path"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"class": "path_confusion",
|
|
183
|
+
"code": "new File(request.getParameter('f'))",
|
|
184
|
+
"note": "java File request param"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"class": "wrong_sanitizer",
|
|
188
|
+
"code": "$x = htmlspecialchars($_GET['q']); $db->query(\"SELECT * FROM t WHERE c='\" . $x . \"'\");",
|
|
189
|
+
"note": "HTML sanitizer into SQL"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"class": "wrong_sanitizer",
|
|
193
|
+
"code": "$x = strip_tags($_GET['q']); mysqli_query($c, \"SELECT * FROM t WHERE c='\" . $x . \"'\");",
|
|
194
|
+
"note": "strip_tags into SQL"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"class": "wrong_sanitizer",
|
|
198
|
+
"code": "$x = esc_html($_GET['q']); $db->query(\"SELECT * FROM t WHERE c='\" . $x . \"'\");",
|
|
199
|
+
"note": "addslashes into SQL"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"class": "missing_authz",
|
|
203
|
+
"code": "add_action('wp_ajax_nopriv_export', 'h'); function h() { update_option('export', $_POST['x']); }",
|
|
204
|
+
"note": "nopriv handler no capability check"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"class": "missing_authz",
|
|
208
|
+
"code": "app.delete('/admin/user/:id', (req, res) => { User.delete(req.params.id); })",
|
|
209
|
+
"note": "admin route no auth"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"class": "missing_nonce",
|
|
213
|
+
"code": "add_action('wp_ajax_del_order', 'h'); function h() { wp_delete_post((int)$_POST['id']); }",
|
|
214
|
+
"note": "ajax handler state change no nonce"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"class": "missing_nonce",
|
|
218
|
+
"code": "add_action('wp_ajax_del', 'h'); function h() { wp_delete_post((int)$_POST['id']); }",
|
|
219
|
+
"note": "ajax no nonce check"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"class": "missing_nonce",
|
|
223
|
+
"code": "add_action('wp_ajax_save', 'h'); function h() { wp_update_post($_POST); }",
|
|
224
|
+
"note": "ajax handler state change no nonce"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"class": "missing_nonce",
|
|
228
|
+
"code": "add_action('wp_ajax_save', 'h'); function h() { update_option('x', $_POST['x']); }",
|
|
229
|
+
"note": "ajax save no nonce"
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"class": "file_upload",
|
|
233
|
+
"code": "move_uploaded_file($_FILES['f']['tmp_name'], '/uploads/' . $_FILES['f']['name']);",
|
|
234
|
+
"note": "move_uploaded_file raw name"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"class": "file_upload",
|
|
238
|
+
"code": "wp_upload_bits($_FILES['f']['name'], null, file_get_contents($_FILES['f']['tmp_name']));",
|
|
239
|
+
"note": "wp_upload_bits raw name"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"class": "file_upload",
|
|
243
|
+
"code": "file.save(path.join(uploadDir, req.files.f.name))",
|
|
244
|
+
"note": "node multer raw name"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"class": "file_upload",
|
|
248
|
+
"code": "move_uploaded_file($_FILES['f']['tmp_name'], '/uploads/' . basename($_FILES['f']['name']));",
|
|
249
|
+
"note": "basename only, no ext whitelist"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"class": "priv_esc",
|
|
253
|
+
"code": "$u->set_role($_POST['role']);",
|
|
254
|
+
"note": "set_role request role"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"class": "priv_esc",
|
|
258
|
+
"code": "update_user_meta($id, 'wp_capabilities', $_POST['caps']);",
|
|
259
|
+
"note": "user meta capabilities request"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"class": "priv_esc",
|
|
263
|
+
"code": "$u->add_role($_GET['role']);",
|
|
264
|
+
"note": "add_role request role"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"class": "priv_esc",
|
|
268
|
+
"code": "db.query(\"UPDATE users SET role='\" + $_POST['role'] + \"' WHERE id=\" + $_POST['id'])",
|
|
269
|
+
"note": "raw role update"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"class": "hardcoded_secret",
|
|
273
|
+
"code": "$db_password = \"EXAMPLE_DB_PASSWORD_123\";",
|
|
274
|
+
"note": "db password literal"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"class": "hardcoded_secret",
|
|
278
|
+
"code": "const apiKey = \"EXAMPLE_API_KEY_123456789\";",
|
|
279
|
+
"note": "api key literal"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"class": "hardcoded_secret",
|
|
283
|
+
"code": "$aws_access_key_id = \"EXAMPLE_ACCESS_KEY_123\";",
|
|
284
|
+
"note": "aws key literal"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"class": "hardcoded_secret",
|
|
288
|
+
"code": "JWT_SECRET = \"EXAMPLE_JWT_SIGNING_KEY_123\";",
|
|
289
|
+
"note": "jwt secret literal"
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"class": "llm_injection",
|
|
293
|
+
"code": "openai.chat.completions.create(messages=[{'content': req.body.text}])",
|
|
294
|
+
"note": "openai completion request input"
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"class": "llm_injection",
|
|
298
|
+
"code": "anthropic.messages.create(prompt=req.body.prompt)",
|
|
299
|
+
"note": "anthropic prompt request input"
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"class": "llm_injection",
|
|
303
|
+
"code": "llm.invoke(req.body.query)",
|
|
304
|
+
"note": "langchain invoke request input"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"class": "graphql_exposure",
|
|
308
|
+
"code": "const server = new ApolloServer({ introspection: true });",
|
|
309
|
+
"note": "apollo introspection on"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"class": "graphql_exposure",
|
|
313
|
+
"code": "const server = new ApolloServer({ playground: true });",
|
|
314
|
+
"note": "apollo playground on"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"class": "graphql_exposure",
|
|
318
|
+
"code": "graphqlHTTP({ schema, graphiql: true })",
|
|
319
|
+
"note": "express-graphql graphiql on"
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"class": "oauth_misconfig",
|
|
323
|
+
"code": "const redirect_uri = req.query.redirect_uri;",
|
|
324
|
+
"note": "redirect_uri from query"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"class": "oauth_misconfig",
|
|
328
|
+
"code": "$redirect_uri = $_GET['redirect_uri'];",
|
|
329
|
+
"note": "redirect_uri from request"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"class": "oauth_misconfig",
|
|
333
|
+
"code": "const returnUrl = request.params.get('returnUrl');",
|
|
334
|
+
"note": "returnUrl from request"
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"class": "grpc_reflection",
|
|
338
|
+
"code": "server.add_service(grpc_reflection_v1alpha.ServerReflectionServicer(...))",
|
|
339
|
+
"note": "grpc reflection servicer"
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
"class": "grpc_reflection",
|
|
343
|
+
"code": "reflection.enable_server_reflection()",
|
|
344
|
+
"note": "reflection enabled"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"class": "grpc_reflection",
|
|
348
|
+
"code": "grpc_reflection_v1.ReflectionServicer.to_server(server)",
|
|
349
|
+
"note": "reflection to server"
|
|
350
|
+
}
|
|
351
|
+
]
|
|
352
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blitzstrike",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.64",
|
|
4
4
|
"description": "Blitz Strike — a universal MCP security-audit toolbelt. BLITZ sweeps the attack surface, EAGLE-EYE traces source-to-sink, STRIKE verifies live. 57 attack chains, 130-tool catalog, intelligence data layer. One server, every agent.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|