@query-ai/digital-workers 1.0.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/.claude-plugin/marketplace.json +27 -0
- package/.claude-plugin/plugin.json +11 -0
- package/README.md +430 -0
- package/hooks/hooks.json +16 -0
- package/hooks/run-hook.cmd +4 -0
- package/hooks/session-start +32 -0
- package/package.json +16 -0
- package/skills/alert-classifier/SKILL.md +111 -0
- package/skills/alert-investigation/SKILL.md +838 -0
- package/skills/detection-engineer/SKILL.md +170 -0
- package/skills/evidence-quality-checker/SKILL.md +109 -0
- package/skills/fsql-expert/SKILL.md +308 -0
- package/skills/fsql-expert/fsql-reference.md +525 -0
- package/skills/hunt-pattern-analyzer/SKILL.md +150 -0
- package/skills/hunt-quality-checker/SKILL.md +105 -0
- package/skills/hypothesis-builder/SKILL.md +303 -0
- package/skills/identity-investigator/SKILL.md +172 -0
- package/skills/itdr/SKILL.md +1178 -0
- package/skills/network-investigator/SKILL.md +196 -0
- package/skills/report-writer/SKILL.md +158 -0
- package/skills/senior-analyst-review/SKILL.md +199 -0
- package/skills/severity-scorer/SKILL.md +131 -0
- package/skills/templates/org-policy-template.md +516 -0
- package/skills/templates/runbook-template.md +300 -0
- package/skills/threat-hunt/SKILL.md +628 -0
- package/skills/threat-intel-enricher/SKILL.md +127 -0
- package/skills/using-digital-workers/SKILL.md +76 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: threat-intel-enricher
|
|
3
|
+
description: Use when IOCs (IP addresses, file hashes, domains, URLs) need reputation checks, campaign correlation, or threat actor attribution
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Threat Intel Enricher
|
|
7
|
+
|
|
8
|
+
## Iron Law
|
|
9
|
+
|
|
10
|
+
**REPUTATION IS CONTEXT, NOT VERDICT.**
|
|
11
|
+
|
|
12
|
+
A "clean" reputation does not mean safe. A "malicious" reputation does not mean confirmed compromise. Reputation informs the investigation — it does not conclude it.
|
|
13
|
+
|
|
14
|
+
## When to Invoke
|
|
15
|
+
|
|
16
|
+
Called by `alert-investigation` or any investigator skill when IOCs need enrichment:
|
|
17
|
+
- IP addresses (source or destination)
|
|
18
|
+
- File hashes (MD5, SHA1, SHA256)
|
|
19
|
+
- Domain names
|
|
20
|
+
- URLs
|
|
21
|
+
- Email addresses (sender reputation)
|
|
22
|
+
|
|
23
|
+
## Process
|
|
24
|
+
|
|
25
|
+
### Step 1: Categorize IOCs
|
|
26
|
+
|
|
27
|
+
Group extracted IOCs by type:
|
|
28
|
+
- **IP addresses**: Source IPs, destination IPs, intermediate IPs
|
|
29
|
+
- **Hashes**: File hashes from process activity, email attachments
|
|
30
|
+
- **Domains**: DNS queries, email sender domains, URL hostnames
|
|
31
|
+
- **Email addresses**: Sender addresses from phishing investigations
|
|
32
|
+
|
|
33
|
+
### Step 1.5: Assess IOC Availability
|
|
34
|
+
|
|
35
|
+
Before querying, check whether expected IOC types are actually available in the investigation data:
|
|
36
|
+
|
|
37
|
+
1. **Malware detections without file hashes**: If findings reference malware families but all hash fields are empty, document: "File hashes not available in detection findings — hash-based threat intel lookup not possible."
|
|
38
|
+
2. **Network detections without external IPs**: If findings reference network activity but only internal IPs are present, document: "No external IPs in detection findings — IP reputation lookup limited to internal context."
|
|
39
|
+
3. **State the confidence ceiling**: "Without [IOC type], independent verification is limited to vendor labels. Attribution confidence cannot exceed MEDIUM."
|
|
40
|
+
|
|
41
|
+
If no enrichable IOCs exist at all, state this as an explicit finding rather than silently returning nothing:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
THREAT INTELLIGENCE:
|
|
45
|
+
Result: ENRICHMENT NOT POSSIBLE
|
|
46
|
+
Reason: No enrichable IOCs available (file hashes empty, no external IPs, no domains)
|
|
47
|
+
Impact: Investigation cannot independently verify vendor detection labels.
|
|
48
|
+
Attribution confidence is capped at MEDIUM.
|
|
49
|
+
Attempted: [list of field paths checked and their values]
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Step 2: Query the Mesh for Threat Intel
|
|
53
|
+
|
|
54
|
+
Use `digital-workers:fsql-expert` to search for IOC context within the mesh:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
-- Layer 1a: Discovery scan — find which event types contain the IOC (never overflows)
|
|
58
|
+
QUERY *.message, *.time WITH %ip = '<ioc_ip>' AFTER 30d
|
|
59
|
+
QUERY *.message, *.time WITH %hash = '<ioc_hash>' AFTER 7d
|
|
60
|
+
QUERY *.message, *.time WITH %domain = '<ioc_domain>' AFTER 7d
|
|
61
|
+
|
|
62
|
+
-- Layer 1b: Targeted detail — query specific event types found in Layer 1a
|
|
63
|
+
QUERY detection_finding.message, detection_finding.severity_id, detection_finding.status_id,
|
|
64
|
+
detection_finding.time, detection_finding.observables
|
|
65
|
+
WITH %ip = '<ioc_ip>' AND detection_finding.status_id = NEW AFTER 30d
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Step 3: Assess Reputation
|
|
69
|
+
|
|
70
|
+
For each IOC, determine:
|
|
71
|
+
- **Known malicious**: Appears in threat intel feeds, associated with known campaigns
|
|
72
|
+
- **Suspicious**: Limited negative indicators, no positive reputation
|
|
73
|
+
- **Unknown**: No intelligence available (which is itself noteworthy)
|
|
74
|
+
- **Known good**: Recognized legitimate service, CDN, cloud provider
|
|
75
|
+
|
|
76
|
+
### Step 4: Campaign Correlation
|
|
77
|
+
|
|
78
|
+
If IOCs match known threat intelligence:
|
|
79
|
+
- Identify the threat actor or campaign name
|
|
80
|
+
- Document associated TTPs (MITRE ATT&CK)
|
|
81
|
+
- List other IOCs associated with the same campaign
|
|
82
|
+
- Search the mesh for those additional IOCs:
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
QUERY %ip IN '<related_ip_1>', '<related_ip_2>' AFTER 30d
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Step 5: Historical Context
|
|
89
|
+
|
|
90
|
+
For each IOC, check if it has been seen before in this environment:
|
|
91
|
+
- First seen date
|
|
92
|
+
- Frequency of occurrence
|
|
93
|
+
- Which systems have interacted with it
|
|
94
|
+
- Whether it's been previously investigated
|
|
95
|
+
|
|
96
|
+
## Output
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
THREAT INTELLIGENCE:
|
|
100
|
+
IOC: [value] ([type])
|
|
101
|
+
Reputation: [Known Malicious / Suspicious / Unknown / Known Good]
|
|
102
|
+
Confidence: [High / Medium / Low]
|
|
103
|
+
|
|
104
|
+
Campaign Association: [campaign name or "None identified"]
|
|
105
|
+
Threat Actor: [actor name or "Unknown"]
|
|
106
|
+
Associated TTPs: [MITRE technique IDs]
|
|
107
|
+
Related IOCs: [list of associated indicators]
|
|
108
|
+
|
|
109
|
+
Historical Context:
|
|
110
|
+
First seen in environment: [date or "Never"]
|
|
111
|
+
Frequency: [count over time period]
|
|
112
|
+
Systems affected: [list]
|
|
113
|
+
Previously investigated: [Yes/No — reference if yes]
|
|
114
|
+
|
|
115
|
+
Assessment: [Plain language summary of what this IOC means for the investigation]
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**Return this enrichment output to the calling orchestrator and continue. Do not present to the user or wait for input.**
|
|
119
|
+
|
|
120
|
+
## Red Flags
|
|
121
|
+
|
|
122
|
+
| Red Flag | Correct Action |
|
|
123
|
+
|----------|---------------|
|
|
124
|
+
| "IP is clean on reputation, so it's safe" | STOP. Reputation is one signal. New C2 infrastructure won't have reputation yet. |
|
|
125
|
+
| "No threat intel available, skip enrichment" | STOP. Unknown reputation IS a finding. Document it. An unknown IP connecting to internal systems is noteworthy. |
|
|
126
|
+
| "This is a known cloud provider IP, it's fine" | STOP. Cloud IPs host malicious infrastructure too. Check what specific service/resource it points to. |
|
|
127
|
+
| "No IOCs to enrich, skipping" without documenting the gap | STOP. Inability to enrich is itself a finding. Document what IOC types are missing, why, and how it limits conclusions. |
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: using-digital-workers
|
|
3
|
+
description: Use when starting any session where security investigation may be needed — establishes how to find and invoke Digital Workers skills
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Using Digital Workers
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Digital Workers is a security operations framework built on the Query Data Mesh. It provides composable skills for two workflows: **reactive alert investigation** (triage, enrich, disposition) and **proactive threat hunting** (hypothesis-driven Sqrrl hunting loop with detection automation).
|
|
11
|
+
|
|
12
|
+
## Available Skills
|
|
13
|
+
|
|
14
|
+
| Skill | Invoke When |
|
|
15
|
+
|-------|------------|
|
|
16
|
+
| `digital-workers:alert-investigation` | User asks to investigate alerts, triage findings, or run the Discovery workflow |
|
|
17
|
+
| `digital-workers:fsql-expert` | Any FSQL query needs to be authored, validated, or executed |
|
|
18
|
+
| `digital-workers:alert-classifier` | An alert needs OCSF categorization or MITRE ATT&CK mapping |
|
|
19
|
+
| `digital-workers:severity-scorer` | Alert severity needs multi-factor risk scoring |
|
|
20
|
+
| `digital-workers:identity-investigator` | Investigation involves user accounts, authentication, or identity |
|
|
21
|
+
| `digital-workers:network-investigator` | Investigation involves network activity, lateral movement, or C2 |
|
|
22
|
+
| `digital-workers:threat-intel-enricher` | IOCs (IPs, hashes, domains) need reputation/campaign lookup |
|
|
23
|
+
| `digital-workers:report-writer` | Investigation findings need to be formatted as a response-ready report |
|
|
24
|
+
| `digital-workers:evidence-quality-checker` | Evidence quality checkpoint invoked at Gate 2 and Gate 3 exits — verifies status filtering, data completeness, and analytical reasoning |
|
|
25
|
+
| `digital-workers:senior-analyst-review` | A completed investigation needs quality review (auto on HIGH/CRITICAL, or invoke manually) |
|
|
26
|
+
| `digital-workers:threat-hunt` | User asks to hunt for threats, test a hypothesis, proactively search for TTPs, or asks "what should I hunt?" |
|
|
27
|
+
| `digital-workers:hypothesis-builder` | Convert raw intel, MITRE technique IDs, or analyst hunches into a structured, testable hunting hypothesis |
|
|
28
|
+
| `digital-workers:hunt-pattern-analyzer` | Classify hunt findings — Active Threat, Historical, Suspicious, Coverage Gap, or Clean — and map to ATT&CK |
|
|
29
|
+
| `digital-workers:detection-engineer` | Convert hunt findings to FSQL detections, Sigma rules, and Query platform recipes; produce gap remediation plans |
|
|
30
|
+
| `digital-workers:hunt-quality-checker` | Hunt process checkpoint invoked at Phase 2 exit — verifies hypothesis exists, data map exists, all TTPs tested, confidence tracked, and artifacts current |
|
|
31
|
+
|
|
32
|
+
## How to Invoke
|
|
33
|
+
|
|
34
|
+
Use the `Skill` tool: `skill: "digital-workers:alert-investigation"`
|
|
35
|
+
|
|
36
|
+
## When the User Asks to Investigate
|
|
37
|
+
|
|
38
|
+
If the user asks to investigate alerts, triage security events, or anything related to reactive security operations:
|
|
39
|
+
|
|
40
|
+
1. **Invoke `digital-workers:alert-investigation`** — this is the master orchestrator
|
|
41
|
+
2. The orchestrator will invoke specialized skills as needed based on findings
|
|
42
|
+
3. Do NOT invoke specialized skills directly unless the user specifically asks for one
|
|
43
|
+
|
|
44
|
+
## When the User Asks to Hunt
|
|
45
|
+
|
|
46
|
+
If the user asks to hunt for threats, test a hypothesis, search for TTPs, check exposure to a threat actor, or asks "what should I hunt?":
|
|
47
|
+
|
|
48
|
+
1. **Invoke `digital-workers:threat-hunt`** — this is the hunting orchestrator
|
|
49
|
+
2. The orchestrator runs the 4-phase Sqrrl loop: Hypothesis → Investigate → Discover Patterns → Automate Detections
|
|
50
|
+
3. It will invoke `hypothesis-builder`, `hunt-pattern-analyzer`, and `detection-engineer` as needed
|
|
51
|
+
4. Do NOT invoke hunting sub-skills directly unless the user specifically asks for one
|
|
52
|
+
|
|
53
|
+
**Example hunting prompts:**
|
|
54
|
+
- "Hunt for lateral movement via RDP from service accounts"
|
|
55
|
+
- "I read about Volt Typhoon — check our environment"
|
|
56
|
+
- "Test our visibility against T1059.001 PowerShell fileless execution"
|
|
57
|
+
- "What should I hunt next?"
|
|
58
|
+
- "Here's a threat advisory — build a hunt from it" (paste or URL)
|
|
59
|
+
|
|
60
|
+
## Key Principles
|
|
61
|
+
|
|
62
|
+
- **Recommend, don't declare.** The worker proposes dispositions and recommends escalation. It never formally declares incidents or assigns final dispositions — those are human decisions with compliance and business implications.
|
|
63
|
+
- **Evidence before claims.** Every conclusion must cite the FSQL query and data that supports it.
|
|
64
|
+
- **Stage gates are mandatory.** Do not skip steps in the Discovery workflow.
|
|
65
|
+
- **Show confidence.** Label every finding: Confirmed / High / Medium / Low / Insufficient Data.
|
|
66
|
+
- **State unknowns.** Explicitly say what couldn't be determined and why.
|
|
67
|
+
- **Follow the process.** The same investigation workflow runs every time, regardless of perceived simplicity.
|
|
68
|
+
|
|
69
|
+
## Global Rule: No Bash Processing of Data
|
|
70
|
+
|
|
71
|
+
**NEVER use Bash, cat, python, jq, or any shell command to process, parse, filter, or extract data from MCP tool results or investigation data.** This applies to the ENTIRE investigation — not just FSQL queries.
|
|
72
|
+
|
|
73
|
+
- MCP tool results returned inline → analyze directly (you are an LLM, you parse JSON natively)
|
|
74
|
+
- MCP tool results saved to a file (too large for context) → **DO NOT read or process the file.** Re-run the query with specific field selectors instead of `**`. A file-overflow means the query was too broad. Example: replace `QUERY ** WITH %hash = 'abc'` with `QUERY detection_finding.message, detection_finding.severity_id, detection_finding.time WITH %hash = 'abc'`
|
|
75
|
+
|
|
76
|
+
**Never Bash. Never cat. Never python. Never jq. If results overflow, re-query with narrower selectors.**
|