Module 11 Lesson 2 of 6 🕑 ~55 min

> cat module-11-2-edr-xdr-detection.md

EDR, XDR & Detection Types

Lesson 1 covered how logs become searchable. This lesson covers what actually watches the endpoint in real time, how those signals get correlated across the whole environment, and the different underlying strategies a detection rule can use to spot an attacker in the first place.

1 EDR

EDR (Endpoint Detection and Response) covers Windows laptops, Windows servers, Linux systems, macOS devices, virtual machines, and cloud workloads. Traditional antivirus asked one question: is this file known to be malicious? EDR asks a much bigger one: what is happening on this device?

Traditional antivirus leaned heavily on known malware signatures — File hash: abc123... → Known malware: Trojan.Generic → Action: Quarantine. Modern EDR adds behaviour analysis, machine learning, process monitoring, memory analysis, exploit prevention, script monitoring, network telemetry, cloud reputation, and attack-behaviour detection on top of that. Just as importantly, it gives analysts investigation capability, not just a verdict:

WINWORD.EXE
     |
     +--- powershell.exe
               |
               +--- rundll32.exe
                        |
                        +--- outbound network connection

That process tree alone gives an analyst far more context than simply knowing a suspicious executable existed somewhere on the disk — it shows the whole chain of custody from the document that started it all.

An EDR sensor typically collects process creation and command lines, file creation, registry activity, network activity, DLL loading, user activity, persistence (scheduled tasks, new services), remote authentication, script execution, and memory behaviour like code injection — enough to let an analyst reconstruct an attack as a sequence of events rather than a single isolated verdict.

2 Common Platforms & Response Actions

You're likely to meet Microsoft Defender for Endpoint, CrowdStrike Falcon, SentinelOne Singularity, Palo Alto Cortex XDR, Trend Micro, Sophos, Trellix, VMware/Carbon Black, or Elastic Defend. Defender for Endpoint sits inside Defender XDR alongside identity, email and cloud-app signals; CrowdStrike Falcon and SentinelOne/Cortex all provide endpoint behaviour detection plus automated response.

EDR does more than observe. Depending on permissions and product, an analyst may be able to isolate a device, terminate a process, quarantine or delete a file, collect forensic information, retrieve files, run remote investigation commands, or block hashes/indicators:

Employee laptop compromised → SOC confirms malware
   → EDR isolates device → Network communication blocked
   → Incident Response investigates

Isolation is particularly useful because the endpoint often stays manageable by the security platform even while normal network connectivity is blocked — the analyst doesn't lose visibility just because the attacker lost network access.

3 Legacy Endpoint Security

Before EDR, companies mostly ran traditional antivirus, Host Intrusion Prevention Systems (HIPS), personal firewalls, application control, and Host Intrusion Detection (HIDS) — older deployments of Symantec Endpoint Protection, McAfee/Trellix, Trend Micro OfficeScan, Microsoft System Center Endpoint Protection, or Sophos still turn up in real environments.

Legacy servers sometimes simply can't support a modern EDR agent:

Windows Server 2008 running legacy financial application
        |
        +---- cannot install modern EDR
        |
        +---- business says server cannot be replaced

The SOC compensates with network monitoring, firewall rules, IDS, centralised Windows logging, application logs, and network segmentation — a compensating control, the same concept Module 8 introduced for legacy technology generally.

4 XDR

XDR (Extended Detection and Response) correlates information across multiple security domains — endpoint, identity, email, cloud, SaaS, network — rather than looking at endpoints alone. Microsoft describes Defender XDR as correlating signals across endpoints, identities, email and applications; Palo Alto describes Cortex XDR similarly, pulling from endpoint, network, cloud and identity data instead of endpoint telemetry alone.

Why XDR exists

A phishing attack, seen through four separate lenses: email security sees a malicious email delivered; identity security sees a sign-in from an unusual location; endpoint security sees a browser download an executable; the firewall sees the laptop talking to a suspicious IP. A traditional SOC might receive four unrelated alerts. XDR correlates them into one incident instead:

INCIDENT #45821 - Possible account and endpoint compromise
User: alice@example.com   Device: LON-LT-2847
Email: Malicious attachment
Identity: Suspicious authentication
Endpoint: PowerShell execution
Network: Communication with malicious infrastructure

Which is dramatically more useful to an analyst than four disconnected tickets they'd otherwise have to manually stitch together themselves.

5 SIEM vs EDR vs XDR vs SOAR

TechnologyMain Purpose
SIEMCollect and analyse security information from many sources
EDRMonitor and respond to activity on endpoints
XDRCorrelate detection and response across multiple security domains
SOARAutomate investigation and response workflows (Lesson 6)

The boundaries are increasingly blurred — Elastic Security combines SIEM, XDR, endpoint and cloud security in one console; Google Security Operations combines SIEM, SOAR and threat intelligence. Don't expect a clean, single-purpose product per row of that table in a real environment.

6 How Detections Actually Work

A detection rule can spot an attacker several fundamentally different ways.

Signature-based
Looks for known malicious characteristics, e.g. SHA256 hash = known ransomware. Very effective against known threats, much weaker against new or modified malware.
Indicator-based (IOCs)
Uses Indicators of Compromise — IPs, domains, URLs, file hashes, email addresses, filenames, certificate fingerprints. E.g. IF destination_domain = malicious-example.com THEN alert. The problem: attackers can change infrastructure easily and often.
Behaviour-based
Looks at what systems are doing, e.g. WINWORD.EXE launches powershell.exe. Often more meaningful than the hash of the PowerShell binary itself, since PowerShell is legitimate software — attackers frequently abuse legitimate OS tools instead of bringing their own malware, a technique called Living off the Land.
Threshold
Looks for unusual frequency, e.g. more than 20 failed logins against one account within five minutes. Simple, but extremely useful.
Sequence
Looks for events in a particular order: account created → added to Domain Admins → logs into a Domain Controller. Each step alone could be legitimate; together they may warrant investigation.
Anomaly
Flags behaviour significantly different from someone's normal pattern — a user who normally logs in from London 08:00–18:00 on one laptop, downloading ~100MB/day, suddenly logs in at 03:00 from an unfamiliar device in a different country and downloads 20GB. No single characteristic proves compromise; combined, they justify a look.
UEBA
User and Entity Behaviour Analytics — builds behavioural baselines for users, devices, servers, applications and service accounts, then flags deviations. E.g. a service account (svc_sql_backup) that normally only talks SQL01 → BACKUP01 suddenly authenticates to an employee workstation — unusual and worth a look, even with no known bad IOC involved at all.

7 MITRE ATT&CK

One of the most important frameworks in SOC work is MITRE ATT&CK — a knowledge base describing adversary tactics and techniques drawn from real-world attacker behaviour. Instead of thinking only "malware detected," SOC teams think in terms of attacker objectives:

TacticAttacker Objective
Initial AccessEnter the environment
ExecutionRun malicious code
PersistenceMaintain access
Privilege EscalationGain higher permissions
Credential AccessSteal credentials
DiscoveryLearn about the environment
Lateral MovementMove between systems
CollectionGather information
Command and ControlCommunicate with compromised systems
ExfiltrationRemove information
ImpactDamage or disrupt the organisation

MITRE's Enterprise ATT&CK matrix currently lists fifteen enterprise tactics in total, giving SOC teams (and vendors, and this course) a shared vocabulary for describing what an attacker is actually trying to do at any given step.

8 Detection Engineering & Sigma Rules

Large SOCs employ Detection Engineers to design and tune detection logic. A first attempt at a PowerShell detection might be as simple as ProcessName == powershell.exe — which would generate thousands of alerts, since PowerShell is used constantly by administrators, developers, deployment tools, backup software, and monitoring tools. It needs refining:

Process = powershell.exe
AND CommandLine contains:
  -EncodedCommand OR DownloadString OR FromBase64String

🔮 Think it through

Even this refined rule might still need tuning. What's a realistic reason it could still fire thousands of times a day in a real enterprise, and what would you do about it — disable the rule entirely, or something more targeted?

Reveal a realistic answer

A legitimate deployment tool (e.g. SCCM) might routinely run encoded PowerShell as part of normal software rollout, generating hundreds of "true" matches that are entirely benign. The fix is never to disable the whole rule — that creates a blind spot for real attacks. Instead, add a precise exception, e.g. EXCEPT host = SCCM-DEPLOYMENT-01 AND account = svc_sccm AND parent process = ccmexec.exe. Detection engineering is iterative by nature; Lesson 3 covers this same idea from the analyst's side as alert tuning and alert fatigue.

Modern teams increasingly manage detections as code. Sigma is an open, YAML-based detection format that describes a detection independently of any one SIEM, then translates into Splunk, Elasticsearch, or Sentinel queries:

title: Suspicious Encoded PowerShell
logsource:
  product: windows
  category: process_creation
detection:
  selection:
    Image|endswith: '\powershell.exe'
    CommandLine|contains: '-EncodedCommand'
  condition: selection
level: high

You don't need to become a Sigma expert immediately — just understand that organisations increasingly manage detections like software: Detection rule → Git repository → Peer review → Testing → Production deployment. Sigma also lets authors explicitly document expected false positives right in the rule, which shows how closely detection development and detection tuning are actually connected.

Lesson Outcome

You should now be able to explain what EDR adds beyond traditional antivirus, why XDR correlates across domains instead of watching endpoints alone, name the seven detection approaches and pick the right one for a given scenario, use MITRE ATT&CK tactic names to describe attacker objectives, and explain why detection engineering is iterative. Lesson 3 covers what happens once one of these detections actually fires — how an alert becomes an incident, and how an analyst triages it.