Query Details
// Sneaky 2FA MDO Detection // https://blog.sekoia.io/sneaky-2fa-exposing-a-new-aitm-phishing-as-a-service/ let Sneaky2FATable=externaldata(RawData:string) [h'https://raw.githubusercontent.com/SlimKQL/Hunting-Queries-Detection-Rules/refs/heads/main/IOC/Sneaky2FA.txt'] | parse RawData with Sneaky2FADomains:string; let IOCs = Sneaky2FATable | distinct Sneaky2FADomains; let InboundEmailReceipient = EmailUrlInfo | join EmailEvents on NetworkMessageId | where EmailDirection == "Inbound" | distinct RecipientEmailAddress; let InboundEncodedEmailReceipient = EmailUrlInfo | join EmailEvents on NetworkMessageId | where EmailDirection == "Inbound" | extend EncodeEmail = base64_encode_tostring(RecipientEmailAddress) | distinct EncodeEmail; EmailUrlInfo | join EmailEvents on NetworkMessageId | where EmailDirection == "Inbound" | where DeliveryAction == "Delivered" | where Url has_any(IOCs) and (Url has_any(InboundEmailReceipient) or Url has_any(InboundEncodedEmailReceipient))
This KQL (Kusto Query Language) query is designed to detect a specific type of phishing attack known as "Sneaky 2FA" (Two-Factor Authentication) that uses phishing-as-a-service techniques. Here's a simplified breakdown of what the query does:
Load Suspicious Domains: It retrieves a list of suspicious domains related to the Sneaky 2FA attack from an external data source (a GitHub repository).
Extract Unique Domains: It extracts distinct domains from the loaded data to use as indicators of compromise (IOCs).
Identify Inbound Email Recipients:
EmailUrlInfo and EmailEvents.Filter and Analyze Emails:
The goal of this query is to detect potentially malicious emails that are part of the Sneaky 2FA phishing campaign by looking for specific patterns in email URLs and recipient information.

Steven Lim
Released: January 18, 2025
Tables
Keywords
Operators