Exfiltration (TA0010) Techniques
Introduction
Investigating data exfiltration forensically on workstations and server systems involves identifying and analysing how sensitive data was transferred from the network. This process is critical in understanding the scope of a security breach. Exfiltration can occur in various ways, including unauthorised email transmissions, external storage devices, cloud storage uploads, and covert channels.
Understanding Common Exfiltration Techniques
Email Transmission: Unauthorised sending of sensitive data via email.
Removable Media: Copying data to USB drives or other removable media.
Network Transfer: Utilising FTP, HTTP, or other protocols to transfer data to external servers.
Cloud Storage: Uploading data to cloud storage services.
Encrypted Channels: Using VPNs, SSH tunnels, or other encrypted methods to hide data transmission.
Data Collection and Preservation
Forensic Imaging: Create exact images of the hard drives of affected systems using tools like FTK Imager or dd.
Memory Capture: Use tools like Magnet RAM Capture or WinPmem to capture volatile memory.
Log Collection: Gather network logs, firewall logs, system logs, and application logs.
Email Analysis
Email Server Logs: Review logs for signs of large email transmissions or emails sent to unusual external addresses.
Email Client Analysis: Examine the email clients on affected systems for sent items, drafts, or deleted emails.
Removable Media Analysis
USB Device History: Windows stores a history of connected USB devices in the registry. Examine this for evidence of any unknown devices.
File System Analysis: Check for recently accessed files or file copies that coincide with the connection times of external media.
Network Traffic Analysis
Network Monitoring Tools: Use tools like Wireshark or Tcpdump to analyse captured network traffic for data transfers to unusual external IP addresses.
Firewall and Proxy Logs: Review logs for large data transfers or connections to known file-sharing or cloud storage sites.
Cloud Storage and Web Uploads
Browser History and Cookies: Examine web browser history and cookies for access to cloud storage websites.
Web Proxy Logs: Analyse web proxy logs for uploads to cloud services.
Analysing Encrypted Traffic
Decrypting Traffic: Where possible and legal, decrypt encrypted network traffic to inspect the contents.
TLS/SSL Certificate Analysis: Review certificates for any unrecognised or self-signed certificates that may have been used in exfiltration.
File Access and Movement Analysis
File Access Logs: Review logs for files being accessed that contain sensitive information.
Recent Documents and File Timestamps: Examine recent documents and file timestamps for evidence of copying or accessing large volumes of data.
Use of Specialised Forensic Tools
Forensic Suites: Tools like EnCase, Autopsy, or AXIOM Cyber for comprehensive analysis.
Network Analysis Tools: Wireshark, Tcpdump, NetWitness for network traffic analysis.
Documentation and Reporting
Detailed Documentation: Keep a detailed record of all findings, tools used, and investigative processes.
Forensic Report: Prepare a comprehensive report detailing the exfiltration methods identified, data compromised, and impact assessment.
Post-Investigation Actions
Mitigation and Remediation: Implement necessary security measures to prevent future incidents.
Recovery and Notifications: Follow organisational and legal protocols for data breach response, including notifying affected parties if necessary.
Key Considerations
Legal Compliance: Ensure the investigation complies with legal and regulatory requirements, especially when dealing with encrypted traffic and privacy-sensitive data.
Data Confidentiality: Maintain strict confidentiality and integrity of data throughout the investigation process.
Chain of Custody: Maintain a clear chain of custody for all evidence collected.
Forensic investigations of data exfiltration require careful analysis of various data sources and the application of appropriate forensic techniques. Tailoring the investigation to the specifics of the incident and the nature of the data involved is crucial.
Using KQL to Investigate Data Exfiltration Activities in an Environment Using Defender/Sentinel
Exfiltration techniques involve adversaries stealing data from a compromised network or system and transferring it to an external location under their control.
1. T1048.003 - Exfiltration Over Alternative Protocol: Exfiltration Over Unencrypted/Obfuscated Non-C2 Protocol
Objective: Detect attempts to exfiltrate data using unencrypted or obfuscated protocols that are not typically used for Command and Control.
Detect Data Exfiltration Over FTP
Purpose: Identify FTP PUT requests used to upload files to an external FTP server.
Monitor for Exfiltration Over HTTP Using Non-Standard Ports
Purpose: Detect HTTP POST requests on non-standard ports that may be used for exfiltration.
Identify Large Data Transfers Over FTP
Purpose: Monitor for large file uploads over FTP, indicating potential data exfiltration.
Detect Exfiltration Over SMTP
Purpose: Identify SMTP DATA commands that could be used to send sensitive data via email.
Monitor for DNS-Based Exfiltration
Purpose: Detect DNS queries with uncommon record types, which could indicate DNS tunneling for data exfiltration.
Identify Exfiltration Over ICMP
Purpose: Monitor for large ICMP packets, which may be used to exfiltrate data.
2. T1052.001 - Exfiltration Over Physical Medium: USB Drive
Objective: Detect attempts to exfiltrate data via physical media, such as USB drives.
Detect USB Drive Insertion
Purpose: Identify when a USB drive is inserted into a system, which could be used for data exfiltration.
Monitor for File Transfers to USB Drives
Purpose: Detect files being copied to a USB drive, which could indicate data exfiltration.
Identify Execution of Files from USB Drives
Purpose: Monitor for the execution of files directly from a USB drive.
Detect Unusual Activity on USB Drives
Purpose: Identify file deletions on USB drives, which may be an attempt to cover tracks after data exfiltration.
Monitor for Large Data Transfers to USB Drives
Purpose: Detect large files being transferred to a USB drive, indicating potential exfiltration.
Identify Suspicious USB Drive Activity by Non-Admin Users
Purpose: Monitor for USB drive usage by non-admin users, which may be unusual in a secured environment.
3. T1041 - Exfiltration Over C2 Channel
Objective: Detect attempts to exfiltrate data over established Command and Control (C2) channels.
Detect Data Sent to Known C2 Servers
Purpose: Identify data exfiltration attempts to known C2 servers.
Monitor for Large POST Requests to External IPs
Purpose: Detect large POST requests to external IPs that could be used for data exfiltration.
Identify Unusual C2 Channel Activity After Hours
Purpose: Monitor for C2 channel activity outside of normal business hours, which could indicate exfiltration.
Detect C2 Channels Using Non-Standard Ports
Purpose: Identify C2 channels that are exfiltrating data using non-standard ports.
Monitor for Encrypted Traffic to Untrusted IPs
Purpose: Detect encrypted traffic to external IP addresses that could be exfiltrating data.
Identify Suspicious DNS Tunneling Activity
Purpose: Monitor for DNS tunneling activity that could be used for data exfiltration.
4. T1020 - Automated Exfiltration
Objective: Detect and investigate automated processes that continuously exfiltrate data from the environment.
Detect Scheduled Tasks for Data Exfiltration
Purpose: Identify scheduled tasks configured to automate data exfiltration.
Monitor for Automated File Transfers
Purpose: Detect automated file transfers to external servers.
Identify Use of PowerShell for Automated Data Exfiltration
Purpose: Monitor for PowerShell scripts that automate data exfiltration tasks.
Detect Use of Automated Exfiltration Tools
Purpose: Identify the use of tools that automate data transfers to external servers.
Monitor for Continuous Network Activity to External IPs
Purpose: Detect continuous or persistent network connections to external IPs that could indicate automated exfiltration.
Identify Repeated Attempts to Exfiltrate Data
Purpose: Monitor for repeated exfiltration attempts to external IPs.
5. T1030 - Data Transfer Size Limits
Objective: Detect and investigate attempts to exfiltrate data while staying under network or data transfer size limits to avoid detection.
Detect Multiple Small Data Transfers
Purpose: Identify multiple small data transfers that could be an attempt to avoid detection.
Monitor for Continuous Data Transfers Staying Below Size Limits
Purpose: Detect continuous data transfers that stay below common detection thresholds.
Identify Repeated Small Exfiltration Attempts
Purpose: Monitor for repeated small exfiltration attempts via POST requests.
Detect Stealthy Exfiltration Using Non-Standard Ports
Purpose: Identify data exfiltration attempts using non-standard ports while keeping transfer sizes small.
Monitor for Exfiltration Via Chunked Transfer Encoding
Purpose: Detect exfiltration attempts using chunked transfer encoding to bypass size limits.
Identify Exfiltration Attempts to Unusual IPs
Purpose: Monitor for exfiltration attempts to unusual or unrecognized external IP addresses.
Last updated