Skip to content
incident-responseintermediate#edr#endpoint-security#detection#soc#blue-team

EDR: How Endpoint Detection and Response Works

What an EDR sensor collects on Windows, macOS and Linux, how its detections and response actions work, how it differs from antivirus, XDR, MDR and a SIEM, how attackers blind it, and how to measure real coverage across a fleet.

An attacker on a laptop leaves a trail of small actions. A document opens, the word processor starts a shell, the shell downloads a file, a new scheduled task appears, a process reads the memory of the credential store, and a connection goes out to an address nobody has seen before. Antivirus asks a narrower question about each file it touches: is this file bad? Most of those actions involve no bad file at all.

Endpoint detection and response is the tool built for the trail. An agent on each endpoint records what happens, ships the record to a backend, detects attack behaviour in it, and gives a responder controls on the host from wherever they sit. Gartner's Anton Chuvakin named the category in July 2013 as "endpoint threat detection and response", tools focused on detecting and investigating suspicious activity on hosts. The name shortened to EDR and the category became standard equipment.

This guide covers what the sensor collects and how, how detection and response work, where EDR sits against antivirus, XDR, MDR and a SIEM, where coverage fails, how attackers blind the sensor, and how to measure coverage across a fleet. What Is a SIEM? owns the log pipeline the EDR feeds, Living Off the Land owns the built-in-binary techniques in depth, and Threat Hunting Guide owns searching EDR data without an alert.

What the sensor collects

An EDR's value is its telemetry. Detection rules, machine-learning models and analysts all work from the same record, so whatever the sensor fails to capture is invisible to every layer above it.

CategoryTypical fieldsWhat it catches
ProcessImage path, hash, signer, full command line, parent and grandparent, user, integrity level, start and exit timeOffice spawning a shell, encoded PowerShell, credential dumping tools, renamed binaries
FileCreate, modify, rename, delete, with the process responsible and the hash of the resultPayload drops, ransomware mass renames, staging archives
Registry (Windows)Key and value set or deleted, with the writing processRun keys, services, image file execution options, disabling security settings
NetworkConnection with remote address, port, protocol, and the process that made it; DNS queries by processCommand and control beacons, lateral movement over SMB or WinRM, a binary that has no reason to talk to the internet
Module and driver loadsDLL or kernel driver loaded, its path, signer and hashDLL sideloading, vulnerable driver loads
Script contentThe deobfuscated script body as the engine is about to run itPowerShell, VBScript, JScript and Office macro payloads that never touch disk
Cross-process accessHandle opened to another process, with the access rights requestedReading LSASS memory, process injection
AuthenticationLogons on the host, logon type, sourcePass-the-hash, remote interactive logons by service accounts

The parent-child relationship is what makes the process data useful. powershell.exe -enc JABzAD0... started by explorer.exe after a user opened a terminal is administration. The same command started by winword.exe is a macro payload. The command line alone cannot tell them apart and the process tree can.

Where the data comes from on each platform

The sensor has to be told about events as they happen, which means registering with the operating system at a privileged level. Each platform offers a different interface.

Windows. The richest and most invasive. A kernel driver registers documented callbacks: PsSetCreateProcessNotifyRoutineEx for process creation, PsSetLoadImageNotifyRoutine for image and driver loads, ObRegisterCallbacks for handles opened to processes and threads, CmRegisterCallbackEx for registry operations, and a file system minifilter for file I/O. Event Tracing for Windows (ETW) supplies more, including the Microsoft-Windows-Threat-Intelligence provider, which reports memory operations such as remote allocations and writes and is available only to protected antimalware processes. The Antimalware Scan Interface (AMSI) hands the sensor script content after deobfuscation. Many products also hook functions in ntdll.dll inside each user-mode process, which gives a view of API calls and is the easiest layer for an attacker to remove.

macOS. Apple deprecated third-party kernel extensions and moved security tools to the user-space Endpoint Security framework. The Endpoint Security framework, introduced in macOS 10.15, is a C API that a system extension uses to "authorize pending events, or receive notifications of events that already occurred", including process executions, file system mounts, forks and signals. AUTH events let the client allow or deny an operation before it completes, NOTIFY events report what already happened. A client needs an Apple-granted entitlement and Full Disk Access, and runs in user space, so a crashing macOS sensor takes down its own process and leaves the kernel running.

Linux. Products historically used auditd rules or their own kernel module. The current direction is eBPF: small verified programs attached to kernel hooks without a loadable module. Microsoft Defender for Endpoint on Linux made eBPF its default supplementary event provider from agent version 101.23082.0006 and dropped auditd support from 101.2408.0000. Where eBPF is unsupported it falls back to Netlink, which still captures process events and misses file and socket events. That fallback is a coverage gap that shows up only in the sensor's health output.

Why the kernel matters: July 2024

A sensor that hooks the kernel sees everything and can break everything. On 19 July 2024 a CrowdStrike content update for the Windows sensor carried 21 input fields to code that expected 20; the resulting out-of-bounds read crashed about 8.5 million Windows machines during a 78-minute window, and many could not boot far enough to receive a fix. The 2024 CrowdStrike Outage covers the root cause.

The outage changed the platform. Microsoft launched the Windows Resiliency Initiative in November 2024, and in June 2025 said a private preview of a Windows endpoint security platform, which lets antivirus and EDR vendors run their products outside the kernel, would reach a set of Microsoft Virus Initiative partners the following month. The trade-off is the same one macOS already made: a user-mode sensor crashes alone, and depends on what the operating system chooses to expose to it.

How detection works

Detections run on the endpoint, in the vendor cloud, or both. Three kinds sit on top of the telemetry.

Indicator matches. A file hash, domain, IP address or certificate on a list. Cheap, precise and short-lived; changing a byte in the file or moving the server defeats it. Useful for known commodity malware and for sweeping the fleet when an incident produces new indicators.

Behavioural rules. A pattern over one or more events, independent of the specific file. Examples that every mature product carries in some form:

  • An Office application starts cmd.exe, powershell.exe, wscript.exe or mshta.exe.
  • A process that is neither a known backup tool nor a system component opens LSASS with memory read rights.
  • More than a few hundred files renamed with a new extension by one process in a minute.
  • A new service installed whose binary path points into a user-writable folder.
  • vssadmin delete shadows or wbadmin delete catalog, which ransomware runs before encrypting.

Behavioural rules catch most real intrusions because attackers can change their tools far more easily than their objectives. They also produce the false positives, since administrators use the same commands. Rules written in a portable format such as Sigma can be run against EDR data shipped to a SIEM; Sigma Rules Explained covers the format, and the Sigma detection coverage map shows which ATT&CK techniques the public rule set covers for the log sources you collect.

Machine-learning models. Static classifiers score files on features such as imports, entropy, section layout and signer before they run. Behavioural models score sequences of events against what is normal for that process or host. Models are good at variants of known malware families and at catching an unusual process tree quickly. They are weaker at explaining themselves, which costs triage time, and at activity that is rare but legitimate in your environment.

The output of all three is an alert tied to a process tree, a host, a user and a timeline. An analyst reads that tree first. A good EDR alert lets the analyst answer "what started this, what did it do, and what did it touch" without leaving the console.

Response actions

The "R" in EDR is a set of remote controls. Microsoft Defender for Endpoint's list is representative:

ActionWhat it doesWhen to use it
Isolate deviceCuts the host off the network while keeping it connected to the EDR service, so investigation continuesConfirmed hands-on-keyboard activity, ransomware precursors
Selective isolationIsolation with named processes or destinations allowed (for example, collaboration tools)Executive or production hosts where full isolation breaks the business
Stop and quarantine fileKills the process and quarantines the file across the hosts where it appearsConfirmed malicious binary
Restrict app executionApplies a code integrity policy that lets only files signed by a Microsoft-issued certificate runContainment short of isolation
Collect investigation packagePulls logs, autoruns, network state, scheduled tasks and installed software into one archiveAny host you may need to explain later
Live responseAn authenticated remote shell for running scripts, pulling files and inspecting stateScoping and cleanup
Run antivirus scanTriggers a full or quick scanAfter cleanup, as confirmation

Two decisions belong in a runbook before the first incident. First, which actions may fire automatically. Isolating a workstation on a high-confidence ransomware detection is easy to defend; isolating a domain controller on a model score is how a false positive becomes an outage. Second, how isolation interacts with your network. Microsoft notes that hosts behind a full VPN tunnel can lose contact with the Defender service once isolated, and recommends split tunnelling for its traffic. An isolated device you can no longer reach is a device you have to visit.

EDR against antivirus, XDR, MDR and a SIEM

The terms overlap because vendors bundle them. The useful distinction is what each one sees and who operates it.

Antivirus (EPP)EDRXDRMDRSIEM
What it isProductProductProductServiceProduct
SeesFiles on one endpointBehaviour on endpoints, with historyEndpoint plus the vendor's email, identity, cloud and network sensorsWhatever its EDR or XDR seesLogs from anything you send it
Main questionIs this file bad?What happened on this host?What happened across this vendor's estate?Who is watching at 03:00?What happened across everything?
ResponseBlock, quarantineIsolate, kill, collect, live shellEDR actions plus account and mailbox actionsProvider acts or escalates to youThrough automation or other tools
Blind toFileless and living-off-the-land activityAnything without a sensorSources the vendor does not makeSame as its tooling, plus your business contextEndpoint detail it was never sent

Antivirus and EDR now ship as one agent in most products, and the gap is in what is switched on and licensed. MDR is the answer when nobody in-house can triage alerts around the clock. EDR alerts are one of the first sources to send a SIEM, because cross-source detections need the endpoint view.

Illustrated cybersecurity scene for EDR: How Endpoint Detection and Response Works
Illustration for EDR: How Endpoint Detection and Response Works.

Where coverage fails

A dashboard that says "EDR deployed" usually means the agent was pushed to the machines the management tool knew about. Five gaps sit behind that statement.

Unmanaged devices. Machines that were never enrolled in the tool that deploys the agent: contractor laptops, lab machines, a server built by hand during an outage, virtual machines cloned from an old template, a cloud instance launched outside the pipeline. They are invisible to the EDR console, so they never appear as a gap there. Network discovery helps: Defender for Endpoint, for example, uses onboarded devices to observe traffic and probe the network, and lists unmanaged endpoints, network devices and IoT devices in its inventory.

Unsupported platforms. Every vendor has a support matrix. Older Windows Server releases, unusual Linux kernels, appliances built on embedded Linux, network gear, hypervisors and OT systems often cannot run the agent at all. Attackers know this; ransomware crews have repeatedly targeted hypervisors because the virtual machines' EDR cannot see the host underneath them. These devices need compensating controls and log forwarding, and they need to be counted as uncovered.

Tamper protection off. Without it, a local administrator, or malware running as one, can stop the service, add an exclusion for C:\, or turn off real-time protection. In Defender for Endpoint, tamper protection on Windows keeps real-time protection, behaviour monitoring, cloud protection and automatic actions on, and blocks changes to exclusions and to settings through the registry. On macOS it defaults to audit mode after installation, which logs tampering and blocks nothing until set to block. On Linux it is audit-only and in preview.

Sensors in passive or audit mode. Products that run alongside a second security product, or were deployed in audit mode during a pilot, may detect without blocking. On a device onboarded to Defender for Endpoint with another antivirus as primary, Defender Antivirus runs in passive mode: it scans and reports, does not remediate, and runs without attack surface reduction rules, network protection or cloud-delivered protection. EDR in block mode adds remediation of artifacts the EDR detects; those three protections stay off. Get-MpComputerStatus | select AMRunningMode returns Normal, Passive or EDR Block Mode. The pilot that never moved to enforce is one of the most common findings in an EDR review.

Telemetry not forwarded. The EDR detects and alerts in its own console, and the SIEM never receives those alerts or the raw events. Every cross-source detection that needs endpoint context then fails silently, and so does any hunt run in the SIEM. A host can be fully protected by the EDR and invisible to the SOC's correlation rules at the same time. The Telemetry Contract Builder sets out which events a system must emit and forward, and which ATT&CK techniques each one makes detectable.

There is a sixth, quieter one: stale sensors. A device enrolled two years ago and not seen for 45 days counts as protected in some reports. Either it no longer exists, and the inventory is wrong, or it exists and its sensor is broken.

How attackers evade EDR

Attackers who reach administrator or SYSTEM on a host often go after the sensor before they do anything noisy. MITRE ATT&CK tracks this as T1562.001, Impair Defenses: Disable or Modify Tools. The common routes, in rough order of how often they appear in incident reports:

Bring your own vulnerable driver (BYOVD). Windows requires kernel drivers to be signed. So the attacker brings a legitimately signed driver with a known flaw, loads it, and uses the flaw to run code or read and write memory in the kernel. From there they can remove the EDR's kernel callbacks or terminate its protected processes. ATT&CK records the technique under T1068 and names it directly. A frequently cited example is RTCore64.sys, a driver shipped with MSI Afterburner, whose flaw (CVE-2019-16098) lets any authenticated user read and write kernel memory. Ransomware affiliates package these drivers into dedicated "EDR killer" tools.

The defences are platform features. Since the Windows 11 2022 update, Microsoft's vulnerable driver blocklist is on by default, and it is enforced when memory integrity (HVCI), Smart App Control or S mode is active. Microsoft states the in-box list is less complete than the downloadable one, because some blocks are held back for compatibility, and recommends applying the full list through App Control for Business where you can. The attack surface reduction rule "Block abuse of exploited vulnerable signed drivers" stops a driver being written to disk; it does not stop one already present from loading, which is what the blocklist does.

Unhooking. A sensor that hooks functions in ntdll.dll sees API calls only as long as those hooks are in place. Malware can load a fresh copy of ntdll.dll from disk and overwrite the hooked section, or make system calls directly or through gadgets elsewhere in ntdll. This blinds the user-mode hooks. It does not blind kernel callbacks or the Threat-Intelligence ETW provider, which is why sensors that lean on kernel telemetry are harder to evade this way. A related trick patches EtwEventWrite inside the attacker's own process so that process stops emitting ETW events (ATT&CK T1562.006, Indicator Blocking).

Living off the land. The cheapest evasion is to look normal. certutil to download, rundll32 and regsvr32 to execute, wmic and PowerShell remoting to move laterally, ntdsutil to copy the domain database. Each is a signed Microsoft binary with legitimate uses, so detection depends on command lines and parent processes. A February 2024 joint advisory from CISA, NSA, FBI and international partners noted that many organisations do not implement the logging and baselining capabilities that detecting these techniques requires. Living Off the Land covers the binaries and the detections.

Exclusions and policy abuse. Where tamper protection is off, adding an exclusion for the staging folder is simpler than any of the above. Attackers also look for folders the organisation already excluded for performance, often backup and database paths, and work from there.

Going where the sensor is not. Hypervisors, NAS appliances, unmanaged Linux boxes and VPN appliances. No evasion technique is needed on a host that has no sensor.

Detection for tampering exists. The EDR itself reports driver loads, service stops and setting changes when it is able to; Windows logs service installs (event 7045) and Defender configuration changes (event 5007); and a sensor that stops reporting is itself a signal. Windows Event IDs for Security lists the events. A sensor going silent on a host that is still sending other logs to the SIEM deserves an alert of its own.

Measuring coverage across a fleet

"What percentage of our endpoints have EDR?" has a precise answer only if both halves of the fraction are defined.

The denominator is an independent inventory. The EDR console cannot tell you about devices that never enrolled. Build the device list from sources that do not depend on the EDR: the directory (Active Directory, Entra ID), the MDM (Intune, Jamf), cloud account APIs for instances, the virtualisation platform, DHCP and network discovery. Join them on a stable identifier. Hardware serial number and directory device ID survive renames; hostnames do not, and a fleet with LAPTOP-7F2Q and laptop-7f2q.corp.example as two rows will report coverage it does not have.

The numerator is a sensor in a good state. Enrolment is the weakest test. Count a device as covered only when its sensor:

  1. reported within the last seven days (or whatever window matches your laptops' travel patterns),
  2. runs in an enforcing mode (active or EDR block mode rather than passive or audit),
  3. has tamper protection on, and
  4. has its alerts reaching the SIEM.

Report per platform. A single percentage hides the platform that is failing. Here is a worked example for a fleet of 4,110 devices, counting criteria 1 to 3 (SIEM forwarding is checked separately under detection testing below):

PlatformIn inventorySensor reporting (7 days)Enforcing, tamper onCovered
Windows workstations2,6002,5402,47095.0%
Windows Server42037134081.0%
macOS78070265584.0%
Linux servers31019819061.3%
Total4,1103,8113,65588.9%

The EDR console in this example counts 3,811 reporting devices, of which 3,655 are healthy, and reports 95.9% healthy. Against the inventory the real figure is 88.9%, and 455 devices need a named owner and a reason. The Linux row has the lowest rate, 61.3%: 112 of its 120 gaps are servers with no sensor reporting, typically because they were built outside the configuration pipeline, run kernels the sensor does not support, or carry an agent that broke and was never noticed. The Windows Server row has 31 sensors reporting but not enforcing, which on inspection will usually be servers set to passive mode during a migration from another product and never switched back. The macOS row's 47 reporting-but-not-enforcing devices are the tamper protection audit default.

Each gap has a different fix: an enrolment step in the build pipeline, a policy change, a support-matrix exception with compensating logging. Report the split per platform.

The Endpoint Coverage checker reads one device export in the browser (Defender for Endpoint, Intune, CrowdStrike Falcon, Jamf, or any CSV with a device name column) and reports EDR, antivirus, encryption, DLP, tamper protection and OS support coverage by platform, with every gap listed. It checks one export at a time, so the join against the independent inventory stays a separate step. Running it monthly and keeping the output turns coverage into a trend line.

Two more measurements close the loop. Detection testing: run a known-safe technique, such as an Atomic Red Team test for LSASS access, on a sample host per platform, and confirm the alert reaches both the EDR console and the SIEM. A sensor that reports healthy and never alerts is broken in a way no health check shows. Telemetry completeness: for each platform, confirm the event types your detections depend on are actually arriving. A Linux host on Netlink fallback reports healthy while sending no file or socket events.

The verdict

EDR is the deepest view of an endpoint a defender can get, and the place most intrusions are first seen. Its strength comes from privileged hooks into the operating system, which is also why a bad sensor update can stop a fleet and why attackers with admin rights aim straight at it.

Most deployments fail on coverage: the laptop nobody enrolled, the Linux server the agent does not support, the pilot left in passive mode, tamper protection set to audit, and alerts that stop at the EDR console. Measure coverage against an inventory the EDR does not control, per platform, counting only sensors that report, enforce and forward. Turn on the vulnerable driver blocklist and memory integrity wherever hardware allows, keep tamper protection in block mode, and alert when a sensor goes quiet.

Sources & further reading