Home / Blog / Threat Hunting
How to Hunt for Data Staging and Archive Exfiltration in a Bank
Find attackers gathering, compressing and encrypting payment and customer data before it leaves, using Defender XDR and Splunk hunts tied to business and DORA risk.
Before a ransomware crew publishes stolen customer records, or an insider walks out with a pricing model, the data almost always passes through two quiet steps: it is gathered into one place and squeezed into an archive. This guide shows threat hunters in banks, payment firms and trading businesses how to find that staging activity in Microsoft Defender XDR and Splunk, link it to an outbound transfer, and judge the business risk quickly enough to meet regulatory reporting clocks.
Scenario: At 02:14 on a Sunday, the service account svc-recon on PAY-FS-02, a file server holding daily payment reconciliation exports, launches 7z.exe with a password switch and a UNC path pointing at the finance share. Twenty minutes later a process named syncsvc.exe on the same server opens HTTPS connections to a cloud storage provider the bank has never used. No alert fired. This is the pattern you are hunting for.
Frame the hunt around your crown jewels
Archive tools run legitimately all day in a bank: backup jobs, regulatory submissions, log rotation and analysts zipping evidence for auditors. Hunting for every archive will drown you. Start from the data an attacker would want, list where it lives, and hunt for staging close to those locations first.
Write the hypothesis down before you query anything, so the hunt has a clear pass or fail result:
An attacker with access to our payment or customer data stores will copy that data to a single host, compress and encrypt it, then send it to an external storage service outside business hours.
Note: Keep the servers and shares behind these data sets in a Sentinel watchlist or a let statement. Every query below gets sharper when you can rank a finding by whether it touched one of them.
Hunt for encrypted archives built on the command line
Archive via Utility (T1560.001) covers attackers compressing collected data with tools such as 7-Zip and WinRAR. Those tools are popular with intruders for three reasons: they encrypt with a password switch (-p), they can hide the file list inside the archive (-hp in RAR, -mhe=on in 7-Zip), and they can split output into volumes (-v) to slip under upload size limits. Scheduled backup jobs rarely do all of that with an inline password.
Checking the original file name from the binary's version information also catches copies renamed to look harmless, which ATT&CK tracks as Rename Legitimate Utilities (T1036.003).
Microsoft Defender XDR
let archivers = dynamic(["7z.exe", "7za.exe", "7zr.exe", "7zg.exe", "rar.exe", "winrar.exe"]);
DeviceProcessEvents
| where Timestamp > ago(14d)
| where FileName in~ (archivers) or ProcessVersionInfoOriginalFileName in~ (archivers)
| extend HasPassword = ProcessCommandLine matches regex @"\s-h?p\S+"
| extend HidesNames = ProcessCommandLine has "-mhe=on" or ProcessCommandLine matches regex @"\s-hp\S+"
| extend SplitsVolumes = ProcessCommandLine matches regex @"\s-v\d+[kmgb]?"
| extend RemoteSource = ProcessCommandLine contains @"\\"
| extend Renamed = isnotempty(ProcessVersionInfoOriginalFileName) and FileName !~ ProcessVersionInfoOriginalFileName
| extend Score = toint(HasPassword) + toint(HidesNames) + toint(SplitsVolumes) + toint(RemoteSource) + 2 * toint(Renamed)
| where Score >= 2
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessFileName, Score
| order by Score desc, Timestamp desc
The score is deliberately simple. A password on its own scores 1 and drops out; a password plus a UNC source, or any renamed archiver, rises to the top. Adjust the weights once you have seen a week of results from your own estate.
Splunk with Sysmon
index=sysmon EventCode=1 (OriginalFileName IN ("7z.exe", "7za.exe", "7zr.exe", "rar.exe", "WinRAR.exe") OR Image IN ("*\\7z.exe", "*\\7za.exe", "*\\rar.exe", "*\\WinRAR.exe"))
| eval has_password=if(match(CommandLine, "\\s-h?p\\S+"), 1, 0)
| eval hides_names=if(like(CommandLine, "%-mhe=on%") OR match(CommandLine, "\\s-hp\\S+"), 1, 0)
| eval splits=if(match(CommandLine, "\\s-v\\d+[kmgb]?"), 1, 0)
| eval unc_source=if(like(CommandLine, "%\\\\%"), 1, 0)
| eval score=has_password + hides_names + splits + unc_source
| where score >= 2
| table _time, host, User, Image, CommandLine, ParentImage, score
| sort - score
Watch out: The archive password often sits in plain text in the command line. Treat these results as sensitive, restrict who can see them, and record the password in the case notes so incident responders can open any archive they recover.
Find the staging folder and the archive itself
Data Staged (T1074) has two flavours. Local Data Staging (T1074.001) gathers files on the host that will send them out. Remote Data Staging (T1074.002) pulls data from many systems onto one central host first, which in a bank is often a file server or jump box that already talks to everything. Hunt for both.
Large archives in unusual folders
let stagingPaths = dynamic([@"\ProgramData\", @"\PerfLogs\", @"\Users\Public\", @"\Windows\Temp\", @"\$Recycle.Bin\", @"\AppData\Local\Temp\"]);
DeviceFileEvents
| where Timestamp > ago(14d)
| where ActionType in ("FileCreated", "FileModified", "FileRenamed")
| where FileName matches regex @"(?i)\.(7z|rar|zip|cab|tar|gz|\d{3})$"
| summarize arg_max(Timestamp, FileSize, InitiatingProcessFileName, InitiatingProcessAccountName) by DeviceName, FolderPath
| where FolderPath has_any (stagingPaths) or FileSize > 500000000
| summarize Archives = count(), TotalGB = round(sum(FileSize) / 1073741824.0, 2), Paths = make_set(FolderPath, 10), Writers = make_set(InitiatingProcessFileName, 5) by DeviceName, InitiatingProcessAccountName
| order by TotalGB desc
Archives grow while they are written, so a single event can understate the final size. Taking the latest event per file with arg_max gives you the most complete size. The \d{3} pattern catches split volumes such as .001 and .002.
Files arriving over SMB at a central host
DeviceFileEvents
| where Timestamp > ago(7d)
| where RequestProtocol == "SMB"
| summarize FilesWritten = count(), Sources = make_set(RequestSourceIP, 10), Accounts = make_set(RequestAccountName, 5) by DeviceName, Hour = bin(Timestamp, 1h)
| where FilesWritten > 500
| order by FilesWritten desc
The threshold of 500 files an hour is only a starting point. Baseline each server first: a document management server will exceed it every morning, while a jump box should almost never receive bulk writes.
Tip: Without Defender for Endpoint, Windows Security event 5145 (detailed file share access) gives similar visibility, but only when Audit Detailed File Share is enabled. It is very noisy, so scope it to the crown jewel shares from your list rather than enabling it everywhere.
Link staging to an outbound transfer
Staging on its own is not exfiltration. To turn a lead into a finding you need the next step: something carrying the archive out. Rclone, tracked by ATT&CK as software S1040, is a legitimate sync tool that many ransomware groups use to push stolen data to services such as MEGA, Dropbox and Amazon S3. It is often renamed to blend in, so hunt on its original file name and on its distinctive switches.
DeviceProcessEvents
| where Timestamp > ago(14d)
| where ProcessVersionInfoOriginalFileName =~ "rclone.exe"
or FileName =~ "rclone.exe"
or (ProcessCommandLine has_any ("copy", "sync", "move")
and ProcessCommandLine has_any ("--transfers", "--multi-thread-streams", "--max-age", "--ignore-existing"))
| project Timestamp, DeviceName, AccountName, FileName, FolderPath, ProcessCommandLine, InitiatingProcessFileName
| order by Timestamp desc
Next, correlate the two halves. This query looks for a password protected archive on a device followed within six hours by a non browser process talking to a cloud storage service.
let storageDomains = dynamic(["mega.nz", "mega.io", "mega.co.nz", "dropboxapi.com", "s3.amazonaws.com", "wasabisys.com", "backblazeb2.com", "pcloud.com"]);
let browsers = dynamic(["msedge.exe", "chrome.exe", "firefox.exe"]);
let archives = DeviceProcessEvents
| where Timestamp > ago(14d)
| where ProcessVersionInfoOriginalFileName in~ ("7z.exe", "7za.exe", "rar.exe", "winrar.exe")
| where ProcessCommandLine matches regex @"\s-h?p\S+"
| project ArchiveTime = Timestamp, DeviceId, DeviceName, ArchiveAccount = AccountName, ArchiveCmd = ProcessCommandLine;
archives
| join kind=inner (
DeviceNetworkEvents
| where Timestamp > ago(14d)
| where RemoteUrl has_any (storageDomains)
| where InitiatingProcessFileName !in~ (browsers)
| project NetTime = Timestamp, DeviceId, RemoteUrl, RemoteIP, UploadProcess = InitiatingProcessFileName
) on DeviceId
| where NetTime between (ArchiveTime .. (ArchiveTime + 6h))
| summarize FirstUpload = min(NetTime), Urls = make_set(RemoteUrl, 10), Uploaders = make_set(UploadProcess, 5) by DeviceName, ArchiveAccount, ArchiveTime, ArchiveCmd
| order by ArchiveTime desc
Note: DeviceNetworkEvents records connections, not bytes transferred. To estimate how much left the bank, pivot to your proxy, firewall or CASB logs for the same host, destination and time window. That volume figure feeds directly into impact assessment later.
Rate the finding by business impact
A hunt result is only useful if the people reading it can see the risk to the bank. Grade each confirmed finding by what was touched and whether it left, not just by how suspicious the command looked.
Encrypted archive of regulated data, then upload
HighPassword protected archive built from a payment or customer share, followed by connections to an unsanctioned storage service.
Isolate the host, preserve the archive and logs, revoke the account's sessions and credentials, and start major incident classification.
Renamed archiver or rclone on a server
HighOriginal file name does not match the file on disk, or rclone runs from ProgramData or a temp folder.
Treat as hands on keyboard activity. Hunt the same hash and account across every server and escalate to incident response.
Large plain archive in an admin profile
MediumUnencrypted archive created by an IT administrator during a change window, with no outbound transfer.
Check it against the change record and confirm with the owner. Close with notes if it matches, escalate if it does not.
Escalation needs to follow a path agreed in advance, because the regulatory clocks start running while you are still hunting.
- L0Hunt leadSuspicious archive or staging folder found. Gather context and keep the case open.Hunter
- L1Confirmed stagingArchive or staging folder contains crown jewel data. Raise an incident and preserve evidence.SOC lead
- L2Confirmed exfiltrationOutbound transfer tied to the archive. Bring in IR and the DPO, as UK GDPR gives 72 hours to report a notifiable personal data breach to the ICO.IR and DPO
- L3Major incidentFor firms in scope of DORA, the initial notification is due within 4 hours of classifying the incident as major and no later than 24 hours after becoming aware of it. UK firms also consider FCA notification under SUP 15.CISO and compliance
Watch out: Under DORA the deadline is measured from awareness and classification, so the moment your hunt first confirmed staging of regulated data may become part of the reporting timeline. Record it accurately in the case, with the query that proved it.
Turn the hunt into lasting detections
A hunt that finds nothing still pays off if it leaves behind detections and better telemetry. Before you close it, work through this list.
- Schedule the password protected archive query as an analytic rule, scoped first to the crown jewel servers from your list.
- Allowlist legitimate backup and submission jobs by account and folder path together, never by binary name alone.
- Alert on renamed archivers and on rclone anywhere in the estate, since approved use should be rare and documented.
- Block unsanctioned cloud storage at the proxy and record exceptions with a business owner.
- Confirm Defender for Endpoint or Sysmon covers every file server holding payment, customer or trading data.
- Log the hunt with its hypothesis, ATT&CK IDs, queries and result so the next hunter can repeat it.
Key takeaways
- Start from where payment, customer and trading data lives, then hunt for staging close to it.
- Password, hidden file list, split volumes and UNC sources together are a strong archive signal; any one alone is weak.
- Hunt original file names to catch renamed archivers and rclone.
- Correlate staging with outbound connections, then use proxy or firewall logs to measure volume.
- Grade findings by business impact and escalate early, because DORA and UK GDPR clocks start before the investigation is finished.
Data staging is one of the last points where you can stop a breach before it becomes a disclosure. Run these hunts regularly against your most sensitive data stores, keep the results tied to business impact, and every quiet Sunday night archive job will either be explained or escalated.
Written by Riz, Senior Cybersecurity Consultant, Finance