Archive Collected Data
Adversaries may compress and/or encrypt data that is collected prior to exfiltration. Compressing the data can help to obfuscate collected data and minimize the amount of data sent over the network. Encryption can be used to hide information that is being exfiltrated from detection or make exfiltration less conspicuous upon inspection by a defender. Both compression and encryption are done prior to exfiltration and can be performed using a utility, third-party library, or custom method. Common tools include 7-Zip, WinRAR, the Windows built-in compact and certutil utilities, PowerShell Compress-Archive and .NET IO.Compression classes, and tar/gzip/openssl on Linux and macOS. Threat actors including Dragonfly, Lazarus Group, Ember Bear, BlackByte, and Axiom have all used archiving and encryption as a pre-exfiltration staging step. Sub-techniques cover archive via utility (T1560.001), archive via library (T1560.002), and archive via custom method (T1560.003).
let ArchiveUtilities = dynamic(["7z.exe", "7za.exe", "7zr.exe", "rar.exe", "winrar.exe"]);
let SuspiciousParents = dynamic(["winword.exe", "excel.exe", "outlook.exe", "powerpnt.exe", "mshta.exe", "wscript.exe", "cscript.exe", "mmc.exe", "regsvr32.exe", "rundll32.exe"]);
// Detection 1: Password-protected archives — strongest indicator of pre-exfiltration data staging
let PasswordProtectedArchive = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ (ArchiveUtilities)
| where ProcessCommandLine has "-hp"
or ProcessCommandLine has_any ("-pass", "-password")
or ProcessCommandLine matches regex @"\s+-p\S"
| extend DetectionType = "Password-Protected Archive", RiskLevel = "High";
// Detection 2: Archive utilities spawned by Office apps or scripting engines (macro/script-based staging)
let SuspiciousParentArchive = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ (ArchiveUtilities)
| where InitiatingProcessFileName in~ (SuspiciousParents)
| extend DetectionType = "Archive via Suspicious Parent Process", RiskLevel = "High";
// Detection 3: PowerShell compression using .NET classes (custom staging or library-based archiving)
let PSCompression = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ ("powershell.exe", "pwsh.exe")
| where ProcessCommandLine has_any ("Compress-Archive", "IO.Compression.ZipFile", "IO.Compression.GZipStream", "System.IO.Compression", "ZipArchive", "DeflateStream", "GZipStream")
| extend DetectionType = "PowerShell .NET Compression", RiskLevel = "Medium";
// Detection 4: certutil base64 encoding — encodes binary blobs for text-channel or clipboard exfiltration
let CertutilEncoding = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName =~ "certutil.exe"
| where ProcessCommandLine has_any ("-encode", "-decode", "-encodehex")
| extend DetectionType = "CertUtil Base64 Encoding", RiskLevel = "Medium";
// Combine all detections
union PasswordProtectedArchive, SuspiciousParentArchive, PSCompression, CertutilEncoding
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, InitiatingProcessCommandLine,
DetectionType, RiskLevel
| sort by Timestamp desc Data Sources
Required Tables
False Positives
- IT backup and archiving jobs (Veeam, Acronis, custom scripts) that use 7-Zip or WinRAR with passwords to protect backup archives
- Software release pipelines packaging artifacts into password-protected zip files for deployment
- DBA scripts compressing and encrypting database exports or log files before offsite transfer
- certutil legitimately used by PKI administrators to encode/decode certificate files (.cer, .p7b) for transport
- PowerShell-based software deployment tools (SCCM, Intune, Ansible) using Compress-Archive to bundle installation packages
References (13)
- https://attack.mitre.org/techniques/T1560/
- https://attack.mitre.org/techniques/T1560/001/
- https://attack.mitre.org/techniques/T1560/002/
- https://attack.mitre.org/techniques/T1560/003/
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1560/T1560.md
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1560.001/T1560.001.md
- https://cdn.cnn.com/cnn/2018/images/07/13/gru.indictment.pdf
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-deviceprocessevents-table
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-devicefileevents-table
- https://www.cisa.gov/sites/default/files/publications/AA18-074A_MAR-10135536-G.PDF
- https://securelist.com/toddycat-check-logs/110696/
- https://www.cybereason.com/blog/threat-analysis-report-bumblebee-loader-the-high-road-to-enterprise-domain-control
- https://github.com/SigmaHQ/sigma/tree/master/rules/windows/process_creation
Unlock Pro Content
Get the full detection package for T1560 including response playbook, investigation guide, and atomic red team tests.