Stripped Payloads
Adversaries may attempt to make a payload difficult to analyze by removing symbols, strings, and other human readable information. Scripts and executables may contain variable names and other strings that help developers document code functionality. Symbols are often created by an operating system's linker when executable payloads are compiled. Adversaries use stripped payloads to make malware analysis more difficult. Stripped payload formats include run-only AppleScripts (compiled and stripped AppleScript), stripped ELF binaries on Linux, and stripped PE files on Windows. Cuckoo Stealer and macOS.OSAMiner are notable examples using stripped formats. Golang malware is frequently stripped to remove symbol tables.
DeviceProcessEvents
| where Timestamp > ago(24h)
| where InitiatingProcessFileName in~ ("osascript", "osacompile")
or FileName in~ ("osascript", "osacompile")
| where ProcessCommandLine has_any ("-x ", "-o ", "compile", ".scpt", ".scptd", "run-only")
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, InitiatingProcessCommandLine
| sort by Timestamp desc
| union (
DeviceFileEvents
| where Timestamp > ago(24h)
| where ActionType == "FileCreated"
| where FileName endswith ".scpt" or FileName endswith ".scptd"
| where FolderPath !has "/Library/Scripts/"
and FolderPath !has "/System/Library/"
| project Timestamp, DeviceName, AccountName=InitiatingProcessAccountName,
FileName, FolderPath, InitiatingProcessFileName, InitiatingProcessCommandLine
) Data Sources
Required Tables
False Positives
- IT administrators deploying AppleScript automation tools that compile scripts for distribution
- macOS application builds that compile AppleScript resources as part of their build process
- Legitimate automation frameworks (Automator, Script Editor) that save compiled scripts in user directories
- Go language toolchain installations that strip symbols as part of release builds
References (4)
- https://attack.mitre.org/techniques/T1027/008/
- https://www.sentinelone.com/labs/fade-dead-adventures-in-reversing-malicious-run-only-applescripts/
- https://www.intezer.com/blog/malware-analysis/executable-linkable-format-101-part-2-symbols/
- https://www.mandiant.com/resources/blog/golang-internals-symbol-recovery
Unlock Pro Content
Get the full detection package for T1027.008 including response playbook, investigation guide, and atomic red team tests.