Data Encoding

Adversaries may encode data to make the content of command and control traffic more difficult to detect. Command and control (C2) information can be encoded using a standard data encoding system. Use of data encoding may adhere to existing protocol specifications and includes use of ASCII, Unicode, Base64, MIME, or other binary-to-text and character encoding systems.[1] [2] Some data encoding systems may also result in data compression, such as gzip.

ID: T1132
Sub-techniques:  T1132.001, T1132.002
Platforms: ESXi, Linux, Windows, macOS
Contributors: Itzik Kotler, SafeBreach
Version: 1.3
Created: 31 May 2017
Last Modified: 24 October 2025

Procedure Examples

ID Name Description
S0128 BADNEWS

After encrypting C2 data, BADNEWS converts it into a hexadecimal representation and then encodes it into base64.[3]

S0132 H1N1

H1N1 obfuscates C2 traffic with an altered version of base64.[4]

S0362 Linux Rabbit

Linux Rabbit sends the payload from the C2 server as an encoded URL parameter. [5]

S0699 Mythic

Mythic provides various transform functions to encode and/or randomize C2 data.[6]

S0386 Ursnif

Ursnif has used encoded data in HTTP URLs for C2.[7]

G1047 Velvet Ant

Velvet Ant sent commands to compromised F5 BIG-IP devices in an encoded format requiring a passkey before interpretation and execution.[8]

Mitigations

ID Mitigation Description
M1031 Network Intrusion Prevention

Network intrusion detection and prevention systems that use network signatures to identify traffic for specific adversary malware can be used to mitigate activity at the network level. Signatures are often for unique indicators within protocols and may be based on the specific obfuscation technique used by a particular adversary or tool, and will likely be different across various malware families and versions. Adversaries will likely change tool C2 signatures over time or construct protocols in such a way as to avoid detection by common defensive tools. [9]

Detection Strategy

ID Name Analytic ID Analytic Description
DET0108 Detection Strategy for Data Encoding in C2 Channels AN0302

Atypical processes (e.g., powershell.exe, regsvr32.exe) encode large outbound traffic using Base64 or other character encodings; this traffic is sent over uncommon ports or embedded in protocol fields (e.g., HTTP cookies or headers).

AN0303

Custom scripts or processes encode outbound traffic using gzip, Base64, or hex prior to exfiltration via curl, wget, or custom sockets. Encoding typically occurs before or during outbound connections from non-network daemons.

AN0304

Processes use built-in encoding utilities (e.g., base64, xxd, or plutil) to encode file contents followed by HTTP/HTTPS transfer via curl or custom applications.

AN0305

ESXi daemons (e.g., hostd, vpxa) are wrapped or impersonated to send large outbound traffic using gzip/Base64 encoding over SSH or HTTP. These actions follow suspicious logins or shell access.

References