T1554 Splunk · SPL

Detect Compromise Host Software Binary in Splunk

Adversaries may modify host software binaries to establish persistent access to systems. Common targets include SSH clients/servers, FTP clients, web browsers, VPN daemons, and other frequently-executed system utilities. Attackers may replace a legitimate binary entirely with a trojanized version containing credential harvesting or backdoor functionality, or patch an existing binary at its entry point to redirect execution to malicious code before resuming normal operation. After modification, adversaries may use version-lock mechanisms (e.g., yum-versionlock, apt-mark hold) to prevent legitimate updates from overwriting the trojanized binary.

MITRE ATT&CK

Tactic
Persistence
Technique
T1554 Compromise Host Software Binary
Canonical reference
https://attack.mitre.org/techniques/T1554/

SPL Detection Query

Splunk (SPL)
spl
index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational"
| eval EventCode=coalesce(EventCode, event_id)
| where EventCode IN ("2", "11")
| eval isBinaryPath=if(
    match(lower(TargetFilename), "(c:\\\\windows\\\\system32\\\\|c:\\\\windows\\\\syswow64\\\\|c:\\\\program files\\\\openssh\\\\|c:\\\\program files.*\\\\bin\\\\)"),
    1, 0)
| eval isCriticalBinary=if(
    match(lower(TargetFilename), "(ssh\.exe|sshd\.exe|sftp\.exe|curl\.exe|wget\.exe|putty\.exe|winscp\.exe|chrome\.exe|firefox\.exe|msedge\.exe|notepad\.exe|cmd\.exe|powershell\.exe|pwsh\.exe|taskmgr\.exe|mstsc\.exe|lsass\.exe)"),
    1, 0)
| eval isLegitUpdater=if(
    match(lower(Image), "(msiexec\.exe|trustedinstaller\.exe|wusa\.exe|setup\.exe|install\.exe|windowsupdate|svchost\.exe)"),
    1, 0)
| where isBinaryPath=1 AND isCriticalBinary=1 AND isLegitUpdater=0
| eval ModificationType=case(
    EventCode="2", "FileCreationTimeChanged",
    EventCode="11", "FileCreated",
    true(), "Unknown")
| eval SuspicionNote=case(
    EventCode="2", "File creation time changed - common indicator of binary replacement to hide modification",
    EventCode="11", "New file created in critical binary directory from unexpected process",
    true(), "Binary path modification")
| table _time, host, User, TargetFilename, Image, CommandLine,
        ParentImage, ParentCommandLine, ModificationType, SuspicionNote, Hashes
| sort - _time
high severity medium confidence

Detects modifications to critical system executables using Sysmon Event ID 2 (File Creation Time Changed — a key indicator of binary replacement where adversaries restore original timestamps to avoid detection) and Event ID 11 (File Created — binary drops in system directories). Filters out known-legitimate updater processes. The Hashes field captures MD5/SHA256 for comparison against vendor-published values. Event ID 2 is especially significant: legitimate software updates rarely modify file creation timestamps, but binary patching attacks frequently alter them to match the original file.

Data Sources

File: File ModificationFile: File CreationSysmon Event ID 2Sysmon Event ID 11

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/Operational

False Positives & Tuning

  • Legitimate software updates via Windows Update or third-party application updaters that reset file timestamps during install
  • OpenSSH for Windows installation or reinstallation creating new executables in Program Files\OpenSSH
  • Antivirus/EDR products that write modified or instrumented copies of monitored binaries as part of their monitoring infrastructure
  • Build and deployment tools (Jenkins agents, Ansible) that deploy updated application binaries to managed paths
Download portable Sigma rule (.yml)

Other platforms for T1554


Testing Methodology

Validate this detection against 5 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 1Replace System Binary with Modified Copy (Windows)

    Expected signal: Sysmon Event ID 11: FileCreate targeting C:\Windows\System32\notepad.exe with Image=powershell.exe. Sysmon Event ID 2: FileCreateTime change for notepad.exe if timestamps diverge. DeviceFileEvents ActionType=FileModified with FileName=notepad.exe in SystemBinaryPaths, InitiatingProcessFileName=powershell.exe. SHA256 will not match Microsoft-published hash.

  2. Test 2Hash Verification and Signature Check Workflow (Windows)

    Expected signal: DeviceProcessEvents: powershell.exe executing Get-FileHash and Get-AuthenticodeSignature. No file modification events — this is read-only. Output provides hashes for comparison against Microsoft Security Response Center published values or NSRL hash database.

  3. Test 3Trojanize SSH Client Binary (Linux)

    Expected signal: auditd: SYSCALL record for open(O_WRONLY) on /usr/bin/ssh by root/sudo, comm=cp. Linux syslog: sudo invocation logs showing binary replacement. 'rpm -V openssh-clients' reports 'S.5......' (size and hash mismatch). If MDE Linux agent deployed: DeviceFileEvents ActionType=FileModified for /usr/bin/ssh. After execution, /tmp/.t1554_harvest.log created (Sysmon Event ID 11 equivalent on Linux).

  4. Test 4Version Lock Compromised Package (Linux — UNC3886 TTP)

    Expected signal: Linux syslog/secure: sudo execution of 'yum versionlock openssh-clients' or 'apt-mark hold openssh-client' with effective UID=0. DeviceProcessEvents (MDE Linux): ProcessCommandLine containing 'versionlock' or 'apt-mark hold', AccountName=root or sudo-invoked user. Auditd: EXECVE record for yum/apt-mark with full argument list.

  5. Test 5Browser Binary Replacement Simulation (macOS — XCSSET TTP)

    Expected signal: macOS Unified Log: ES_EVENT_TYPE_NOTIFY_WRITE for /Applications/Firefox.app/Contents/MacOS/firefox from sudo/bash. macOS Gatekeeper: 'codesign --verify /Applications/Firefox.app' reports code signature invalid. If MDE macOS agent deployed: DeviceFileEvents ActionType=FileModified for browser binary path with initiating process=bash/sudo. macOS LaunchServices quarantine: application launch may trigger Gatekeeper alert when modified app is opened.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections