← All articles

ARTICLE · DATA LEAK ACTIVE TESTING

Detecting exfiltration: the SOC method and how to measure time to detection

  • Detection
  • 6 min read
  • Updated
Dark world map dotted with red points, an image of the signals a SOC has to spotKnown T0, measured delay

The short version

Time to detection splits into collection, correlation and triage. Fix collection first: no rule fires on an event that has not reached the SIEM.

Test your SOC’s exfiltration detection by sending a decoy out yourself and timing each step, from the moment it leaves to the moment an analyst confirms the alert. You get three durations instead of one, each with its own owner.

Exfiltration use cases worth a dedicated rule

Pick five to ten, built around the data an attacker would want, and instrument each one properly rather than switching on every vendor rule; the MITRE ATT&CK framework and its Exfiltration tactic give the list a structure. These five usually earn their place:

  • Abnormal outbound volume: a host sending far more than usual. One common build: alert when an hour’s outbound bytes exceed both the host’s own 99th percentile over 30 days and a fixed floor, so a laptop going from 2 MB to 20 MB pages nobody.
  • Upload to personal cloud storage: files sent to a service the company has not sanctioned (see data leakage through personal cloud and collaboration tools); ATT&CK lists it as T1567.002.
  • Protocol abuse and covert channels: DNS tunnelling (T1048.003, or T1071.004 when the tunnel also carries command and control) packs data into subdomain labels of up to 63 characters, so alert on long query names and on a host generating many unique subdomains under one parent domain. Add encrypted traffic to newly registered or rarely seen domains.
  • Data staging: files archived just before a transfer (T1560, Archive Collected Data). Watch for 7-Zip or RAR run from a user session with a password switch (-p): Sysmon Event ID 1 gives you the command line, Event ID 11 the archive being written.
  • A trusted account pulling files in bulk: in the Microsoft 365 unified audit log, count FileDownloaded and FileSyncDownloadedFull events per user per hour, and alert above that user’s own 99th percentile, with a fixed floor as above.

The log sources exfiltration detection depends on

Check the telemetry before you judge a rule.

Source What it lets you see Classic blind spot
EDR / endpoint logs Process behind the transfer, file access, use of removable media Hosts without the agent, agents in a degraded state
Proxy and web gateway Destinations, volumes, URL categories Traffic that bypasses the proxy, partial TLS inspection
Firewall and network flows Outbound volumes per host, ports and destinations No application or user context
DNS logs Unusual lookups, recently registered domains External resolvers used directly
DLP, CASB, email Sensitive content detected, external shares, attachments Alerts not forwarded to the SIEM, policies in audit mode
SaaS and cloud logs Shares, exports, public link creation Delay before the provider makes the logs available

Microsoft sets no fixed delay for the Microsoft 365 unified audit log and says records for core services (Exchange, SharePoint, OneDrive, Teams) are typically available 60 to 90 minutes after the event. Any rule built on that log starts with a T1 minus T0 of around an hour. To measure your own lag, compare _indextime with _time in Splunk, or take ingestion_time() minus TimeGenerated in Microsoft Sentinel: one query gives you the spread per source. The blind spots of encrypted traffic inspection are detailed in our article on HTTPS exfiltration.

Measuring time to detection

Four timestamps

One “time to detection” figure hides where the minutes go. Split it four ways:

  1. T0: actual start of the data leaving.
  2. T1: arrival of the event in the SIEM.
  3. T2: rule firing and alert creation.
  4. T3: triage by an analyst (confirmed true positive).

Diagram · time to detection broken down

Time to detection in four timestampsA timeline with four timestamps: T0 the data starts leaving, T1 the event reaches the SIEM, T2 the alert is created, T3 an analyst triages it. Between them, three segments to measure separately: collection, correlation and triage.T0EgressT1SIEMT2AlertT3TriagedCollectionCorrelationTriage

T1 minus T0 measures your collection chain. T2 minus T1 measures correlation, and a scheduled rule sets its own floor: a Microsoft Sentinel analytics rule that runs every 15 minutes can take that long to see an event that has just landed, and with a lookback no wider than the run interval, a late event can fall between two runs. Widen the lookback to cover ingestion delay. T3 minus T2 is the human side: alert priority, workload on the shift, and how much context the alert carries.

The T0 problem

In a real incident, T0 is pieced together afterwards, and only roughly. When you trigger the scenario yourself you know it to the second, so you can compare the figure month on month. A use case with no scenario behind it has no figure at all.

Validating detection rules with scripted test scenarios

A rule that has never fired is either watching a quiet network or broken, and the SIEM console will not tell you which. Run realistic exfiltration scenarios in production with synthetic data shaped like your sensitive data, then look at what reaches the SOC.

A decoy payroll export

A test machine in finance uploads a decoy payroll export to a personal storage service. Then check three things: whether the event reached the SIEM, and when (T1); whether the “sensitive data to unsanctioned cloud” rule fired (T2); and whether the alert named the user, file and destination, so an analyst could confirm it without digging (T3).

If the DLP blocks the upload and the SOC hears nothing, record that as a result too: the data is safe, but an attempt that may have been the first of several has gone unseen. Test prevention and detection in the same run, as in the method for testing your DLP.

Illustrative example, made-up figures: the scenario starts at T0 and the report shows it attempted (the agent started the upload), transmitted (the file left the machine) and collected (it reached the test destination), so nothing stopped it on the way out. The proxy forwards its logs in hourly batches, so the event only lands in the SIEM at T0 + 52 min (T1); the rule fires at T0 + 61 min (T2) and an analyst confirms it at T0 + 75 min (T3).

Next step

Time a decoy from your network to your SIEM

Before you time anything, a 30-minute guided demo covers pre-built results: a campaign across our eight channels, Google Drive and DNS among them, with nothing to install and no access to your environment. The POC, quick and usually free, runs a standard scenario with synthetic data from a machine on your network, through your real egress controls, and records its start time for your SIEM search; a paid pilot extends that to a limited part of your production.

Fixing detection gaps: collection, rules, then triage

Fix collection before you touch a rule: in the illustrative timeline above, 52 of the 75 minutes passed before the SIEM saw anything. Next come the rules that stay silent on your most critical use cases. Triage comes last: map the account, host, file and URL as entities in the Sentinel analytics rule, so the incident opens with them already resolved. Ranking the fixes is covered in our article on prioritising remediation; the full method is on the data exfiltration testing page.

Frequently asked questions

What time to detection should you aim for on exfiltration?

There is no universal target, but there is a floor: log latency plus the rule’s run interval. A rule on the Microsoft 365 unified audit log that runs every 15 minutes will typically fire 60 to 105 minutes after the event. Measure where you stand with a dated test, then set a target per use case.

Can exfiltration scenarios be replayed in production without risk?

For your data, yes: only synthetic data leaves, to destinations agreed in advance. The risk left is operational (SOC or MSSP alerts, load on the test machines), so agree the machines, time slots and who is told in writing first.

How often should detection rules be validated?

After any change to log forwarding, parsing or the rule itself, and on a fixed cycle for critical use cases. A parser update that renames one field can leave a rule returning nothing, with no error.

Should the SOC know that a test is under way?

Not the whole SOC. Tell one named contact, so a confirmed alert does not set off incident response, and leave the shift unaware: their triage time is part of what you are measuring.

From a known start to a confirmed alert

Scenarios carry synthetic data through your real egress controls, each with its MITRE ATT&CK technique for your SIEM search: we measure what was attempted, transmitted and collected, and you read the rest of the timeline, up to the analyst’s confirmation, in your own SIEM, which we do not connect to.