Has used Base64 encoded shellcode in infection chains to evade detection.1
Encrypted/Encoded File T1027.013
- Tactic
- Stealth
- Platforms
- Linux, macOS, Windows
- Version
- 2.0
- Created
- 29 March 2024
- Last modified
- 12 May 2026
- Contributors
- Andrew Northern, @ex_raritas; David Galazin @themalwareman1; Jai Minton, @Cyberraiju
Adversaries may encrypt or encode files to obfuscate strings, bytes, and other specific patterns to impede detection. Encrypting and/or encoding file content aims to conceal malicious artifacts within a file used in an intrusion. Many other techniques, such as Software Packing, Steganography, and Embedded Payloads, share this same broad objective. Encrypting and/or encoding files could lead to a lapse in detection of static signatures, only for this malicious content to be revealed (i.e., Deobfuscate/Decode Files or Information) at the time of execution/use.
Encrypted/Encoded File MITRE reference T1027.013
40 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 hexadecimal string encoding to hide critical JavaScript module names, function names, and C2 URLs, which are decoded dynamically at runtime.1
XOR encodes a Cobalt Strike installation payload in a DLL file that is decoded with a hardcoded key when called by a legitimate 7zip installation process.1
Has used encrypted payloads within files for follow-on execution and defense evasion.1
Initial payloads included encoded follow-on payloads located in the resources file of the first-stage loader.1
Has used scripts encoded in Base64 certificates to distribute malware to victims.1
All 40 groups for this technique · 6 newest in this preview
13 campaigns have been recorded using this technique. Listed newest first; dates are year-granularity and attribution is MITRE’s.
During the 2025 Poland Wiper Attacks, the adversaries utilized a Base64-encoded ZIP archive to prevent content analysis.1
During RedPenguin, UNC3886 generated Base64-encoded files in the FreeBSD shell environment of targeted Juniper devices.12
During Cutting Edge, threat actors used a Base64-encoded Python script to write a patched version of the Ivanti Connect Secure dsls binary.1
During ShadowRay, threat actors used Base64-encrypted Python code to evade detection.1
Mustang Panda stored installation payloads as encrypted files in hidden folders during RedDelta Modified PlugX Infection Chain Operations.1
Used encrypted payloads decrypted and executed in memory.1
All 13 campaigns for this technique · 6 newest in this preview
195 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 used a hybrid AES-256-GCM and RSA OAEP-SHA256 encryption to archive gathered data. Mini Shai-Hulud has also utilized custom MD5-keystream XOR cipher to encrypt data.1 Mini Shai-Hulud has also been deployed via an obfuscated script using Bun JavaScript runtime.2
Has used multi-stage payloads with double Base64-encoded scripts to evade static analysis.123
Has encrypted all strings in the code using position independent XOR encryption.1
Has used a custom addition-based function and a string stacking function for string encryption.1
Tsundere Botnet’s loader contained AES-CBC/PKCS7 encrypted blobs, which were descrypted and written to disk.1
The AshTag AshenOrchestrator component payload as been Base64 encoded and embedded with HTML content from the C2 server.1
All 195 software entries for this technique · 6 newest in this preview
Offense vs defense T1027.013
Is defensive coverage keeping up with adversary use? Eight counts, each ranked against all 697 ATT&CK techniques. Attack sits left, defense right, so a shape leaning left means adversaries are better documented here than defenders are equipped. Hover any spoke for its percentile and the share of techniques that have more. The timeline below shows when each side arrived.
How it got here
Adversary activity (campaign spans) over cumulative rule output. Each source is plotted independently from zero, so neither line includes the other. Campaign dates are year-granularity.
Encrypted/Encoded File detection strategy DET0087
MITRE names one behaviour worth catching for this technique and breaks it into 3 analytics, one per platform. Each carries the log sources it needs and the fields you tune per environment.
Encrypted or Encoded File Payload Detection Strategy
AN0237 · Windows
Detection of processes that load or decode encrypted/encoded files in memory and subsequently execute or inject them, indicating payload unpacking or memory-resident malware.
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.
| Data component | Name | Channel |
|---|---|---|
| Module LoadDC0016 | WinEventLog:Sysmon | EventCode=7 |
| Process CreationDC0032 | WinEventLog:Security | EventCode=4688 |
| Process AccessDC0035 | WinEventLog:Sysmon | EventCode=10 |
Tunable fields
MITRE calls these the analytic’s mutable elements: the thresholds and filters you set for your own environment.
| Field | What you tune |
|---|---|
| Image | Path of decoder utilities (e.g., certutil.exe, powershell.exe) can vary across environments. |
| CommandLine | Base64/hex strings used may change per encoded payload. |
| TimeWindow | The duration between file decode and execution may differ across implementations. |
AN0238 · Linux
Detection of suspicious use of shell utilities or scripts that decode or decrypt a payload and execute it without writing to disk.
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.
| Data component | Name | Channel |
|---|---|---|
| Process CreationDC0032 | auditd:SYSCALL | execve |
| Network Connection CreationDC0082 | linux:Sysmon | EventCode=3, 22 |
Tunable fields
MITRE calls these the analytic’s mutable elements: the thresholds and filters you set for your own environment.
| Field | What you tune |
|---|---|
| UserContext | Normal usage of base64, openssl, or gpg varies by user/role. |
| ProcessLineage | Parent-child process chains may differ across deployments. |
| TimeWindow | Time between decode and execution is implementation-specific. |
AN0239 · macOS
Detection of encoded payloads being decoded and executed in-memory using scripting tools or third-party decoders.
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.
| Data component | Name | Channel |
|---|---|---|
| Process ModificationDC0020 | macos:unifiedlog | memory mapping |
| Process CreationDC0032 | macos:endpointsecurity | es_event_exec |
| Command ExecutionDC0064 | macos:unifiedlog | log stream |
Tunable fields
MITRE calls these the analytic’s mutable elements: the thresholds and filters you set for your own environment.
| Field | What you tune |
|---|---|
| ScriptContent | Encoded payload content varies across adversaries. |
| ExecutionChain | Sequence of tools or scripts executed can differ. |
| UserContext | May depend on whether user is admin, daemon, or system account. |
Anti-virus can be used to automatically detect and quarantine suspicious files, including those with high entropy measurements or with otherwise potentially malicious signs of obfuscation.
On Windows 10+, enable Attack Surface Reduction (ASR) rules to block execution of potentially obfuscated scripts. Security tools should be configured to analyze the encoding properties of files and detect anomalies that deviate from standard encoding practices.
Tests from Atomic Red Team (MIT licence) · technique definition