Detect Software Packing in CrowdStrike LogScale
Adversaries may perform software packing or virtual machine software protection to conceal their code. Software packing is a method of compressing or encrypting an executable. Packing an executable changes the file signature in an attempt to avoid signature-based detection. Most decompression techniques decompress the executable code in memory. Virtual machine software protection translates an executable's original code into a special format that only a special virtual machine can run. Common packers include UPX, MPRESS, Themida, VMProtect, and custom packers. APT41, APT39, Lazarus Group, Aoqin Dragon, and many commodity malware families including LockBit, QakBot, and Cobalt Strike use software packing.
MITRE ATT&CK
- Tactic
- Defense Evasion
- Technique
- T1027 Obfuscated Files or Information
- Sub-technique
- T1027.002 Software Packing
- Canonical reference
- https://attack.mitre.org/techniques/T1027/002/
LogScale Detection Query
// T1027.002 Software Packing — CrowdStrike Falcon LogScale (CQL)
// Signal 1: Direct packer tool execution via ProcessRollup2
#event_simpleName = /^(ProcessRollup2|SyntheticProcessRollup2)$/
| ImageFileName = /(?i)(\\|\/)(upx|themida|vmprotect|mpress|enigma|obsidium|asprotect|pecompact)\.exe$/
| groupBy(
[ComputerName, UserName, ImageFileName, ParentImageFileName],
function=[
count(as=ExecutionCount),
collect(CommandLine, limit=10, as=ObservedCommandLines),
min(timestamp, as=FirstSeen),
max(timestamp, as=LastSeen)
]
)
| sort(ExecutionCount, order=desc)
// ---
// Signal 2 (run as separate saved query):
// PE binary written to temp/download path by a known packer process
// Uncomment to activate
// ---
// #event_simpleName = NewExecutableWritten
// | TargetFileName = /(?i)\\(Temp|Downloads|AppData\\Roaming|AppData\\Local\\Temp)\\/
// | ImageFileName = /(?i)(upx|themida|vmprotect|mpress|enigma)\.exe$/
// | groupBy(
// [ComputerName, UserName, ImageFileName, TargetFileName],
// function=[
// count(as=FileWriteCount),
// min(timestamp, as=FirstSeen),
// max(timestamp, as=LastSeen)
// ]
// )
// | sort(FileWriteCount, order=desc) CrowdStrike Falcon LogScale (CQL) detection for software packing (T1027.002). The primary query uses ProcessRollup2 and SyntheticProcessRollup2 events to identify execution of known packer tools (UPX, Themida, VMProtect, MPRESS, Enigma, Obsidium, ASProtect, PECompact) by matching ImageFileName with a case-insensitive regex. Results are grouped by host, user, and packer image name with execution count, observed command lines, and time window to support triage. A secondary commented query uses NewExecutableWritten events to detect PE files created in temp or download directories by known packer processes, mirroring the KQL FileCreated join pattern — activate as a separate saved search or detection.
Data Sources
Required Tables
False Positives & Tuning
- Red team operators during authorized adversary simulation exercises using packer tools to evade endpoint controls — apply CrowdStrike detection exclusion policies scoped to specific sensor groups or hostnames for the duration of the engagement window.
- Software development teams with CI/CD pipelines on managed Windows endpoints that invoke UPX as a build step — false positive rate is high in developer-dense environments and requires hostname or process tree exclusions.
- Game anti-cheat client installers (Easy Anti-Cheat, BattlEye) that ship protected executables — Falcon telemetry on endpoints with popular multiplayer games will generate ProcessRollup2 hits for packer-protected anti-cheat binaries at launch.
Other platforms for T1027.002
Testing Methodology
Validate this detection against 4 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.
- Test 1Pack an Executable with UPX
Expected signal: Sysmon Event ID 1: upx.exe process creation with '--best' flag and output path. Sysmon Event ID 11: File Create for packed_target.exe in %TEMP%. The output file will have different SHA256 than the input, smaller file size, and UPX-specific section names (.UPX0, .UPX1).
- Test 2Identify Packed Binary with PE Entropy Check
Expected signal: Sysmon Event ID 1: sigcheck.exe process creation with the target binary path. Output will show section entropy values. For a UPX-packed binary, sections will show entropy near 7.8-8.0.
- Test 3Simulate Packed Malware Self-Extraction Pattern
Expected signal: Sysmon Event ID 1: powershell.exe with Assembly.Load command. Sysmon Event ID 11: Temp file creation followed by deletion. PowerShell ScriptBlock Log Event ID 4104 with the full script including Assembly.Load. This pattern (write to disk + load + delete) is characteristic of packed dropper behavior.
- Test 4Download and Execute UPX to Pack a Binary
Expected signal: Sysmon Event ID 1: PowerShell with Invoke-WebRequest (download cradle). Sysmon Event ID 3: Network connection to github.com. Sysmon Event ID 11: upx.zip download, extraction. Sysmon Event ID 1: upx.exe execution on victim_payload.exe.
References (5)
Unlock Pro Content
Get the full detection package for T1027.002 including response playbook, investigation guide, and atomic red team tests.