Join our Newsletter — 33% off our NHI Course
Home› FAQ› Threats, Abuse & Incident Response› How do you detect data staged for exfiltration…
Threats, Abuse & Incident Response

How do you detect data staged for exfiltration with PowerShell compression?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated October 20, 2026 Domain: Threats, Abuse & Incident Response

Detect staging by looking for PowerShell creating archive files, especially zip or similar compressed outputs, in user, temp, or shared locations. Correlate compression activity with large file access, unusual directory enumeration, and later outbound transfer or cloud upload. Suspicious signs include encoded commands, uncommon compression from administrative accounts, and archives created shortly before network exfiltration.

What PowerShell compression tells you about staging

PowerShell compression is useful to attackers because it turns many files into one smaller archive before transfer. That matters when the archive is created in a user profile, temp folder, or another writable shared path, especially if it follows rapid file discovery or bulk reads. Treat the compression step as a staging signal, not proof of exfiltration on its own.

Look for archive creation that is unusual for the account, host, or time of day. The strongest signal is not “zip exists”, but “zip exists after the system touched a lot of data and before an outbound transfer.” If the same process chain also shows encoded commands, directory sweeps, or cloud-sync activity, the staging hypothesis becomes much stronger.

Compression often appears because the actor is trying to reduce traffic volume, bundle sensitive files, or make later transfer less visible. In practice, that means the archive can be the bridge between collection and exfiltration, so the timeline around creation is as important as the command itself.

What telemetry makes this detectable

Focus on process creation, command-line logging, file events, and network correlation. PowerShell that invokes compression cmdlets or .NET archive functions, especially when paired with recursive enumeration, large file reads, or writes to short-lived archive names, is a common staging pattern. File paths also matter: user profile trees, temp directories, downloads folders, and shared work locations are the most common places to inspect.

Correlate the archive event with subsequent outbound destinations, such as web uploads, cloud storage, remote sync tools, or unusual HTTPS sessions. If you can tie the archive creation to a later burst of egress, you have a cleaner story than any single alert can provide. The same approach helps separate legitimate admin packaging from suspicious collection because admin use usually has a clear business purpose and a familiar destination.

For a broader view of collection-to-exfiltration patterns, use the Data Exfiltration Guide as the parent reference for archive-based staging, transfer telemetry, and common exfiltration paths. If your environment already watches for data leakage more generally, the Data Loss Prevention (DLP) Guide is useful for connecting endpoint activity to policy violations and outbound control points.

How to separate benign compression from malicious staging

Start with context. Backup jobs, software packaging, log collection, and deployment scripts often create archives, but they usually do so from known paths, with known names, and on a schedule. Suspicion rises when the archive is created interactively, renamed to blend in, written to an unusual location, or followed quickly by cleanup such as deletion of source files or temporary working directories.

The command line is also revealing. Encoded or obfuscated PowerShell, use of uncommon compression logic, and archive creation launched from an account that normally has no need to package large file sets are all useful indicators. When the same activity touches documents, source trees, exports, or shared repositories, the likely intent shifts from convenience to staging for transfer.

It can help to compare the archive size against the file set it came from. A very large compressed output created from many recently accessed files is more informative than a small archive from a routine admin folder. In other words, the question is not whether compression happened, but whether it plausibly reduced a targeted collection into a transferable payload.

Risk and Threat Considerations

PowerShell compression is attractive to intruders because it is a low-friction way to concentrate stolen data into a single object that is easier to move, hide, or upload. The main risk is that collection and exfiltration can be separated in time, so defenders who watch only for the final transfer may miss the earlier staging step.

Failure mechanism: An attacker enumerates files, reads the target data, compresses it locally, and then shifts the archive through ordinary outbound channels, cloud services, or remote tools that look routine at the network layer.

Impact: Sensitive data can leave the environment in a compact form with fewer obvious transfer events, which shortens dwell time, reduces detection opportunities, and can make incident scoping harder because the archive may contain many source files.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

MITRE ATT&CK and OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0 and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
MITRE ATT&CKT1560 — Archive Collected DataPowerShell compression is a staging technique for exfiltration.
T1027 — Obfuscated Files or InformationEncoded PowerShell and compressed payloads often hide collection activity.
Recommendation — Map archive creation and collection bursts to T1560 and hunt for staging before egress. Correlate encoded commands with archive creation and investigate the process chain.
NIST CSF 2.0DE.CM-01 — Network MonitoringDetection depends on correlating host activity with outbound transfer behavior.
Recommendation — Monitor host-to-network correlations that follow local archive creation.
NIST SP 800-53 Rev 5AU-6 — Audit Review, Analysis, and ReportingLog analysis is needed to connect PowerShell, file access, and egress events.
Recommendation — Review correlated logs to link archive creation with prior file access and later transfer.
OWASP Non-Human Identity Top 10NHI-02 — Secret LeakageArchives used for staging can bundle secrets, tokens, or other sensitive material.
Recommendation — Scan archives for exposed credentials and other secrets before they leave the host.

Practitioner Guidance

What to verify: Confirm whether the archive was created by a known workflow, then check whether the same host shows recent directory enumeration, large reads, encoded PowerShell, or outbound transfer shortly after compression. If those elements line up, treat the event as staging, not housekeeping.

Decision rule: If the archive was created from sensitive directories or by an account that does not normally package data, prioritise containment and timeline reconstruction before you spend time proving the final exfiltration path. The staging step is often your earliest reliable detection point.

Practitioner takeaway: The best detection is temporal correlation, not file creation alone, because compression becomes meaningful when it sits between bulk access and outbound movement.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 20, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org