T1027.006 HTML Smuggling
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.31
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
.3214
Item | Value |
---|---|
ID | T1027.006 |
Sub-techniques | T1027.001, T1027.002, T1027.003, T1027.004, T1027.005, T1027.006, T1027.007, T1027.008, T1027.009, T1027.010, T1027.011 |
Tactics | TA0005 |
Platforms | Linux, Windows, macOS |
Version | 1.0 |
Created | 20 May 2021 |
Last Modified | 19 May 2022 |
Procedure Examples
ID | Name | Description |
---|---|---|
G0016 | APT29 | APT29 has embedded an ISO file within an HTML attachment that contained JavaScript code to initiate malware execution.8 |
S0634 | EnvyScout | EnvyScout contains JavaScript code that can extract an encoded blob from its HTML body and write it to disk.5 |
S0650 | QakBot | QakBot has been delivered in ZIP files via HTML smuggling.67 |
Detection
ID | Data Source | Data Component |
---|---|---|
DS0022 | File | File Creation |
References
-
Hegt, S. (2018, August 14). HTML smuggling explained. Retrieved May 20, 2021. ↩↩
-
Microsoft Threat Intelligence Center (MSTIC). (2021, May 27). New sophisticated email-based attack from NOBELIUM. Retrieved May 28, 2021. ↩
-
Subramanian, K. (2020, August 18). New HTML Smuggling Attack Alert: Duri. Retrieved May 20, 2021. ↩↩
-
Warren, R. (2017, August 8). Smuggling HTA files in Internet Explorer/Edge. Retrieved May 20, 2021. ↩
-
MSTIC. (2021, May 28). Breaking down NOBELIUM’s latest early-stage toolset. Retrieved August 4, 2021. ↩
-
Kenefick, I. et al. (2022, October 12). Black Basta Ransomware Gang Infiltrates Networks via QAKBOT, Brute Ratel, and Cobalt Strike. Retrieved February 6, 2023. ↩
-
Vilkomir-Preisman, S. (2022, August 18). Beating Black Basta Ransomware. Retrieved March 8, 2023. ↩
-
ESET. (2022, February). THREAT REPORT T3 2021. Retrieved February 10, 2022. ↩