Exfiltration Over Alternative Protocol: Exfiltration Over Symmetric Encrypted Non-C2 Protocol

Adversaries may steal data by exfiltrating it over a symmetrically encrypted network protocol other than that of the existing command and control channel. The data may also be sent to an alternate network location from the main command and control server.

Symmetric encryption algorithms are those that use shared or the same keys/secrets on each end of the channel. This requires an exchange or pre-arranged agreement/possession of the value used to encrypt and decrypt data.

Network protocols that use asymmetric encryption often utilize symmetric encryption once keys are exchanged, but adversaries may opt to manually share keys and implement symmetric cryptographic algorithms (ex: RC4, AES) vice using mechanisms that are baked into a protocol. This may result in multiple layers of encryption (in protocols that are natively encrypted such as HTTPS) or encryption in protocols that not typically encrypted (such as HTTP or FTP).

ID: T1048.001
Sub-technique of:  T1048
Tactic: Exfiltration
Platforms: ESXi, Linux, Windows, macOS
Version: 1.1
Created: 15 March 2020
Last Modified: 15 April 2025

Mitigations

ID Mitigation Description
M1037 Filter Network Traffic

Enforce proxies and use dedicated servers for services such as DNS and only allow those systems to communicate over respective ports/protocols, instead of all systems within a network.

M1031 Network Intrusion Prevention

Network intrusion detection and prevention systems that use network signatures to identify traffic for specific adversary command and control infrastructure and malware can be used to mitigate activity at the network level.

M1030 Network Segmentation

Follow best practices for network firewall configurations to allow only necessary ports and traffic to enter and exit the network.[1]

Detection

ID Data Source Data Component Detects
DS0017 Command Command Execution

Monitor for execution of encryption-related tools before outbound data transfer, use of symmetric encryption algorithms (AES, RC4, Blowfish) in scripts or binaries, or file encryption activity followed by network communication.

Analytic 1 - Detecting Symmetric Encryption Before Exfiltration

(EventCode=1 OR source="/var/log/audit/audit.log" type="execve")| where (command IN ("openssl enc -aes-256-cbc", "gpg -c", "python -c 'import Crypto.Cipher.AES'", "certutil -encode"))| eval risk_score=case( command IN ("openssl enc -aes-256-cbc", "gpg -c"), 9, command IN ("python -c 'import Crypto.Cipher.AES'", "certutil -encode"), 8)| where risk_score >= 8| stats count by _time, host, user, command, risk_score

DS0022 File File Access

Monitor for files being encrypted before transfer, temporary storage of encrypted files before exfiltration, or files with unusual extensions indicative of encryption (.aes, .enc, .bin).

Analytic 1 - Detecting Encrypted Files Before Exfiltration

(EventCode=11 OR EventCode=4663 OR source="/var/log/audit/audit.log" type="open")| where (file_path IN ("/tmp/", "/var/tmp/", "/home//Downloads/", "C:\Users\*\Documents\exfil") AND file_extension IN ("aes", "enc", "bin"))| eval risk_score=case( file_extension="aes" OR file_extension="enc", 9, file_extension="bin", 8)| where risk_score >= 8| stats count by _time, host, user, file_path, file_extension, risk_score

DS0029 Network Traffic Network Connection Creation

Monitor for outbound network connections using traditionally non-encrypted protocols, connections where data sent is significantly larger than data received, traffic spikes over uncommon ports (e.g., FTP, SMB, SMTP, ICMP), or traffic patterns indicative of encrypted payload transmission.

Analytic 1 - Detecting Symmetric Encrypted Exfiltration via Alternative Protocols

(EventCode=3 OR source="zeek_conn.log" OR source="firewall_logs")| where (dest_port IN (21, 25, 53, 139, 445, 587, 990) AND bytes_out > 10000000)| stats count, sum(bytes_out) as total_bytes by _time, host, process, dest_ip, dest_port| where count >= 3 AND total_bytes > 50000000| eval risk_score=case( total_bytes > 100000000, 9, total_bytes > 50000000, 8)| where risk_score >= 8| table host, dest_ip, total_bytes, dest_port, risk_score

Network Traffic Content

Monitor for encrypted payloads using symmetric cryptography over plaintext channels, detection of RC4, AES, or Blowfish in network traffic, or HTTP, FTP, or DNS packets containing unusually long Base64 or XOR-encoded strings.

Analytic 1 - Detecting Encrypted Payloads in Alternative Protocols

(EventCode=3 OR source="zeek_http.log" OR source="dns.log")| where (uri_length > 200 OR request_body_length > 5000)| eval encoded_data=if(match(uri, "([A-Za-z0-9+/=]{100,})") OR match(request_body, "([A-Za-z0-9+/=]{100,})"), 1, 0)| where encoded_data=1| stats count by _time, host, user, uri, request_body_length, risk_score| eval risk_score=case( request_body_length > 10000, 9, request_body_length > 5000, 8)| where risk_score >= 8| table host, uri, request_body_length, risk_score

Network Traffic Flow

Monitor network data for uncommon data flows. Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious.

References