T1027.008 Splunk · SPL

Detect Stripped Payloads in Splunk

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.

MITRE ATT&CK

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

SPL Detection Query

Splunk (SPL)
spl
index=syslog OR index=osquery sourcetype=linux_secure OR sourcetype=osquery
| eval is_strip=if(match(cmdline, "strip\s+(--strip-all|-s)\s+"), 1, 0)
| eval is_stripped_exec=if(match(cmdline, "(go build.*-ldflags.*-s.*-w|gcc.*-s |g\+\+.*-s )"), 1, 0)
| eval is_osa=if(match(cmdline, "osacompile.*-x"), 1, 0)
| where is_strip=1 OR is_stripped_exec=1 OR is_osa=1
| table _time, host, user, cmdline, is_strip, is_stripped_exec, is_osa
| sort - _time
| append [
    search index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
      (CommandLine="*strip*" OR CommandLine="*-ldflags*-s*-w*" OR CommandLine="*pdbremove*")
      NOT (Image="C:\\Windows\\*" OR Image="C:\\Program Files\\*")
    | table _time, host, User, Image, CommandLine
]
medium severity low confidence

Detects symbol stripping operations across platforms: Linux strip command with --strip-all or -s flags, Go build commands with -ldflags -s -w (strips symbols and DWARF), macOS osacompile with -x flag (creates run-only script), and Windows PDB removal tools. These operations remove human-readable analysis artifacts from binaries to hinder reverse engineering and signature-based detection.

Data Sources

Process: Process CreationCommand: Command ExecutionSysmon Event ID 1

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/Operationallinux_secure

False Positives & Tuning

  • Legitimate Go builds with -ldflags '-s -w' for production size optimization — this is standard practice in Go release builds
  • Linux kernel module builds and system software compilation with strip commands
  • Cross-compilation toolchains for embedded systems that strip debug info from binaries
  • CI/CD pipelines that strip symbols from production builds to reduce binary size
Download portable Sigma rule (.yml)

Other platforms for T1027.008


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.

  1. Test 1Create Run-Only AppleScript (macOS Stripped Payload)

    Expected signal: Process creation events for osacompile (twice) and osascript. File creation events for compiled.scpt and runonly.scpt. The runonly.scpt will fail osadecompile, confirming stripped (run-only) status.

  2. Test 2Strip Symbols from Linux Binary with strip Command

    Expected signal: Process creation for cp, strip, file, and nm commands. File creation and modification events for /tmp/stripped_ls. The 'file' output will show 'stripped', and nm will return 'no symbols'.

  3. Test 3Compile Go Binary with Symbol Stripping Flags

    Expected signal: Process creation for go build with -ldflags '-s -w' arguments. File creation of stripped_go in /tmp. Execution of stripped_go from /tmp. The 'file' command shows stripped ELF.

  4. Test 4Verify Stripped Binary Cannot Be Analyzed with Standard Tools

    Expected signal: Process creation events for cp (twice), strip, and nm (twice). This test demonstrates the before/after comparison an analyst would perform to confirm stripping.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections