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

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

Lesson 148 identified evidence consistent with possible credential access on WS-FIN-042. Four minutes later, the same user account appears in logon telemetry on another endpoint.

That timing immediately raises a lateral-movement question. In this lesson we use DeviceLogonEvents to follow the account across devices, preserve the source and logon context, establish the user's normal device pattern and determine whether the second logon belongs to the same attack chain.

A second-device logon is not automatically lateral movement. The source, logon type, timing and preceding credential-access evidence give it meaning.
Agent Foskett KQL Academy lateral movement investigation
Your case file

Minutes after LSASS-related evidence on WS-FIN-042, the same account records a successful logon to WS-HR-017.

✓ Follow one account across endpoints
✓ Inspect logon type and source context
✓ Establish the user's normal device pattern
✓ Test the lateral-movement hypothesis

Case briefing

CASE FILE Account: alex.wilson Original device: WS-FIN-042 01:27:00 — LSASS-related evidence ↓ 01:31:12 — successful logon Destination: WS-HR-017 Account: alex.wilson ↓ THE QUESTION Was this normal account activity, or did credentials from the compromised endpoint move the attacker to another device?

Investigation objective

Use DeviceLogonEvents to follow the account from the compromised endpoint to another device, identify the logon type and available source context, compare the event with the user's normal behaviour and determine whether the evidence supports lateral movement.

Investigator's rule

Sequence creates suspicion; context creates the finding. A logon minutes after credential-access activity deserves attention, but legitimate administrators, remote access tools and normal user behaviour can also produce multi-device authentication.

Stage 1 — follow the account through logon telemetry

Begin with the account and narrow incident window. Preserve destination device, logon type, result, remote source and initiating-process fields where they are available.

01-follow-account-logons.kql
12345678910111213141516
let TargetAccount = "alex.wilson";
let TargetTime = datetime(2026-08-18 01:31:00);
DeviceLogonEvents
| where Timestamp between (TargetTime - 10m .. TargetTime + 15m)
| where AccountName =~ TargetAccount
| project Timestamp,
          DeviceName,
          AccountName,
          AccountDomain,
          LogonType,
          ActionType,
          RemoteDeviceName,
          RemoteIP,
          InitiatingProcessFileName,
          InitiatingProcessCommandLine
| order by Timestamp asc

Why DeviceLogonEvents?

DeviceLogonEvents provides endpoint authentication telemetry that can reveal when an account is used on another Defender-onboarded device during an incident.

Keep LogonType

Interactive, network, remote-interactive and other logon types represent different behaviours. The type can materially change how the second-device event should be interpreted.

Stage 2 — isolate logons away from the original device

Now remove WS-FIN-042 from the result set and ask where else the account appeared during the surrounding period.

02-find-logons-to-other-devices.kql
123456789101112131415
let TargetAccount = "alex.wilson";
let OriginalDevice = "WS-FIN-042";
let TargetTime = datetime(2026-08-18 01:31:00);
DeviceLogonEvents
| where Timestamp between (TargetTime - 15m .. TargetTime + 30m)
| where AccountName =~ TargetAccount
| where DeviceName !~ OriginalDevice
| project Timestamp,
          DeviceName,
          LogonType,
          ActionType,
          RemoteDeviceName,
          RemoteIP,
          InitiatingProcessFileName
| order by Timestamp asc

Destination versus source

DeviceName identifies the endpoint recording the logon event. Fields such as RemoteDeviceName and RemoteIP, when populated, can help explain where the authentication originated.

Missing source data is still a limitation

Do not invent a source when telemetry does not provide one. Record what is known, state what is missing and use other tables or evidence to continue the investigation.

Stage 3 — investigate the destination device

Pivot to WS-HR-017 and examine the account's logon event in detail. The aim is to preserve enough context to decide whether the authentication resembles normal access or attacker movement.

03-investigate-destination-logon.kql
1234567891011121314151617
let TargetDevice = "WS-HR-017";
let TargetAccount = "alex.wilson";
let TargetTime = datetime(2026-08-18 01:31:00);
DeviceLogonEvents
| where DeviceName =~ TargetDevice
| where AccountName =~ TargetAccount
| where Timestamp between (TargetTime - 10m .. TargetTime + 20m)
| project Timestamp,
          DeviceName,
          AccountName,
          LogonType,
          ActionType,
          RemoteDeviceName,
          RemoteIP,
          InitiatingProcessFileName,
          InitiatingProcessCommandLine
| order by Timestamp asc

Ask whether the account belongs there

Does alex.wilson normally use WS-HR-017? A technically successful logon can still be suspicious if the destination falls outside the user's established working pattern.

Successful does not mean legitimate

A valid credential can produce a completely successful authentication. The investigation must determine whether the person using that credential was the legitimate account owner.

Stage 4 — establish the account's normal device pattern

Expand to seven days and summarise the devices, logon types and remote IPs associated with the account. This gives the second-device event behavioural context.

04-establish-account-device-baseline.kql
12345678910111213
let TargetAccount = "alex.wilson";
DeviceLogonEvents
| where Timestamp > ago(7d)
| where AccountName =~ TargetAccount
| summarize FirstSeen=min(Timestamp),
            LastSeen=max(Timestamp),
            Logons=count(),
            Devices=dcount(DeviceId),
            DeviceNames=make_set(DeviceName, 50),
            LogonTypes=make_set(LogonType, 20),
            RemoteIPs=make_set(RemoteIP, 50)
          by AccountName
| order by FirstSeen asc

New device is a clue

If WS-HR-017 has never appeared in the user's recent endpoint logon history, that rarity strengthens the need for investigation — but it remains supporting evidence rather than proof.

Known device can still be abused

An attacker may move to a device the user legitimately accesses. Baselines help, but they cannot replace examination of source, timing, process activity and the wider incident.

Stage 5 — build the account movement timeline

Place the account's endpoint logons in chronological order around the incident. The temporal relationship to the earlier LSASS-related evidence is now one of the central clues.

05-build-account-movement-timeline.kql
123456789101112131415
let TargetAccount = "alex.wilson";
let StartTime = datetime(2026-08-18 01:22:00);
let EndTime = datetime(2026-08-18 01:40:00);
DeviceLogonEvents
| where Timestamp between (StartTime .. EndTime)
| where AccountName =~ TargetAccount
| project Timestamp,
          DeviceName,
          AccountName,
          LogonType,
          ActionType,
          RemoteDeviceName,
          RemoteIP,
          InitiatingProcessFileName
| order by Timestamp asc

Correlation changes the picture

A single logon to WS-HR-017 might be routine. A new-device logon four minutes after suspected credential access on a compromised endpoint deserves a very different level of scrutiny.

Look forward as well as backward

If lateral movement is suspected, WS-HR-017 becomes a new investigation starting point. Examine its process, file, network and authentication telemetry after the logon.

Agent Foskett's lateral-movement timeline

01:22:19 suspicious execution on WS-FIN-042 ↓ 01:24–01:25 persistence established ↓ 01:27:00 LSASS-related evidence ↓ 01:31:12 alex.wilson logs on to WS-HR-017 ↓ DEVICE BASELINE WS-HR-017 not seen in recent account history ↓ SOURCE + LOGON TYPE reviewed in DeviceLogonEvents ↓ NEXT PIVOT Investigate activity on WS-HR-017 ↓ ASSESSMENT Possible lateral movement
The clue was not simply that the account logged on. It was where, when and what had happened four minutes earlier.

Your evidence board

EvidenceWhat it supportsWeight
Second-device logon minutes after LSASS-related evidenceCreates a strong temporal link to possible credential access.Strong context
Destination device is unusual for the accountSupports abnormal account movement.Strong when baseline is reliable
Remote source aligns with compromised endpointCan directly strengthen the lateral-movement hypothesis.Very strong when available
Unexpected logon typeMay indicate remote or network-based access inconsistent with normal use.Strong when validated
Successful authenticationConfirms the credential was accepted, not that the user was legitimate.Context only
Second-device logon aloneDoes not prove lateral movement.Insufficient alone

Write the finding like an investigator

Example: Microsoft Defender XDR endpoint logon telemetry recorded a successful authentication by alex.wilson to WS-HR-017 approximately four minutes after LSASS-related security evidence was observed on the compromised device WS-FIN-042. The destination device, logon type and available remote-source context were reviewed and compared with the account's recent endpoint authentication history. WS-HR-017 was not present in the recent device baseline, increasing the significance of the event. In the context of the preceding execution, persistence and credential-access evidence, the authentication supports a possible lateral-movement hypothesis. Activity on WS-HR-017 should be investigated as a new endpoint timeline before concluding that lateral movement was successful.

Lesson 149 key takeaways

  • DeviceLogonEvents can help follow an account across Defender-onboarded endpoints.
  • Preserve destination device, LogonType, result and available remote-source context.
  • A successful logon proves authentication succeeded, not that the legitimate user performed it.
  • Compare the destination with the account's recent device baseline.
  • A new device is supporting evidence, not proof of lateral movement.
  • Known devices can also be abused by an attacker.
  • Do not invent source information when telemetry fields are empty.
  • Timing becomes especially important after suspected credential-access activity.
  • A suspicious second-device logon turns the destination endpoint into a new investigation pivot.
  • Correlate authentication with process, file, network and identity evidence before reaching a final conclusion.

Module 12 — one investigation remains

Lesson 148 identified possible credential-access behaviour. Lesson 149 now follows the account onto another endpoint and raises the possibility of lateral movement. In the final lesson of Module 12, we bring every stage together and decide what the evidence can defend.

Next: Lesson 150 — Building the Complete Endpoint Compromise Timeline.

Continue your KQL investigation training

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

Related Agent Foskett Investigations

Continue with investigations where endpoint and authentication evidence reveal how an attack moved beyond its original foothold.

🔎 KQL Academy — Module 12: Advanced Endpoint Investigation

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

Investigate lateral movement with KQL

Lesson 149 of the Agent Foskett KQL Academy uses Microsoft Defender XDR DeviceLogonEvents to investigate an account appearing on another endpoint minutes after suspected credential access.

Follow account logons across devices in Microsoft Defender XDR

Learn how to preserve logon type and source context, establish a user's normal endpoint pattern, pivot to a destination device and assess whether the authentication sequence supports lateral movement.