Skip to content

Wrong Account

Red Flags

Every process runs in a session and carries a token, the security record that names its account and its integrity level, which is how far Windows trusts it. Services run as SYSTEM or a service account in session 0, where Windows keeps its services. The programs a person opens run as that person in their own session, at medium integrity, or high when elevated. A command prompt running as SYSTEM in session 0, or a system process under a person, means something handed it that identity, such as a remote execution service. Read the account and integrity level from the token first, and the session from the kernel.

Normal and Suspicious

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

Normal

A clean Windows 11 install

A standard user's command prompt on a clean install, running as their own account at medium integrity, not elevated.
PartValue
IntegrityMedium (S-1-16-8192)
Elevation typeDefault (Type 1)
UserThe person signed in
See It in the Window

Suspicious

ws-042,

The prompt PSEXESVC.exe started at 09:58, still running on ws-042 at 10:08 on 12 Oct 2026, in session 0.
PartValue
IntegritySystem (S-1-16-16384)
Elevation typeDefault (Type 1)
UserNT AUTHORITY\SYSTEM (S-1-5-18)
ValueSYSTEM in a command prompt: a prompt a person opens runs as that person, not the machine account. Wrong Account
See It in the Window

Why It Matters

The account decides what a process can reach. A system process under a person, or a person's tool running as SYSTEM in session 0, means something handed it that identity.

How to Confirm It

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

  1. Read the account from the process token, live with Get-Process and its user name option. In a memory image windows.getsids lists the token's SIDs, its integrity level among them.Token and Privileges
  2. In event 4688 in the Security log, take the account from the Target Subject when it is filled, else from the Creator Subject. The Creator Subject alone gives services and elevated programs the wrong account.Process Trees and Call Chains
  3. Check the session. The SessionId from windows.pslist comes from the kernel, while windows.sessions reads environment values the process itself can change.Process Listings and Scans
  4. Find what gave it that identity, reading the parent chain, and for a new logon session the logon events on the machine.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.Creator Subject and Target Subject, Token Elevation Type and Mandatory Label. The account is the Target Subject when filled.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.User, IntegrityLevel and LogonId, which ties the process to the logon session it runs in.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 huntingAccountName, AccountSid, ProcessIntegrityLevel, ProcessTokenElevation and CreatedProcessSessionId for each new process.The Defender for Endpoint sensor on the device
15031 Elevation Approved (opens in a new tab)Microsoft-Windows-LUA, an event tracing provider rather than an event logIt is written on Windows 11 computers with Administrator protection on.Administrator protection approved an elevation, so the elevated program runs as a hidden, system-generated account by design.Turn on Administrator protection, and run a trace session for the Microsoft-Windows-LUA provider.

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 for the PsExec prompt, read for the account it runs as.
Field, as the Record Writes ItWhat It Tells You
Creator Subject: Security IDSYSTEMThe creator, PSEXESVC.exe, runs as SYSTEM, the local system account. Services run as it unless they are set otherwise.
Target Subject: Account Name-Empty, because the new process shares its creator's logon, so Windows records only the creator. The prompt therefore runs as SYSTEM too.
Token Elevation Type%%1936TokenElevationTypeDefault, Default (Type 1), which SYSTEM and services run with. An administrator's prompt has it too with User Account Control off, so weigh the account.
Mandatory LabelS-1-16-16384System integrity, the level of services. A prompt a person opens runs at Medium, or High when elevated, not at System.
False Positives

Per-user services run svchost.exe as the signed-in person under names such as CDPUserSvc_<LUID>, and Administrator protection runs elevated programs as a hidden, system-generated account.

Management agents, installers and scheduled tasks run shells as SYSTEM in session 0 every day, so judge them by their parent and their command.

Blind Spots

A thread can work under another account's token while its process keeps its own, and Velociraptor's Windows.Detection.Impersonation finds such threads.

Without administrator rights a live tool may not read a SYSTEM process's owner, so an empty account is not a finding. Run the check elevated.

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. Agents and scheduled tasks start shells as SYSTEM too, so read the creator first. Per-user service hosts are left out, as running as the person is normal for them.

KQLDefender XDR, Advanced hunting
// Core processes running under a person's account, and shells running as SYSTEM in session 0DeviceProcessEvents| where Timestamp > ago(30d)| extend Name = tolower(FileName)| where (Name in ("smss.exe", "csrss.exe", "wininit.exe", "winlogon.exe", "services.exe", "lsass.exe", "lsaiso.exe", "spoolsv.exe")        and AccountSid != "S-1-5-18")    or (Name in ("cmd.exe", "powershell.exe", "pwsh.exe") and AccountSid == "S-1-5-18" and CreatedProcessSessionId == 0)| project Timestamp, DeviceName, FileName, FolderPath, AccountName, AccountSid, ProcessIntegrityLevel, CreatedProcessSessionId, InitiatingProcessFileName, 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.

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.