Skip to content

Wrong Path

Red Flags

Windows keeps its own programs in a few protected folders, System32 above all, and each core process has a known home among them. A Windows name running from anywhere else, or a service whose binary sits in Temp, Downloads or a user's profile, is not something Windows does. It usually means a file dropped under a trusted name, or a service installed from a folder many accounts can write to. Read the full path first and compare it with the program's own home, after removing device prefixes and ignoring case.

Normal and Suspicious

A clean machine sits beside a suspicious one, and the pointer marks where to look.

Normal

A clean Windows 11 install

The WMI provider host under the service hosts on a clean install, at home in System32\wbem, not System32 itself.
NameParentPath
svchost.exeservices.exeC:\Windows\System32\svchost.exe
WmiPrvSE.exesvchost.exeC:\Windows\System32\wbem\WmiPrvSE.exe
See It in the Window

Suspicious

ws-042,

The new service binary on ws-042 at 10:06 on 12 Oct 2026, started by services.exe.
NameParentPath
services.exewininit.exeC:\Windows\System32\services.exe
updsvc64.exeservices.exeC:\Windows\Temp\updsvc64.exe
PathIn C:\Windows\Temp: a service binary normally runs from System32 or Program Files, not a temporary folder. Wrong Path
See It in the Window

Why It Matters

Windows keeps its own programs in a few protected folders, so a system name anywhere else is an impostor. A service or SYSTEM process running from Temp, Downloads or AppData was put there by whoever could write to it.

How to Confirm It

Work through these in order. Each step names the page that shows how.

  1. Read the full path and compare it with the program's home, ignoring case and removing prefixes such as \\?\ and \Device\HarddiskVolume3, because one file can be written several ways.Process Listings and Scans
  2. Check the folder itself. Windows or Program Files with an extra space, or a folder of that name inside another path, only looks trusted. Never trim spaces when you normalise a path.Process Listings and Scans
  3. Look for a file named like a Windows tool in another program's folder, because a program that starts a tool without its full path can run that copy first.Process Listings and Scans
  4. For a service, compare the binary with its ImagePath and its account, and with event 7045 in the System log, which records its install. A service binary in Temp is a finding on its own.Process Listings and Scans
  5. Find when the file landed and what wrote it (DeviceFileEvents, Sysmon events 11 and 29), then follow the writer's own chain.Process Trees and Call Chains

What Defenders See

Each record names its log and what must be switched on to get it.

Record and Where It LandsWhat to ReadHow to Turn It On
4688 A new process has been created (opens in a new tab)SecurityIt is written on the computer the process ran on.New Process Name holds the full path. Compare it, case-insensitively, with the program's home.Process Trees and Call Chains shows how to read it.Turn on Audit Process Creation. For the command line, also turn on Include command line in process creation events.
1 Process creation (opens in a new tab)Microsoft-Windows-Sysmon/OperationalIt is written on any Windows computer running Sysmon.Image, with Hashes and OriginalFileName to tell a moved Windows file from an impostor.Process Trees and Call Chains shows how to read it.Run Sysmon with ProcessCreate events in its configuration.
DeviceProcessEvents (opens in a new tab)Each row is a process creation or a related event, naming the new process, the process that created it and that creator's parent.Defender XDR, advanced huntingFolderPath with the file name, and InitiatingProcessFileName. A process whose creator is services.exe is a service binary.The Defender for Endpoint sensor on the device
DeviceFileEvents (opens in a new tab)Each row is a file creation, modification or other file system event, so it shows when a binary landed and which process wrote it.Defender XDR, advanced huntingWhen the binary was written and by which process, where the trail starts for anything in Temp or AppData.The Defender for Endpoint sensor on the device
29 FileExecutableDetected (opens in a new tab)Microsoft-Windows-Sysmon/OperationalIt is written on any Windows computer running Sysmon.A new executable written to disk, with its path and hashes, where Sysmon is set to log it.Run Sysmon with FileExecutableDetected events in its configuration.
AsrAbusedSystemToolAudited, AsrAbusedSystemToolBlocked, AsrAbusedSystemToolWarnBypassed (opens in a new tab)The attack surface reduction (ASR) rule against copied or impersonated system tools fired, in audit, block or warn mode.DeviceEventsDefender XDR, advanced huntingThe ASR rule against copied or impersonated system tools fired, so a system name ran from the wrong place.The Defender for Endpoint sensor on the device

What It Looks Like

This record is decoded field by field, with what each value means.

4688 A new process has been created (opens in a new tab)On ws-042, . Event 4688 in the Security log on ws-042 when the new service started.
Field, as the Record Writes ItWhat It Tells You
New Process NameC:\Windows\Temp\updsvc64.exeA program running from the machine's temporary folder. Anything can be written there, so nothing there should run as a service.
Creator Process NameC:\Windows\System32\services.exeThe Service Control Manager started it, so it is a service. A service binary in Temp is a red flag on its own.
Mandatory LabelS-1-16-16384System integrity, so it runs with full control of the machine. Whatever the file does, it does as SYSTEM.
False Positives

Some genuine programs live outside System32, such as explorer.exe in C:\Windows, WmiPrvSE.exe in System32\wbem and 32-bit copies in SysWOW64. Compare each with its own home.

A program running as SYSTEM has C:\Windows\Temp as its temporary folder, so installers and updaters can run briefly from there. A known vendor, a valid signature and a short life are the signs of a genuine one.

Blind Spots

A binary that replaced the genuine file in its home folder, or code running inside a genuine process, passes every path check, so pair this with signatures and the injection checks.

Kernel listings print device paths and some tools add \\?\, so a check that compares text without normalising it misses some mismatches and invents others.

Hunt It

The same hunt is written for four tools, so pick the one you use. Defender XDR and Sentinel queries are in KQL, which you paste into Advanced hunting in the Defender portal or into Sentinel's Logs page. Splunk queries are in SPL, for its Search page, and Velociraptor queries are in VQL, which you run as a hunt.

Needs Defender for Endpoint. FolderPath holds the full path, compared here in lower case. Defender's own platform folder under ProgramData is left out, but other agents and installers also run from ProgramData or Temp as SYSTEM, so read the rare paths first.

KQLDefender XDR, Advanced hunting
// System names away from their home folder, services or SYSTEM processes from writable folders, and look-alike foldersDeviceProcessEvents| where Timestamp > ago(30d)| extend Name = tolower(FileName), Path = tolower(FolderPath)| extend System32 = strcat(@"c:\windows\system32\", Name), SysWow64 = strcat(@"c:\windows\syswow64\", Name)| where (Name in ("smss.exe", "csrss.exe", "wininit.exe", "winlogon.exe", "services.exe", "lsass.exe", "lsaiso.exe", "spoolsv.exe", "taskhostw.exe", "runtimebroker.exe", "conhost.exe")        and Path != System32)    or (Name in ("svchost.exe", "dllhost.exe") and Path != System32 and Path != SysWow64)    or (Name == "explorer.exe" and Path !in (@"c:\windows\explorer.exe", @"c:\windows\syswow64\explorer.exe"))    or (Name == "wmiprvse.exe" and Path !in (@"c:\windows\system32\wbem\wmiprvse.exe", @"c:\windows\syswow64\wbem\wmiprvse.exe"))    or (Path matches regex @"^c:\\(windows\\temp|programdata|users\\public|users\\[^\\]+\\(downloads|appdata)|\$recycle\.bin)\\"        and (InitiatingProcessFileName =~ "services.exe" or AccountSid == "S-1-5-18")        and not(Path startswith @"c:\programdata\microsoft\windows defender\platform\"))    or Path matches regex @"^c:\\(windows|program files|program files \(x86\)) +\\"| project Timestamp, DeviceName, FileName, FolderPath, InitiatingProcessFileName, AccountName, ProcessCommandLine| order by Timestamp desc

In a Memory Image

Volatility 3 reads a memory image, and each of its plugins below shows part of this sign.

Rules to Compare With

Security vendors publish detection rules anyone can read. These look for the same thing, so compare your own with them.

Show the 5 Public Rules

How to Prevent It

Each control helps prevent it, and its line says what it does here.

Sources

MITRE ATT&CK is a free public catalogue of the techniques attackers use. Each technique has an ID, such as T1055 for Process Injection, so defenders can name the same behaviour the same way. This red flag can point to these techniques.