Response playbooks, investigation guides, and Atomic Red Team tests are Pro-only. Upgrade to unlock the full detection package for T1027.015.

Upgrade to Pro
T1027.015 Splunk · SPL

Detect Compression in Splunk

This detection identifies adversary use of file compression utilities (ZIP, gzip, 7z, RAR, tar) to obfuscate payloads, stage data for exfiltration, or deliver malicious archives. Key signals include compression tools spawned by unusual parent processes, self-extracting archive execution, concatenated ZIP files used to evade scanners, and shellcode compressed into registry keys. The detection focuses on behavioral anomalies such as compression utilities invoked from scripting engines, email clients, or Office applications, as well as archives extracted directly into temporary or startup directories.

MITRE ATT&CK

Tactic
Defense Evasion
Technique
T1027 Obfuscated Files or Information
Sub-technique
T1027.015 Compression
Canonical reference
https://attack.mitre.org/techniques/T1027/015/

SPL Detection Query

Splunk (SPL)
spl
index=* (sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1)
| eval process_lower=lower(Image)
| eval parent_lower=lower(ParentImage)
| where match(process_lower, "(7z\.exe|7za\.exe|7zr\.exe|winrar\.exe|rar\.exe|unrar\.exe|winzip32\.exe|winzip64\.exe|pkzip\.exe|wzzip\.exe)")
    OR (match(process_lower, "tar\.exe") AND match(CommandLine, "(-z|-j|-J|--gzip|--bzip2)"))
| where match(parent_lower, "(winword\.exe|excel\.exe|powerpnt\.exe|outlook\.exe|mshta\.exe|wscript\.exe|cscript\.exe|rundll32\.exe|regsvr32\.exe|msiexec\.exe|powershell\.exe)")
    OR match(CommandLine, "(-sfx|sfx|-mhe|-p[a-zA-Z0-9]+|-mx9|-ao)")
    OR match(CommandLine, "(\\\\Temp\\\\|\\\\AppData\\\\|\\\\ProgramData\\\\|\\\\Users\\\\Public\\\\)")
| eval risk_score=case(
    match(parent_lower,"(winword|excel|powerpnt|outlook)"), 80,
    match(CommandLine,"-sfx"), 90,
    match(CommandLine,"-mhe"), 85,
    true(), 60)
| table _time, ComputerName, User, ParentImage, Image, CommandLine, CurrentDirectory, Hashes, risk_score
| sort - risk_score
medium severity medium confidence

Detects Sysmon process creation events where known compression tools are launched from suspicious parent processes (Office, scripting engines) or with flags for self-extracting archives, encryption, or max-compression often used to hide payloads.

Data Sources

Sysmon

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/Operational

False Positives & Tuning

  • Helpdesk or sysadmin scripts that invoke 7z or WinRAR from PowerShell for routine backups
  • Software installers using self-extracting archives as a normal distribution mechanism
  • Security testing or red team exercises that generate compressed payloads

Other platforms for T1027.015


Testing Methodology

Validate this detection against 3 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 17zip Self-Extracting Archive Creation from PowerShell

    Expected signal: Sysmon Event ID 1: PowerShell spawning 7z.exe with -sfx, -p, -mhe flags. Sysmon Event ID 11: payload.exe created in C:\Users\Public\. DeviceProcessEvents in MDE.

  2. Test 2Concatenated ZIP Payload Creation

    Expected signal: Sysmon Event ID 1: cmd.exe spawning 7z.exe twice. Sysmon Event ID 11: concatenated.zip created in C:\Temp\. Security Event 4688 if process auditing enabled.

  3. Test 3Linux gzip Compression of Shellcode Blob

    Expected signal: Auditd syscall logs showing dd, gzip, and base64 invocations. Syslog entries for process execution. File creation event for /tmp/.hidden_payload.b64.

Unlock playbooks & atomic tests with Pro

Get the full detection package for T1027.015 — response playbook and atomic red team tests, plus investigation guidance and hunting queries.

df00tech Pro — £29/user/month

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections