In this section

Endpoint Security Exercise: One Ransomware Intrusion Read Against Every Defender for Endpoint Control

Module 0

Introduction

This module has read one control family per lesson. This lesson reads one intrusion, from the email that started it to the files it encrypted, and places every control on the estate at every step. At each step there are three possible answers for each control: it stopped the step, it saw the step, or it was missing.

The intrusion is the ransomware on NE-BENNETT-LT on 12 March, which lessons 0.5 and 0.7 met from the middle. Here it is read from the start, in seven steps over about thirty-five minutes.

1. 10:38 to 10:54email delivered, macro document saved and opened2. 10:56 to 11:02Word starts PowerShell, ransomware starts3. 11:03 to 11:05shadow copies, backups and recovery removed4. 11:06 to 11:13lateral connections, upload, files encrypted

Seven steps in about thirty-five minutes on NE-BENNETT-LT, 12 March.

Work through the steps in order. Each section shows the records for one or two steps and places the controls; the practice at the end asks you to do the same placing yourself and to choose the one change that would have ended it earliest.

01

The Message and the Macro

Steps one and two: delivery and opening

The intrusion begins outside the endpoint. The email, the document it carried, and the moment Word opened it:

union
    (EmailEvents
    | where RecipientEmailAddress == 'l.bennett@ne.com'
        and SenderFromAddress endswith 'northgate-finance-share.com'
    | project Timestamp, Source = 'email',
        Detail = strcat(DeliveryAction, ' to ', DeliveryLocation, ': ', Subject)),
    (DeviceFileEvents
    | where DeviceName == 'NE-BENNETT-LT' and FileName endswith '.docm'
    | project Timestamp, Source = 'file',
        Detail = strcat(FileName, ' saved by ', InitiatingProcessFileName)),
    (DeviceProcessEvents
    | where DeviceName == 'NE-BENNETT-LT' and ProcessCommandLine has '.docm'
    | project Timestamp, Source = 'process',
        Detail = strcat(FileName, ' opened it, from ', InitiatingProcessFileName))
| project Time = format_datetime(Timestamp, 'HH:mm:ss'), Source, Detail
| order by Time asc

The three records, from delivery to opening, in time order:

Time      Source   Detail
--------  -------  --------------------------------------------------
10:38:07  email    Delivered to Inbox: Remittance advice: Q1 invoices
10:53:40  file     Invoice_Q1_Remittance.docm saved by OUTLOOK.EXE
10:54:18  process  WINWORD.EXE opened it, from OUTLOOK.EXE

At 10:38 a message from a look-alike finance domain was delivered to Bennett's inbox, with Invoice_Q1_Remittance.docm attached. At 10:53 Outlook saved the attachment to Downloads, and at 10:54 Word opened it. A .docm file is a Word document that carries macros, and an invoice has no reason to.

Two controls apply at these steps. Email filtering, which is not an endpoint control and not this course's subject, delivered the message to the inbox. On the endpoint, application control could have refused nothing here, because Word is a permitted application doing what Word does. The first two steps are where the endpoint has no decision to make; the document is just a file until something in it runs.

That is worth stating plainly because it is often missed. An endpoint architecture cannot stop an email arriving or a user opening an attachment. What it decides is what the attachment is allowed to do next, and on this estate that decision falls at the next step.

The same domain appears once more in the email records: a message to Thompson on 10 March, the day of lesson 0.1's intrusion. Two intrusions began the same way, two days apart, and nothing between them changed what the second one met at the endpoint.

Read the file record closely, too. The attachment was saved by Outlook into Downloads before Word opened it, which means the user chose to open it. That is normal behavior for an invoice, and no amount of training makes every user suspicious of every invoice.

The architecture has to assume the document will be opened and decide what happens next. Office's own macro settings are one such decision, made outside Defender and outside this course.

02

Word Starts PowerShell

Step three: the first decision the endpoint gets

The macro ran. What Word started, with the ASR record for the same moment:

union
    (DeviceProcessEvents
    | where DeviceName == 'NE-BENNETT-LT'
        and InitiatingProcessFileName =~ 'WINWORD.EXE'
    | project Timestamp, Source = 'process',
        Detail = strcat(FileName, ' started by ', InitiatingProcessFileName)),
    (DeviceEvents
    | where DeviceName == 'NE-BENNETT-LT' and ActionType startswith 'Asr'
    | extend F = parse_json(AdditionalFields)
    | project Timestamp, Source = 'ASR',
        Detail = strcat(ActionType, ', target ', tostring(F.Target)))
| where Timestamp between (datetime(2026-03-12 10:30) .. datetime(2026-03-12 11:20))
| project Time = format_datetime(Timestamp, 'HH:mm:ss'), Source, Detail
| order by Time asc

The process start and the ASR record, side by side:

Time      Source   Detail
--------  -------  ---------------------------------------------------
10:56:15  process  powershell.exe started by WINWORD.EXE
10:56:15  ASR      AsrOfficeChildProcessAudited, target powershell.exe

At 10:56:15 Word started PowerShell with a hidden window, no profile and an encoded command, and in the same second the ASR rule for Office applications starting child processes recorded it. The record's ActionType ends in Audited. The rule saw exactly the behavior it exists to refuse, named the target as powershell.exe, and allowed it.

This is the step where the intrusion could have ended. Lesson 0.4 found the same rule in block mode on the pilot laptops since 9 March, where it refused the quoting add-in eight times. NE-BENNETT-LT is not one of the four. On a pilot laptop, this step produces a Blocked record and the intrusion stops with a Word document that could not start anything.

Lesson 0.4 also showed the cost the pilot paid: the rule broke a line-of-business add-in, and the remedy for that is an exclusion written from audit data, not a rule left in audit everywhere else. Three days after the pilot started, a laptop outside it met the attack the rule was written for.

So the verdict for this step is the most important in the lesson. One control saw it. The same control, in the mode already proven on this estate, would have stopped it. Every step after this one exists only because of that difference.

The encoded command is worth noticing for what it says about the attacker's expectations.

A hidden window and a base64-encoded command are chosen to avoid a user seeing anything and to avoid simple string matching on the command line. They are not chosen to avoid the ASR rule, because the rule does not read the command at all: it refuses the parent-child relationship itself. That is why rules like this one hold up against variations that defeat signatures.

03

The Payload Runs

Steps four and five: ransomware and recovery removed

The encoded PowerShell fetched and started the ransomware. Its start, the antivirus verdict, what it ran next, and the EDR alert:

union
    (DeviceProcessEvents
    | where DeviceName == 'NE-BENNETT-LT'
        and (FileName =~ 'notlocker.exe'
            or InitiatingProcessParentFileName =~ 'notlocker.exe')
    | project Timestamp, Source = 'process', Detail = FileName),
    (DeviceEvents
    | where DeviceName == 'NE-BENNETT-LT' and ActionType == 'AntivirusDetection'
    | project Timestamp, Source = 'antivirus', Detail = 'detected, not remediated'),
    (AlertEvidence
    | where DeviceName == 'NE-BENNETT-LT' and EntityType == 'Machine'
        and Title startswith 'Ransomware'
    | project Timestamp, Source = 'EDR alert', Detail = Title)
| where Timestamp between (datetime(2026-03-12 10:30) .. datetime(2026-03-12 11:20))
| project Time = format_datetime(Timestamp, 'HH:mm:ss'), Source, Detail
| order by Time asc

The payload and everything it started, with the verdict and the alert:

Time      Source     Detail
--------  ---------  ----------------------------
11:02:14  process    notlocker.exe
11:02:20  antivirus  detected, not remediated
11:03:47  process    vssadmin.exe
11:04:00  EDR alert  Ransomware activity detected
11:04:08  process    wbadmin.exe
11:04:31  process    bcdedit.exe
11:04:52  process    bcdedit.exe
11:05:13  process    net.exe

notlocker.exe started at 11:02:14 from the user's Temp folder. Six seconds later the antivirus engine identified it and left it running, as lesson 0.5 found. Within three minutes it had deleted the shadow copies, deleted the backup catalog, turned off Windows recovery at boot and stopped the Volume Shadow Copy service, each through cmd.exe. The EDR alert for ransomware activity came at 11:04, in the middle of that sequence.

Place the controls. Application control was missing; an allow-list would have refused an unknown executable in Temp before it ran. Antivirus saw it and, configured to report, did not stop it; configured to remove, it would have ended the intrusion here, six seconds in. The EDR sensor saw the recovery being removed and alerted. No automated response acted on the alert.

The recovery commands deserve a moment, because they are the step that turns an incident into a disaster. Shadow copies and the backup catalog are how a laptop's files are restored without paying.

Removing them is the attacker making sure the encryption that follows cannot be undone locally. They are ordinary system tools used in an unusual order, which is exactly what an EDR behavior alert is for, and the sensor caught them. The gap was entirely in what happened after.

Notice the order of the first two records. The process started, then the verdict arrived six seconds later. Every control that acts on a file's verdict acts after the file has started; only controls that refuse before execution, application control and the ASR rules, act before. That is the reason this module kept returning to prevention: a verdict, however fast, is a verdict on something already running.

The parent of the payload matters as well. notlocker.exe was started by PowerShell, which was started by Word. An ASR rule refusing the first link would have meant there was no PowerShell to start the payload, so the antivirus verdict, the recovery commands and everything after would never have occurred. Controls further up a process chain remove more of the chain.

04

Across and Out

Step six: lateral movement and the upload

With recovery gone, the ransomware reached outward. Its network connections after 11:05, with the alerts that followed:

union
    (DeviceNetworkEvents
    | where DeviceName == 'NE-BENNETT-LT'
        and InitiatingProcessFileName =~ 'notlocker.exe'
        and Timestamp > datetime(2026-03-12 11:05)
    | project Timestamp, Source = 'network',
        Detail = strcat(RemoteIP, ':', RemotePort, ' ', RemoteUrl)),
    (AlertEvidence
    | where DeviceName == 'NE-BENNETT-LT' and EntityType == 'Machine'
        and not(Title startswith 'Ransomware')
    | project Timestamp, Source = 'EDR alert', Detail = Title)
| where Timestamp between (datetime(2026-03-12 10:30) .. datetime(2026-03-12 11:20))
| project Time = format_datetime(Timestamp, 'HH:mm:ss'), Source, Detail
| order by Time asc

The connections and the alerts, in time order:

Time      Source     Detail
--------  ---------  ----------------------------------------------
11:06:20  network    10.0.1.130:445
11:06:25  EDR alert  Lateral movement using compromised credentials
11:07:20  network    10.0.1.45:445
11:10:00  network    194.168.227.156:443 194.168.227.156/upload
11:12:30  EDR alert  Mass file modification detected

At 11:06 and 11:07 notlocker.exe opened SMB connections to two internal hosts, and the lateral movement alert came at 11:06:25. At 11:10 it uploaded to an outside address, 194.168.227.156, the step that turns ransomware into extortion: files copied out before they are encrypted in place. The mass file modification alert followed at 11:12.

SMB on port 445 to internal hosts is how ransomware looks for shares and machines to spread to, and the alert's title says it used compromised credentials, Bennett's own. Two responses were missing here.

Isolation, which lesson 0.7 showed was never used, would have cut the laptop off at 11:04 and made both the lateral connections and the upload impossible. An indicator for the outside address would have refused the upload; the address appears in no indicator, and network protection, blocking on the estate's laptops from 11 March, had nothing to block it with.

This is also where the estate's response capacity mattered. The incident for this laptop, lesson 0.7 found, stayed New with no owner. Nobody was going to isolate the laptop by hand, so only a configured automatic response could have acted, and none was configured to.

The upload deserves its own weight. Encryption can sometimes be recovered from backups held elsewhere; data copied out cannot be called back. From 11:10 the incident is no longer only about Bennett's laptop. It is about whatever was in the upload, and the people whose payroll, contracts and customer records those were.

The records here do not name the two internal hosts the laptop reached for. Finding out what happened on them is an investigation question, and lesson 0.9's reconciliation of the hosts the inventory does not know is where it would start.

05

Files Encrypted

Step seven: the outcome

The last step is the one every earlier step was for. Every file record the ransomware produced:

DeviceFileEvents
| where DeviceName == 'NE-BENNETT-LT'
    and InitiatingProcessFileName =~ 'notlocker.exe'
| summarize Files = count(), FirstSeen = min(Timestamp), LastSeen = max(Timestamp)
    by ActionType
| project ActionType, Files,
    FirstSeen = format_datetime(FirstSeen, 'HH:mm:ss'),
    LastSeen = format_datetime(LastSeen, 'HH:mm:ss')

Grouped by action, with the first and last of each:

ActionType   Files  FirstSeen  LastSeen
-----------  -----  ---------  --------
FileCreated  2      11:13:00   11:13:01
FileRenamed  20     11:12:00   11:12:57

20 files in Bennett's Documents folder renamed with an .encrypted extension, three seconds apart, between 11:12:00 and 11:12:57, then ransom notes written to Documents and the Desktop. Budgets, payroll, contracts, customer data and a board deck, by their names.

One control exists specifically for this step: controlled folder access, which permits only trusted applications to change files in protected folders such as Documents. Module 4 covers it alongside the ASR rules.

On this estate it has produced no records anywhere, so either it is not enabled or it has never had occasion to act; on a laptop where an unknown process just rewrote 20 documents, the first is the likely answer. It is the third control in this intrusion that would have refused the step outright and was not there to do so.

The EDR sensor saw this step too, and alerted. By then the alert could only describe what had happened.

Controlled folder access has a reputation for breaking things, which is often why it is left off. It refuses changes from any application it does not trust, and some legitimate applications write to Documents without being on its list.

The method is the same as for the ASR rules: run it in audit, read the records, add the applications the business needs, then block. Lesson 0.4's discipline applies unchanged, and the estate already practiced it once.

The renames also show how fast this step is once it starts. Three seconds a file, twenty files in a minute, and a real user's Documents folder is usually far larger than this one.

By the time any person could have read the alert, the step would be over. This is the step where only a control that refuses in advance can help, and the only one designed for it was not there.

06

Every Control on One Page

What stopped it, what saw it, what was missing

Put the seven steps together and every control on the estate falls into one of four places:

Every control, at every step

Seen at every step, stopped at none

Stopped it

nothing, at any step

Would have stopped it

the ASR Office rule in block, as on the pilot laptops; antivirus set to remove

Saw it

ASR in audit, antivirus, three EDR alerts

Missing

application control, an indicator, isolation, controlled folder access, incident ownership

Nothing stopped this intrusion at any step. Three controls saw it: ASR in audit, the antivirus engine and the EDR sensor, between them producing a record at almost every stage.

Two controls running elsewhere on the estate in a stronger mode would have stopped it: the ASR rule in block, as on the pilot laptops, and antivirus remediation. And five were missing entirely: application control, an indicator, isolation, controlled folder access and anyone owning the incident.

That is the shape this module found again and again, now seen in one intrusion. The estate detects well. It is configured to watch rather than refuse, and it has no response that does not wait for a person. The fix is not a new product. It is the modes and the responses already available, set the way the evidence on this estate says they should be.

Read the steps again with that in mind, and the earliest refusal decides everything. The ASR rule at 10:56 would have ended it with nothing lost. Antivirus remediation at 11:02 would have ended it before recovery was removed. Isolation at 11:04 would have ended it before the upload. Controlled folder access at 11:12 would have saved the files. Each layer is a chance, and the estate took none of them.

That ordering is also the sequence of lesson 0.9 seen from the attacker's side. Prevention first, because every step it refuses removes all the steps after it; response next, because it shortens what prevention misses.

None of this needed a better detection. Every control that saw the intrusion saw it correctly and on time. The losses came entirely from modes and responses: audit where block was proven, report where remove was available, alert where isolation was possible.

That is the most hopeful finding in the module, because modes and responses are settings, and settings can be changed this week. For the ASR rules and network protection, the audit evidence for the change already exists on this estate, gathered by the pilots and the records this module read.

07

What the Course Builds On It

From this intrusion to the capstone

Every module of this course has a lesson in this intrusion, and the card below places them.

Where each module meets this intrusion

The course on one page

Module 2

coverage: the sensor that recorded every step

Modules 4 and 5

the ASR rule at step three, antivirus at step four, controlled folder access at step seven

Modules 6 and 7

application control at step four, indicators and isolation at step six

Modules 8 and 9

the hosts the lateral connections reached for, and this intrusion run again at the end

Module 2 is the coverage that makes everything else verifiable. Module 4 is the ASR rule that would have ended it at the third step, and controlled folder access at the seventh. Module 5 is the antivirus configuration that would have ended it at the fourth.

Module 6 is the application control that was missing, and the indicators. Module 7 is the isolation and the automation level. Module 8 is the servers and other platforms that lateral connections like these reach for.

Module 9's capstone runs this exercise at the scale of the whole estate: each phase takes one control family, builds the evidence for every device, closes the gaps in the order of lesson 0.9, and ends with this intrusion run again against the configured estate. The test of the architecture is whether the same seven steps now meet a refusal, and how early.

That test is deliberately concrete. An architecture document can claim anything; an intrusion replayed against the configured estate either stops at the third step or it does not. Module 9 holds its own output to that standard, and so should any estate review: name the intrusion, name the step where it now stops, and show the record that proves it.

The habits this module has built all appear in this one lesson. Read every record for the mode it was produced in. Line records up in time to see how long each step was allowed.

Treat a detection as the start of a question, not the end of one. Measure what each device can say before reading its silence. And place every control as stopped, saw or missing, because only the first of those protects anything.

Those habits are what an endpoint engineer brings to an estate on the first day, before any setting is changed. They are also the habits that keep an estate honest after the work is done, because every change this course recommends can be checked by running the same queries again and seeing whether the records changed.

Do

Practice

Place every control at every step
prepared evidence

The exercise below has two tabs: the seven steps of the intrusion, and the state of each control on this laptop as the earlier lessons found it.

Decide where a control already running on this estate could have stopped it, which controls saw it without stopping it, which have no records anywhere, and the one change that would have ended it earliest. Each answer comes with its reasoning, so check it against both tabs rather than only the choice.

Work through the steps tab first and write down, for each step, which control applies. Then use the controls tab to say what state that control was in. The answers follow from putting the two side by side. A control that applies to a step but sits in audit, or has no records at all, is placed by its state rather than by its potential.

The last question asks for one change, not a list. The point is to find the earliest step where an available control would have refused, because that is where every later step disappears, and the change that achieves it is usually smaller than the list of everything that went wrong.

Then run this lesson's queries for NE-THOMPSON-LT on 10 March, the intrusion from lesson 0.1, and build the same seven-step table. Note which step the ASR rule reached on that laptop, and whether its verdict was the same.

One intrusion, seven steps, about thirty-five minutes, and every control on the estate placed at each step. Nothing stopped it; three controls saw it; two would have stopped it in the mode already proven elsewhere on the estate; five were missing. The earliest refusal available was an ASR rule already in block on four laptops.

That is the end of Module 0. The modules that follow take each control in this lesson and build it properly, and Module 9 runs this intrusion again at the end to see where it stops.