T1036.005

Match Legitimate Resource Name or Location

Adversaries may match or approximate the name or location of legitimate files, Registry keys, or other resources when naming/placing them. This is done for the sake of evading defenses and observation. This may be done by placing an executable in a commonly trusted directory (ex: under System32) or giving it the name of a legitimate, trusted program (ex: svchost.exe). In containerized environments, a threat actor may create a resource in a trusted namespace or one that matches the naming convention of a container pod or cluster.

Microsoft Sentinel / Defender
kusto
let SystemProcessPaths = dynamic([
  @"C:\Windows\System32\svchost.exe",
  @"C:\Windows\System32\csrss.exe",
  @"C:\Windows\System32\lsass.exe",
  @"C:\Windows\System32\services.exe",
  @"C:\Windows\System32\smss.exe",
  @"C:\Windows\System32\wininit.exe",
  @"C:\Windows\System32\conhost.exe",
  @"C:\Windows\System32\dllhost.exe",
  @"C:\Windows\System32\RuntimeBroker.exe"
]);
DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ ("svchost.exe", "csrss.exe", "lsass.exe", "services.exe", "smss.exe", "wininit.exe", "conhost.exe", "dllhost.exe", "RuntimeBroker.exe", "taskhostw.exe", "spoolsv.exe", "msdtc.exe", "wuauclt.exe", "vmtoolsd.exe")
| where not(FolderPath in~ (SystemProcessPaths))
| where not(FolderPath startswith @"C:\Windows\System32\" or FolderPath startswith @"C:\Windows\SysWOW64\")
| extend ParentMismatch = case(
    FileName =~ "svchost.exe" and InitiatingProcessFileName !~ "services.exe", true,
    FileName =~ "csrss.exe" and InitiatingProcessFileName !in~ ("smss.exe", "csrss.exe"), true,
    FileName =~ "lsass.exe" and InitiatingProcessFileName !~ "wininit.exe", true,
    FileName =~ "services.exe" and InitiatingProcessFileName !~ "wininit.exe", true,
    false)
| project Timestamp, DeviceName, AccountName, FileName, FolderPath, ProcessCommandLine,
         InitiatingProcessFileName, ParentMismatch, SHA256
| sort by Timestamp desc
high severity high confidence

Data Sources

Process: Process Creation Process: Process Metadata Microsoft Defender for Endpoint

Required Tables

DeviceProcessEvents

False Positives

  • VMware Tools (vmtoolsd.exe) running from non-default install locations in virtualized environments
  • Application compatibility fixes that redirect binary execution paths
  • Windows Feature on Demand or Windows Sandbox creating system binary copies in temporary locations
  • Some endpoint protection tools that create copies of system binaries for analysis

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections