Agent Foskett Academy • KQL Academy • Module 12 • Lesson 148 • Endpoint Investigation

Lesson 148 — LSASS Was Accessed by an Unexpected Process

Lesson 147 uncovered a second persistence mechanism in the Windows Registry. Now the investigation moves into credential access.

Microsoft Defender surfaces evidence involving LSASS on WS-FIN-042 and a process already connected to the suspicious endpoint chain. In this lesson we reconstruct the surrounding process activity, inspect Defender alert evidence and determine what the telemetry genuinely supports.

LSASS is sensitive. But “LSASS appeared in the evidence” is not the same as “credentials were stolen.” Correlation still matters.
Agent Foskett KQL Academy LSASS credential access investigation
Your case file

After suspicious execution, network activity and two persistence clues, Defender surfaces LSASS-related evidence involving an unexpected process.

✓ Reconstruct activity around the LSASS evidence
✓ Examine Defender alert evidence
✓ Follow the unexpected process
✓ Test whether credential access fits the timeline

Case briefing

CASE FILE Device: WS-FIN-042 01:22:19 — suspicious execution ↓ 01:22:24 — external connection ↓ 01:24:03 — scheduled task created ↓ 01:25:11 — Registry Run value appears ↓ 01:27:00 — Defender evidence involves LSASS Unexpected process: rundll32.exe ↓ THE QUESTION Does the evidence support credential access, and how does it connect to the existing attack chain?

Investigation objective

Use process and alert evidence in Microsoft Defender XDR to investigate suspicious activity involving LSASS, connect the unexpected process to the existing endpoint timeline and determine what the telemetry does — and does not — prove about credential access.

Investigator's rule

Do not turn a suspicious clue into a stronger claim than the telemetry supports. LSASS-related evidence deserves immediate attention, but successful credential theft should only be concluded when the available evidence establishes it.

Stage 1 — reconstruct process activity around the LSASS event

Begin with the known device and alert time. Preserve command-line and parent-process context so the LSASS clue can be placed into the endpoint timeline.

01-reconstruct-process-activity-around-lsass.kql
1234567891011
let TargetDevice = "WS-FIN-042";
let TargetTime = datetime(2026-08-18 01:27:00);
DeviceProcessEvents
| where DeviceName =~ TargetDevice
| where Timestamp between (TargetTime - 10m .. TargetTime + 10m)
| where FileName in~ ("lsass.exe", "rundll32.exe", "powershell.exe", "cmd.exe")
    or ProcessCommandLine contains "lsass"
| project Timestamp, AccountName, FileName, ProcessCommandLine,
          ProcessId, InitiatingProcessFileName,
          InitiatingProcessCommandLine, InitiatingProcessId
| order by Timestamp asc

Why start with the timeline?

The event becomes more meaningful when it appears minutes after suspicious execution and persistence. A narrow time window helps determine whether it belongs to the same incident sequence.

Process name is not enough

rundll32.exe and other Windows binaries have legitimate uses. Preserve the command line, parent process, account and surrounding behaviour before deciding why the process matters.

Stage 2 — examine Defender alert evidence

Process-creation telemetry does not describe every type of process interaction. If Defender has generated alert evidence, inspect AlertEvidence for the entities and artefacts associated with the detection.

02-examine-defender-alert-evidence.kql
123456789
let TargetDevice = "WS-FIN-042";
let TargetTime = datetime(2026-08-18 01:27:00);
AlertEvidence
| where Timestamp between (TargetTime - 15m .. TargetTime + 15m)
| where DeviceName =~ TargetDevice
| project Timestamp, EntityType, EvidenceRole, DeviceName,
          AccountName, FileName, ProcessCommandLine,
          SHA1, RemoteIP, AdditionalFields
| order by Timestamp asc

Why use alert evidence?

Advanced hunting tables answer different questions. DeviceProcessEvents is excellent for process creation and ancestry; alert evidence can provide additional context surfaced by Defender detections.

Keep detection and telemetry separate

An alert is an important security signal, but it remains part of the evidence set. Validate it against process, file, network, identity and timeline data rather than treating an alert title as the final finding.

Stage 3 — follow the unexpected process

Pivot on the process implicated in the LSASS-related evidence. Examine its executions and children around the incident window to determine how it entered the process tree and what it did next.

03-follow-unexpected-process.kql
123456789101112
let TargetDevice = "WS-FIN-042";
let TargetProcess = "rundll32.exe";
let TargetTime = datetime(2026-08-18 01:27:00);
DeviceProcessEvents
| where DeviceName =~ TargetDevice
| where Timestamp between (TargetTime - 15m .. TargetTime + 15m)
| where FileName =~ TargetProcess
    or InitiatingProcessFileName =~ TargetProcess
| project Timestamp, AccountName, FileName, ProcessCommandLine,
          ProcessId, InitiatingProcessFileName,
          InitiatingProcessCommandLine, InitiatingProcessId, SHA1
| order by Timestamp asc

Parentage changes meaning

A Windows utility launched by a normal system component may be routine. The same utility launched from the suspicious execution chain with unusual arguments tells a different story.

Preserve the hash

Where available, retain the process hash as another pivot. It can help distinguish expected binaries from unusual copies and support wider hunting.

Stage 4 — establish process prevalence

Before calling the process abnormal, look at how it normally appears across the estate. Compare devices, accounts and command lines rather than relying on the executable name alone.

04-establish-process-prevalence.kql
12345678910111213
let TargetProcess = "rundll32.exe";
DeviceProcessEvents
| where Timestamp > ago(7d)
| where FileName =~ TargetProcess
| summarize FirstSeen=min(Timestamp),
            LastSeen=max(Timestamp),
            Executions=count(),
            Devices=dcount(DeviceId),
            DeviceNames=make_set(DeviceName, 50),
            Accounts=make_set(AccountName, 50),
            Commands=make_set(ProcessCommandLine, 50)
          by FileName
| order by FirstSeen asc

Normal binary, abnormal behaviour

A common Windows executable can still be used suspiciously. Prevalence provides baseline context; command line and process ancestry explain the behaviour.

Rare does not equal malicious

Low prevalence is a reason to investigate further, not proof of compromise. Keep testing the hypothesis against the rest of the evidence.

Stage 5 — place credential access into the attack timeline

Finish by rebuilding the relevant process sequence around the credential-access clue and determine whether it logically follows the execution and persistence activity already established.

05-build-credential-access-timeline.kql
1234567891011
let TargetDevice = "WS-FIN-042";
let StartTime = datetime(2026-08-18 01:22:00);
let EndTime = datetime(2026-08-18 01:32:00);
DeviceProcessEvents
| where DeviceName =~ TargetDevice
| where Timestamp between (StartTime .. EndTime)
| where FileName in~ ("powershell.exe", "cmd.exe", "rundll32.exe", "lsass.exe")
    or ProcessCommandLine contains "lsass"
| project Timestamp, AccountName, InitiatingProcessFileName,
          FileName, ProcessCommandLine, ProcessId, InitiatingProcessId
| order by Timestamp asc

What can we say?

If Defender evidence identifies suspicious LSASS-related activity and the implicated process belongs to the existing attack chain, we can document strong evidence consistent with attempted or suspected credential access.

What should we avoid saying?

Do not automatically claim that passwords were dumped, credentials were successfully stolen or accounts were compromised unless additional evidence establishes those outcomes.

Agent Foskett's credential-access timeline

01:22:19 suspicious execution ↓ 01:22:24 external connection ↓ 01:24:03 scheduled-task persistence ↓ 01:25:11 Registry Run persistence ↓ 01:27:00 Defender LSASS-related evidence ↓ UNEXPECTED PROCESS rundll32.exe ↓ PROCESS CORRELATION connects back to suspicious ancestry ↓ ASSESSMENT Credential-access behaviour suspected — outcome still requires evidence
The strongest investigator is not the one who makes the biggest claim. It is the one who makes the claim the evidence can defend.

Your evidence board

EvidenceWhat it supportsWeight
Defender evidence involving LSASSProvides a security signal consistent with credential-access investigation.Strong signal
Unexpected process belongs to suspicious ancestryConnects the LSASS clue to the existing endpoint incident.Strong
Event follows execution and persistencePlaces credential-access behaviour logically inside the attack timeline.Strong context
Unusual command line or process contextCan strengthen the hypothesis that the process use was abnormal.Strong when validated
Process is rare across the estateProvides prevalence context.Supporting only
LSASS mentioned without supporting contextDoes not by itself prove successful credential theft.Insufficient alone

Write the finding like an investigator

Example: Microsoft Defender XDR surfaced LSASS-related security evidence on WS-FIN-042 during the same incident window as the suspicious process execution, outbound network activity and persistence mechanisms identified earlier. The process associated with the evidence was investigated using process ancestry, command-line, account and timestamp context and aligned with the existing suspicious execution chain. This supports a credential-access hypothesis; however, the available evidence should not be overstated as proof that credentials were successfully extracted or subsequently used. Further investigation should correlate any resulting authentication and lateral-movement activity.

Lesson 148 key takeaways

  • LSASS-related evidence deserves high-priority investigation because of its role in Windows authentication.
  • DeviceProcessEvents helps reconstruct process creation, command lines and ancestry around the event.
  • AlertEvidence can provide additional entity context from Defender detections.
  • Different hunting tables describe different parts of the incident.
  • A legitimate Windows process name does not guarantee legitimate behaviour.
  • Process ancestry and command-line context can be more useful than filename alone.
  • Prevalence is supporting context, not a maliciousness verdict.
  • Correlate credential-access clues with the wider execution and persistence timeline.
  • Distinguish suspected credential access from confirmed credential theft.
  • Write conclusions at exactly the strength supported by the evidence.

Module 12 — the attack chain continues

Lesson 147 uncovered registry persistence. Lesson 148 now identifies behaviour consistent with credential access. Next we investigate whether the account authenticated to another endpoint only minutes later.

Next: Lesson 149 — The Account Logged On to Another Device Minutes Later.

Continue your KQL investigation training

Module 12 follows endpoint evidence from suspicious execution through process relationships, files, network activity, persistence, credential access and spread.

Related Agent Foskett Investigations

Continue with endpoint investigations where process, alert and identity evidence must be correlated before reaching a conclusion.

🔎 KQL Academy — Module 12: Advanced Endpoint Investigation

Following the attack chain from the first suspicious process to a defensible endpoint compromise assessment.

Investigate suspicious LSASS activity with KQL

Lesson 148 of the Agent Foskett KQL Academy uses Microsoft Defender XDR process and alert evidence to investigate suspicious activity involving LSASS and possible credential access.

Correlate LSASS evidence in Microsoft Defender XDR

Learn how to reconstruct the surrounding process timeline, inspect Defender alert evidence, follow an unexpected process and write a credential-access finding without overstating what the telemetry proves.