HTML Smuggling

T1027.006

Sub-technique of T1027 Obfuscated Files or Information.View on attack.mitre.org

About this technique

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.

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.

Detection rules0

Rules on DetectionCode tagged with T1027.006.

Sigma0

No Sigma rules are mapped to this technique yet.

Splunk0

No Splunk rules are mapped to this technique yet.

Groups1

Software2

Campaigns0

None recorded.

Procedure examples3

Groups1

Used byProcedure example
GroupAPT29

APT29 has embedded an ISO file within an HTML attachment that contained JavaScript code to initiate malware execution.

Software2

Used byProcedure example
MalwareEnvyScout

EnvyScout contains JavaScript code that can extract an encoded blob from its HTML body and write it to disk.

MalwareQakBot

QakBot has been delivered in ZIP files via HTML smuggling.

References4

  1. HTML Smuggling Menlo Security 2020 Open source
    Subramanian, K. (2020, August 18). New HTML Smuggling Attack Alert: Duri. Retrieved May 20, 2021.
  2. MSTIC NOBELIUM May 2021 Open source
    Microsoft Threat Intelligence Center (MSTIC). (2021, May 27). New sophisticated email-based attack from NOBELIUM. Retrieved May 28, 2021.
  3. Outlflank HTML Smuggling 2018 Open source
    Hegt, S. (2018, August 14). HTML smuggling explained. Retrieved May 20, 2021.
  4. nccgroup Smuggling HTA 2017 Open source
    Warren, R. (2017, August 8). Smuggling HTA files in Internet Explorer/Edge. Retrieved September 12, 2024.

Data from MITRE ATT&CK® (Enterprise). ATT&CK® is a registered trademark of The MITRE Corporation.