← All Threat Hunting ReportsThreat Hunting Exercise

Threat Hunting Exercise: Analyzing Email HTML Smuggling Phishing Attachment Delivery Dataset

This hunt uses a simulated email-gateway and endpoint dataset (email_html_smuggling_2022-12-14T101500.json) capturing T1027.006: Obfuscated Files or Information: HTML Smuggling, where an attacker embeds a malicious payload (an encoded executable or archive) inside JavaScript within an HTML email attachment, which is assembled and written to disk client-side in the browser - entirely bypassing network-level and gateway-level file inspection since no malicious file ever crosses the wire in its final form.

Step 1: Hypothesis Formation

Hypothesis: An email delivers an .html/.htm attachment (or a link to one) that, when opened, contains obfuscated JavaScript using Blob/msSaveOrOpenBlob/base64-decoding constructs to reconstruct and auto-trigger download of an embedded payload, and this download is followed shortly by execution of a file with an extension not native to normal browser downloads (.iso, .js, .hta, .exe), indicating HTML smuggling was used to bypass attachment-scanning controls. Indicators:

Null Hypothesis: The HTML attachment is a legitimate business report or interactive dashboard export that uses client-side JavaScript for benign rendering purposes (e.g., an exported Power BI report). Invalidate by checking the sender's authentication (SPF/DKIM/DMARC alignment) and whether the HTML structure matches a known-good reporting-tool export template.

Rationale: HTML smuggling is specifically designed to defeat gateway and network-layer file inspection, since the malicious payload literally does not exist as a discrete file until JavaScript executing inside the recipient's own browser reconstructs it - meaning detection must shift to endpoint-side telemetry (file creation without a corresponding network download) and to static/behavioral inspection of the HTML/JavaScript content itself.

Step 2: Data Sources and Scope

Step 3: Key Findings

Parsed events (5 shown) confirm t.nguyen opened an HTML "invoice" attachment whose embedded JavaScript assembled and auto-saved a disguised ISO file, which was then mounted and executed, all without any corresponding network-level file transfer.

Timestamp (UTC)HostEventDetailIOC/Why Suspicious?
2022-12-14 10:15:03Email GatewayAttachment ScanInvoice_44921.html, scan verdict: clean (no executable content detected), SPF/DKIM: fail (sender domain mismatch)Delivery IOC: the gateway only sees an HTML file with no embedded executable to flag, and the failed SPF/DKIM alignment is a red flag independently indicating a spoofed sender that should have been quarantined.
2022-12-14 10:18:41WKS-FIN-023(Browser telemetry)Invoice_44921.html opened in Chrome; JavaScript execution includes atob() decode of a ~14MB base64 string and new Blob([...], {type:'application/octet-stream'})Smuggling-Pattern IOC: this is the canonical HTML-smuggling JavaScript construct - client-side base64 decoding into a Blob object to reconstruct a file that never existed on the wire.
2022-12-14 10:18:44WKS-FIN-023(EDR file-creation event)New file Invoice_Statement.iso (13.9 MB) written to Downloads, with no corresponding network download event in proxy logsNo-Network-Transfer IOC: a 13.9MB file appearing on disk with zero matching bytes transferred over the network confirms it was assembled entirely client-side from the smuggled base64 payload, bypassing all network-layer file inspection.
2022-12-14 10:19:10WKS-FIN-023(EDR process event)explorer.exe auto-mounted Invoice_Statement.iso as drive E:, then user double-clicked Invoice_Statement.lnk inside itContainer-Evasion IOC: mounting the payload inside an ISO is an additional evasion layer, since Windows treats the ISO's contents as coming from a trusted local "CD drive" and Mark-of-the-Web (MOTW) propagation is frequently lost for files inside ISO containers.
2022-12-14 10:19:12WKS-FIN-023(EDR process event)Invoice_Statement.lnk executed powershell.exe -windowstyle hidden -enc <b64>Execution IOC: the .lnk file's true payload is a hidden PowerShell downloader, confirming the ISO delivered a functional dropper rather than a legitimate document.

Validation:

Step 4: Recommendations & Next Steps

Hypothesis confirmed - a spoofed-sender phishing email delivered an HTML attachment whose embedded JavaScript smuggled a 13.9MB ISO payload past the email gateway entirely, which was then mounted and used to launch a hidden PowerShell downloader!