HTML smuggling is an initial-access delivery technique that defeats perimeter content inspection by never putting a malicious file in transit. The email carries a benign-looking HTML document (an attachment or a link to one); the HTML contains a Base64/blob-encoded payload plus JavaScript that, when the page is opened in the user's own browser, decodes the blob client-side and uses the HTML5 download attribute (or an <a> + Blob + msSaveOrOpenBlob / URL.createObjectURL) to write the real payload to the Downloads folder. The mail gateway, sandbox, and web proxy only ever see HTML and JavaScript — the ISO/ZIP/JS/LNK/EXE is manufactured on the endpoint, after the trust boundary.
This is one of the highest-frequency delivery chains a SOC sees. It has been the initial-access vector for Qakbot, Pikabot, IcedID, NOBELIUM/Midnight Blizzard (EnvyScout), DEV-0796 and numerous commodity loaders. Because detonation and signature scanning fail by design, detection shifts onto the endpoint: a browser process writing an executable/archive/script to disk, followed by a script host or a mounted container executing from that path.
Key data sources: EmailAttachmentInfo + EmailEvents (the delivered .html/.htm/.svg), DeviceFileEvents (browser-written payload in Downloads), DeviceProcessEvents (script host / container mount execution from the download path), and DeviceNetworkEvents (second-stage retrieval and C2).
☰ Table of Contents
01 — BACKGROUND
TECHNIQUE OVERVIEWHTML smuggling (T1027.006) hides a malicious payload inside an HTML/JavaScript document so that the payload is assembled on the victim's machine rather than traversing the network as a recognizable file. Antivirus, secure email gateways and sandboxes inspect the HTML and see only text and script — the dangerous artifact (an ISO, ZIP, JS, VBS, LNK or EXE) is written to disk by the browser after the user opens the page. This is why a smuggled lure routinely shows DeliveryAction = Delivered with no malware verdict: there was nothing for the scanner to flag in flight.
| Field | Value |
|---|---|
| MITRE Technique | T1027.006 — Obfuscated Files or Information: HTML Smuggling T1204.002 — User Execution: Malicious File T1105 — Ingress Tool Transfer (second stage) T1553.005 — Subvert Trust Controls: Mark-of-the-Web Bypass (when a container file is smuggled) |
| Kill-chain Phase | Initial Access / Execution (delivery → user-executed dropper) |
| Primary Log Source | DeviceFileEvents (browser drop), DeviceProcessEvents (execution) |
| Secondary Log Sources | EmailAttachmentInfo, EmailEvents, EmailUrlInfo, UrlClickEvents, DeviceNetworkEvents |
| Common Lure Shapes | Invoice/remittance, voicemail/fax notification, DocuSign/Adobe "secure document", shipping/DHL, HR/payroll, legal notice |
| Common Payload Shapes | .iso / .img / .vhd(x) container → .lnk + hidden DLL; .zip / .rar → .js / .vbs / .wsf; .js / .hta direct; password-protected .zip (password in body/image to defeat scanning) |
| Default Severity | SEV3 on delivery → SEV1 once a script host or mounted-container child process executes |
| Detection Window | Query last 24 hours; pivot ±30 min around the browser file-write for the execution chain |
A "clean" email verdict is NOT exoneration. HTML smuggling is specifically engineered so the gateway, detonation sandbox and AV all pass the message — the malicious file does not exist until the browser builds it on the endpoint. Treat Delivered-with-no-verdict HTML attachments matching the lure patterns as suspicious, not safe.
HTML smuggling is a delivery primitive — on its own it only drops a file. Severity is driven entirely by whether a human then executed the dropped payload and what that payload did. The concrete attack paths a SOC sees:
- AHTML → ISO/IMG container → LNK + sideloaded DLL. The smuggled container mounts as a drive letter; child files inherit no Mark-of-the-Web, so SmartScreen/MOTW never prompts. The user double-clicks a LNK that runs a hidden DLL via
rundll32/sideloading (Qakbot, IcedID pattern). Pivot to SOP-116 and SOP-117. - BHTML → ZIP → JS/VBS/WSF. The archive drops a script that pulls and runs a loader via
wscript/cscript. Pivot to SOP-25 (malicious script engine). - CHTML → direct .js / .hta / .exe. Simpler commodity campaigns write the executable/script straight to Downloads and social-engineer the click.
- DHTML → password-protected ZIP. The password is placed in the email body or an image to stop the gateway unpacking and scanning the archive; the HTML or a landing page supplies it to the user.
- ESVG smuggling. The lure is an
.svgattachment — SVG is XML and can embed<script>; opening it in a browser runs the same smuggling JavaScript. A rapidly rising 2025–26 variant because SVG is widely allowed through mail filters.
Business impact: HTML smuggling is the front door for banking-trojan/loader families that lead to ransomware (Qakbot→Black Basta, IcedID→various), and for nation-state espionage implants (EnvyScout→NOBELIUM). A single executed dropper can become full domain compromise within hours. Severity model:
| Observed State | Severity |
|---|---|
| HTML/SVG lure delivered, no browser file-write yet | SEV3 — scope & purge, user awareness |
| Browser wrote a container/archive/script/EXE to Downloads (no execution) | SEV2 — contact user, hunt execution, isolate if uncertain |
| Script host / mounted-ISO child process executed from the download path | SEV1 — isolate endpoint, full IR |
| Second-stage download, C2 beacon, or credential access observed | SEV1 — treat as active intrusion, parallel SOP-09/SOP-83/SOP-03 |
02 — IDENTIFICATION
6 INDICATORSAnswer these five questions first. Any YES in rows 3–5 means execution is confirmed — jump straight to Containment.
- 1Did the user receive an .html / .htm / .shtml / .svg attachment (or click a link that opened one) with an invoice / voicemail / DocuSign / shipping lure?
- 2Did a browser process (msedge/chrome/firefox/brave) write a .iso / .img / .vhd / .zip / .rar / .js / .vbs / .lnk / .exe to the Downloads folder shortly after?
- 3Did a script host (wscript/cscript/mshta) or rundll32 / regsvr32 / powershell launch from the download path or a mounted drive letter?
- 4Is there a second-stage network call or new C2-looking connection from the child process?
- 5Did the same attachment hash or lure subject reach more than one mailbox (campaign)?
Fastest ground truth is the user. Call them: "Did you open an attachment, and did your browser download a file you had to double-click?" A yes to both pins the timeline and tells you whether to expect execution telemetry in I3.
The smuggling vehicle is an HTML/HTM/SHTML/SVG attachment (or a link to one). Because the payload is built client-side, these messages are overwhelmingly delivered with no malware verdict — so you hunt by file type + lure theme, not by detonation result. This establishes who was targeted and the attachment hash you will pivot on everywhere else.
- 1Run the KQL below in Advanced Hunting, Time range Last 24 hours.
- 2For each hit note SHA256, SenderFromAddress, Subject and RecipientEmailAddress — these drive I5 scoping.
- 3In Email & collaboration › Explorer (Threat Explorer) search the attachment file name / SHA256 to confirm delivery state and whether ZAP acted.
- 4A
DeliveryAction = DeliveredwithThreatTypesempty is expected for this technique — it does not exonerate the message.
| Attachment Signal | Meaning | Severity |
|---|---|---|
| FileType in (html, htm, shtml) | Classic HTML-smuggling vehicle — opens in browser, runs embedded JS | HIGH |
| FileType == svg | SVG is XML; can embed <script> — rising 2025–26 smuggling variant | HIGH |
| .html inside a .zip/.img attachment | Nested to defeat flat file-type filters | HIGH |
| Lure: invoice / voicemail / DocuSign / shipping | Dominant social-engineering themes for smuggling campaigns | MEDIUM |
| Password-in-body for attached archive | Password supplied to user to stop gateway unpacking/scanning | HIGH |
Do not scope only on FileType. Some gateways rewrite or mislabel the extension. Also match FileName regex and, for campaigns, pivot on the attachment SHA256 — the file content is identical across recipients even when names are randomized.
This is the defining artifact of HTML smuggling: a browser process writing an executable, archive, script or disk-image container into the Downloads folder. A legitimate web page almost never causes Edge/Chrome to drop an .iso/.img/.vhd/.js/.vbs/.lnk; when it does right after an HTML/SVG attachment was opened, the payload was assembled client-side. This is the pivot from "suspicious email" to "payload is on disk."
- 1Run the KQL below. Scope to the recipient device(s) from I1 if known, otherwise run tenant-wide for the last 24h.
- 2Confirm InitiatingProcessFileName is a browser (
msedge.exe,chrome.exe,firefox.exe,brave.exe) — not a legitimate installer or sync client. - 3Record the FolderPath, FileName and SHA256 of the dropped file; this is your execution pivot for I3 and your block indicator.
- 4Open the Device Timeline for the device and visually confirm the sequence: browser launch → file write → (any) subsequent process creation.
| Dropped Extension | Meaning | Severity |
|---|---|---|
| .iso / .img / .vhd / .vhdx | Container — mounts as a drive, bypasses Mark-of-the-Web (pivot SOP-116) | CRITICAL |
| .js / .jse / .vbs / .wsf / .hta | Direct script payload — runs under wscript/cscript/mshta | CRITICAL |
| .lnk | Shortcut that launches a hidden/sideloaded binary | CRITICAL |
| .zip / .rar / .7z (esp. password-protected) | Archive staging the real payload — unpack & inspect contents | HIGH |
| .exe / .scr / .dll / .msi | Direct binary dropper | CRITICAL |
Baseline-aware tuning: corporate browsers legitimately download .zip and .msi all day. The high-fidelity subset is .iso/.img/.vhd/.vhdx/.js/.vbs/.lnk from a browser — these almost never have a benign reason and should drive a standalone analytic rule.
The dropped file is harmless until a human runs it. Execution is the SEV2→SEV1 line. Look for a script host, rundll32/regsvr32, or an EXE spawning from the download path or a freshly-mounted ISO/VHD drive letter. A mounted container (explorer launching something from D:\/E:\ that did not previously exist) is the T1553.005 Mark-of-the-Web bypass in action.
- 1Run the KQL below pivoting on the device and ±30 minutes around the I2 file-write timestamp.
- 2Confirm the parent is explorer.exe (user double-click) or the browser, and the process or its command line references the dropped file / a removable-drive letter.
- 3For ISO/VHD cases, check DeviceEvents for a mount (
PnpDeviceConnected/ volume arrival) immediately before the child process — confirms container execution (pivot SOP-116). - 4If a DLL ran via
rundll32from a non-standard path, follow the sideloading chain in SOP-117.
| Execution Indicator | Meaning | Severity |
|---|---|---|
| wscript/cscript \Downloads\*.js|.vbs|.wsf | Script host running the smuggled script — core execution event | CRITICAL |
| mshta \Downloads\*.hta (or inline URL) | HTA execution — common loader stage | CRITICAL |
| rundll32 <mounted-drive>\*.dll,<export> | Sideloaded DLL from mounted ISO — Qakbot/IcedID pattern | CRITICAL |
| explorer → *.exe from D:\ / E:\ (new volume) | User ran payload from a mounted container — MOTW bypassed | CRITICAL |
| powershell -enc / -w hidden from Downloads | Encoded PowerShell launched by the dropper (pivot SOP-25) | CRITICAL |
Once I3 fires, the dropper has run — do not wait for an AV verdict. Isolate the endpoint now and capture volatile evidence (running processes, network connections, the dropped file) via Live Response before isolation severs the session.
Most smuggled droppers are first-stage loaders — they reach out for a second-stage payload and establish C2. Confirming (or ruling out) outbound activity from the child process decides whether this is a contained drop or an active intrusion, and yields the network IOCs you will block. Credential-store access from the follow-on process means you have crossed into post-exploitation.
- 1Run the KQL below pivoting on the InitiatingProcess identified in I3 and the device.
- 2Flag connections to raw IPs, newly-registered domains, or non-browser processes beaconing on a regular interval (pivot SOP-09 for beacon analysis).
- 3Check DeviceFileEvents for access to browser credential stores (
Login Data,Cookies,Local State) by the follow-on process — infostealer behaviour, pivot SOP-83. - 4Record every external IP / domain / URL as an IOC for the block list in Containment.
If the loader family is known (Qakbot, Pikabot, IcedID), pull its documented C2 config / beacon interval and run a dedicated beacon query (SOP-09). A regular, low-jitter interval to a single host confirms live C2 even when the destination is not yet on a TI feed.
HTML smuggling is almost always a campaign, not a one-off. Before you close, you must know every recipient of the same attachment SHA256 / sender / lure subject so the purge and the block are complete. Missing co-recipients is how the same campaign re-detonates on a second user an hour later.
- 1In Explorer filter by the attachment SHA256 from I1, then by Sender and Subject to catch name-randomized copies.
- 2Run the KQL below for the full recipient and click list; export it as the purge/notify target set.
- 3Cross-reference recipients against DeviceFileEvents (I2) to find who already has the payload on disk — prioritize those devices for I3 execution checks.
Before escalating, pull every IOC and make an explicit call. The burden of proof for a false positive is a documented benign explanation — a legitimate software download, a known internal tool — not "the browser downloaded something, probably fine."
IOCs to extract:
- 1Attachment SHA256 + file name(s) + sender address + sender IP (I1)
- 2Dropped payload SHA256 + full path + file type (I2)
- 3Executed process command lines + any mounted volume label (I3)
- 4Second-stage URLs / domains / IPs + beacon interval (I4)
- 5Affected user UPNs and device names across the fan-out (I5)
| True Positive signals | False Positive signals |
|---|---|
| Browser wrote .iso/.img/.vhd/.js/.vbs/.lnk to Downloads right after an HTML/SVG attachment was opened | Download is a signed, expected application installer (.msi/.exe) from a known vendor domain, matching a change/ticket |
| Script host / rundll32 / mshta executed from the download path or a mounted drive | Dropped file was never opened; no child process; user confirms they did not interact |
| Second-stage egress to raw IP / new domain, or regular beacon | Network activity is the browser itself to a reputable domain, not the dropper process |
| Same attachment hash / lure delivered to multiple mailboxes | Single internal test / red-team exercise with a documented authorization |
| Credential-store access or lateral movement follow-on | Developer/IT tooling that legitimately ships .js/.vbs (allow-listed, baselined path) |
"A browser downloaded a file" is not benign by default for this technique — the browser is always the writer in HTML smuggling. The deciding factors are the dropped file type, whether it executed, and whether a matching HTML/SVG lure preceded it. Resolve those three before calling FP.
03 — CONTAINMENT
STOP ITPaste-to-detonation on these chains can be under a minute. If I3 has fired, do not sequence politely — isolate first, investigate second. Capture volatile evidence through Live Response during isolation, not after.
- 1Open the affected device, click Actions (⋮) → Isolate Device → Full Isolation.
- 2Before isolation severs the session, start a Live Response session (Actions → Initiate Live Response) and collect: process list, network connections, and
getfileon the dropped payload (I2 path) and the originating HTML (browser cache / Downloads). - 3If a container was mounted, note the drive letter and volume label and
getfilethe LNK + sideloaded DLL from the mounted path (pivot SOP-116/117). - 4Link all related alerts into one incident; attach the IOC set from I6.
- 5Check every other device from the I5 fan-out for the dropped payload — isolate any that also show I3 execution.
- 1If the follow-on process touched the browser credential/cookie store (I4 → SOP-83), revoke sessions: user profile → Revoke sessions — stolen cookies survive a password reset, so revocation is mandatory.
- 2Reset the password and require re-registration if MFA material may have been exposed.
- 3Review SigninLogs for anomalous sign-ins after the execution timestamp (new IP / impossible travel) — pivot SOP-04 / SOP-18 if an AiTM session is suspected.
Isolating the device does nothing to a session token already exfiltrated to the attacker. If any infostealer behaviour is seen in I4, session revocation is not optional.
- 1Purge all copies of the lure from every mailbox in the I5 fan-out: Threat Explorer → select messages → Take action → Soft delete (or Hard delete).
- 2Block the sender and the attachment SHA256: Defender → Settings → Email & collaboration → Tenant Allow/Block List (sender/file hash).
- 3Block the payload hash(es) tenant-wide: Defender → Settings → Endpoints → Indicators → File hashes → Add (both the dropped payload and any second-stage binary).
- 4Block the C2 / second-stage URL, domain and IP at MDE Indicators + the web proxy / egress firewall (I4 IOCs).
- 5If this is a repeat vector, add/confirm an Attack Surface Reduction rule blocking JS/VBS/HTA execution of downloaded content, and block mounting of ISO/VHD for standard users via policy (pivot SOP-116).
Purge before you block the sender — attackers rotate sender addresses constantly, but the message is already in the mailboxes. Removing delivered copies prevents a second user detonating the same lure while you work the first.
04 — ERADICATION
CLEAN UP- 1Via Live Response, delete the dropped payload, the originating HTML/SVG from Downloads and browser cache, and dismount any attacker container (
Dismount-DiskImage -ImagePath <path>); then delete the .iso/.vhd. - 2Kill any live loader/child process (
taskkill/ Live Responsekill) and confirm no re-spawn. - 3Hunt second-stage persistence the loader may have planted: scheduled tasks & run keys (SOP-26), services (SOP-106), WMI subscriptions (SOP-104). Remove any created in the incident window.
- 4If a DLL was sideloaded from a mounted container, remove the dropped DLL + co-dropped signed EXE and follow SOP-117 to confirm no persisted sideloading path remains.
- 5Run a full Defender scan on the endpoint after cleanup:
Start-MpScan -ScanType FullScan. - 6Re-run I2, I3 and I4 expecting 0 hits on the device over the incident window. Re-run I5 to confirm all campaign copies are purged.
- 7Reconstruct the timeline: HTML opened → file dropped → executed → egress → any lateral/credential activity — document data-at-risk for escalation and breach assessment.
- Dropped payload, originating HTML/SVG and any mounted container removed from the device
- All loader/child processes terminated with no re-spawn
- No second-stage persistence (tasks / run keys / services / WMI) remains from the incident window
- Payload + second-stage hashes and C2 IOCs blocked tenant-wide (MDE Indicators + proxy/firewall)
- All campaign copies purged from every mailbox in the I5 fan-out; sender + attachment hash blocked
- User sessions revoked / password reset where infostealer behaviour was observed
- I2 / I3 / I4 re-run and returning 0 hits; full Defender scan clean
05 — ESCALATION
TIERS| Tier | Trigger Condition | Who to Notify | Action |
|---|---|---|---|
| L1 → L2 | Browser drop (I2) found but TP/FP unresolved in 30 min; any privileged-user mailbox; >5 affected recipients in I5 | L2 Analyst / Shift Lead | Hand over with IOC set, hold endpoint pending execution check |
| L2 → IR | Execution confirmed (I3) and/or second-stage/C2 egress (I4); known loader family (Qakbot/Pikabot/IcedID) | IR Team / SOC Manager | Full IR, scope lateral movement, parallel SOP-09 / SOP-83 |
| IR → CISO | Credential theft confirmed, lateral movement, or ransomware precursor behaviour (Defender tamper / VSS delete) | CISO / Management | Invoke IR plan, parallel SOP-03 / SOP-28 / SOP-105, consider BC/DR |
| CISO → External | Confirmed data exfiltration of regulated data; business-wide campaign; nation-state implant indicators | Legal / DPO / Regulators / MSSP / Law enforcement | Breach assessment, GDPR 72h clock, engage forensics vendor & threat-intel sharing |
Bring to every escalation:
- 1Incident ID, affected user UPN(s) and device name(s)
- 2Timeline: HTML opened → payload dropped → executed → egress
- 3Full IOC set (attachment + payload hashes, C2 URLs/IPs, sender) and I5 fan-out count
- 4Containment actions already taken (isolation, purge, session revoke, blocks)
- 5Current confidence: TP confirmed / suspected / unverified
| MITRE ATT&CK Mapping | Technique |
|---|---|
| T1027.006 | Obfuscated Files or Information: HTML Smuggling |
| T1204.002 | User Execution: Malicious File |
| T1105 | Ingress Tool Transfer (second-stage retrieval) |
| T1553.005 | Subvert Trust Controls: Mark-of-the-Web Bypass (smuggled container) |
| T1566.001 | Phishing: Spearphishing Attachment (delivery) |
| T1059.005 / T1059.007 | Command and Scripting Interpreter: VBScript / JavaScript |
If execution (I3) coincides with Defender tampering (SOP-28) or Volume Shadow Copy deletion (SOP-105), treat it as an imminent ransomware deployment: escalate straight to IR/CISO and invoke SOP-03 in parallel — do not wait for file encryption to be observed.
Stay Threat-Ready
Follow CyberHawk Threat Intel for daily SOC analyst playbooks, detection engineering guides, and threat intelligence.