The Login Came Through A Trusted Device
The sign-in looked legitimate.
Correct user. Correct MFA. Correct device. Conditional Access allowed it.
Everything matched policy.
The problem was...
the attacker was already inside the trusted device.
This Agent Foskett briefing looks at a modern Microsoft security problem: attackers do not always need to bypass identity controls if they can inherit trust from a device that the organisation already trusts.
The dashboard may show a successful login. The Conditional Access policy may show success. The device may appear compliant. But the real investigation begins after trust has been granted.
Briefing summary
A trusted device is not automatically a safe device. GEMXIT looks at how Entra ID sign-ins, Conditional Access, Microsoft Defender for Endpoint and KQL can reveal suspicious behaviour after a legitimate authentication event.
What happened
The problem with device trust assumptions
First hunt: successful sign-ins from trusted devices
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
SigninLogs | where TimeGenerated > ago(7d) | where ResultType == 0 | summarize LoginCount = count(), Apps = make_set(AppDisplayName), IPs = make_set(IPAddress), Locations = make_set(Location) by UserPrincipalName, DeviceDetail, bin(TimeGenerated, 1d) | where LoginCount > 20 | order by LoginCount desc
Second hunt: endpoint activity before or after the trusted login
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
DeviceProcessEvents | where Timestamp > ago(7d) | where FileName in~ ("powershell.exe", "cmd.exe", "wscript.exe", "mshta.exe", "rundll32.exe") or InitiatingProcessFileName in~ ("chrome.exe", "msedge.exe", "firefox.exe") | project Timestamp, DeviceName, InitiatingProcessAccountName, FileName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine | order by Timestamp desc
Third hunt: suspicious cloud activity after trust was granted
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
AuditLogs | where TimeGenerated > ago(7d) | where OperationName has_any ("FileDownloaded", "Add member", "Update user", "Consent") | extend Hour = datetime_part("hour", TimeGenerated) | where Hour < 6 or Hour > 20 | project TimeGenerated, OperationName, InitiatedBy, TargetResources | order by TimeGenerated desc
What this kind of activity can indicate
How GEMXIT approaches trusted-device investigations
Final thought
It is: “What happened after trust was granted?”
Continue the investigation with MFA Session Hijacking, The Session Token Never Expired, When Nothing Looks Wrong, The Dashboard Was Green, The After-Hours Download and Microsoft Security Operations.
Develop IT. Protect IT. GEMXIT PTY LTD | GEMXIT UK LTD