security-detections-mcp 1.1.0 → 1.2.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.md +177 -20
- package/dist/db.d.ts +61 -1
- package/dist/db.js +354 -12
- package/dist/index.js +318 -9
- package/dist/indexer.d.ts +3 -1
- package/dist/indexer.js +57 -2
- package/dist/parsers/elastic.js +4 -0
- package/dist/parsers/kql.d.ts +2 -0
- package/dist/parsers/kql.js +348 -0
- package/dist/parsers/sigma.js +4 -0
- package/dist/parsers/splunk.js +4 -0
- package/dist/types.d.ts +6 -1
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
# Security Detections MCP
|
|
2
2
|
|
|
3
|
-
An MCP (Model Context Protocol) server that lets LLMs query a unified database of **Sigma**, **Splunk ESCU**, and **
|
|
3
|
+
An MCP (Model Context Protocol) server that lets LLMs query a unified database of **Sigma**, **Splunk ESCU**, **Elastic**, and **KQL** security detection rules.
|
|
4
4
|
|
|
5
|
-
[](https://cursor.com/en/install-mcp?name=security-detections&config=
|
|
5
|
+
[](https://cursor.com/en/install-mcp?name=security-detections&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsInNlY3VyaXR5LWRldGVjdGlvbnMtbWNwIl0sImVudiI6eyJTSUdNQV9QQVRIUyI6Ii9wYXRoL3RvL3NpZ21hL3J1bGVzLC9wYXRoL3RvL3NpZ21hL3J1bGVzLXRocmVhdC1odW50aW5nIiwiU1BMVU5LX1BBVEhTIjoiL3BhdGgvdG8vc2VjdXJpdHlfY29udGVudC9kZXRlY3Rpb25zIiwiU1RPUllfUEFUSFMiOiIvcGF0aC90by9zZWN1cml0eV9jb250ZW50L3N0b3JpZXMiLCJFTEFTVElDX1BBVEhTIjoiL3BhdGgvdG8vZGV0ZWN0aW9uLXJ1bGVzL3J1bGVzIiwiS1FMX1BBVEhTIjoiL3BhdGgvdG8va3FsLXJ1bGVzIn19)
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
9
|
-
- **Unified Search** - Query Sigma, Splunk ESCU, and
|
|
9
|
+
- **Unified Search** - Query Sigma, Splunk ESCU, Elastic, and KQL detections from a single interface
|
|
10
10
|
- **Full-Text Search** - SQLite FTS5 powered search across names, descriptions, queries, MITRE tactics, CVEs, process names, and more
|
|
11
11
|
- **MITRE ATT&CK Mapping** - Filter detections by technique ID or tactic
|
|
12
12
|
- **CVE Coverage** - Find detections for specific CVE vulnerabilities
|
|
13
13
|
- **Process Name Search** - Find detections that reference specific processes (e.g., powershell.exe, w3wp.exe)
|
|
14
14
|
- **Analytic Stories** - Query by Splunk analytic story (optional - enhances context)
|
|
15
|
+
- **KQL Categories** - Filter KQL queries by category (Defender For Endpoint, Azure AD, Threat Hunting, etc.)
|
|
15
16
|
- **Auto-Indexing** - Automatically indexes detections on startup from configured paths
|
|
16
|
-
- **Multi-Format Support** - YAML (Sigma, Splunk), TOML (Elastic)
|
|
17
|
+
- **Multi-Format Support** - YAML (Sigma, Splunk), TOML (Elastic), Markdown (KQL)
|
|
17
18
|
- **Logsource Filtering** - Filter Sigma rules by category, product, or service
|
|
18
19
|
- **Severity Filtering** - Filter by criticality level
|
|
19
20
|
|
|
@@ -52,7 +53,8 @@ Add to your MCP config (`~/.cursor/mcp.json` or `.cursor/mcp.json` in your proje
|
|
|
52
53
|
"SIGMA_PATHS": "/path/to/sigma/rules,/path/to/sigma/rules-threat-hunting",
|
|
53
54
|
"SPLUNK_PATHS": "/path/to/security_content/detections",
|
|
54
55
|
"ELASTIC_PATHS": "/path/to/detection-rules/rules",
|
|
55
|
-
"STORY_PATHS": "/path/to/security_content/stories"
|
|
56
|
+
"STORY_PATHS": "/path/to/security_content/stories",
|
|
57
|
+
"KQL_PATHS": "/path/to/Hunting-Queries-Detection-Rules"
|
|
56
58
|
}
|
|
57
59
|
}
|
|
58
60
|
}
|
|
@@ -73,7 +75,8 @@ Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
|
|
|
73
75
|
"SIGMA_PATHS": "/Users/you/sigma/rules,/Users/you/sigma/rules-threat-hunting",
|
|
74
76
|
"SPLUNK_PATHS": "/Users/you/security_content/detections",
|
|
75
77
|
"ELASTIC_PATHS": "/Users/you/detection-rules/rules",
|
|
76
|
-
"STORY_PATHS": "/Users/you/security_content/stories"
|
|
78
|
+
"STORY_PATHS": "/Users/you/security_content/stories",
|
|
79
|
+
"KQL_PATHS": "/Users/you/Hunting-Queries-Detection-Rules"
|
|
77
80
|
}
|
|
78
81
|
}
|
|
79
82
|
}
|
|
@@ -84,16 +87,17 @@ Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
|
|
|
84
87
|
|
|
85
88
|
| Variable | Description | Required |
|
|
86
89
|
|----------|-------------|----------|
|
|
87
|
-
| `SIGMA_PATHS` | Comma-separated paths to Sigma rule directories |
|
|
88
|
-
| `SPLUNK_PATHS` | Comma-separated paths to Splunk ESCU detection directories |
|
|
89
|
-
| `ELASTIC_PATHS` | Comma-separated paths to Elastic detection rule directories |
|
|
90
|
+
| `SIGMA_PATHS` | Comma-separated paths to Sigma rule directories | At least one source required |
|
|
91
|
+
| `SPLUNK_PATHS` | Comma-separated paths to Splunk ESCU detection directories | At least one source required |
|
|
92
|
+
| `ELASTIC_PATHS` | Comma-separated paths to Elastic detection rule directories | At least one source required |
|
|
93
|
+
| `KQL_PATHS` | Comma-separated paths to KQL hunting query directories | At least one source required |
|
|
90
94
|
| `STORY_PATHS` | Comma-separated paths to Splunk analytic story directories | No (enhances context) |
|
|
91
95
|
|
|
92
96
|
## Getting Detection Content
|
|
93
97
|
|
|
94
98
|
### Quick Start: Download All Rules (Copy & Paste)
|
|
95
99
|
|
|
96
|
-
Create a `detections` folder and download all
|
|
100
|
+
Create a `detections` folder and download all sources with sparse checkout (only downloads the rules, not full repos):
|
|
97
101
|
|
|
98
102
|
```bash
|
|
99
103
|
# Create detections directory
|
|
@@ -111,10 +115,14 @@ cd security_content && git sparse-checkout set detections stories && cd ..
|
|
|
111
115
|
git clone --depth 1 --filter=blob:none --sparse https://github.com/elastic/detection-rules.git
|
|
112
116
|
cd detection-rules && git sparse-checkout set rules && cd ..
|
|
113
117
|
|
|
118
|
+
# Download KQL hunting queries (~300+ queries)
|
|
119
|
+
git clone --depth 1 https://github.com/Bert-JanP/Hunting-Queries-Detection-Rules.git kql
|
|
120
|
+
|
|
114
121
|
echo "Done! Configure your MCP with these paths:"
|
|
115
122
|
echo " SIGMA_PATHS: $(pwd)/sigma/rules,$(pwd)/sigma/rules-threat-hunting"
|
|
116
123
|
echo " SPLUNK_PATHS: $(pwd)/security_content/detections"
|
|
117
124
|
echo " ELASTIC_PATHS: $(pwd)/detection-rules/rules"
|
|
125
|
+
echo " KQL_PATHS: $(pwd)/kql"
|
|
118
126
|
echo " STORY_PATHS: $(pwd)/security_content/stories"
|
|
119
127
|
```
|
|
120
128
|
|
|
@@ -134,6 +142,10 @@ git clone https://github.com/splunk/security_content.git
|
|
|
134
142
|
# Elastic Detection Rules
|
|
135
143
|
git clone https://github.com/elastic/detection-rules.git
|
|
136
144
|
# Use rules/ directory
|
|
145
|
+
|
|
146
|
+
# KQL Hunting Queries
|
|
147
|
+
git clone https://github.com/Bert-JanP/Hunting-Queries-Detection-Rules.git
|
|
148
|
+
# Use entire repo
|
|
137
149
|
```
|
|
138
150
|
|
|
139
151
|
## MCP Tools
|
|
@@ -145,8 +157,8 @@ git clone https://github.com/elastic/detection-rules.git
|
|
|
145
157
|
| `search(query, limit)` | Full-text search across all detection fields (names, descriptions, queries, CVEs, process names, etc.) |
|
|
146
158
|
| `get_by_id(id)` | Get a single detection by its ID |
|
|
147
159
|
| `list_all(limit, offset)` | Paginated list of all detections |
|
|
148
|
-
| `list_by_source(source_type)` | Filter by `sigma`, `splunk_escu`, or `
|
|
149
|
-
| `get_raw_yaml(id)` | Get the original YAML/TOML content |
|
|
160
|
+
| `list_by_source(source_type)` | Filter by `sigma`, `splunk_escu`, `elastic`, or `kql` |
|
|
161
|
+
| `get_raw_yaml(id)` | Get the original YAML/TOML/Markdown content |
|
|
150
162
|
| `get_stats()` | Get index statistics |
|
|
151
163
|
| `rebuild_index()` | Force re-index from configured paths |
|
|
152
164
|
|
|
@@ -174,6 +186,14 @@ git clone https://github.com/elastic/detection-rules.git
|
|
|
174
186
|
| `list_by_detection_type(type)` | Filter by type (TTP, Anomaly, Hunting, Correlation) |
|
|
175
187
|
| `list_by_analytic_story(story)` | Filter by Splunk analytic story |
|
|
176
188
|
|
|
189
|
+
### KQL-Specific Filters
|
|
190
|
+
|
|
191
|
+
| Tool | Description |
|
|
192
|
+
|------|-------------|
|
|
193
|
+
| `list_by_kql_category(category)` | Filter KQL by category (e.g., "Defender For Endpoint", "Azure Active Directory", "Threat Hunting") |
|
|
194
|
+
| `list_by_kql_tag(tag)` | Filter KQL by tag (e.g., "ransomware", "hunting", "ti-feed", "dfir") |
|
|
195
|
+
| `list_by_kql_datasource(data_source)` | Filter KQL by Microsoft data source (e.g., "DeviceProcessEvents", "SigninLogs") |
|
|
196
|
+
|
|
177
197
|
### Story Tools (Optional)
|
|
178
198
|
|
|
179
199
|
| Tool | Description |
|
|
@@ -183,6 +203,45 @@ git clone https://github.com/elastic/detection-rules.git
|
|
|
183
203
|
| `list_stories(limit, offset)` | List all analytic stories |
|
|
184
204
|
| `list_stories_by_category(category)` | Filter stories by category (Malware, Adversary Tactics, etc.) |
|
|
185
205
|
|
|
206
|
+
### Efficient Analysis Tools (Token-Optimized)
|
|
207
|
+
|
|
208
|
+
These tools do heavy processing server-side and return minimal, actionable data:
|
|
209
|
+
|
|
210
|
+
| Tool | Description | Output Size |
|
|
211
|
+
|------|-------------|-------------|
|
|
212
|
+
| `analyze_coverage(source_type?)` | Get coverage stats by tactic, top techniques, weak spots | ~2KB |
|
|
213
|
+
| `identify_gaps(threat_profile, source_type?)` | Find gaps for ransomware, apt, persistence, etc. | ~500B |
|
|
214
|
+
| `suggest_detections(technique_id, source_type?)` | Get detection ideas for a technique | ~2KB |
|
|
215
|
+
| `get_technique_ids(source_type?, tactic?, severity?)` | Get only technique IDs (no full objects) | ~200B |
|
|
216
|
+
| `generate_navigator_layer(name, source_type?, tactic?)` | Generate ATT&CK Navigator layer JSON | ~3KB |
|
|
217
|
+
|
|
218
|
+
**Why use these?** Traditional tools return full detection objects (~50KB+ per query). These return only what you need, saving 25x+ tokens.
|
|
219
|
+
|
|
220
|
+
## Claude Code Skills
|
|
221
|
+
|
|
222
|
+
This repo includes [Claude Code Skills](https://code.claude.com/docs/en/skills) in `.claude/skills/` that teach Claude efficient workflows:
|
|
223
|
+
|
|
224
|
+
| Skill | Purpose |
|
|
225
|
+
|-------|---------|
|
|
226
|
+
| `coverage-analysis` | Efficient coverage analysis using the token-optimized tools |
|
|
227
|
+
|
|
228
|
+
**Why skills?** Instead of figuring out methodology each time (wasting tokens), skills teach Claude once.
|
|
229
|
+
|
|
230
|
+
You can also install personal skills to `~/.claude/skills/` for cross-project use.
|
|
231
|
+
|
|
232
|
+
### Example: Efficient Coverage Analysis
|
|
233
|
+
|
|
234
|
+
```
|
|
235
|
+
You: "What's my Elastic coverage against ransomware?"
|
|
236
|
+
|
|
237
|
+
AI uses skills + efficient tools:
|
|
238
|
+
1. analyze_coverage(source_type="elastic") → Stats by tactic
|
|
239
|
+
2. identify_gaps(threat_profile="ransomware") → Prioritized gaps
|
|
240
|
+
3. suggest_detections(technique_id="T1486") → Fix top gap
|
|
241
|
+
|
|
242
|
+
Total: ~5KB of data vs ~500KB with traditional tools
|
|
243
|
+
```
|
|
244
|
+
|
|
186
245
|
## Example Workflows
|
|
187
246
|
|
|
188
247
|
### Find PowerShell Detections
|
|
@@ -204,7 +263,7 @@ Tool: list_by_cve(cve_id="CVE-2024-27198")
|
|
|
204
263
|
```
|
|
205
264
|
LLM: "What detections do we have for credential dumping?"
|
|
206
265
|
Tool: search(query="credential dumping", limit=10)
|
|
207
|
-
→ Returns results from Sigma, Splunk, AND
|
|
266
|
+
→ Returns results from Sigma, Splunk, Elastic, AND KQL
|
|
208
267
|
```
|
|
209
268
|
|
|
210
269
|
### Find Web Server Attack Detections
|
|
@@ -222,24 +281,39 @@ Tool: search_stories(query="ransomware")
|
|
|
222
281
|
Tool: list_by_analytic_story(story="Ransomware")
|
|
223
282
|
```
|
|
224
283
|
|
|
284
|
+
### Find KQL Hunting Queries for Defender
|
|
285
|
+
|
|
286
|
+
```
|
|
287
|
+
LLM: "What KQL queries do we have for Defender For Endpoint?"
|
|
288
|
+
Tool: list_by_kql_category(category="Defender For Endpoint")
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
### Search for BloodHound Detections
|
|
292
|
+
|
|
293
|
+
```
|
|
294
|
+
LLM: "Find detections for BloodHound usage"
|
|
295
|
+
Tool: search(query="bloodhound", limit=10)
|
|
296
|
+
→ Returns KQL hunting queries and other source detections
|
|
297
|
+
```
|
|
298
|
+
|
|
225
299
|
## Unified Schema
|
|
226
300
|
|
|
227
|
-
All detection sources (Sigma, Splunk, Elastic) are normalized to a common schema:
|
|
301
|
+
All detection sources (Sigma, Splunk, Elastic, KQL) are normalized to a common schema:
|
|
228
302
|
|
|
229
303
|
### Core Fields
|
|
230
304
|
|
|
231
305
|
| Field | Description |
|
|
232
306
|
|-------|-------------|
|
|
233
|
-
| `id` | Unique identifier
|
|
307
|
+
| `id` | Unique identifier |
|
|
234
308
|
| `name` | Detection name/title |
|
|
235
309
|
| `description` | What the detection looks for |
|
|
236
|
-
| `query` | Detection logic (Sigma YAML, Splunk SPL,
|
|
237
|
-
| `source_type` | `sigma`, `splunk_escu`, or `
|
|
310
|
+
| `query` | Detection logic (Sigma YAML, Splunk SPL, Elastic EQL, or KQL) |
|
|
311
|
+
| `source_type` | `sigma`, `splunk_escu`, `elastic`, or `kql` |
|
|
238
312
|
| `severity` | Detection severity level |
|
|
239
313
|
| `status` | Rule status (stable, test, experimental, production, etc.) |
|
|
240
314
|
| `author` | Rule author |
|
|
241
315
|
| `file_path` | Original file path |
|
|
242
|
-
| `raw_yaml` | Original YAML/TOML content |
|
|
316
|
+
| `raw_yaml` | Original YAML/TOML/Markdown content |
|
|
243
317
|
|
|
244
318
|
### Enhanced Fields (for Semantic Search)
|
|
245
319
|
|
|
@@ -252,11 +326,20 @@ All detection sources (Sigma, Splunk, Elastic) are normalized to a common schema
|
|
|
252
326
|
| `process_names` | Process names referenced in detection |
|
|
253
327
|
| `file_paths` | Interesting file paths referenced |
|
|
254
328
|
| `registry_paths` | Registry paths referenced |
|
|
255
|
-
| `data_sources` | Required data sources |
|
|
329
|
+
| `data_sources` | Required data sources (Sysmon, DeviceProcessEvents, etc.) |
|
|
256
330
|
| `detection_type` | TTP, Anomaly, Hunting, or Correlation |
|
|
257
331
|
| `asset_type` | Endpoint, Web Server, Cloud, Network |
|
|
258
332
|
| `security_domain` | endpoint, network, cloud, access |
|
|
259
333
|
|
|
334
|
+
### KQL-Specific Fields
|
|
335
|
+
|
|
336
|
+
| Field | Description |
|
|
337
|
+
|-------|-------------|
|
|
338
|
+
| `kql_category` | Category derived from folder path (e.g., "Defender For Endpoint") |
|
|
339
|
+
| `kql_tags` | Extracted tags (e.g., "ransomware", "hunting", "ti-feed") |
|
|
340
|
+
| `kql_keywords` | Security keywords extracted for search |
|
|
341
|
+
| `platforms` | Platforms (windows, azure-ad, office-365, etc.) |
|
|
342
|
+
|
|
260
343
|
## Database
|
|
261
344
|
|
|
262
345
|
The index is stored at `~/.cache/security-detections-mcp/detections.sqlite`.
|
|
@@ -294,6 +377,16 @@ From [Elastic Detection Rules](https://github.com/elastic/detection-rules):
|
|
|
294
377
|
- Optional: `rule.description`, `rule.query`, `rule.severity`, `rule.tags`, `rule.threat` (MITRE mappings)
|
|
295
378
|
- Supports EQL, KQL, Lucene, and ESQL query languages
|
|
296
379
|
|
|
380
|
+
### KQL Hunting Queries (Markdown)
|
|
381
|
+
|
|
382
|
+
From [Bert-JanP/Hunting-Queries-Detection-Rules](https://github.com/Bert-JanP/Hunting-Queries-Detection-Rules):
|
|
383
|
+
- Microsoft Defender XDR and Azure Sentinel hunting queries
|
|
384
|
+
- Extracts title from markdown heading
|
|
385
|
+
- Extracts KQL from fenced code blocks
|
|
386
|
+
- Extracts MITRE technique IDs from tables
|
|
387
|
+
- Derives category from folder path
|
|
388
|
+
- Extracts data sources (DeviceProcessEvents, SigninLogs, etc.)
|
|
389
|
+
|
|
297
390
|
## Development
|
|
298
391
|
|
|
299
392
|
```bash
|
|
@@ -307,6 +400,7 @@ npm run build
|
|
|
307
400
|
SIGMA_PATHS="./detections/sigma/rules" \
|
|
308
401
|
SPLUNK_PATHS="./detections/splunk/detections" \
|
|
309
402
|
ELASTIC_PATHS="./detections/elastic/rules" \
|
|
403
|
+
KQL_PATHS="./detections/kql" \
|
|
310
404
|
STORY_PATHS="./detections/splunk/stories" \
|
|
311
405
|
npm start
|
|
312
406
|
```
|
|
@@ -320,8 +414,71 @@ When fully indexed with all sources:
|
|
|
320
414
|
| Sigma Rules | ~3,000+ |
|
|
321
415
|
| Splunk ESCU | ~2,000+ |
|
|
322
416
|
| Elastic Rules | ~1,500+ |
|
|
417
|
+
| KQL Queries | ~300+ |
|
|
323
418
|
| Analytic Stories | ~330 |
|
|
324
|
-
| **Total** | **~
|
|
419
|
+
| **Total** | **~7,000+** |
|
|
420
|
+
|
|
421
|
+
## 🔗 Using with MITRE ATT&CK MCP
|
|
422
|
+
|
|
423
|
+
**This MCP pairs perfectly with [mitre-attack-mcp](https://github.com/MHaggis/mitre-attack-mcp)** for complete threat coverage analysis:
|
|
424
|
+
|
|
425
|
+
| MCP | Purpose |
|
|
426
|
+
|-----|---------|
|
|
427
|
+
| **security-detections-mcp** | Query 7,000+ detection rules (Sigma, Splunk ESCU, Elastic, KQL) |
|
|
428
|
+
| **mitre-attack-mcp** | Analyze coverage against ATT&CK framework, generate Navigator layers |
|
|
429
|
+
|
|
430
|
+
### Combined Workflow (Efficient)
|
|
431
|
+
|
|
432
|
+
```
|
|
433
|
+
You: "What's my coverage against APT29?"
|
|
434
|
+
|
|
435
|
+
LLM workflow (3 calls, ~10KB total):
|
|
436
|
+
1. mitre-attack-mcp → get_group_techniques("G0016") # APT29's TTPs
|
|
437
|
+
2. detections-mcp → analyze_coverage(source_type="elastic") # Your coverage
|
|
438
|
+
3. mitre-attack-mcp → find_group_gaps("G0016", your_coverage) # The gaps
|
|
439
|
+
|
|
440
|
+
Result: Prioritized gap list, not 500KB of raw data
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
### Generate Navigator Layer (1 call)
|
|
444
|
+
|
|
445
|
+
```
|
|
446
|
+
You: "Generate a Navigator layer for my initial access coverage"
|
|
447
|
+
|
|
448
|
+
LLM: generate_navigator_layer(
|
|
449
|
+
name="Initial Access Coverage",
|
|
450
|
+
source_type="elastic",
|
|
451
|
+
tactic="initial-access"
|
|
452
|
+
)
|
|
453
|
+
|
|
454
|
+
→ Returns ready-to-import Navigator JSON
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
### Install Both Together
|
|
458
|
+
|
|
459
|
+
```json
|
|
460
|
+
{
|
|
461
|
+
"mcpServers": {
|
|
462
|
+
"security-detections": {
|
|
463
|
+
"command": "npx",
|
|
464
|
+
"args": ["-y", "security-detections-mcp"],
|
|
465
|
+
"env": {
|
|
466
|
+
"SIGMA_PATHS": "/path/to/sigma/rules",
|
|
467
|
+
"SPLUNK_PATHS": "/path/to/security_content/detections",
|
|
468
|
+
"ELASTIC_PATHS": "/path/to/detection-rules/rules",
|
|
469
|
+
"KQL_PATHS": "/path/to/kql-hunting-queries"
|
|
470
|
+
}
|
|
471
|
+
},
|
|
472
|
+
"mitre-attack": {
|
|
473
|
+
"command": "npx",
|
|
474
|
+
"args": ["-y", "mitre-attack-mcp"],
|
|
475
|
+
"env": {
|
|
476
|
+
"ATTACK_DOMAIN": "enterprise-attack"
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
```
|
|
325
482
|
|
|
326
483
|
## License
|
|
327
484
|
|
package/dist/db.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare function insertDetection(detection: Detection): void;
|
|
|
8
8
|
export declare function searchDetections(query: string, limit?: number): Detection[];
|
|
9
9
|
export declare function getDetectionById(id: string): Detection | null;
|
|
10
10
|
export declare function listDetections(limit?: number, offset?: number): Detection[];
|
|
11
|
-
export declare function listBySource(sourceType: 'sigma' | 'splunk_escu' | 'elastic', limit?: number, offset?: number): Detection[];
|
|
11
|
+
export declare function listBySource(sourceType: 'sigma' | 'splunk_escu' | 'elastic' | 'kql', limit?: number, offset?: number): Detection[];
|
|
12
12
|
export declare function listByMitre(techniqueId: string, limit?: number, offset?: number): Detection[];
|
|
13
13
|
export declare function listByLogsource(category?: string, product?: string, service?: string, limit?: number, offset?: number): Detection[];
|
|
14
14
|
export declare function listBySeverity(level: string, limit?: number, offset?: number): Detection[];
|
|
@@ -17,6 +17,9 @@ export declare function listByAnalyticStory(story: string, limit?: number, offse
|
|
|
17
17
|
export declare function listByProcessName(processName: string, limit?: number, offset?: number): Detection[];
|
|
18
18
|
export declare function listByDetectionType(detectionType: string, limit?: number, offset?: number): Detection[];
|
|
19
19
|
export declare function listByDataSource(dataSource: string, limit?: number, offset?: number): Detection[];
|
|
20
|
+
export declare function listByKqlCategory(category: string, limit?: number, offset?: number): Detection[];
|
|
21
|
+
export declare function listByKqlTag(tag: string, limit?: number, offset?: number): Detection[];
|
|
22
|
+
export declare function listByKqlDatasource(dataSource: string, limit?: number, offset?: number): Detection[];
|
|
20
23
|
export declare function listByMitreTactic(tactic: string, limit?: number, offset?: number): Detection[];
|
|
21
24
|
export declare function getStats(): IndexStats;
|
|
22
25
|
export declare function getRawYaml(id: string): string | null;
|
|
@@ -29,3 +32,60 @@ export declare function searchStories(query: string, limit?: number): AnalyticSt
|
|
|
29
32
|
export declare function listStories(limit?: number, offset?: number): AnalyticStory[];
|
|
30
33
|
export declare function listStoriesByCategory(category: string, limit?: number, offset?: number): AnalyticStory[];
|
|
31
34
|
export declare function getStoryCount(): number;
|
|
35
|
+
export interface TechniqueIdFilters {
|
|
36
|
+
source_type?: 'sigma' | 'splunk_escu' | 'elastic';
|
|
37
|
+
tactic?: string;
|
|
38
|
+
severity?: string;
|
|
39
|
+
}
|
|
40
|
+
export declare function getTechniqueIds(filters?: TechniqueIdFilters): string[];
|
|
41
|
+
export interface CoverageReport {
|
|
42
|
+
summary: {
|
|
43
|
+
total_techniques: number;
|
|
44
|
+
total_detections: number;
|
|
45
|
+
coverage_by_tactic: Record<string, {
|
|
46
|
+
covered: number;
|
|
47
|
+
total: number;
|
|
48
|
+
percent: number;
|
|
49
|
+
}>;
|
|
50
|
+
};
|
|
51
|
+
top_covered: Array<{
|
|
52
|
+
technique: string;
|
|
53
|
+
detection_count: number;
|
|
54
|
+
}>;
|
|
55
|
+
weak_coverage: Array<{
|
|
56
|
+
technique: string;
|
|
57
|
+
detection_count: number;
|
|
58
|
+
}>;
|
|
59
|
+
}
|
|
60
|
+
export declare function analyzeCoverage(sourceType?: 'sigma' | 'splunk_escu' | 'elastic'): CoverageReport;
|
|
61
|
+
export interface GapAnalysis {
|
|
62
|
+
threat_profile: string;
|
|
63
|
+
total_gaps: number;
|
|
64
|
+
critical_gaps: Array<{
|
|
65
|
+
technique: string;
|
|
66
|
+
priority: string;
|
|
67
|
+
reason: string;
|
|
68
|
+
}>;
|
|
69
|
+
covered: string[];
|
|
70
|
+
recommendations: string[];
|
|
71
|
+
}
|
|
72
|
+
export declare function identifyGaps(threatProfile: string, sourceType?: 'sigma' | 'splunk_escu' | 'elastic'): GapAnalysis;
|
|
73
|
+
export interface DetectionSuggestion {
|
|
74
|
+
technique_id: string;
|
|
75
|
+
existing_detections: Array<{
|
|
76
|
+
id: string;
|
|
77
|
+
name: string;
|
|
78
|
+
source: string;
|
|
79
|
+
}>;
|
|
80
|
+
data_sources_needed: string[];
|
|
81
|
+
detection_ideas: string[];
|
|
82
|
+
}
|
|
83
|
+
export declare function suggestDetections(techniqueId: string, sourceType?: 'sigma' | 'splunk_escu' | 'elastic'): DetectionSuggestion;
|
|
84
|
+
export interface NavigatorLayerOptions {
|
|
85
|
+
name: string;
|
|
86
|
+
description?: string;
|
|
87
|
+
source_type?: 'sigma' | 'splunk_escu' | 'elastic';
|
|
88
|
+
tactic?: string;
|
|
89
|
+
severity?: string;
|
|
90
|
+
}
|
|
91
|
+
export declare function generateNavigatorLayer(options: NavigatorLayerOptions): object;
|