
Explanation:

In Microsoft 365 Defender advanced hunting, email attachments are recorded in EmailAttachmentInfo and endpoint file activity is recorded in DeviceFileEvents . To correlate a malicious attachment to devices where the same file was observed, you join on the file hash ( SHA256 ) . The hunting guidance specifies using EmailAttachmentInfo to filter by sender and to ensure the attachment has a hash ( isnotempty(SHA256) ).
Then, a join with DeviceFileEvents on SHA256 links the email-borne file to endpoint observations.
Before joining, i t's best practice to reduce the right-hand dataset with project to only needed fields (e.g., FileName , SHA256 , DeviceName , DeviceId , Timestamp ) to improve performance and limit data volume.
After the join, use project again to shape the final result set fo r investigation, including timeline and pivot identifiers: Timestamp , FileName , SHA256 , DeviceName , DeviceId , plus email context such as NetworkMessageId , SenderFromAddress , and RecipientEmailAddress .
Therefore, the correct operator sequence is: join (subq uery over DeviceFileEvents with project ) on SHA256
, then final project of the incident-relevant columns.
Comments
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).