Threat Intelligence & Threat Hunting

Collect, analyze, and operationalize cyber threat intelligence — understanding threat actors, TTPs, and IOCs — and proactively hunt for adversary activity in your environment before alerts fire.

Hard 65m 3 tasks

Learning Objectives

  • Distinguish strategic, operational, and tactical threat intelligence
  • Use MISP and OpenCTI for threat intelligence sharing and management
  • Hunt for threats using hypotheses derived from ATT&CK
  • Correlate IOCs across SIEM data sources
  • Understand threat actor profiling and the Diamond Model

What Is Cyber Threat Intelligence?

CTI: processed, analyzed information about threats that enables decisions

Three levels:
1. STRATEGIC (C-suite, board)
   - Nation-state threats to your industry
   - Geopolitical risk assessment
   - Long-term investment decisions
   - Example: "APT41 (China) targets pharmaceutical IP"

2. OPERATIONAL (security management)
   - Specific campaigns targeting your sector
   - Actor TTPs, motivations, targeting
   - Example: "APT41 using spear phishing with COVID research lures"

3. TACTICAL (SOC analysts)
   - IOCs: IPs, domains, hashes, YARA rules, Snort rules
   - Immediately actionable in security tools
   - Example: specific C2 IPs, malware hashes to block/alert on

Threat Actor Profiling

Understanding who attacks you helps prioritize defenses

Threat actor categories:
- Nation-state: APT groups (APT28=Russia, APT41=China, Lazarus=NKOR)
  Motivation: espionage, sabotage, financial (NKOR)
  Capability: high, custom malware, 0-days, years of persistence

- Cybercriminals: ransomware groups (Cl0p, BlackCat, LockBit)
  Motivation: financial
  Capability: medium-high, ransomware-as-a-service

- Hacktivists: Anonymous, Killnet
  Motivation: ideology
  Capability: low-medium, mostly DDoS and defacement

- Insider threats: employees, contractors
  Motivation: financial gain, revenge, espionage
  Capability: high (internal access)

Known APT Group resources:
- MITRE ATT&CK Groups: attack.mitre.org/groups/
- Mandiant APT profiles: mandiant.com
- CrowdStrike Adversary Intelligence: crowdstrike.com/adversary-intelligence

Diamond Model of Intrusion Analysis

4 core features of every intrusion:

         Adversary
            |
   Capability --[event]-- Infrastructure
            |
          Victim

Adversary: who conducted the attack
Capability: tools, TTPs used (malware, exploits)
Infrastructure: C2 IPs, domains, compromised hosts
Victim: targeted organization, person, data

Meta-features: timestamp, phase, result, direction

Usage:
- Group attacks: same adversary uses same infra across campaigns
- Attribution: unique capability (custom malware) links multiple incidents
- Defense: disrupt infrastructure = prevent all their campaigns

Lockheed Martin Cyber Kill Chain

7-stage attack model:
1. Reconnaissance    OSINT, scanning, target research
2. Weaponization     create malware + exploit delivery mechanism
3. Delivery          email, web, USB delivery to target
4. Exploitation      triggering the vulnerability
5. Installation      establishing persistence
6. Command & Control C2 callback, attacker controls host
7. Actions           objectives: data theft, ransomware, espionage

Defenders can interrupt at ANY stage
Earlier interruption = less damage

vs. MITRE ATT&CK:
Kill Chain: high-level stages (simpler, easier to explain)
ATT&CK: detailed techniques under each tactic (more actionable for hunters)

MISP (Malware Information Sharing Platform)

# MISP: open-source threat intelligence sharing platform
# Used by: CERTs, ISACs, enterprises, government agencies
# https://www.misp-project.org/

# Key concepts:
Event: collection of IOCs about a specific incident/campaign
Attribute: individual IOC (IP, domain, hash, URL, email)
Tag: classification (TLP:RED, APT28, ransomware)
Galaxy: structured threat actor/malware knowledge base
Correlation: automatic linking of events sharing attributes

# TLP (Traffic Light Protocol) for sharing:
TLP:WHITE    public, can be shared freely
TLP:GREEN    community sharing only
TLP:AMBER    organization only, limited distribution
TLP:RED      restricted to named recipients only

# Consuming MISP via API:
pip3 install pymisp
from pymisp import PyMISP
misp = PyMISP('https://misp.org/', 'API_KEY', False)
events = misp.search(value='185.220.101.5', type_attribute='ip-dst')
for e in events:
    print(e['Event']['info'], e['Event']['date'])

# MISP Feeds (free threat intel):
# OTX: AlienVault Open Threat Exchange
# Abuse.ch: URLHaus, MalwareBazaar feeds
# Emerging Threats: IP/domain blocklists

STIX 2.1 & TAXII

STIX 2.1 (Structured Threat Information Expression):
JSON-based standard for sharing threat intel

STIX Domain Objects (SDOs):
- Threat Actor
- Campaign
- Attack Pattern (ATT&CK technique)
- Malware
- Tool
- Indicator (pattern + valid_from + valid_until)
- Observed Data
- Vulnerability
- Course of Action (remediation)

Example STIX Indicator:
{
  "type": "indicator",
  "spec_version": "2.1",
  "id": "indicator--12345...",
  "name": "Malicious IP C2",
  "pattern": "[ipv4-addr:value = '185.220.101.5']",
  "pattern_type": "stix",
  "valid_from": "2024-01-01T00:00:00Z",
  "indicator_types": ["malicious-activity"]
}

TAXII (Trusted Automated eXchange of Intelligence Information):
REST protocol for serving STIX over HTTP/S

# Access TAXII feed:
pip3 install taxii2-client
from taxii2client.v21 import Server
server = Server('https://cti-taxii.mitre.org/', user='guest', password='')
for col in server.api_roots[0].collections:
    print(col.title)

Threat Hunting

Threat hunting: proactively searching for hidden threats
BEFORE an alert fires

Hunter mindset:
- Assume breach (attacker is already inside)
- SOC alerts catch known threats
- Hunters find UNKNOWN threats

Threat Hunting Loop:
1. CREATE HYPOTHESIS
   Based on: ATT&CK techniques, threat intel, new CVEs
   Example: "APT28 is using Kerberoasting (T1558.003) — is this in our environment?"

2. INVESTIGATE
   Query data sources to test hypothesis
   SIEM: look for Event ID 4769 spikes
   EDR: process execution patterns
   Network: beaconing detection

3. UNCOVER FINDINGS
   True positive: attacker found
   False positive: benign activity
   New hypothesis: discovered something unexpected

4. INFORM & ENRICH
   Share findings: new IOCs to SIEM, block lists
   Improve detections: write new SIEM rules from findings

SIEM-Based Hunting Queries

Hunting for beaconing (C2 check-in):
SELECT dest_ip, COUNT(*) as connections, STDDEV(time_gap) as jitter
FROM netflow
WHERE src_ip IN (internal_ranges)
GROUP BY dest_ip
HAVING connections > 100 AND jitter < 5
ORDER BY jitter ASC
-- Low jitter + high frequency = likely beaconing

Hunting for PowerShell encoded commands:
index=windows EventCode=4688
| search CommandLine="*-enc*" OR CommandLine="*-encoded*" OR CommandLine="*-e *"
| stats count by ComputerName, CommandLine
| sort -count

Hunting for lateral movement:
index=windows EventCode=4624 LogonType=3
| stats dc(TargetUserName) as unique_users by IpAddress
| where unique_users > 5
-- One IP authenticating as many different users = suspicious

Hunting Kerberoasting:
index=windows EventCode=4769
| stats count by TargetUserName
| where count > 10 AND TargetUserName!="krbtgt"
-- Service accounts with many TGS requests = Kerberoasting

Set up MISP threat intelligence workflow: (1) use MISP demo at misp-project.org/misp-training (free demo instance), (2) explore an existing event — note attributes, tags, galaxy entries, (3) search for a known threat actor (APT28) in the Galaxy, (4) add a new event for a simulated incident with 5 IOCs: 2 IPs, 1 domain, 1 file hash, 1 URL, (5) tag with TLP:GREEN and a relevant threat actor, (6) explore: how does MISP correlate this event with existing events sharing the same IOCs?

✦ Answer the questions to complete this task

What is the Traffic Light Protocol (TLP) and why is it used in threat sharing?

What is the difference between an IOC and an IOA?

Conduct a structured threat hunt: (1) create a hypothesis: 'An attacker may be using PowerShell download cradles to stage malware on our endpoints', (2) data sources needed: Windows Security Event Log (4688), PowerShell Operational Log (4103/4104), EDR telemetry, (3) design query: search for powershell.exe with -enc or -download in args, (4) run query on available log data (use Splunk/Elastic free tier or log files), (5) analyze results: true positives (IT admin scripts vs attacker), (6) if true positive: escalate to IR; if false positive: add to whitelist and refine query.

✦ Answer the questions to complete this task

Why does a threat hunter 'assume breach' rather than relying on alerts?

Research a specific APT group using open-source intelligence: (1) go to attack.mitre.org/groups and select APT29 (Cozy Bear), (2) document: motivation, suspected origin, targeted sectors, associated malware, (3) note which ATT&CK techniques they commonly use — which tactics are dominant?, (4) find 3 public threat reports about APT29 (Mandiant, CrowdStrike, or SentinelOne), (5) extract IOCs from the reports, (6) write a 1-page threat profile: who are they, what do they do, what should your org do to defend against them?

✦ Answer the questions to complete this task

What is the Diamond Model's 'infrastructure' component?

💪 Exercises & Challenges

📝 MCQ Medium +20 XP

Threat Intelligence MCQ

Threat Intelligence MCQ

Start →
⚙️ Practical Medium +30 XP

Threat Hunt Campaign

Threat Hunt Campaign

Start →
🚩 Challenge Hard +50 XP

Identify the Threat Actor

Identify the Threat Actor

Start →