Archive via Utility
Adversaries may use utilities to compress and/or encrypt collected data prior to exfiltration. Many utilities include functionalities to compress, encrypt, or otherwise package data into a format that is easier or more secure to transport. Adversaries may abuse utilities such as 7-Zip, WinRAR, WinZip, tar, zip, and Windows built-ins like makecab/diantz and certutil to stage data for exfiltration. Password-protected archives are a common indicator as they prevent inspection by security tools. Threat actors including HAFNIUM, APT1, APT33, Volt Typhoon, Mustang Panda, menuPass, and Wizard Spider are documented using this technique.
let ArchiveTools = dynamic(["7z.exe", "7za.exe", "7zr.exe", "rar.exe", "winrar.exe", "winzip32.exe", "winzip64.exe", "zip.exe", "makecab.exe", "diantz.exe", "xcopy.exe"]);
let SuspiciousFlags = dynamic(["-p", "-hp", "a -", " a ", "-r ", "-v", "password", "-ep", "-ep2", "-ep3"]);
let SensitivePaths = dynamic(["\\ntds", "\\lsass", "\\sam", "\\system", "\\security", "\\users\\", "\\documents", "\\desktop", "\\appdata", "c:\\windows\\temp", "c:\\programdata", "\\inetpub"]);
union
(
DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ (ArchiveTools)
| where ProcessCommandLine has_any (SuspiciousFlags) or ProcessCommandLine has_any (SensitivePaths)
| extend PasswordProtected = ProcessCommandLine has_any ("-p", "-hp", "password")
| extend TargetsSensitivePath = ProcessCommandLine has_any (SensitivePaths)
| extend MultiVolume = ProcessCommandLine has_any ("-v", "-v1", "-v2", "-v500", "-v1000")
| extend OutputToTemp = ProcessCommandLine has_any ("\\temp\\", "\\tmp\\", "\\programdata\\", "\\appdata\\")
| extend DetectionSource = "ArchiveTool"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, InitiatingProcessCommandLine,
PasswordProtected, TargetsSensitivePath, MultiVolume, OutputToTemp, DetectionSource
),
(
DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName =~ "certutil.exe"
| where ProcessCommandLine has_any ("-encode", "-encodehex", "/encode", "/encodehex")
| extend PasswordProtected = false
| extend TargetsSensitivePath = ProcessCommandLine has_any (SensitivePaths)
| extend MultiVolume = false
| extend OutputToTemp = ProcessCommandLine has_any ("\\temp\\", "\\tmp\\", "\\programdata\\")
| extend DetectionSource = "CertutilEncode"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, InitiatingProcessCommandLine,
PasswordProtected, TargetsSensitivePath, MultiVolume, OutputToTemp, DetectionSource
),
(
DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName =~ "makecab.exe" or FileName =~ "diantz.exe"
| where ProcessCommandLine !contains "windows\\ " and ProcessCommandLine !contains "system32\\"
| extend PasswordProtected = false
| extend TargetsSensitivePath = ProcessCommandLine has_any (SensitivePaths)
| extend MultiVolume = false
| extend OutputToTemp = ProcessCommandLine has_any ("\\temp\\", "\\tmp\\", "\\programdata\\")
| extend DetectionSource = "CabinetTool"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, InitiatingProcessCommandLine,
PasswordProtected, TargetsSensitivePath, MultiVolume, OutputToTemp, DetectionSource
)
| sort by Timestamp desc Data Sources
Required Tables
False Positives
- System administrators using 7-Zip or WinRAR for legitimate backup or file transfer operations
- Backup software agents (Veeam, Commvault, Acronis) that invoke archive utilities as part of scheduled backup jobs
- Software packaging tools and CI/CD pipelines that compress build artifacts before deployment
- IT operations compressing log files or diagnostic data for vendor support cases
- makecab.exe invoked by Windows Update, software installers, and MSI packages as part of normal installation routines
References (12)
- https://attack.mitre.org/techniques/T1560/001/
- https://www.7-zip.org/
- https://www.rarlab.com/
- https://www.winzip.com/win/en/
- https://lolbas-project.github.io/lolbas/Binaries/Diantz/
- https://lolbas-project.github.io/lolbas/Binaries/Certutil/
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1560.001/T1560.001.md
- https://www.microsoft.com/en-us/security/blog/2021/03/02/hafnium-targeting-exchange-servers/
- https://www.secureworks.com/blog/volt-typhoon-targets-us-critical-infrastructure
- https://www.cisa.gov/news-events/cybersecurity-advisories/aa24-038a
- https://www.mandiant.com/resources/reports/apt1-exposing-one-of-chinas-cyber-espionage-units
- https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/makecab
Unlock Pro Content
Get the full detection package for T1560.001 including response playbook, investigation guide, and atomic red team tests.