The Connection Happened At 1:22AM
At exactly 1:22AM, a workstation connected to an IP address nobody recognised.
No alert fired.
Nobody was supposed to be working.
The time of the connection changed everything.
This Agent Foskett investigation explores how defenders can use DeviceNetworkEvents and KQL to investigate suspicious after-hours activity in Microsoft Defender XDR.

Briefing summary
A connection may look routine until the timestamp says otherwise. DeviceNetworkEvents helps defenders see where a device connected, which process made the connection and whether the timing fits normal business activity.
Why after-hours network traffic matters
First hunt: find after-hours connections
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
DeviceNetworkEvents | where Timestamp > ago(7d) | where hourofday(Timestamp) between (0 .. 5) | project Timestamp, DeviceName, InitiatingProcessFileName, RemoteIP, RemotePort, Protocol, ActionType | order by Timestamp desc
Second hunt: identify processes active overnight
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
DeviceProcessEvents | where Timestamp > ago(7d) | where hourofday(Timestamp) between (0 .. 5) | project Timestamp, DeviceName, FileName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine, AccountName | order by Timestamp desc
When after-hours traffic deserves deeper investigation
Third hunt: identify repeated overnight activity
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
DeviceNetworkEvents | where Timestamp > ago(30d) | where hourofday(Timestamp) between (0 .. 5) | summarize Connections = count(), Destinations = dcount(RemoteIP), Processes = make_set(InitiatingProcessFileName, 10) by DeviceName | top 25 by Connections desc
Fourth hunt: find connections near the suspicious 1:22AM event
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
DeviceNetworkEvents | where Timestamp between ( datetime(2026-05-30 01:12:00) .. datetime(2026-05-30 01:32:00) ) | project Timestamp, DeviceName, InitiatingProcessFileName, InitiatingProcessCommandLine, RemoteIP, RemotePort, Protocol, ActionType | order by Timestamp asc
What after-hours telemetry can prove
The Agent Foskett investigator mindset
How GEMXIT approaches after-hours endpoint investigations
Final thought
The device looked healthy.
The destination was unfamiliar.
But the biggest clue was the time.
Nobody was supposed to be working.
Yet the device was active.
The connection happened at 1:22AM.
It is: “Why did it happen at 1:22AM, and what happened around it?”
Continue the investigation with The Device Was Talking To Something It Shouldn't, The Process Tree Told The Real Story, Rundll32 Looked Legitimate, The Process Was Signed By Microsoft, The PowerShell Never Triggered An Alert, KQL Threat Hunting, Microsoft Defender KQL Threat Hunting Complete Guide, Microsoft Defender and the GEMXIT Security Review.
Develop IT. Protect IT.GEMXIT PTY LTD | GEMXIT UK LTD
