The User Opened The Attachment Two Days Later
The email looked harmless.
It arrived on Monday morning.
Nobody reported it.
No alert fired.
Then on Wednesday afternoon, the attachment was opened.
The delay changed the investigation.
This Agent Foskett investigation explores how defenders can use EmailEvents, EmailAttachmentInfo, timestamps and KQL to identify attachments that become dangerous long after the email was delivered.

Briefing summary
An attachment may not become important when the email arrives. It becomes important when somebody opens it, saves it, executes it or when the file hash appears somewhere else in the environment.
Why delayed attachment activity matters
First hunt: find recent email attachments
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
EmailAttachmentInfo | where Timestamp > ago(30d) | project Timestamp, NetworkMessageId, FileName, FileType, SHA256 | order by Timestamp desc
Second hunt: match attachments back to the email
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
EmailAttachmentInfo | where Timestamp > ago(30d) | join kind=inner ( EmailEvents | where Timestamp > ago(30d) | project EmailTime = Timestamp, NetworkMessageId, SenderFromAddress, RecipientEmailAddress, Subject, DeliveryAction ) on NetworkMessageId | project EmailTime, Timestamp, SenderFromAddress, RecipientEmailAddress, Subject, FileName, SHA256, DeliveryAction | order by EmailTime desc
When an attachment deserves deeper investigation
Third hunt: search endpoint activity for the attachment hash
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
let SuspiciousHashes = EmailAttachmentInfo | where Timestamp > ago(30d) | where FileName has_any ("invoice", "statement", "payment") | distinct SHA256; DeviceFileEvents | where Timestamp > ago(30d) | where SHA256 in (SuspiciousHashes) | project Timestamp, DeviceName, ActionType, FileName, FolderPath, SHA256, InitiatingProcessFileName | order by Timestamp asc
Fourth hunt: build the attachment timeline
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
let TargetMessage = EmailEvents | where Timestamp > ago(30d) | where Subject has "invoice" | project EmailTime = Timestamp, NetworkMessageId, SenderFromAddress, RecipientEmailAddress, Subject; TargetMessage | join kind=inner ( EmailAttachmentInfo | project AttachmentTime = Timestamp, NetworkMessageId, FileName, FileType, SHA256 ) on NetworkMessageId | project EmailTime, AttachmentTime, SenderFromAddress, RecipientEmailAddress, Subject, FileName, FileType, SHA256 | order by EmailTime asc
What attachment telemetry can prove
The Agent Foskett investigator mindset
How GEMXIT approaches attachment investigations
Final thought
Nothing happened.
Tuesday passed.
Still nothing.
Then on Wednesday afternoon, the attachment was opened.
The alert did not begin when the email arrived.
The investigation began when the file became active.
The user opened the attachment two days later.
It is: “What happened to the attachment after delivery?”
Continue the investigation with The Attachment Was Never Opened, The Link Was Clicked After The Email Was Delivered, The User Clicked The Link Three Days Later, Investigating EmailEvents, UrlClickEvents, 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
