Custom Command and Control Protocol

From enterprise
Jump to: navigation, search
Custom Command and Control Protocol
Technique
ID T1094
Tactic Command and Control
Platform Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP, Windows 7, Windows 8, Windows Server 2003 R2, Windows Server 2008 R2, Windows Server 2012 R2, Windows Vista, Windows 8.1, Linux, Windows 10, MacOS, OS X
Data Sources Packet capture, Netflow/Enclave netflow, Process use of network, Process monitoring
Requires Network Yes

Adversaries may communicate using a custom command and control protocol instead of using existing Standard Application Layer Protocol to encapsulate commands. Implementations could mimic well-known protocols.

Examples

  • APT32 uses Cobalt Strike's malleable C2 functionality to blend in with network traffic.12
  • Lazarus Group malware uses a unique form of communication encryption that mimics TLS but uses a different encryption method, evading SSL man-in-the-middle decryption attacks.3
  • Cobalt Strike allows adversaries to modify the way the "beacon" payload communicates. This is called "Malleable C2" in the Cobalt Strike manual and is intended to allow a penetration test team to mimic known APT C2 methods.42
  • Duqu is capable of using its command and control protocol over port 443. However, Duqu is also capable of encapsulating its command protocol over standard application layer protocols. The Duqu command and control protocol implements many of the same features as TCP and is a reliable transport protocol.5
  • RTM uses HTTP POST requests with data formatted using a custom protocol.6
  • RedLeaves can communicate to its C2 over TCP using a custom binary protocol.7

Mitigation

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 protocol 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.8

Detection

Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Analyze packet contents to detect communications that do not follow the expected protocol behavior for the port that is being used.8