Threat-based detection

Threat-based Detection

One-liner: Detection focused on identifying attacker tactics, techniques, and procedures (TTPs) rather than specific indicators.

๐ŸŽฏ What Is It?

Threat-based detection (also called TTP-based or behavioral detection) focuses on detecting how attackers operate, not just what tools they use. Instead of matching specific file hashes or IP addresses (Indicator Detection), threat-based detection identifies the behavioral patterns and techniques described in frameworks like MITRE ATT&CK.

๐Ÿ†š Threat-based vs Indicator-based Detection

Aspect Indicator Detection Threat-based Detection
What it detects Specific IOCs (IPs, hashes, domains) Attacker behaviors (TTPs)
Example Block IP 192.168.1.50 Detect process injection
Evasion resistance Low (change hash, change IP) High (hard to change behavior)
Longevity Days to weeks Months to years
False positives Lower Higher (needs tuning)
Coverage Known threats Known + unknown threats

Pyramid of Pain

      Hardest to Change (Threat-based)
             โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
             โ”‚  TTPs   โ”‚  โ† Most valuable
          โ”Œโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”
          โ”‚     Tools     โ”‚
       โ”Œโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”
       โ”‚  Network Artifacts  โ”‚
    โ”Œโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”
    โ”‚   Host Artifacts          โ”‚
 โ”Œโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”
 โ”‚      Domain Names              โ”‚
โ”Œโ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”
โ”‚       IP Addresses               โ”‚  โ† Easiest to change
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
     (Indicator-based)

Attackers easily change IPs and hashes, but changing their TTPs requires retooling and retraining.

๐ŸŽฏ MITRE ATT&CK Mapping

Threat-based detection is organized around MITRE ATT&CK tactics and techniques.

Example Detections

T1059.001 - PowerShell Execution

Behavioral Indicators:

Detection Rule:

title: Suspicious PowerShell Execution
detection:
  selection:
    Image|endswith: '\powershell.exe'
    ParentImage|endswith:
      - '\winword.exe'
      - '\excel.exe'
      - '\outlook.exe'
    CommandLine|contains:
      - '-enc'
      - '-executionpolicy bypass'
      - 'downloadstring'
  condition: selection

T1055 - Process Injection

Behavioral Indicators:

T1003 - Credential Dumping

Behavioral Indicators:

๐Ÿ› ๏ธ Building Threat-based Detections

Workflow

1. Study Adversary TTPs
   โ†“
2. Map to MITRE ATT&CK technique
   โ†“
3. Identify behavioral telemetry sources
   โ†“
4. Write Sigma rule or SIEM query
   โ†“
5. Test with Atomic Red Team
   โ†“
6. Tune to reduce FPs
   โ†“
7. Deploy to production

Telemetry Sources

๐Ÿ“Š Detection Coverage Matrix

Track which MITRE ATT&CK techniques you can detect:

Tactic Technique Detection Coverage
Execution T1059.001 (PowerShell) โœ… High Process monitoring
Defense Evasion T1070 (Indicator Removal) โš ๏ธ Medium File deletion logs
Credential Access T1003 (Credential Dump) โœ… High lsass access
Lateral Movement T1021 (RDP) โœ… High Audit Logon Events
Command & Control T1071 (Web Protocols) โš ๏ธ Medium Zeek, proxy logs

๐Ÿ”„ Living Off the Land Detection

Living off the Land attacks use legitimate binaries, making IOC detection useless. Threat-based detection is critical:

Example: Detecting Malicious Use of certutil.exe

Normal Use: Certificate management
Malicious Use: Download payloads

Detection:
  - certutil.exe + URL in command line
  - certutil.exe spawned by suspicious parent
  - certutil.exe + -decode (decoding malware)

๐Ÿ“ˆ Detection Maturity

Threat-based detection represents a mature detection program:

Level 1 (Reactive): Signature/IOC-based only
         โ†“
Level 2 (Proactive): Some behavioral rules
         โ†“
Level 3 (Advanced): Extensive TTP coverage
         โ†“
Level 4 (Leading): Automated threat hunting

๐Ÿงช Testing Detections

Validate threat-based detections with:

Example Test:

# Atomic Test: T1059.001 - PowerShell Download Cradle
Invoke-AtomicTest T1059.001 -TestNumbers 1

Verify your detection fires โ†’ Tune โ†’ Repeat.

๐ŸŽค Interview Angles

Q: Why is threat-based detection better than signature-based?

Q: How would you detect Living off the Land attacks?

STAR Example:
Situation: Attacker used certutil.exe to download malware (no malicious file hash to block).
Task: Detect this TTP going forward.
Action:

Q: What's the downside of behavioral detection?