Reading width
Wide uses the full column for everything, text, diagrams, code, and exercises. Narrow keeps the standard reading width.
Text size
Scales the body text. Headings and code blocks keep their size.
In this section
Endpoint Security Foundations: Process Trees, LSASS, Persistence and What Defender for Endpoint Records
Introduction
Endpoint security engineering is configuring a few dozen controls on a few thousand devices, and it is easy to do that as a checklist. This course does it the other way round. Every control exists because an attacker needs something from the operating system: a way to start code, a place where credentials live, a way to come back after a reboot.
An engineer who knows which structures an attacker goes for can judge a control by whether it guards one of them, and can read the sensor's records as evidence of whether it did.
This lesson reads one real intrusion from the course's estate for exactly that. On 10 March a Finance laptop, NE-THOMPSON-LT, opened a macro-enabled Word document, and over the next 25 minutes the attacker started PowerShell from Word, dumped the memory of LSASS, created a scheduled task and reached for a second laptop.
Every step is in the estate's Defender for Endpoint data, and every query on this page runs in your browser against it.
One intrusion, read as the operating-system structures it used.
The lessons in this module each lay the ground for one later module. This one is Module 1's, on the internals of Windows, Linux and macOS that every later control depends on, and it ends with what Module 1 builds on it.
One Intrusion, Read as a Process Tree
Who started what, and with which rightsEvery program on Windows runs as a process, and every process has a parent: the process that started it. Defender records each start in DeviceProcessEvents with the parent's name beside the child's, so the intrusion can be read as a tree before any of its content is understood:
DeviceProcessEvents
| where DeviceName == 'NE-THOMPSON-LT'
| where Timestamp between (datetime(2026-03-10 10:30) .. datetime(2026-03-10 10:55))
| where InitiatingProcessFileName != 'services.exe'
| project Time = format_datetime(Timestamp, 'HH:mm:ss'),
Parent = InitiatingProcessFileName, Process = FileName,
Integrity = ProcessIntegrityLevel
| order by Time asc
Run it, and the engine returns the eleven processes the attacker's session started in those 25 minutes, oldest first:
Time Parent Process Integrity
-------- -------------- -------------- ---------
10:30:14 explorer.exe WINWORD.EXE Medium
10:30:47 WINWORD.EXE powershell.exe Medium
10:31:02 powershell.exe powershell.exe Medium
10:33:10 powershell.exe cmd.exe Medium
10:33:18 cmd.exe whoami.exe Medium
10:33:24 cmd.exe net.exe Medium
10:33:40 powershell.exe rundll32.exe Medium
10:36:51 cmd.exe rundll32.exe High
10:42:09 cmd.exe wmic.exe Medium
10:48:33 cmd.exe schtasks.exe Medium
10:54:12 cmd.exe 7za.exe Medium
Read the Parent column down the result, one row at a time. explorer.exe starts WINWORD.EXE, which is the user opening a document. WINWORD.EXE then starts powershell.exe, and from there PowerShell starts a second PowerShell, a command shell, the reconnaissance tools whoami and net, two copies of rundll32.exe, wmic, schtasks and an archiver.
None of those names is malicious by itself; every one is a standard Windows tool. What is wrong is the shape: a word processor is not supposed to start a script engine, and everything after that inherits from it.
The Integrity column matters as much as the names. Windows marks each process with an integrity level, and a process started by an ordinary user runs at Medium. Ten of the eleven processes here run at Medium.
One, the rundll32.exe at 10:36:51, runs at High, which means it was started with an administrator's token. That is the step where the attacker used rights the user's own programs did not have, and the next section shows what for.
This is the first habit of the course: read the tree before the names, and read the rights next to the tree. Module 1 teaches the process model underneath it, and Module 4's attack surface reduction rules are built on exactly these parent-child shapes.
It is worth noticing what the tree does not show. It does not show who sent the document, the content of the document, the code the macro ran or what the downloaded script did inside PowerShell. Those are in other tables and other tools.
What it shows is enough to judge the intrusion by its structure: an application that opens documents started an interpreter that runs code, and the interpreter started everything else. An engineer who can read that shape in a process tree can predict which control would have broken the chain, and that is the skill the rest of this module builds lesson by lesson.
Why the Attacker Wanted LSASS
Credential material, and the dump that took itLSASS, the Local Security Authority Subsystem Service, is the Windows process that checks credentials at sign-in and holds credential material for signed-in users so that their access to network resources keeps working without asking again.
That makes its memory the most valuable thing on a workstation to an attacker who wants to move to other machines. The elevated rundll32.exe's command line says what it did. It loads C:\Windows\System32\comsvcs.dll with the arguments MiniDump 712, names lsass.dmp in the user's Temp folder as the output and asks for a full dump.
That calls the MiniDump function exported by comsvcs.dll, a standard Windows library, on process 712, LSASS, and writes a complete copy of its memory to disk. The dump itself needed no attacker tool: it was taken with a component every Windows machine ships. Defender recorded both sides of it. In the device events, the process opening LSASS:
DeviceEvents
| where DeviceName == 'NE-THOMPSON-LT'
| where Timestamp between (datetime(2026-03-10 10:30) .. datetime(2026-03-10 10:55))
| where FileName =~ 'lsass.exe' or ActionType startswith 'AsrLsass'
| project Time = format_datetime(Timestamp, 'HH:mm:ss'), ActionType,
Initiator = InitiatingProcessFileName
It returns two records with the same second, one from the ASR rule that guards LSASS and one from the sensor's own record of the open:
Time ActionType Initiator
-------- ------------------------------ ------------
10:36:52 AsrLsassCredentialTheftAudited rundll32.exe
10:36:52 OpenProcessApiCall rundll32.exe
And in the file events, the dump being written three seconds later:
DeviceFileEvents
| where DeviceName == 'NE-THOMPSON-LT'
| where Timestamp between (datetime(2026-03-10 10:30) .. datetime(2026-03-10 10:55))
| where FileName endswith '.dmp'
| project Time = format_datetime(Timestamp, 'HH:mm:ss'), ActionType, FileName,
Initiator = InitiatingProcessFileName
The file events for the same window hold one memory dump, written by rundll32.exe itself:
Time ActionType FileName Initiator
-------- ----------- --------- ------------
10:36:55 FileCreated lsass.dmp rundll32.exe
Put together, the three records say the same thing three ways: a process with an administrator token opened LSASS, an ASR rule noticed, and a file appeared that holds the result. Here is the intrusion so far in the terms the rest of the course uses:
What the attacker went for
NE-THOMPSON-LT, 10 MarchTwo things in those results are for later modules. The ASR rule that guards LSASS saw the access and, because it was in audit mode on this device, let it happen; Module 4 is about moving rules like that from audit to block without breaking anything.
And the open was possible at all because the user's session could get an administrator token; Module 1 covers the credential protections, such as Credential Guard, that take LSASS's secrets out of reach even of a process with those rights.
The order of the records matters too. The open and the ASR audit record share a second, 10:36:52, and the dump file follows three seconds later. That is how fast credential theft is once an attacker has the rights: there is no window in which an analyst could have reacted to the first record before the third existed.
Prevention has to act at the open, or the credentials are gone, which is the argument for blocking rather than auditing that Module 4 makes in full. It is also why the course treats Credential Guard as an engineering decision rather than a checkbox: it changes what is in LSASS to be taken, so it still helps on the day a block fails.
Coming Back After a Reboot
A scheduled task, and the Run key beside itAn attacker who has credentials wants to keep the foothold too. At 10:48 the command shell ran schtasks, and the device events record the task it made:
DeviceEvents
| where DeviceName == 'NE-THOMPSON-LT'
| where Timestamp between (datetime(2026-03-10 10:30) .. datetime(2026-03-10 10:55))
| where ActionType == 'ScheduledTaskCreated'
| extend Task = tostring(parse_json(AdditionalFields).TaskName)
| project Time = format_datetime(Timestamp, 'HH:mm:ss'), ActionType, Task,
Initiator = InitiatingProcessFileName
One task was created in the window, by schtasks.exe, three minutes before the archiver ran:
Time ActionType Task Initiator
-------- -------------------- ------------ ------------
10:48:34 ScheduledTaskCreated AdobeUpdater schtasks.exe
The task is named AdobeUpdater, a name chosen to look ordinary. Its command line, in the process events, sets it to run PowerShell with a hidden window from the user's AppData folder at every logon, with the highest privileges available, so the attacker's script comes back each time the user signs in, with no further email needed.
Scheduled tasks are one of several places Windows starts programs automatically; the registry's Run keys are another, and this laptop's registry events show how busy those are on an ordinary day:
DeviceRegistryEvents
| where DeviceName == 'NE-THOMPSON-LT'
| summarize Writes = count() by RegistryKey
| top 3 by Writes
The three registry keys written most often on this laptop, across the whole period the estate covers:
RegistryKey Writes
----------------------------------------------------------------------------- ------
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run 95
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Winmgmt 21
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Chrome 14
95 writes to the machine's Run key over the estate's period, none of them the attacker's: they are installers and updaters doing what they normally do.
That is why persistence is not found by watching a location for any change. It is found by knowing what normally lives there and reading what is new against it, which is what Module 1's lesson on the registry as an attack surface teaches, and what Module 7's response work has to undo: a device cleaned without removing AdobeUpdater would be compromised again at the next logon.
The same applies to the other autostart locations this intrusion did not use: services, WMI subscriptions, startup folders. Module 1 lists them with the structures behind each, so that a persistence check has a complete list of places to look.
Notice also the privilege the task asks for. Running at the highest level available means that each time the user signs in, the attacker's PowerShell starts with the same administrator token the LSASS dump used, without asking again.
Persistence and privilege are planned together, which is why Module 7's playbooks treat a task like this as part of the intrusion's scope rather than as a detail to tidy up afterwards. An engineer reviewing persistence controls asks two questions of every autostart entry: who could create it, and with what rights does it run.
What the Sensor Saw, and Why It Could
Telemetry is not preventionEvery result above came from Defender for Endpoint's sensor, and it is worth asking where it got each record. Process starts come from the kernel's notifications. The PowerShell content and the antivirus detection come from the scanning interfaces Windows offers security products, and much of the rest arrives through Event Tracing for Windows, the operating system's own instrumentation, which Module 1 explains.
The practical consequence is that the sensor is only as complete as those sources are healthy: a sensor that cannot reach the cloud, or a device on which logging has been tampered with, records less, and the gaps do not announce themselves. Here is everything the sensor reported about the attack itself in the device events, besides the LSASS access and the task:
DeviceEvents
| where DeviceName == 'NE-THOMPSON-LT'
| where Timestamp between (datetime(2026-03-10 10:30) .. datetime(2026-03-10 10:55))
| where ActionType in ('PowerShellCommand', 'AntivirusDetection',
'AsrOfficeChildProcessAudited', 'AsrLsassCredentialTheftAudited')
| project Time = format_datetime(Timestamp, 'HH:mm:ss'), ActionType, FileName
| order by Time asc
In time order, the sensor reported five such records in the 25 minutes of the attack:
Time ActionType FileName
-------- ------------------------------ --------
10:30:47 PowerShellCommand
10:30:47 AsrOfficeChildProcessAudited
10:31:02 PowerShellCommand
10:35:00 AntivirusDetection u.ps1
10:36:52 AsrLsassCredentialTheftAudited
Two PowerShell commands, both Invoke-WebRequest: the download of the second-stage script. Two ASR audit records, Word starting PowerShell and the LSASS access: the rules saw both and blocked neither, because neither was set to block. And one antivirus detection, at 10:35, of the downloaded script u.ps1 as Trojan:Script/Downloader.A, with WasRemediated false: the engine identified the script after it had started and did not stop it.
That is the pattern this course is built against. The sensor recorded every step, so a detection analyst could reconstruct the intrusion afterwards.
The preventive controls that would have stopped it at the first or third step were present on the device and configured to watch rather than act. An estate can have every Defender component licensed and deployed and still be protected by none of them, and the difference is configuration.
The detection also says something about timing. The script was identified at 10:35, five minutes after the macro started it and two minutes after the reconnaissance began. A detection that arrives after the code has run is evidence; it is not protection.
Module 5 is about the antivirus settings that move a verdict earlier, before a script gets to run, and about reading whether a detection was remediated or only reported, which is the column that made the difference on this laptop.
Not Only Windows
Linux and macOS in the same estateThe intrusion on NE-THOMPSON-LT is a Windows intrusion, but the estate is not only Windows. The latest record for each device in the inventory gives the mix:
DeviceInfo
| summarize arg_max(Timestamp, *) by DeviceId
| summarize Devices = count() by OSPlatform
| order by Devices desc
Grouped by platform, the latest record for each device gives this:
OSPlatform Devices
----------------- -------
Windows11 17
WindowsServer2022 2
WindowsServer2019 1
macOS 1
Linux 1
22 device records, most of them Windows 11 laptops, with three Windows servers, one Linux server and one Mac. The ideas above carry over, and the structures do not. Linux has no LSASS; credentials live in files such as /etc/shadow, in the memory of the processes that use them and in agents such as ssh-agent.
Persistence on Linux means cron, systemd units and shell start-up files rather than scheduled tasks and Run keys, and macOS has its own launch agents and its own security architecture.
Even the idea of an administrator token differs: Linux grants root through sudo and file permissions rather than through an integrity level, so the question this lesson asked of the High-integrity rundll32.exe, which step needed more than the user's rights, is asked on Linux of a process's user ID and of the sudo rules that let it change.
The sensor on each platform also gets its telemetry differently. Module 1 covers the Linux kernel and eBPF, the mechanism much modern Linux security tooling uses to observe a running kernel, Linux authentication and the privilege model, and the macOS security architecture, so that when Module 8 configures protection for servers, Linux and macOS, the reader knows what each control can and cannot see on each platform.
For this lesson the point is narrower. An engineer who reads only the Windows view of an estate reads most of its devices and misses the ones that are often the most exposed: the Linux web server here is the one device in the inventory marked as facing the internet.
Defender records that as a column of the device itself, IsInternetFacing in the device inventory, so it can be queried like any other property and watched for change, and an engineer planning where to start hardening can begin with the devices an attacker can reach without any email at all.
From Internals to Controls
What Module 1 builds on itThe intrusion maps onto the course as a sequence of decisions. Each step used an operating-system structure, and each structure has a control that could have refused the step, configured in a later module:
Each step of the intrusion is a structure Module 1 explains and a control a later module configures.
Module 1 builds the internals that make each of those controls make sense. The figure is also the shape of this module: lessons 0.2 to 0.8 take one control family each, 0.9 fits them together, and 0.10 reads one intrusion against all of them.
It starts with the Windows process model and LSASS, the registry and Event Tracing for Windows, then Linux and macOS, and ends with what attackers actually target and three assessments, two of which made the estate worse by misreading the internals.
Each of those lessons is written so that a later module can lean on it. The process model is what ASR rules are expressed in. LSASS and credential storage are what Credential Guard and the LSASS rule protect. The registry and Event Tracing for Windows are where tampering shows and what the sensor reads. The Linux and macOS lessons are what Module 8's cross-platform protection assumes you already know.
What Module 1 builds
Module 1The habits to carry into it are the ones this lesson used. Read the process tree before the names. Read the integrity level next to it, because the step that needed an administrator token is where the attacker's real goal shows.
Know what normally lives in an autostart location before judging what is new there. And never read a recorded event as a prevented one: everything above was recorded, and almost nothing was stopped.
The rest of this module follows the same intrusion's estate through the course's other modules: whether the sensor is present everywhere, whether configuration holds, what ASR does in audit and in block, whether antivirus is actually working, what device and application control add, what EDR does beyond the defaults, how servers, Linux and macOS differ, how the controls fit together, and finally the whole intrusion read against every control at once.
Practice
Read the tree for what had to be stopped prepared evidenceThe prepared evidence below is the process tree of the intrusion, eleven processes from Word opening the document to the archiver. Find the first step a preventive control could have refused, the step that needed an administrator token, and what it was for. Each answer comes with its reasoning, so check it against the rows rather than only the choice.
The tree is the same one this lesson read; the questions ask you to reach the conclusions from the rows alone, without the prose beside them.
Try each question before opening its answer, and say to yourself which column decided it. The first question turns on the Parent column, the second on Integrity, and the third on knowing what a process with those rights was likely to want on a workstation.
Those three columns are the ones to read first in any process tree this course shows you. If you get one wrong, go back to the section that read that column and run its query again with the time window widened: the answer is in the data, not in the explanation.
Then run the queries on this page and change them. Widen the time window on the first one to the whole day and see how much ordinary activity surrounds the intrusion, then replace NE-THOMPSON-LT with NE-WILLIAMS-LT, the laptop the attacker reached with wmic at 10:42, and see what that device recorded.
An endpoint intrusion is a sequence of operating-system structures: a process tree, a credential store, an autostart location. The sensor records each one, and recording is not stopping. Read the tree before the names and the rights next to it, know the normal contents of an autostart location before judging a change, and remember that the estate has Linux and macOS devices whose structures differ.
The next lesson asks whether the sensor that recorded all of this is actually present and healthy on every device, because every record above depended on it, and a device without it would have shown none of this intrusion at all.