T1560 Splunk · SPL

Detect Archive Collected Data in Splunk

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).

MITRE ATT&CK

Tactic
Collection
Technique
T1560 Archive Collected Data
Canonical reference
https://attack.mitre.org/techniques/T1560/

SPL Detection Query

Splunk (SPL)
spl
index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
  (Image="*\\7z.exe" OR Image="*\\7za.exe" OR Image="*\\7zr.exe" OR Image="*\\rar.exe" OR Image="*\\winrar.exe"
   OR Image="*\\powershell.exe" OR Image="*\\pwsh.exe" OR Image="*\\certutil.exe")
| eval CommandLineLower=lower(CommandLine)
| eval IsArchiveTool=if(match(Image, "(?i)(7z[ar]?\.exe|rar\.exe|winrar\.exe)$"), 1, 0)
| eval PasswordProtected=if(IsArchiveTool=1 AND (match(CommandLineLower, "\s-hp") OR match(CommandLineLower, "-pass") OR match(CommandLineLower, "\s-p\S")), 1, 0)
| eval SuspiciousParent=if(IsArchiveTool=1 AND match(lower(ParentImage), "(?i)(winword|excel|outlook|powerpnt|mshta|wscript|cscript|mmc|regsvr32|rundll32)\.exe$"), 1, 0)
| eval PSCompression=if(match(Image, "(?i)(powershell|pwsh)\.exe$") AND match(CommandLineLower, "(compress-archive|io\.compression|zipfile|gzipstream|deflatestream|ziparchive)"), 1, 0)
| eval CertutilEncode=if(match(Image, "(?i)certutil\.exe$") AND match(CommandLineLower, "(-encode|-decode|-encodehex)"), 1, 0)
| eval SuspicionScore=PasswordProtected + SuspiciousParent + PSCompression + CertutilEncode
| where SuspicionScore > 0
| eval DetectionType=case(
    PasswordProtected=1, "Password-Protected Archive",
    SuspiciousParent=1, "Archive via Suspicious Parent",
    PSCompression=1, "PowerShell .NET Compression",
    CertutilEncode=1, "CertUtil Encoding",
    true(), "Archive Activity")
| table _time, host, User, Image, CommandLine, ParentImage, ParentCommandLine, DetectionType, SuspicionScore
| sort - _time
medium severity high confidence

Detects pre-exfiltration data archiving and encoding activity using Sysmon Event ID 1 (Process Creation). Evaluates four detection categories: password-protected archive creation (-hp, -pass, -p flags on 7z/rar/winrar), archive utilities spawned by Office or scripting engine parents, PowerShell .NET compression class usage, and certutil base64 encoding. A cumulative SuspicionScore is computed per event to support triage prioritisation. All ImagePath comparisons use case-insensitive anchored regex to avoid false negatives from path variations.

Data Sources

Process: Process CreationCommand: Command ExecutionSysmon Event ID 1

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/Operational

False Positives & Tuning

  • IT backup jobs using 7-Zip or WinRAR with passwords to protect backup archives — typically run under service accounts from task scheduler
  • Software CI/CD pipelines packaging release artifacts into protected archives — typically a known build agent account spawning the archive tool
  • DBA or DevOps scripts compressing and encrypting database exports before offsite transfer
  • certutil legitimately used by PKI admins encoding certificate files; adjust with allowlist of known admin accounts
  • PowerShell deployment automation (SCCM, Intune, Chocolatey) using Compress-Archive to bundle payloads
Download portable Sigma rule (.yml)

Other platforms for T1560


Testing Methodology

Validate this detection against 5 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 17-Zip Password-Protected Archive of Sensitive Directory

    Expected signal: Sysmon Event ID 1: Process Create with Image ending in 7z.exe, CommandLine containing '-hp' and 'staged_exfil.zip'. Sysmon Event ID 11: File Create event for C:\Windows\Temp\staged_exfil.zip with InitiatingProcessFileName=7z.exe. Security Event ID 4688 (if process command line auditing enabled) with same details.

  2. Test 2PowerShell Compress-Archive Staging in Temp Directory

    Expected signal: Sysmon Event ID 1: Process Create with Image=powershell.exe, CommandLine containing 'Compress-Archive' and 'C:\Windows\Temp\recent_files_staged.zip'. Sysmon Event ID 11: File Create for the zip archive. PowerShell ScriptBlock Log Event ID 4104 in Microsoft-Windows-PowerShell/Operational with full cmdlet and path.

  3. Test 3certutil Base64 Encode Binary File

    Expected signal: Sysmon Event ID 1: Process Create with Image=certutil.exe, CommandLine containing '-encode' and 'encoded_payload.txt'. Sysmon Event ID 11: File Create for C:\Windows\Temp\encoded_payload.txt. Security Event ID 4688 with the same certutil command line if process auditing is enabled.

  4. Test 4Linux tar + gzip Collection and Staging

    Expected signal: Auditd execve record: type=EXECVE with argv containing 'tar' 'czf' '/tmp/sys_backup_...' '/etc/passwd' '/etc/shadow'. Syslog process creation record (if auditd not deployed). File creation event for /tmp/sys_backup_*.tar.gz. If using a SIEM with Linux file integrity monitoring, alert on new file creation in /tmp matching *.tar.gz by root or privileged account.

  5. Test 5WinRAR Archive with Password and Locked Headers

    Expected signal: Sysmon Event ID 1: Process Create with Image ending rar.exe, CommandLine containing '-hp' and 'staging.rar'. Sysmon Event ID 11: File Create for C:\ProgramData\Microsoft\staging.rar with InitiatingProcessFileName=rar.exe. Security Event ID 4688 with full command line.

Unlock Pro Content

Get the full detection package for T1560 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections