T1027.009 Splunk · SPL

Detect Embedded Payloads in Splunk

Adversaries may embed payloads within other files to conceal malicious content from defenses. Otherwise seemingly benign files (such as scripts and executables) may be abused to carry and obfuscate malicious payloads and content. Adversaries have been observed embedding payloads as PE overlays, within resource sections of legitimate binaries, inside LNK file ExtraData fields, within Office VBA macros, and nested inside other file types. Notable examples include Emotet embedding executables in dropper binaries, DEADEYE embedding payloads in compiled binaries, Lazarus Group distributing malicious payloads in PNG files, Pikabot loading encrypted chunked PE sections, and Uroburos storing executable payloads in encrypted Queue files.

MITRE ATT&CK

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

SPL Detection Query

Splunk (SPL)
spl
index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=11
  (TargetFilename="*.exe" OR TargetFilename="*.dll" OR TargetFilename="*.bin" OR TargetFilename="*.shellcode")
  (Image="*\\WINWORD.EXE" OR Image="*\\EXCEL.EXE" OR Image="*\\POWERPNT.EXE"
   OR Image="*\\AcroRd32.exe" OR Image="*\\FoxitPDFReader.exe"
   OR Image="*\\wscript.exe" OR Image="*\\cscript.exe" OR Image="*\\mshta.exe")
| eval IsOfficeExtract=if(match(Image, "(WINWORD|EXCEL|POWERPNT|AcroRd)"), 1, 0)
| eval IsScriptExtract=if(match(Image, "(wscript|cscript|mshta)"), 1, 0)
| table _time, host, User, TargetFilename, Image, IsOfficeExtract, IsScriptExtract
| sort - _time
| append [
    search index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
      (Image="*\\certutil.exe")
      (CommandLine="*-decode*" OR CommandLine="*-urlcache*")
    | table _time, host, User, Image, CommandLine
]
high severity high confidence

Detects embedded payload drops by document readers and scripting engines (Sysmon Event ID 11) plus certutil decode operations. Office apps dropping PE files are a strong embedded payload indicator — legitimate Office processing never writes .exe or .dll files. The appended certutil search catches the common pattern of certutil being used to decode Base64-encoded embedded payloads.

Data Sources

File: File CreationProcess: Process CreationSysmon Event ID 11Sysmon Event ID 1

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/Operational

False Positives & Tuning

  • certutil -decode used by IT for legitimate certificate file conversion operations
  • Office add-ins that legitimately extract DLL components during first-run setup
  • PDF forms that extract helper executables for PDF form processing
  • Scripting engines extracting legitimate resource files as part of software installation
Download portable Sigma rule (.yml)

Other platforms for T1027.009


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 1Extract Embedded Payload from PE Overlay with certutil

    Expected signal: Sysmon Event ID 1: certutil.exe with -encode and then -decode arguments. Sysmon Event ID 11: encoded_payload.txt and extracted_payload.exe created in %TEMP%. The -decode operation creates an executable from a text file.

  2. Test 2Office Macro Dropping Embedded Executable

    Expected signal: Sysmon Event ID 1: PowerShell spawning Word COM object. Word process creating a document with VBA code. File creation of macro_test.doc.

  3. Test 3Embed Payload in PE Resources Section

    Expected signal: PowerShell process creation demonstrating the concept. Binary data file creation in %TEMP%.

  4. Test 4Extract Payload from LNK ExtraData Field

    Expected signal: Sysmon Event ID 11: embedded_lnk.lnk created in %TEMP%. Sysmon Event ID 1: cmd.exe spawned from LNK execution with arguments. Sysmon Event ID 11: lnk_output.txt created.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections