Detect Ransomware Data Exfiltration Before the Ransom Note

  • Home
  • Detect Ransomware Data Exfiltration Before the Ransom Note
Detect Ransomware Data Exfiltration Before the Ransom Note

CISA’s advisory on the Interlock ransomware group names WinSCP and AzCopy among the tools its operators used to copy data out of victim networks, and it places encryption after the theft. That order is why we tell clients to detect ransomware data exfiltration first and worry about the encryptor second. By the time a ransom note appears, the copy that hurts you is already outside.

Most Indian mid-market teams we work with spent their ransomware budget on backups and endpoint agents. Neither will tell you that a few hundred gigabytes left a file server at 2 am through a tool nobody installed on purpose. Outbound traffic from servers needs the same attention you give inbound attacks, and most firewall policies we audit aren’t built for that.

The short answer: to detect ransomware data exfiltration, limit server egress to a named list of destinations, log every allowed session with byte counts, and alert on five signals: unusual upload volume, transfer tools such as rclone on servers, large archives on file shares, lookups for cloud storage domains, and long uploads when nobody is logged on. Then agree in advance who can block it at night.

The theft is the loud part: how to detect ransomware data exfiltration

Double extortion works because it gives the attacker two levers. Encrypt the servers, and you pay for a decryptor. Publish the files, and you pay to keep your customers’ data off a leak site. Good backups take away the first lever. Nothing in your backup design touches the second.

The sequence is fairly consistent across groups. Someone gets a foothold through a phished login, an exposed VPN or an unpatched edge device. They map the file shares and NAS boxes, often after moving laterally with credentials they’ve already collected. They gather what looks valuable into large archives, push those archives out to storage they control, and only then run the encryptor.

Five-step double-extortion ransomware path showing data upload before encryption
Ransomware crews stage and upload data before they encrypt, which gives you a detection window at steps two to four.

MITRE ATT&CK tracks the upload step as Exfiltration to Cloud Storage (T1567.002) and lists rclone and MEGAcmd among the tools seen doing it, with Akira and Medusa among the groups named. The CISA advisory on Interlock adds WinSCP and, from third-party reporting, AzCopy uploading to Azure storage. None of these tools is malware, which is exactly why antivirus rarely blocks them.

Here’s the useful asymmetry. Encryption happens on the host, quickly. Exfiltration has to cross your perimeter, is bound by your upload bandwidth, and shows up as volume, a destination, a process and a time of day. You can log and alert on every one of those, if you set it up before the night it happens.

Phase 1: decide where your servers are allowed to go

Picture a 600-seat pharma distributor in Ahmedabad. Its file server, ERP database and domain controllers can all reach any internet address over 443, because a Windows update once failed and the quick fix stuck. An attacker on that file server doesn’t need to be clever.

Start by flipping server egress to default deny. Servers need a short, predictable list of destinations: update services, your antivirus or EDR cloud, a licence server or two, the backup provider, perhaps a payment or GST gateway for the ERP. Every major firewall can express that list as FQDN-based address objects, so you aren’t maintaining IP ranges by hand.

Server egress policy allowing named update and backup FQDNs and denying cloud storage
Servers reach a short, named list of destinations; everything else is denied and logged with byte counts.

Don’t flip the switch on day one. Run the new rule in allow-and-log mode for two weeks, build the list from what you actually see, get each application owner to sign off on their entries, and only then change the final rule to deny. The first week always turns up something nobody documented, usually a licence check or a vendor’s remote support tool. Better to find it in a log review than in an angry call from the warehouse.

Is this a lot of work for a lean team? A few days spread over a month, for the control that turns most exfiltration attempts into a blocked, logged event.

Phase 2: log the sessions you allow, with bytes attached

This is where it usually goes wrong. Many firewalls we inherit log only denied traffic, because someone turned off allowed-traffic logging years ago to save disk on the analyser. Denied logs tell you what the attacker failed to do. To catch exfiltration you need the sessions that succeeded, closed out with sent and received byte counts.

The sources we switch on, in priority order:

  • Firewall traffic logs for allowed sessions from server zones, logged at session end so the byte counts are complete.
  • NetFlow or IPFIX from the core switch, which catches the internal hop from file server to staging host that never touches the firewall.
  • DNS query logs from your internal resolvers or domain controllers, kept long enough to look back a month.
  • Process creation with full command lines on servers, from your EDR or from Sysmon where no EDR is licensed.
  • Object access auditing on the two or three file shares that hold the data you would least like to see published.

Retention matters as much as collection. CERT-In’s April 2022 directions ask organisations to keep ICT system logs for a rolling 180 days within India, and we’ve covered how to size firewall log retention for that 180-day requirement separately. Investigations often start weeks after the upload, so short retention quietly destroys evidence.

You don’t need SSL inspection for any of this. Volume, destination, timing and the process behind the connection are enough to catch an upload.

Phase 3: five detections, in the order we would build them

Each needs a Phase 2 source. Build them in this order: the first two catch the most, the last three mostly confirm.

Five detections to detect ransomware data exfiltration and the log source each needs
Five detections worth building first, each tied to a specific log source.
  1. Upload ratio per server. Compare each server’s outbound bytes to the internet, per hour, with its own baseline over the past month. Servers mostly receive. Start with a high multiple and lower it once you have a month of verdicts behind you.
  2. Transfer tools on servers. Alert on rclone, MEGAcmd, WinSCP and AzCopy running on any server that has no change ticket for them. Attackers rename binaries, so also match on command-line patterns, such as rclone’s copy or sync verbs followed by a remote name, and on the file’s original-name metadata.
  3. Big archives in odd places. 7-Zip or WinRAR creating multi-part archives in Temp, ProgramData or a freshly made folder on a file server is rarely innocent. A canary file sitting in a sensitive share, which nobody should ever open, makes this much sharper.
  4. Storage lookups from server subnets. DNS queries from servers to consumer cloud storage and file-sharing domains that aren’t on your Phase 1 list.
  5. Quiet-hour uploads. Long outbound TLS sessions from a server between midnight and 6 am while no interactive logon exists on it. Pair the firewall session with Windows logon events from your domain controllers.

Detection one is the noisiest in the first month. Backup jobs, patch caches and the odd database export to a vendor will all trip it. Tune it by excluding approved destinations, never by excluding whole hosts, because the host you exclude for convenience is the one an attacker will pick.

What would we skip? Keyword-based network DLP as the main control here. The traffic is encrypted, the archives are often password-protected, and the rules raise far more tickets than findings.

Phase 4: sign off containment before the alert fires

A detection at 2:10 am is worth little if the L1 analyst waits until 9:30 for approval to block. Agree actions in advance, in writing, by asset class. Here’s the template we use, ready to copy into your incident response plan:

Action Approved by Run at night without a call? How to undo
Block the destination address or FQDN at the firewall SOC lead Yes Remove the address object from the block group
Isolate a file server through EDR IT head, pre-agreed Yes Release isolation from the EDR console
Isolate the ERP or production database CIO No, call first Release isolation after the call
Disable the account that launched the transfer Identity owner Yes, for service accounts Re-enable and rotate the password
Cut internet egress for the whole server zone CIO No, call first Restore the previous policy revision

The database row exists because isolating it can stop dispatch in a plant or billing at a hospital, and the person who decides that trade-off should be awake. Before anyone reimages a host, preserve the firewall sessions, the archive files and the process tree for the investigation and any insurance claim.

Reporting runs on its own clock. CERT-In’s 2022 directions name data breach and data leak as reportable incidents with a six-hour deadline, so theft without any encryption can still start that clock. We’ve broken down what to do in each of those six hours elsewhere. If personal data was in the archive, the DPDP Act adds notice to the Data Protection Board and to affected people, and most DPDP obligations apply from May 2027; our piece on the DPDP breach notification process covers that. Take legal advice on what to report.

The one-page egress checklist

  • Server zones default to deny outbound, with an FQDN allow-list each application owner has signed.
  • Allowed sessions from server zones are logged at session end with byte counts.
  • NetFlow or IPFIX from the core switch, DNS query logs and server command lines reach the SIEM.
  • All five Phase 3 detections exist, each with a named owner and a review date.
  • Canary files sit in the three most sensitive shares.
  • The containment table above is signed and pinned in the SOC.
  • Logs stay for 180 days in India, and someone has tested a restore of last month’s data.

Where PrahiX Uni fits in the egress window

You can do everything above with tools you already own. Teams struggle with joining the pieces: firewall sessions in one console, flows in another, DNS on a domain controller, process trees in the EDR. That gap is what the platform we deploy and operate for clients closes. PrahiX Tech Pvt Ltd builds PrahiX Ora, a unified SecOps platform, and we are its primary field deployment and operations partner. Here the relevant product is PrahiX Uni, which puts monitoring, SIEM, SOAR and self-healing in one product, with its SIEM and SOAR integration running detection and response on the same engine. Your firewalls and EDR stay exactly where they are; you can read how we run it on our PrahiX Ora SIEM and SOAR page.

Phase 2 without stitching four consoles together

Uni takes syslog, Windows events, DNS, NetFlow, cloud and SaaS audit logs and endpoint telemetry, deduplicates them on arrival, and typically has them searchable within about ten seconds. Logs are kept for 180 days on tiered hot, cold and archive storage, which supports CERT-In’s in-country retention direction. Each signal is tied to its asset, site and user, so a byte count from the firewall and a command line from the EDR land on the same server record. If your NAS or backup appliance speaks a log format nobody supports, Parser Lab adds it.

Phase 3 detections that follow the whole chain

Detections are Sigma-based, mapped to MITRE ATT&CK with kill chain tracking, and can be kept as version-controlled code. UEBA risk scoring raises a server’s score when it starts behaving unlike itself, and graph-based attack storylines link the archive, the rclone process and the upload into one incident running from initial access to impact. Canary files and honeypots trigger playbooks directly, IOCs are matched against more than ten threat intelligence feeds, and CERT-In advisories are ingested automatically.

PrahiX Uni correlating firewall, NetFlow, DNS and EDR logs into contained upload
PrahiX Uni joins four log sources into one incident and runs pre-approved containment.

Where the CrowdStrike stack stops, and what PrahiX adds

Falcon is very good at what detection two needs: process trees and command lines on every host running its agent. The limits show up on the devices and logs around that agent.

With CrowdStrike alone With PrahiX
Falcon is agent-based; firewalls, switches and NAS appliances cannot run the agent Agentless collection over syslog, SNMP, NetFlow, sFlow, IPFIX and vendor APIs from those same devices
Network device health and configuration are outside Falcon’s scope One health model per device, plus configuration snapshots and diffs that show who opened an outbound rule
Falcon Next-Gen SIEM is a module, and third-party ingestion such as firewall logs is licensed by volume Firewall, flow, DNS and endpoint logs in one product, kept 180 days
Falcon Data Protection is a separate module PrahiX Data Protection watches 12 data movement channels with allow, warn, ask the DPO or block
CERT-In six-hour evidence is assembled by hand Compliance-mapped reports for CERT-In 2022 and the DPDP Act 2023, ready to submit
Comparison of CrowdStrike alone versus PrahiX for exfiltration detection coverage
Falcon covers hosts with its agent; PrahiX adds the network devices, logs and data channels around it.

Beyond CrowdStrike: how the other OEMs compare

Across the market, each vendor sees exfiltration from its own devices first, and the full picture costs extra products.

OEM What you get, and where it stops
Fortinet FortiGate logs sessions with byte counts; FortiAnalyzer retention depends on storage and licensed log volume, and a full SOC means FortiSIEM, FortiSOAR and FortiEDR as separate products
Palo Alto Networks Panorama manages and logs PAN-OS firewalls; Cortex XDR, XSOAR and XSIAM are separate products and Strata Logging Service retention depends on storage purchased
Check Point Gateways log well; SmartEvent correlation is a separately licensed blade and Infinity XDR/XPR is another subscription
Sophos Sophos Central covers Sophos firewalls and endpoints; XDR starts from Sophos telemetry and third-party sources need integration licences
CrowdStrike Deep endpoint process visibility; network devices sit outside the agent and Next-Gen SIEM ingestion is licensed by volume
Trellix ePO manages Trellix agents; Helix, Trellix EDR and Trellix DLP are separate products, and network device health is outside scope
PrahiX One engine reading all of them, with pre-built connectors for FortiGate, Palo Alto, Sophos, Check Point, Cisco ASA and CrowdStrike, plus REST, webhooks and Parser Lab for the rest
Six security vendors and where their exfiltration coverage stops
Fortinet, Palo Alto, Check Point, Sophos, CrowdStrike and Trellix each see exfiltration from their own devices first.

Phase 4, pre-approved and timed

The containment table from Phase 4 maps onto Uni’s drag-and-drop playbook builder, with approval gates on the rows that need a call and version control on every change. Blocking an address, isolating a host and revoking a token happen in the same beat as the detection, and each action is recorded on an immutable audit trail with before-and-after diffs. RAYA AI drafts the incident narrative and an executive summary for the CERT-In submission, acting only within limits you set.

The rest of the PrahiX family on data theft

PrahiX Data Protection finds Aadhaar, PAN, bank account and 11 other Indian identifier types on endpoints and shares, so you know what was in that archive, and runs live breach clocks. Multi-vendor diagnostics shows which uplink carried the upload. The camera monitoring system, our video surveillance (VMS) offering, puts server-room video and door access on one timeline. PrahiX Guest keeps a login record for every device on guest Wi-Fi.

Frequently asked questions

What is data exfiltration in a ransomware attack?

It is the copy of your files the attacker takes before encrypting anything. The stolen copy is used for a second demand: pay, or the data is published on a leak site. Restoring from backups solves the encryption but does nothing about the copy, which is why exfiltration now decides how much damage an attack does.

Can a firewall detect data exfiltration without SSL inspection?

Yes, to a useful degree. Session logs still show the source host, destination, duration and bytes sent, and DNS logs show which service was looked up. That is enough to spot a server uploading far more than usual to a new destination at 3 am. Decryption adds content, but you can build every detection here without it.

Is ransomware data theft reportable to CERT-In if nothing was encrypted?

Very likely. CERT-In’s 2022 directions treat data breach and data leak as reportable incidents on the six-hour timeline, so encryption is not the trigger. Sector regulators such as RBI and SEBI may set their own timelines too. Check the facts of your incident with counsel before filing, and keep the firewall evidence intact.

Which tools do ransomware groups use to exfiltrate data?

Mostly legitimate ones. MITRE ATT&CK lists rclone and MEGAcmd for uploads to cloud storage, and CISA’s Interlock advisory mentions WinSCP and AzCopy. Groups also rename these binaries, so matching on file names alone misses them. Alert on command-line patterns and original-name metadata, and on any such tool appearing on a server without a ticket.

This week: read seven nights of server uploads

Before you buy anything, pull the outbound byte counts for your file servers and database servers between midnight and 6 am for the last seven nights. If you can’t produce that report in an hour, Phase 2 is your first job. If you can, start your allow-list from what it shows.

If you’d like a second pair of eyes on that report, our managed SOC team reviews egress policies and builds these detections for clients across India every week. We’re happy to look at yours.

Leave a Reply

Your email address will not be published. Required fields are marked *