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
Last updated: 2026-04-16 Research depth: deep
References (6)
- https://attack.mitre.org/techniques/T1036/005/
- https://www.elastic.co/blog/how-hunt-masquerade-ball
- https://www.aquasec.com/blog/leveraging-kubernetes-rbac-to-backdoor-clusters/
- https://x.com/ItsReallyNick/status/1055321652777619457
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1036.005/T1036.005.md
- https://docs.docker.com/engine/reference/commandline/images/
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
Parent Technique
T1036MasqueradingRelated Sub-techniques
T1036.001Invalid Code SignatureT1036.002Right-to-Left OverrideT1036.003Rename Legitimate UtilitiesT1036.004Masquerade Task or ServiceT1036.006Space after FilenameT1036.007Double File ExtensionT1036.008Masquerade File TypeT1036.009Break Process TreesT1036.010Masquerade Account NameT1036.011Overwrite Process ArgumentsT1036.012Browser Fingerprint