Query Details
// Any.Run Corrupt File Zero Day Attack // https://www.linkedin.com/posts/0x534c_httpsxcomanyrunappstatus1861024272463909018-activity-7269357711639633920-4xZK/ // 𝗖𝘂𝘀𝘁𝗼𝗺 𝗠𝗗𝗢 𝗞𝗤𝗟 𝗗𝗲𝘁𝗲𝗰𝘁𝗶𝗼𝗻 𝗳𝗼𝗿 𝗽𝗼𝘁𝗲𝗻𝘁𝗶𝗮𝗹 𝗭𝗘𝗥𝗢-𝗗𝗔𝗬 𝗔𝘁𝘁𝗮𝗰𝗸: EmailAttachmentInfo | where Timestamp> ago(1h) | where FileName endswith ".docx" | where FileType == "zip" or FileType == "unknown;" | join EmailEvents on NetworkMessageId | where EmailDirection == "Inbound" | where DeliveryAction == "Delivered"
This KQL (Kusto Query Language) query is designed to detect potential zero-day attacks involving corrupt file attachments in incoming emails. Here's a simple breakdown of what the query does:
Data Source: It starts by looking at the EmailAttachmentInfo table, which contains information about email attachments.
Time Filter: It filters the data to only include email attachments that have been received in the last hour (Timestamp > ago(1h)).
File Type Filter: It specifically looks for attachments with filenames ending in ".docx", which are typically Microsoft Word documents.
Suspicious File Type: It further filters these attachments to identify those where the file type is either "zip" or "unknown". This is suspicious because a ".docx" file should not be of type "zip" or "unknown".
Join with Email Events: The query joins this filtered attachment data with the EmailEvents table using the NetworkMessageId to correlate attachment information with email events.
Inbound Emails: It focuses only on inbound emails (EmailDirection == "Inbound"), meaning emails that are received from outside the organization.
Delivery Status: Finally, it checks that these emails were actually delivered (DeliveryAction == "Delivered"), indicating that the potentially malicious attachment reached the recipient.
In summary, this query is designed to identify potentially malicious email attachments that could be part of a zero-day attack by looking for unusual characteristics in recently received emails.

Steven Lim
Released: December 2, 2024
Tables
Keywords
Operators