Data Exfiltration: Channels, Detection and Sizing the Loss
Skip to content

Data Exfiltration Investigation

Data exfiltration is the unauthorized transfer of data out of an organization. It may be carried out by an external attacker, an insider, or malware, and it turns a security incident into a data breach.

This guide is a reference to the channels data leaves through. For each one it covers how the channel is used, which records capture it, and where the blind spots are. It ends with a worked example of sizing what was taken.

The Question Every Incident Raises

After an incident, the business asks one question above the others: what did they take? The answer decides notification, legal exposure, and what customers are told.

It is hard to answer because organizations record who signed in far more thoroughly than what data moved. Transfers are encrypted, so network devices see volume and destination and not content. Attackers use the same cloud storage and transfer tools that staff use every day.

An investigation works from several partial sources and combines them. The channel the data left through decides which sources matter.

Who Takes Data, and Why

The motive shapes the method, and the method decides where the evidence is.

Ransomware and Extortion Groups

Theft for leverage. The attacker wants a large volume of anything that would embarrass or expose the victim: HR files, finance, contracts, customer records, and legal correspondence. They take it quickly, in the days or hours before encryption, and they are not selective. Volume is high and the transfer is noisy, which makes this the easiest kind to detect and to size.

Fraud Groups

Theft to enable a crime. An attacker in a mailbox copies invoices, bank details, and identity documents to commit payment fraud or identity theft. Volumes are small and the activity happens entirely in the cloud service. Evidence is in audit logs, not on the network.

Insiders

Theft for the next job, or out of grievance. A departing salesperson takes the customer list. An engineer takes designs. The person has legitimate access and knows what is valuable. The amounts are modest and spread over weeks.

State-Backed Intruders

Theft for intelligence. Access is maintained for months or years, and specific information is taken in small quantities through channels built to avoid notice. This is the hardest kind to detect and the least common for most organizations.

Accidental Exposure

No thief at all. A storage bucket left public, a file shared with anyone who has the link, a database reachable from the internet. Data can be copied by automated scanners without the organization ever being a deliberate target.

An investigation should settle which of these it is dealing with early. A ransomware case needs firewall logs and file server forensics. A mailbox case needs cloud audit records. An insider case starts from HR dates and the person’s device.

Staging Comes First

External attackers rarely upload files one by one. They gather what they want in one place, compress it, and send the archives. The staging step is often better recorded than the transfer.

Where staging happens

Folders that administrators seldom open, such as temporary and system logging directories, or a new folder on a file server’s data drive.

What it looks like

A compression utility run with password and split-volume options, producing archives of several gigabytes with names that mean nothing.

What it leaves behind

Program execution records, the archive tool’s own history of recently created files, file system journal entries, and sometimes the archives themselves or their remnants after deletion.

Why it matters

The folders an archive was built from show what the attacker selected, even where no log captured the upload.

Insiders stage less and copy directly to their destination.

How Fast Data Leaves

Attackers do not need all the data, only enough to extort, and an ordinary business connection moves that much within hours.

A file server on a business connection with 100 megabits per second of upload capacity can send roughly 45 gigabytes an hour. A full working day’s transfer is several hundred gigabytes. On a gigabit connection the same data moves in a tenth of the time.

In practice the limit is usually how fast the attacker can find and compress what they want. Compression helps with some data and not with other data. Text, CSV exports, and database dumps compress to about a third of their size, which triples the effective speed. Modern Office files, PDFs, and images are already compressed and barely shrink. Either way, a department’s file share of 100 gigabytes can be archived and uploaded overnight.

A joint FBI and CISA advisory on the Akira ransomware group notes incidents where data was taken a little over two hours after initial access.

For defenders, the arithmetic has consequences.

Overnight is enough

Monitoring that is reviewed the next morning sees a completed theft.

Volume alerts need sensible thresholds

An alert set at a terabyte will miss most real cases, which are often tens of gigabytes.

Exfiltration Channels

Cloud Synchronization Tools

Command-line tools that copy whole folders to cloud storage are the most common method in ransomware cases. They are small, need no installation, and are often renamed to look like system files.

Records: endpoint process history with the full command line, which names the source folder and the destination. Firewall and proxy logs show sustained uploads to a storage provider. Blind spot: without command-line logging, only the volume is visible.

File Transfer Clients

Ordinary file transfer programs sending archives to a server the attacker controls, over encrypted protocols.

Records: process history, the client’s own saved session list and logs, and firewall records of long-lived outbound connections on file transfer ports. Blind spot: transfers over standard web ports blend with normal traffic.

Browser Uploads

Files uploaded through a web browser to file-sharing or paste sites, common with insiders and with attackers working over a remote desktop session.

Records: proxy and DNS logs for the destination, and browser history on the device. Blind spot: the proxy sees the site and the volume and rarely the file names.

Cloud Application Downloads

An attacker with a stolen staff account downloads or synchronizes files and mail straight from the cloud service. Nothing touches the organization’s network.

Records: the cloud service’s audit log, which lists files downloaded, synchronized, or shared, by account and time. Blind spot: only the cloud provider records it, and retention is limited.

Email

Files attached and sent, or mail automatically forwarded, to an external address.

Records: message trace, mailbox audit records, and forwarding settings. Blind spot: message trace shows that a message went and how large it was, and the content is gone if the sender deleted it and no retention hold applies.

Application Access

An attacker who controls an account grants a third-party application access to its mailbox or files, then pulls the data through the cloud provider’s programming interface.

Records: the cloud audit log’s entries for the consent and for the application’s access. Blind spot: the downloads appear as application activity and not as a sign-in by the user, so sign-in monitoring does not show them.

Remote Access Sessions

Files copied through the file transfer or clipboard feature of a remote desktop or remote support tool.

Records: the tool’s session and transfer logs, where it keeps them. Blind spot: many remote tools record that a session happened and nothing about what was transferred.

Database Access

Large queries, exports, or copies of backup files taken directly from a database server.

Records: database audit logs and query history, and file access records for backup files. Blind spot: database auditing is frequently switched off for performance reasons.

Removable Media and Printing

Files copied to a USB drive or printed, almost always by an insider.

Records: endpoint device connection history and print logs. Blind spot: device history shows a drive was connected, and file copy records exist only where the endpoint tool collects them.

Covert Channels

Data hidden in DNS queries or other traffic that is always allowed. Slow, and rare outside targeted intrusions.

Records: DNS logs showing very large numbers of unusual queries to one domain. Blind spot: organizations that do not keep DNS logs.

The Insider Case

Insider exfiltration follows a calendar. The risk concentrates in the weeks around a resignation, and the pattern is consistent enough to check for routinely.

Before resigning

Unusual interest in files outside the person’s current work. Bulk downloads from customer, pricing, or design repositories. Large numbers of files opened and closed quickly.

Around the resignation

Forwarding mail to a personal address. Uploads to personal cloud storage. A USB drive connected for the first time in months. Printing volumes above normal.

In the final days

Deleting files, clearing browser history, and wiping the device before returning it.

The evidence sits in different places from an external attack. Cloud audit logs show downloads and sharing to personal accounts. Mail logs show forwarding. Endpoint history shows removable devices and personal-storage websites. HR holds the dates that give the activity its meaning.

A standing review and device preservation make insider cases manageable. Review the activity of departing staff with access to sensitive data as a standard step, covering the 30 to 90 days before their notice. Preserve the returned device before it is rebuilt for the next user, since it is often the best evidence available.

Handle these cases with HR and legal counsel from the start. An employee’s activity may have an innocent explanation, and the organization’s response has employment and privacy implications of its own.

Detection Methods in Depth

No single method covers every channel, so these are used together.

Baselines Per Host

Record what each server normally sends: how much, to where, and when. Then alert on departures from that server’s own pattern, such as a system that normally sends megabytes sending gigabytes, or uploading at night or on a weekend. Most systems download more than they upload, so a reversed ratio over several hours is a signal as well. A database server that has never initiated an outbound connection doing so once is more significant than a workstation sending a gigabyte.

First-Seen Destinations

Track the external destinations the organization’s servers contact. A storage provider or hosting network that no system has ever used, contacted by a server, is a strong signal on its own.

Process and Destination Together

The most reliable detections pair an archive or transfer tool running on a server with a large upload from the same server. Either alone has innocent explanations. Together they rarely do.

File Access Volume

One account opening thousands of files across shares in a short period is the collection step seen from the file server. File access auditing on the shares that hold sensitive data records it.

Decoy Files

Place files with attractive names in shares where no legitimate process should open them. Any read is an alert. Some decoys carry a web beacon or a credential that reports when the file is opened or the credential is used outside the network.

Egress Restrictions

Allow servers to reach only the external services they need. An attacker who cannot upload to cloud storage from the file server has to move the data somewhere that can, which adds steps and creates more to detect. Limiting how much a server may send has the same effect on speed, turning a fast theft into a slow one.

Content Inspection

Data loss prevention tools inspect content for patterns such as card numbers or document labels. They help with accidental disclosure and careless insiders. Against a deliberate attacker they are limited, since archives are encrypted before they leave.

Cloud Activity Monitoring

For data held in cloud services, alert on an account downloading far more than its normal pattern, on synchronization of entire libraries to a new device, and on sharing links created in bulk.

Detection during the transfer limits the loss. Detection during staging, hours earlier, can prevent it.

Sizing What Was Taken

The following example shows how separate sources combine into a defensible statement.

A file server was encrypted on a Sunday. The investigation finds the following.

1
The firewallIts logs show 38 GB sent from the file server to a cloud storage provider between 01:10 and 07:25 on the Saturday.
2
Process historyThe server’s records show a synchronization tool, renamed, run at 01:08 with a staging folder as its source.
3
The staging folderIt is empty, but the archive tool’s history lists 19 archives created there on the Friday evening.
4
File system recordsThey give the size of those archives before deletion: 37.6 GB in total.
5
Process command linesThe recorded command lines for the archive tool show it was pointed at three shares: Finance, HR, and Contracts.
6
The sharesThose three hold 46 GB, mostly Office documents, PDFs, and scanned images. A fourth share, Engineering, holds 400 GB and was never referenced.

The sources agree. The volume uploaded matches the archives. The archives were built from three named shares, and 46 GB shrinking to 37.6 GB, a reduction of about a fifth, is what those file types produce because they are already compressed. The three shares account for the whole upload, and no archive command named the Engineering share, so nothing in the evidence points to it.

Without step 5, the statement would be weaker: 38 GB left, from a server holding 446 GB. That is still useful, because volume sets a ceiling on what could have gone. The ceiling has to allow for compression. Archives of 38 GB could hold about that much in documents and scans, or more than 100 GB of text and database exports. On either reading the whole Engineering share could not have fit.

Stating the Result

Report what was taken in levels of confidence, so the business and legal counsel can act on each part appropriately.

Confirmed

Evidence shows specific data left. In the example, the Finance, HR, and Contracts shares.

Likely

Evidence shows access and a transfer, without proof of the exact content.

Possible

The attacker could reach the data, and no record shows whether it was taken.

Excluded

Evidence shows the data was out of reach or could not fit in what was transferred.

Where records are incomplete, the notification assessment usually has to proceed on what was accessible. State that reasoning plainly. A clear account of the limits serves regulators and affected people better than a confident claim that later proves wrong.

Logs That Are Usually Missing

Most failed exfiltration investigations fail for the same reason: the record existed once and was gone by the time anyone asked. Each blind spot above has a fix, and the fix has to be in place beforehand.

RecordWhat to do before an incident
Firewall and proxy logsSend them to central logging with months of retention, and log each session at its end so the bytes sent are recorded.
Process command linesEnable command-line auditing, and cover servers as well as workstations.
File access eventsEnable auditing on the shares that hold sensitive data.
Cloud audit logsConfirm auditing is on for files, mail, and application consent, and export the records to longer-term storage.
Database audit logsAudit at least exports and large reads on sensitive databases.
DNS logsLog queries at the resolver.
Remote tool transfer logsPrefer tools that log transfers, and restrict the rest.

Retention decides how far back an investigation can see, and it cannot be extended afterward. How long each kind of record lasts by default is listed in our guide to DFIR.

Exfiltration Investigation With ThreatDefence

ThreatDefence investigates suspected data theft with the records this guide describes. Network detection and response keeps continuous traffic records, endpoint agents collect evidence of staging and transfer tools, and cloud audit logs show sharing, mail, and downloads. Forensic chain of custody is maintained throughout.

Data exfiltration is also one of the hunts our threat hunters run across monitored environments, and our 24x7 SOC monitors for the staging activity that comes before a transfer.

Forensic collection in the ThreatDefence portal: artifacts collected from a host, evidence by source, collection progress, fleet hunt results and findings

Experiencing a breach?

Our incident response team answers 24x7, with or without a retainer.

Sources

Talk to Our Experts

Discuss data theft investigation, forensic readiness, and 24x7 monitoring for your organization.

    I'm an MSP, MSSP, or reseller

    By submitting this form, you accept the terms in our privacy policy.

    Frequently Asked Questions

    What is data exfiltration?

    Data exfiltration is the unauthorized copying or transfer of data from an organization’s systems to a location outside its control. It can be carried out by external attackers, insiders, or malware, through networks, cloud services, email, or physical media. The original usually stays in place, which is why a theft can go unnoticed until the data appears somewhere else.

    How is data exfiltration detected?

    By pairing what ran with what left. An archive or transfer tool starting on a server, followed by an upload far above that server’s normal volume, is the strongest signal. In cloud services the equivalent is one account downloading or synchronizing far more than usual. A fixed volume threshold on its own misses most cases, because real thefts are often only tens of gigabytes.

    How can we tell what data was stolen?

    Investigators combine evidence of what the attacker’s accounts could access, which files were gathered or compressed, outbound transfers, and cloud audit activity. File listings and recoverable archives can help identify specific content. Where records are incomplete, the assessment should distinguish confirmed, likely, and possible exposure.

    What are common data exfiltration techniques?

    It depends on who is taking the data. Ransomware groups most often copy archives to cloud storage with a command-line synchronization tool. Attackers holding a stolen account use the cloud service’s own download and sync features. Insiders use personal email, personal cloud storage, and USB drives. Database exports, file transfer through remote access tools, and DNS tunneling are less common.

    How long are the logs needed for an exfiltration investigation kept?

    Firewall and proxy logs kept on the device often last only days. Microsoft 365 keeps standard audit records for 180 days, and Microsoft Entra ID keeps sign-in logs for 7 to 30 days depending on the license. Windows event logs overwrite themselves once they reach a fixed size. Confirm each figure for your own devices and tenant, since configuration changes all of them.

    What is the difference between data exfiltration and a data breach?

    Data exfiltration is the act of removing data. A data breach is the wider event in which information is accessed, disclosed, or lost without authorization. Exfiltration is one way a breach occurs, and usually the most serious. A breach can also happen with no exfiltration at all, for example when data is viewed in place or left publicly exposed.

    Can encrypted traffic hide data exfiltration?

    Encrypted traffic hides the content of a transfer from network devices that cannot inspect it. Those devices can still record the destination, volume, and timing where supported. Endpoint process records and cloud audit logs can help connect the encrypted traffic to specific data.

    Does ransomware always involve data exfiltration?

    No, though many ransomware attacks now include it. Attackers frequently copy data before encrypting systems, to use the threat of publication as further pressure. Every ransomware investigation should check for data theft. The stages around the theft are covered in our guide to ransomware attack stages, detection and response.