agentic-threat-hunting-framework 0.2.3__py3-none-any.whl → 0.3.0__py3-none-any.whl
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.
- {agentic_threat_hunting_framework-0.2.3.dist-info → agentic_threat_hunting_framework-0.3.0.dist-info}/METADATA +38 -40
- agentic_threat_hunting_framework-0.3.0.dist-info/RECORD +51 -0
- athf/__version__.py +1 -1
- athf/cli.py +7 -2
- athf/commands/__init__.py +4 -0
- athf/commands/agent.py +452 -0
- athf/commands/context.py +6 -9
- athf/commands/env.py +2 -2
- athf/commands/hunt.py +3 -3
- athf/commands/init.py +45 -0
- athf/commands/research.py +530 -0
- athf/commands/similar.py +5 -5
- athf/core/research_manager.py +419 -0
- athf/core/web_search.py +340 -0
- athf/data/__init__.py +19 -0
- athf/data/docs/CHANGELOG.md +147 -0
- athf/data/docs/CLI_REFERENCE.md +1797 -0
- athf/data/docs/INSTALL.md +594 -0
- athf/data/docs/README.md +31 -0
- athf/data/docs/environment.md +256 -0
- athf/data/docs/getting-started.md +419 -0
- athf/data/docs/level4-agentic-workflows.md +480 -0
- athf/data/docs/lock-pattern.md +149 -0
- athf/data/docs/maturity-model.md +400 -0
- athf/data/docs/why-athf.md +44 -0
- athf/data/hunts/FORMAT_GUIDELINES.md +507 -0
- athf/data/hunts/H-0001.md +453 -0
- athf/data/hunts/H-0002.md +436 -0
- athf/data/hunts/H-0003.md +546 -0
- athf/data/hunts/README.md +231 -0
- athf/data/integrations/MCP_CATALOG.md +45 -0
- athf/data/integrations/README.md +129 -0
- athf/data/integrations/quickstart/splunk.md +162 -0
- athf/data/knowledge/hunting-knowledge.md +2375 -0
- athf/data/prompts/README.md +172 -0
- athf/data/prompts/ai-workflow.md +581 -0
- athf/data/prompts/basic-prompts.md +316 -0
- athf/data/templates/HUNT_LOCK.md +228 -0
- agentic_threat_hunting_framework-0.2.3.dist-info/RECORD +0 -23
- {agentic_threat_hunting_framework-0.2.3.dist-info → agentic_threat_hunting_framework-0.3.0.dist-info}/WHEEL +0 -0
- {agentic_threat_hunting_framework-0.2.3.dist-info → agentic_threat_hunting_framework-0.3.0.dist-info}/entry_points.txt +0 -0
- {agentic_threat_hunting_framework-0.2.3.dist-info → agentic_threat_hunting_framework-0.3.0.dist-info}/licenses/LICENSE +0 -0
- {agentic_threat_hunting_framework-0.2.3.dist-info → agentic_threat_hunting_framework-0.3.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,581 @@
|
|
|
1
|
+
# AI-Assisted Threat Hunting Workflow
|
|
2
|
+
|
|
3
|
+
**Level:** 2 (Searchable) - AI with Memory
|
|
4
|
+
**Audience:** Threat hunters using Claude Code, GitHub Copilot, Cursor, or similar AI tools
|
|
5
|
+
**Prerequisites:** Hunt repository with AGENTS.md, documented past hunts in hunts/
|
|
6
|
+
|
|
7
|
+
This guide provides workflows for using AI tools that can read your hunt repository, search past hunts, and leverage organizational memory to accelerate threat hunting.
|
|
8
|
+
|
|
9
|
+
**Expected Time Savings:** 70-80% reduction in documentation and research time
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Setup (One-Time)
|
|
14
|
+
|
|
15
|
+
### Choose Your AI Tool
|
|
16
|
+
|
|
17
|
+
| Tool | Best For | Cost |
|
|
18
|
+
|------|----------|------|
|
|
19
|
+
| **Claude Code** | Deep analysis, long context | ~$20/mo |
|
|
20
|
+
| **GitHub Copilot** | GitHub integration, inline suggestions | ~$10/mo |
|
|
21
|
+
| **Cursor** | Full IDE experience, chat + completions | ~$20/mo |
|
|
22
|
+
|
|
23
|
+
**Recommendation:** Start with whatever your organization already licenses.
|
|
24
|
+
|
|
25
|
+
### Verify AI Can Read Files
|
|
26
|
+
|
|
27
|
+
Test AI access:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
You: "Read AGENTS.md and summarize what data sources we have"
|
|
31
|
+
AI: [Should list your SIEM, EDR, and other sources]
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
If AI can't read files, check file permissions and AI tool settings.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## System Prompt for AI Tools
|
|
39
|
+
|
|
40
|
+
When starting a hunting session, provide this context to your AI assistant:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
You are an expert threat hunter helping generate testable hunt hypotheses using the LOCK pattern.
|
|
44
|
+
|
|
45
|
+
BEFORE generating anything new, you MUST:
|
|
46
|
+
|
|
47
|
+
0. Load hunting brain knowledge:
|
|
48
|
+
- Read knowledge/hunting-knowledge.md for expert hunting knowledge
|
|
49
|
+
- Internalize Section 1 (Hypothesis Generation) and Section 5 (Pyramid of Pain)
|
|
50
|
+
- Apply behavioral models from Section 2 (ATT&CK TTP → Observables)
|
|
51
|
+
- All hunts MUST focus on behaviors/TTPs (top of Pyramid of Pain), never just hashes/IPs
|
|
52
|
+
|
|
53
|
+
TOOLS AVAILABLE:
|
|
54
|
+
- If athf CLI installed: Use `athf hunt` commands for search, create, list, stats
|
|
55
|
+
- If CLI unavailable: Use grep across hunts/ folder
|
|
56
|
+
- Check availability: `athf --version`
|
|
57
|
+
- Never fail workflow if CLI unavailable - always have fallback
|
|
58
|
+
|
|
59
|
+
1. Search past hunts to avoid duplicates:
|
|
60
|
+
- Search hunts/ folder for similar TTPs or behaviors
|
|
61
|
+
- Reference lessons learned from past similar hunts
|
|
62
|
+
- Apply false positive filters from past work
|
|
63
|
+
|
|
64
|
+
2. Validate environment relevance:
|
|
65
|
+
- Read environment.md to confirm affected technology exists
|
|
66
|
+
- Verify data sources are available for the proposed hunt
|
|
67
|
+
- Identify any telemetry gaps
|
|
68
|
+
|
|
69
|
+
3. Follow repository guidelines:
|
|
70
|
+
- Read AGENTS.md for repository context and guardrails
|
|
71
|
+
- Understand data sources and query languages available
|
|
72
|
+
- Apply safety checks and validation rules
|
|
73
|
+
|
|
74
|
+
HYPOTHESIS GENERATION REQUIREMENTS:
|
|
75
|
+
|
|
76
|
+
Output Format: LOCK-structured markdown matching templates/HUNT_LOCK.md
|
|
77
|
+
|
|
78
|
+
Required Sections:
|
|
79
|
+
- Hypothesis: One sentence, testable statement
|
|
80
|
+
Format: "Adversaries use [behavior] to [goal] on [target system]"
|
|
81
|
+
- Context: Why now? What triggered this hunt?
|
|
82
|
+
- ATT&CK: Technique ID and tactic
|
|
83
|
+
- Data Needed: Specific indexes/tables from environment.md
|
|
84
|
+
- Time Range: Bounded, justified lookback period
|
|
85
|
+
- Query Approach: High-level steps
|
|
86
|
+
|
|
87
|
+
Quality Standards (from hunting-knowledge.md Section 1):
|
|
88
|
+
✓ Hypothesis is specific and testable (not vague)
|
|
89
|
+
✓ Falsifiable - Can be proven true or false with data
|
|
90
|
+
✓ Scoped - Bounded by target, timeframe, or behavior
|
|
91
|
+
✓ Observable - Tied to specific log sources and fields
|
|
92
|
+
✓ Actionable - Can inform detection or response
|
|
93
|
+
✓ Contextual - References environment, threat landscape, or business risk
|
|
94
|
+
✓ Focuses on BEHAVIOR/TTP (top of Pyramid of Pain), not indicators
|
|
95
|
+
✓ References actual data sources from environment.md
|
|
96
|
+
✓ Includes lessons from past hunts if available
|
|
97
|
+
✓ Has realistic time bounds (no "all time" searches)
|
|
98
|
+
✓ Considers false positive rate
|
|
99
|
+
✓ Builds on past work rather than duplicating
|
|
100
|
+
|
|
101
|
+
Safety Checks:
|
|
102
|
+
✓ Queries must have time bounds
|
|
103
|
+
✓ Result sets must be limited
|
|
104
|
+
✓ Test on small windows before expanding
|
|
105
|
+
|
|
106
|
+
WORKFLOW:
|
|
107
|
+
1. Consult hunting brain (knowledge/hunting-knowledge.md) - Load relevant sections
|
|
108
|
+
2. Acknowledge the threat intel or context provided
|
|
109
|
+
3. Search memory (hunts/ folder) for similar past work
|
|
110
|
+
4. Validate environment (environment.md)
|
|
111
|
+
5. Apply Pyramid of Pain - Ensure hypothesis targets behaviors/TTPs, not indicators
|
|
112
|
+
6. Generate hypothesis following LOCK structure with quality criteria
|
|
113
|
+
7. Apply analytical rigor - Check for biases, score confidence appropriately
|
|
114
|
+
8. Suggest next steps
|
|
115
|
+
|
|
116
|
+
CONVERSATION STYLE:
|
|
117
|
+
- Be proactive but wait for confirmation before creating files
|
|
118
|
+
- Explain your reasoning
|
|
119
|
+
- Flag concerns (missing data sources, high FP rate potential)
|
|
120
|
+
- Reference specific past hunts by ID when building on lessons learned
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Quick Start Workflows
|
|
126
|
+
|
|
127
|
+
### Workflow 1: Threat Intel-Driven Hunt (Most Common)
|
|
128
|
+
|
|
129
|
+
**Scenario:** You receive threat intelligence about adversary TTPs
|
|
130
|
+
**Total Time:** 5-10 minutes
|
|
131
|
+
|
|
132
|
+
**Step 1: Check Memory (2 min)**
|
|
133
|
+
|
|
134
|
+
**With CLI:**
|
|
135
|
+
```
|
|
136
|
+
You: "Check if we've hunted T1003.001 before:
|
|
137
|
+
athf hunt search 'T1003.001'
|
|
138
|
+
athf hunt list --technique T1003.001
|
|
139
|
+
Summarize lessons learned from results."
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Without CLI:**
|
|
143
|
+
```
|
|
144
|
+
You: "Check if we've hunted T1003.001 (LSASS credential dumping) before.
|
|
145
|
+
Search hunts/ folder for this TTP and any related credential dumping hunts.
|
|
146
|
+
Summarize lessons learned."
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**Step 2: Validate Environment (1 min)**
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
You: "Read environment.md and tell me:
|
|
153
|
+
1. Do we have visibility into this behavior?
|
|
154
|
+
2. What data sources can we use?
|
|
155
|
+
3. Any telemetry gaps?"
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Step 3: Generate Hypothesis (2 min)**
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
You: "Generate a LOCK-structured hypothesis for T1003.001.
|
|
162
|
+
Use the system prompt above. This is a proactive hunt."
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**Review checklist:**
|
|
166
|
+
|
|
167
|
+
- [ ] Hypothesis is testable and specific
|
|
168
|
+
- [ ] Data sources match environment.md
|
|
169
|
+
- [ ] Time range is reasonable
|
|
170
|
+
- [ ] ATT&CK mapping is correct
|
|
171
|
+
|
|
172
|
+
**Step 4: Create Hunt File (1 min)**
|
|
173
|
+
|
|
174
|
+
**With CLI:**
|
|
175
|
+
```
|
|
176
|
+
You: "Create this hypothesis using:
|
|
177
|
+
athf hunt new --technique T1003.001 --title 'LSASS Credential Dumping Detection'
|
|
178
|
+
Then review and edit the generated file as needed."
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**Without CLI:**
|
|
182
|
+
```
|
|
183
|
+
You: "Create this hypothesis as H-XXXX.md in hunts/ folder.
|
|
184
|
+
Use the next available hunt number."
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
**Step 5: Generate Query (2-3 min)**
|
|
188
|
+
|
|
189
|
+
```
|
|
190
|
+
You: "Generate a Splunk query with:
|
|
191
|
+
- Time bounds (last 14 days)
|
|
192
|
+
- Result limits (head 1000)
|
|
193
|
+
- False positive filters from past hunts
|
|
194
|
+
- Save as queries/H-XXXX.spl"
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
### Workflow 2: Anomaly Investigation (Fast Response)
|
|
200
|
+
|
|
201
|
+
**Scenario:** SOC alerts you to unusual behavior
|
|
202
|
+
**Total Time:** 3-5 minutes
|
|
203
|
+
|
|
204
|
+
**Quick Response Steps:**
|
|
205
|
+
|
|
206
|
+
**1. Rapid Context (1 min)**
|
|
207
|
+
|
|
208
|
+
```
|
|
209
|
+
You: "Search past hunts for [behavior/TTP].
|
|
210
|
+
What have we learned about false positives?"
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
**2. Incident Hypothesis (2 min)**
|
|
214
|
+
|
|
215
|
+
```
|
|
216
|
+
You: "Generate incident-response hypothesis for:
|
|
217
|
+
[paste anomaly description]
|
|
218
|
+
Mark as HIGH priority, active investigation."
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
**3. Immediate Query (1 min)**
|
|
222
|
+
|
|
223
|
+
```
|
|
224
|
+
You: "Draft query for last 24 hours with these IOCs:
|
|
225
|
+
[paste indicators]
|
|
226
|
+
This is incident response - make it fast."
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
**4. Document As You Go**
|
|
230
|
+
|
|
231
|
+
```
|
|
232
|
+
You: "Summarize these results in LOCK format for the KEEP section of H-XXXX.md"
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
### Workflow 3: Proactive TTP Coverage
|
|
238
|
+
|
|
239
|
+
**Scenario:** Monthly hunt plan, covering MITRE ATT&CK techniques
|
|
240
|
+
**Total Time:** 10-15 minutes
|
|
241
|
+
|
|
242
|
+
**Step 1: Coverage Gap Analysis (3 min)**
|
|
243
|
+
|
|
244
|
+
```
|
|
245
|
+
You: "Analyze past hunts and tell me:
|
|
246
|
+
1. Which tactics have we hunted most/least?
|
|
247
|
+
2. What high-priority TTPs have we never covered?
|
|
248
|
+
3. Suggest 3 hunts to improve ATT&CK coverage
|
|
249
|
+
Consider our environment from environment.md."
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
**Step 2: Select TTP and Research (2 min)**
|
|
253
|
+
|
|
254
|
+
```
|
|
255
|
+
You: "I want to hunt T1003 (Credential Dumping).
|
|
256
|
+
Search past hunts for:
|
|
257
|
+
1. What sub-techniques we've covered
|
|
258
|
+
2. What we haven't covered
|
|
259
|
+
3. Lessons about false positives"
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
**Step 3: Generate and Review (5 min)**
|
|
263
|
+
|
|
264
|
+
Follow Workflow 1 steps 3-5, then:
|
|
265
|
+
|
|
266
|
+
```
|
|
267
|
+
You: "Review this hypothesis and critique:
|
|
268
|
+
1. Is it testable? Too vague?
|
|
269
|
+
2. High false positive risk?
|
|
270
|
+
3. Is the time range appropriate?
|
|
271
|
+
4. What could go wrong?"
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
Iterate based on feedback.
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
### Workflow 4: Post-Hunt Documentation
|
|
279
|
+
|
|
280
|
+
**Scenario:** You've executed a hunt and have results
|
|
281
|
+
**Total Time:** 5-7 minutes
|
|
282
|
+
|
|
283
|
+
**Step 1: Results Summarization (3 min)**
|
|
284
|
+
|
|
285
|
+
```
|
|
286
|
+
You: "Analyze these query results from H-XXXX:
|
|
287
|
+
1. Summary of findings (patterns, counts)
|
|
288
|
+
2. True positives vs false positives
|
|
289
|
+
3. Interesting anomalies worth investigating
|
|
290
|
+
4. Recommended next actions
|
|
291
|
+
|
|
292
|
+
[paste query output - first 100 rows if large]"
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
**Step 2: Update Hunt File (2 min)**
|
|
296
|
+
|
|
297
|
+
```
|
|
298
|
+
You: "Update H-XXXX.md KEEP section with:
|
|
299
|
+
- Query details (runtime, rows returned)
|
|
300
|
+
- Findings summary
|
|
301
|
+
- Status: [Completed|Needs Changes]
|
|
302
|
+
- Lessons learned"
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
**Step 3: Apply Lessons (1 min)**
|
|
306
|
+
|
|
307
|
+
```
|
|
308
|
+
You: "Based on these results, what changes would improve this hunt?
|
|
309
|
+
Should we update the hypothesis or query filters?"
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
## Example: Complete Hunt Conversation
|
|
315
|
+
|
|
316
|
+
This example shows how AI searches memory, validates environment, and generates a hypothesis.
|
|
317
|
+
|
|
318
|
+
**User:**
|
|
319
|
+
|
|
320
|
+
```
|
|
321
|
+
Using the system prompt, generate a hypothesis for T1003.001
|
|
322
|
+
(LSASS Memory credential dumping). This is a proactive hunt.
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
**AI Response:**
|
|
326
|
+
|
|
327
|
+
```
|
|
328
|
+
I'll help generate a hypothesis for T1003.001. Let me first consult the hunting brain and check our repository.
|
|
329
|
+
|
|
330
|
+
[Reads .claude/hunting-knowledge.md Section 1 and Section 2]
|
|
331
|
+
|
|
332
|
+
From hunting brain - Key principle: Focus on BEHAVIOR (LSASS process access pattern),
|
|
333
|
+
not indicators. T1003.001 maps to observable: Sysmon Event 10 ProcessAccess to lsass.exe
|
|
334
|
+
with specific GrantedAccess values (0x1010, 0x1038, 0x1410, 0x1fffff). This is top of
|
|
335
|
+
Pyramid of Pain (TTP level) - adversary can't easily change this behavior.
|
|
336
|
+
|
|
337
|
+
[Searches hunts/ folder]
|
|
338
|
+
|
|
339
|
+
Found H-0022 which hunted LSASS access 6 months ago. That hunt focused on
|
|
340
|
+
Sysmon Event ID 10 with a threshold of >3 access attempts. They discovered
|
|
341
|
+
false positives from monitoring tools and AV scanners - I'll incorporate those lessons.
|
|
342
|
+
|
|
343
|
+
[Reads environment.md]
|
|
344
|
+
|
|
345
|
+
I see you have Windows endpoints with Sysmon Event ID 10 (ProcessAccess) logging
|
|
346
|
+
to Splunk (index=winlogs) and CrowdStrike EDR. Good visibility for this hunt.
|
|
347
|
+
|
|
348
|
+
Here's the LOCK-structured hypothesis:
|
|
349
|
+
|
|
350
|
+
# H-XXXX | LSASS Memory Credential Dumping Detection
|
|
351
|
+
|
|
352
|
+
**Status:** Planning
|
|
353
|
+
|
|
354
|
+
## LEARN: Prepare the Hunt
|
|
355
|
+
|
|
356
|
+
### Hypothesis Statement
|
|
357
|
+
Adversaries access the LSASS process memory to extract plaintext credentials,
|
|
358
|
+
password hashes, and Kerberos tickets for lateral movement and privilege escalation.
|
|
359
|
+
|
|
360
|
+
### Context
|
|
361
|
+
**Why Now:**
|
|
362
|
+
- Proactive TTP coverage for T1003.001 (high-priority credential access technique)
|
|
363
|
+
- Re-running hunt from H-0022 with improved false positive filters
|
|
364
|
+
- 6 months since last hunt - baseline may have changed
|
|
365
|
+
|
|
366
|
+
**ATT&CK:** T1003.001 (OS Credential Dumping: LSASS Memory)
|
|
367
|
+
**Tactic:** Credential Access
|
|
368
|
+
|
|
369
|
+
**Related Past Hunts:**
|
|
370
|
+
- H-0022: LSASS access detection (found 2 suspicious events, 47 false positives from monitoring tools)
|
|
371
|
+
|
|
372
|
+
### ABLE Scoping
|
|
373
|
+
| Field | Your Input |
|
|
374
|
+
|-------|-----------|
|
|
375
|
+
| **Behavior** | Process access to lsass.exe with read/write permissions (GrantedAccess: 0x1010, 0x1038, 0x1410, 0x1fffff) |
|
|
376
|
+
| **Location** | Windows endpoints, focus on servers |
|
|
377
|
+
| **Evidence** | **Source:** Sysmon Event ID 10 (ProcessAccess), CrowdStrike EDR<br>**Key Fields:** SourceImage, TargetImage, GrantedAccess, CallTrace<br>**Example:** Unsigned process from temp directory accessing lsass.exe with 0x1010 permissions |
|
|
378
|
+
|
|
379
|
+
## OBSERVE: Expected Behaviors
|
|
380
|
+
Legitimate LSASS access occurs from:
|
|
381
|
+
- AV/EDR tools (CrowdStrike, Windows Defender)
|
|
382
|
+
- System monitoring (SCOM agents)
|
|
383
|
+
- Signed Microsoft processes
|
|
384
|
+
|
|
385
|
+
Suspicious indicators:
|
|
386
|
+
- Access from user temp/download directories
|
|
387
|
+
- Missing or invalid digital signatures
|
|
388
|
+
- Unusual parent process (Office apps, browsers)
|
|
389
|
+
- Outside business hours
|
|
390
|
+
|
|
391
|
+
## CHECK: Execute & Analyze
|
|
392
|
+
|
|
393
|
+
### Hunting Queries
|
|
394
|
+
```spl
|
|
395
|
+
/* H-XXXX | T1003.001 | LSASS Memory Access Detection */
|
|
396
|
+
|
|
397
|
+
index=winlogs sourcetype=sysmon EventCode=10
|
|
398
|
+
TargetImage="*\\lsass.exe"
|
|
399
|
+
(GrantedAccess=0x1010 OR GrantedAccess=0x1038 OR GrantedAccess=0x1410 OR GrantedAccess=0x1fffff)
|
|
400
|
+
| search NOT [| inputlookup known_good_lsass_access.csv | fields SourceImage]
|
|
401
|
+
| eval suspicious_path=if(match(SourceImage, "(?i)(temp|download|appdata\\\\local)"), "Yes", "No")
|
|
402
|
+
| stats count by SourceImage, TargetImage, GrantedAccess, suspicious_path
|
|
403
|
+
| where suspicious_path="Yes" OR count > 10
|
|
404
|
+
| head 1000
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
**Time Range:** Last 14 days
|
|
408
|
+
**Rationale:** H-0022 used 30 days and returned excessive noise - starting smaller.
|
|
409
|
+
|
|
410
|
+
**Known False Positives (from H-0022):**
|
|
411
|
+
|
|
412
|
+
- CrowdStrike Falcon sensor (CSFalconService.exe)
|
|
413
|
+
- System Center Operations Manager (HealthService.exe)
|
|
414
|
+
- Windows Defender (MsMpEng.exe)
|
|
415
|
+
|
|
416
|
+
## KEEP: Findings & Response
|
|
417
|
+
|
|
418
|
+
[To be completed after execution]
|
|
419
|
+
|
|
420
|
+
---
|
|
421
|
+
|
|
422
|
+
Would you like me to:
|
|
423
|
+
|
|
424
|
+
- Create this as H-XXXX.md?
|
|
425
|
+
- Draft the Splunk query with safety bounds?
|
|
426
|
+
- Create a CSV lookup for known-good processes?
|
|
427
|
+
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
**Key Observations:**
|
|
431
|
+
- AI searched past hunts first (H-0022)
|
|
432
|
+
- Applied lessons learned (FP filters)
|
|
433
|
+
- Validated environment (Sysmon, CrowdStrike)
|
|
434
|
+
- Referenced specific data sources from environment.md
|
|
435
|
+
- Used HUNT_LOCK.md template structure
|
|
436
|
+
- Included bounded query with time limits
|
|
437
|
+
|
|
438
|
+
---
|
|
439
|
+
|
|
440
|
+
## Tool-Specific Tips
|
|
441
|
+
|
|
442
|
+
### Claude Code
|
|
443
|
+
**Strengths:** Long context, deep analysis, explains reasoning
|
|
444
|
+
|
|
445
|
+
**Best Practices:**
|
|
446
|
+
- Ask for explanations: "Explain why you chose this approach"
|
|
447
|
+
- Use multi-step requests: "First search, then analyze, then generate"
|
|
448
|
+
- Reference specific files: "Based on H-0015.md, generate similar hypothesis"
|
|
449
|
+
|
|
450
|
+
### GitHub Copilot
|
|
451
|
+
**Strengths:** Inline suggestions, GitHub integration, fast
|
|
452
|
+
|
|
453
|
+
**Best Practices:**
|
|
454
|
+
- Use Copilot Chat for complex requests
|
|
455
|
+
- Type hypothesis outline, let Copilot complete
|
|
456
|
+
- Use inline suggestions for query writing
|
|
457
|
+
|
|
458
|
+
### Cursor
|
|
459
|
+
**Strengths:** Full IDE, can edit multiple files, code-aware
|
|
460
|
+
|
|
461
|
+
**Best Practices:**
|
|
462
|
+
- Use Cmd+K for inline edits
|
|
463
|
+
- Use chat for analysis, inline for writing
|
|
464
|
+
- Multi-file editing for creating hunt + query simultaneously
|
|
465
|
+
|
|
466
|
+
---
|
|
467
|
+
|
|
468
|
+
## Common Pitfalls and Solutions
|
|
469
|
+
|
|
470
|
+
**Pitfall: AI Doesn't Remember Past Hunts**
|
|
471
|
+
|
|
472
|
+
*Symptom:* AI suggests hunts you've already done
|
|
473
|
+
|
|
474
|
+
*Solution:*
|
|
475
|
+
- Explicitly ask to search first: "Search hunts/ before suggesting"
|
|
476
|
+
- Reference AGENTS.md: "Follow the workflow in AGENTS.md"
|
|
477
|
+
- Use AI tools with file access (not just chat-based)
|
|
478
|
+
|
|
479
|
+
---
|
|
480
|
+
|
|
481
|
+
**Pitfall: AI Suggests Unrealistic Hunts**
|
|
482
|
+
|
|
483
|
+
*Symptom:* Hypotheses for data sources you don't have
|
|
484
|
+
|
|
485
|
+
*Solution:*
|
|
486
|
+
- Keep environment.md updated
|
|
487
|
+
- Remind AI: "Only use data sources from environment.md"
|
|
488
|
+
- Review generated hypotheses against actual capabilities
|
|
489
|
+
|
|
490
|
+
---
|
|
491
|
+
|
|
492
|
+
**Pitfall: Generic, Non-Testable Hypotheses**
|
|
493
|
+
|
|
494
|
+
*Symptom:* "Adversaries may use PowerShell maliciously"
|
|
495
|
+
|
|
496
|
+
*Solution:*
|
|
497
|
+
- Ask for specificity: "Make this more specific and testable"
|
|
498
|
+
- Provide more context: "Focus on [specific behavior]"
|
|
499
|
+
- Use the system prompt above
|
|
500
|
+
|
|
501
|
+
---
|
|
502
|
+
|
|
503
|
+
**Pitfall: Blindly Trusting AI Output**
|
|
504
|
+
|
|
505
|
+
*Symptom:* Running queries without review
|
|
506
|
+
|
|
507
|
+
*Solution:*
|
|
508
|
+
- ALWAYS review queries before running
|
|
509
|
+
- Validate data sources against environment.md
|
|
510
|
+
- Check ATT&CK mappings
|
|
511
|
+
- Test on small time windows first
|
|
512
|
+
|
|
513
|
+
---
|
|
514
|
+
|
|
515
|
+
## Quality Checklist
|
|
516
|
+
|
|
517
|
+
Before finalizing any AI-generated content:
|
|
518
|
+
|
|
519
|
+
**Hypothesis Quality:**
|
|
520
|
+
- [ ] Specific and testable (not vague)
|
|
521
|
+
- [ ] References actual data sources from environment.md
|
|
522
|
+
- [ ] Has bounded time range
|
|
523
|
+
- [ ] Correct ATT&CK technique mapping
|
|
524
|
+
- [ ] Considers false positive rate
|
|
525
|
+
- [ ] Builds on past work (if applicable)
|
|
526
|
+
|
|
527
|
+
**Query Safety:**
|
|
528
|
+
- [ ] Has time bounds (`earliest=-Xd`)
|
|
529
|
+
- [ ] Has result limits (`| head N`)
|
|
530
|
+
- [ ] No expensive operations without justification
|
|
531
|
+
- [ ] Tested for syntax errors
|
|
532
|
+
- [ ] Includes comments explaining logic
|
|
533
|
+
|
|
534
|
+
**Documentation Completeness:**
|
|
535
|
+
- [ ] Hunt file (H-XXXX.md) created with HUNT_LOCK.md template
|
|
536
|
+
- [ ] Status field properly set (Planning/In Progress/Completed)
|
|
537
|
+
- [ ] Lessons learned captured in KEEP section
|
|
538
|
+
|
|
539
|
+
---
|
|
540
|
+
|
|
541
|
+
## Measuring Success
|
|
542
|
+
|
|
543
|
+
**Time Savings:**
|
|
544
|
+
- Hypothesis generation: Manual (15-20 min) → AI (3-5 min)
|
|
545
|
+
- Documentation: Manual (20-30 min) → AI (5-7 min)
|
|
546
|
+
- Total workflow: Manual (45+ min) → AI (10-15 min)
|
|
547
|
+
|
|
548
|
+
**Quality Improvements:**
|
|
549
|
+
- Consistency: All hunts following LOCK format?
|
|
550
|
+
- Completeness: Lessons learned captured every time?
|
|
551
|
+
- Learning: New hunts referencing past hunts?
|
|
552
|
+
|
|
553
|
+
---
|
|
554
|
+
|
|
555
|
+
## Next Steps
|
|
556
|
+
|
|
557
|
+
**Just Starting (Week 1-2):**
|
|
558
|
+
1. Use Workflow 1 for your next threat intelligence report
|
|
559
|
+
2. Compare time vs. manual process
|
|
560
|
+
3. Refine environment.md based on what AI asks for
|
|
561
|
+
|
|
562
|
+
**Getting Comfortable (Month 1):**
|
|
563
|
+
1. Try all core workflows
|
|
564
|
+
2. Experiment with different AI tools
|
|
565
|
+
3. Train team members on workflows
|
|
566
|
+
|
|
567
|
+
**Advanced Usage (Month 2+):**
|
|
568
|
+
1. Build custom prompts for your specific environment
|
|
569
|
+
2. Consider Level 3 automation for repetitive tasks
|
|
570
|
+
3. Share successful patterns with the ATHF community
|
|
571
|
+
|
|
572
|
+
---
|
|
573
|
+
|
|
574
|
+
## Resources
|
|
575
|
+
|
|
576
|
+
- **Basic Prompts:** [basic-prompts.md](basic-prompts.md) for Level 0-1
|
|
577
|
+
- **Hunt Template:** [../templates/HUNT_LOCK.md](../templates/HUNT_LOCK.md)
|
|
578
|
+
- **Real Examples:** [../hunts/H-0001.md](../hunts/H-0001.md), [../hunts/H-0002.md](../hunts/H-0002.md)
|
|
579
|
+
- **Repository Context:** [AGENTS.md](../../../AGENTS.md)
|
|
580
|
+
|
|
581
|
+
**Remember: AI augments, doesn't replace. Always validate, always learn, always improve.**
|