T1554

Compromise Host Software Binary

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.

Microsoft Sentinel / Defender
kusto
let SystemBinaryPaths = dynamic([
  "C:\\Windows\\System32\\",
  "C:\\Windows\\SysWOW64\\",
  "C:\\Program Files\\OpenSSH\\",
  "C:\\Program Files (x86)\\"
]);
let CriticalBinaries = dynamic([
  "ssh.exe", "sshd.exe", "sftp.exe", "curl.exe", "wget.exe",
  "putty.exe", "winscp.exe", "filezilla.exe",
  "chrome.exe", "firefox.exe", "msedge.exe", "iexplore.exe",
  "notepad.exe", "cmd.exe", "powershell.exe", "pwsh.exe",
  "taskmgr.exe", "regedit.exe", "mstsc.exe", "lsass.exe"
]);
let LegitUpdaters = dynamic([
  "msiexec.exe", "trustedinstaller.exe", "wusa.exe",
  "setup.exe", "install.exe", "update.exe", "windowsupdate.exe"
]);
let VersionLockPatterns = dynamic([
  "versionlock", "yum-versionlock", "apt-mark hold",
  "dpkg --set-selections", "apt-mark unhold"
]);
// Arm 1: File writes to critical system binary locations from non-updater processes
let BinaryModifications = DeviceFileEvents
| where Timestamp > ago(24h)
| where ActionType in ("FileModified", "FileCreated", "FileRenamed")
| where FolderPath has_any (SystemBinaryPaths)
| where FileName has_any (CriticalBinaries)
| where InitiatingProcessFileName !in~ (LegitUpdaters)
| extend AlertReason = "SystemBinaryModification"
| project Timestamp, DeviceName, AccountName, FileName, FolderPath, ActionType,
         InitiatingProcessFileName, InitiatingProcessCommandLine,
         AlertReason, SHA256, MD5;
// Arm 2: Package manager version-lock commands (UNC3886 TTPs)
let VersionLockActivity = DeviceProcessEvents
| where Timestamp > ago(24h)
| where ProcessCommandLine has_any (VersionLockPatterns)
| extend AlertReason = "VersionLockDetected"
| project Timestamp, DeviceName, AccountName, FileName,
         ProcessCommandLine, InitiatingProcessFileName,
         InitiatingProcessCommandLine, AlertReason,
         SHA256 = "", MD5 = "";
union BinaryModifications, VersionLockActivity
| sort by Timestamp desc
high severity medium confidence

Data Sources

File: File Modification File: File Creation Process: Process Creation Microsoft Defender for Endpoint

Required Tables

DeviceFileEvents DeviceProcessEvents

False Positives

  • Legitimate software updates and patching via Windows Update (TrustedInstaller) or third-party application updaters that overwrite their own executables during upgrades
  • OpenSSH for Windows installation or upgrade via official installer (msiexec) replacing ssh.exe and sshd.exe in Program Files\OpenSSH
  • System administrators using apt-mark hold or yum-versionlock for legitimate dependency pinning during application deployments, with corresponding change tickets
  • AV/EDR product self-protection mechanisms that write modified copies of monitored binaries to staging locations as part of their own update pipeline

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