MITRE ATT&CK / Techniques / T1027.006

Obfuscated Files or Information: HTML Smuggling

ID
T1027.006
Tactics
TA0005 Stealth
Sub-technique of
T1027 Obfuscated Files or Information
Platforms
Linux, macOS, Windows
Data sources
File Creation, Process Creation, File Metadata, Network Traffic Content
Source
attack.mitre.org
MITRE last modified
12 May 2026

Adversaries may smuggle data and files past content filters by hiding malicious payloads inside of seemingly benign HTML files. HTML documents can store large binary objects known as JavaScript Blobs (immutable data that represents raw bytes) that can later be constructed into file-like objects. Data may also be stored in Data URLs, which enable embedding media type or MIME files inline of HTML documents. HTML5 also introduced a download attribute that may be used to initiate file downloads.[1][2]

Adversaries may deliver payloads to victims that bypass security controls through HTML Smuggling by abusing JavaScript Blobs and/or HTML5 download attributes. Security controls such as web content filters may not identify smuggled malicious files inside of HTML/JS files, as the content may be based on typically benign MIME types such as text/plain and/or text/html. Malicious files or data can be obfuscated and hidden inside of HTML files through Data URLs and/or JavaScript Blobs and can be deobfuscated when they reach the victim (i.e. Deobfuscate/Decode Files or Information), potentially bypassing content filters.

For example, JavaScript Blobs can be abused to dynamically generate malicious files in the victim machine and may be dropped to disk by abusing JavaScript functions such as msSaveBlob.[1][3][2][4]

Detection

Mitigations (1)

M1048 Application Isolation and Sandboxing

Use Browser Extensions or Built-in Security Tools that:

- Monitor JavaScript API calls such as Blob, URL.createObjectURL, and msSaveOrOpenBlob
- Intercept and analyze HTML5 download attributes for suspicious payload generation
- Alert or block behaviors that match known HTML smuggling patterns (e.g., blob-to-disk payload construction)

Apply Content Security Policy (CSP) headers to:

- Restrict inline JavaScript and dynamic script generation
- Disallow downloads from unauthorized sources or blob URIs
- Prevent cross-origin resource sharing (CORS) abuse commonly used in smuggling chains

Enable or enforce enterprise browser security controls, such as:

- Endpoint's Network Protection and Attack Surface Reduction (ASR) rules, which can block Office and browser processes from creating child processes or writing to disk in suspicious ways
- Google Chrome Enterprise Policies, which can control file download behavior, restrict extensions, and isolate risky browsing environments

Deploy browser sandboxing solutions that can isolate JavaScript execution environments and enforce behavioral policy restrictions

Groups (1)

Software (2)

References

  1. HTML Smuggling Menlo Security 2020
  2. Outlflank HTML Smuggling 2018
  3. MSTIC NOBELIUM May 2021
  4. nccgroup Smuggling HTA 2017