T1030 - Data Transfer Size Limits#

An adversary may exfiltrate data in fixed size chunks instead of whole files or limit packet sizes below certain thresholds. This approach may be used to avoid triggering network data transfer threshold alerts.

Atomic Tests#

Atomic Test #1 - Data Transfer Size Limits#

Take a file/directory, split it into 5Mb chunks

Supported Platforms: macos, linux

Dependencies: Run with sh!#

Description: The file must exist for the test to run.#
Check Prereq Commands:#
if [ ! -f /tmp/T1030/T1030_urandom ]; then exit 1; else exit 0; fi;
Get Prereq Commands:#
if [ ! -d /tmp/T1030 ]; then mkdir -p /tmp/T1030; touch /tmp/T1030/safe_to_delete; fi; dd if=/dev/urandom of=/tmp/T1030/T1030_urandom bs=25000000 count=1
Invoke-AtomicTest T1030 -TestNumbers 1 -GetPreReqs

Attack Commands: Run with sh#

cd /tmp/T1030; split -b 5000000 T1030_urandom
ls -l /tmp/T1030
Invoke-AtomicTest T1030 -TestNumbers 1

Cleanup:#

if [ -f /tmp/T1030/safe_to_delete ]; then rm -rf /tmp/T1030; fi;
Invoke-AtomicTest T1030 -TestNumbers 1 -Cleanup

Detection#

Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). If a process maintains a long connection during which it consistently sends fixed size data packets or a process opens connections and sends fixed sized data packets at regular intervals, it may be performing an aggregate data transfer. 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. (Citation: University of Birmingham C2)

Shield Active Defense#

PCAP Collection#

Collect full network traffic for future research and analysis.

PCAP Collection allows a defenders to use the data to examine an adversary’s network traffic more closely, including studying if it is encoded and/or encrypted. PCAP can be run through tools to replay the traffic to get a real-time view of what happened over the wire. These tools can also parse the traffic and send results to a SIEM for monitoring and alerting.

Opportunity#

There is an opportunity to collect network data and analyze the adversary activity it contains.

Use Case#

Collecting full packet capture of all network traffic allows you to review what happened over the connection and identify command and control traffic and/or exfiltration activity.

Procedures#

Collect PCAP on a decoy network to improve visibility into an adversary’s network activity.