The goal is to slip past security tools and make analysis harder. Tools look for known patterns, so changing how content looks can stop the patterns matching while it still runs.
How it works
Security tools often look for known patterns in files and commands. An attacker can change how that content looks so the patterns no longer match, while the content still works when it runs.
Common approaches include compressing or archiving a payload, encoding text so plain-language clues disappear, and splitting a file into harmless-looking parts that only become dangerous when put back together.
Commands can also be disguised, for example by using system settings and platform quirks so that the command line does not look like what it does. MITRE lists 18 sub-techniques under this technique, from T1027.001 Binary Padding to T1027.018 Invisible Unicode.
The table lists the sub-techniques as MITRE ATT&CK names them, with a short note on what each one hides.
| ATT&CK ID | Sub-technique | What it hides |
|---|---|---|
| T1027.001 | Binary Padding | Junk data added to change how a file looks on disk. |
| T1027.002 | Software Packing | Code compressed or encrypted and unpacked only when it runs. |
| T1027.003 | Steganography | Data hidden inside images or other digital media. |
| T1027.004 | Compile After Delivery | Source code delivered uncompiled and built on the victim system. |
| T1027.005 | Indicator Removal from Tools | A detected tool edited to remove what gave it away. |
| T1027.006 | HTML Smuggling | Payloads assembled from data held inside a harmless-looking HTML file. |
| T1027.007 | Dynamic API Resolution | API function names hidden and resolved only at run time. |
| T1027.008 | Stripped Payloads | Symbols, strings and other readable information removed. |
| T1027.009 | Embedded Payloads | Payloads tucked inside otherwise harmless files. |
| T1027.010 | Command Obfuscation | Command-line strings and patterns disguised. |
| T1027.011 | Fileless Storage | Data kept outside the normal file system, such as in the Registry. |
| T1027.012 | LNK Icon Smuggling | Download commands hidden in shortcut (LNK) files. |
| T1027.013 | Encrypted/Encoded File | File content encrypted or encoded to hide strings and bytes. |
| T1027.014 | Polymorphic Code | Code that keeps changing its own form to avoid detection. |
| T1027.015 | Compression | Payloads packed into formats such as ZIP, gzip, 7z or RAR. |
| T1027.016 | Junk Code Insertion | Code that does nothing, added to mask what the malware does. |
| T1027.017 | SVG Smuggling | Payloads hidden inside harmless-looking SVG files. |
| T1027.018 | Invisible Unicode | Non-printing characters used to conceal content. |
Threat groups and malware we profile, by sub-technique
We matched the MITRE ATT&CK procedure examples (Enterprise version 19.2) against the threat group and malware profiles in our library. Each line below names the profiles we publish that MITRE lists as using that technique. The link in each line goes to the MITRE page with the procedure examples, which is the source for the line. The T1027 line holds profiles that MITRE ties to the parent technique itself.
- T1027 Obfuscated Files or Information: groups APT37, APT41, Kimsuky, Mustang Panda. Malware Amadey, BRICKSTORM, Cobalt Strike, Conti, Industroyer, Kazuar, PlugX, PoisonIvy, ROKRAT, SUNBURST, ShadowPad, Shai-Hulud.
- T1027.001 Binary Padding: groups APT29, APT40, Kimsuky. Malware Akira, Black Basta, Emotet, PlugX.
- T1027.002 Software Packing: groups APT27, APT29, APT38, APT39, APT41, Kimsuky, TA505, Volt Typhoon. Malware China Chopper, Clop, Emotet, RedLine Stealer, Snake (Uroburos).
- T1027.003 Steganography: groups APT37, APT40, Andariel, MuddyWater, TeamPCP.
- T1027.004 Compile After Delivery: groups MuddyWater.
- T1027.005 Indicator Removal from Tools: groups APT34, Turla, UNC3886. Malware Cobalt Strike, SUNBURST.
- T1027.006 HTML Smuggling: groups APT29.
- T1027.007 Dynamic API Resolution: groups Kimsuky, Lazarus Group, Mustang Panda. Malware PlugX.
- T1027.009 Embedded Payloads: groups Lazarus Group. Malware CanisterWorm, Dtrack, Emotet, Snake (Uroburos).
- T1027.010 Command Obfuscation: groups APT19, APT32, APT35, FIN7, Kimsuky, MuddyWater, SideWinder, TA505, Turla, Wizard Spider. Malware Emotet, RedLine Stealer.
- T1027.011 Fileless Storage: groups APT32, Turla. Malware REvil, ShadowPad, Snake (Uroburos).
- T1027.012 LNK Icon Smuggling: groups Kimsuky, Mustang Panda.
- T1027.013 Encrypted/Encoded File: groups APT18, APT19, APT27, APT28, APT32, APT33, APT34, APT35, APT36, APT39, APT40, BITTER, Kimsuky, Lazarus Group, MirrorFace, SideWinder, TA505, menuPass. Malware BRICKSTORM, Emotet, GlassWorm, Mini Shai-Hulud, PlugX, REvil, RedLine Stealer, Snake (Uroburos), TeamPCP Cloud Stealer, VersaMem.
- T1027.015 Compression: groups APT27, APT40, Kimsuky. Malware SUNBURST.
- T1027.016 Junk Code Insertion: groups APT32, FIN7, Kimsuky, Mustang Panda.
- T1027.018 Invisible Unicode: malware GlassWorm.
57 of our profiles appear above: 31 threat groups and 26 malware families. Kimsuky has the widest spread, with MITRE listing it under nine of the lines, and Emotet follows with five. T1027.013 Encrypted/Encoded File holds the most of our profiles (28), then T1027.002 Software Packing (13) and T1027.010 Command Obfuscation (12).
MITRE lists no profile of ours under T1027.008 Stripped Payloads, T1027.014 Polymorphic Code, T1027.017 SVG Smuggling.
A real example
- MITRE ATT&CK lists Action RAT as able to hold its commands, strings and domains Base64 encoded inside the payload.
- MITRE ATT&CK lists ADVSTORESHELL as encrypting most of its strings with an XOR-based algorithm, with some also encrypted with 3DES and reversed.
- MITRE ATT&CK lists Agent Tesla as having obfuscated code and using the Rijndael algorithm to encrypt strings.
- MITRE ATT&CK lists Anchor as obfuscating its code with stack strings and string encryption.
- MITRE ATT&CK lists AppleSeed as able to Base64 encode its payload and custom encrypt its API calls.
- The ArmorSteal malware kit uses the commercial packer PyArmor this way; see what ArmorSteal steals and mines.
Seen in incidents
- Incident Kyiv substation attack with Industroyer On 17 December 2016, malware called Industroyer, also known as CrashOverride, disrupted a transmission substation outside Kyiv, Ukraine. December 2016 · Energy and utilities
- Incident MuddyWater campaign against Turkish government entities Cisco Talos described a MuddyWater campaign, active as recently as November 2021, against Turkish government bodies including TÜBİTAK. November 2021 · Government and public sector
How to detect
-
Encoded or packed files after script activity
Link script runs or odd parent processes to the creation of encoded, compressed or encrypted files, especially with unusual command line syntax. On Windows, MITRE's analytic uses process creation (Security event 4688 or Sysmon event 1) and file creation (Sysmon event 11). Tune the entropy threshold, the time window and the list of suspicious parent processes to your environment.
-
Use of encoding and archive tools
Watch for encoding, compression and encryption tools used in scripts, particularly after files have been gathered or listed.
-
Encoded content in transit
Look for encoded or high-entropy files moving over web, file transfer or custom protocols during lateral movement or data theft. Tune the entropy threshold, because harmless compressed data can also look high-entropy.
-
Linux and macOS: archive and encoding tools
On Linux, look for gzip, base64, tar or openssl used in scripts after files are staged or the system is enumerated. MITRE points to auditd records of program runs and file writes, and to shell history. On macOS, watch zip, openssl and base64 use tied to user scripts, and encoded payloads written under /Users or /Volumes. MITRE names the unified log and osquery file events.
-
ESXi: encoded payloads in datastores
On ESXi hosts, look for Base64 encoded PowerCLI or other payloads staged through datastore uploads or shell access. MITRE names the vmkernel datastore events and the hostd remote access and file upload calls.
-
Alert on obfuscated scripts in Microsoft Defender
Microsoft's attack surface reduction rule Block execution of potentially obfuscated scripts looks for suspicious properties in obfuscated scripts. Microsoft says it needs cloud-delivered protection and relies on AMSI, and that it supports PowerShell scripts. Use audit mode to see what it would block, then review the AsrObfuscatedScriptAudited events in advanced hunting.
-
Data sources MITRE lists
Command Execution, File Creation, File Metadata, File Modification, Network Traffic Content, OS API Execution, Process Creation
How to defend
-
Use anti-malware with script scanning
Anti-virus can quarantine suspicious files, and the Antimalware Scan Interface on current Windows versions helps inspect content after it has been unpacked.
-
Turn on attack surface reduction
Attack surface reduction rules on current Windows versions can block execution of payloads that look obfuscated.
-
Review fileless storage
Check places such as the Registry and the WMI repository from time to time for abnormal data.
Frequently Asked Questions
What is Obfuscated Files or Information?
T1027 is when an attacker encrypts, encodes or packs a file, program or command to hide its real content. MITRE lists 18 sub-techniques under it.
How does obfuscation help attackers?
Security tools often look for known patterns. Changing how content looks means the patterns no longer match, while the content still works when it runs.
How can I detect obfuscated files?
Link script runs or odd parent processes to the creation of encoded, compressed or encrypted files. Watch encoding and archive tools used in scripts, and encoded files moving over web or file transfer protocols.
How do I defend against obfuscation?
Use anti-malware with script scanning, including the Antimalware Scan Interface on current Windows, turn on attack surface reduction rules, and check the Registry and WMI repository for abnormal data.
Which threat groups and malware use obfuscated files or information?
MITRE lists many. In our library, 31 threat group profiles and 26 malware profiles appear in the list by sub-technique above. Kimsuky is listed under nine lines, the most of any profile. The sub-techniques with the most profiles are T1027.013 Encrypted/Encoded File, T1027.002 Software Packing and T1027.010 Command Obfuscation.
