Persistence through an automatically starting service.
What gives it awayA service pointing at a binary outside normal software directories, with an automatic start type.
ATT&CK T1543.003Nothing matches that yet. Tell us what you were looking for and it goes on the list.
Windows Security Log · Event 4697
A new Windows service was registered. Services start automatically and run with high privilege, which is why installing one is a standard way to keep access to a machine. Most are ordinary software; the ones that are not stand out quickly.
Also written as 4697Event ID 4697
A program installed a background component that starts with Windows. Normal when you have just installed software; worth questioning if you have not.
The service file name is the field that matters. Legitimate services live in Program Files or System32; services pointing at temp directories, user profiles, or a command interpreter with arguments are the classic remote-execution and persistence patterns. Note this event needs the Audit Security System Extension subcategory enabled, and System log event 7045 covers similar ground without it.
Sanitised. Addresses come from the RFC 5737 documentation ranges.
A service was installed in the system.
Subject:
Security ID: CORP\jbrooks-adm
Account Name: jbrooks-adm
Account Domain: CORP
Logon ID: 0x3E9A11
Service Information:
Service Name: WinHelpSvc
Service File Name: C:\Users\jbrooks\AppData\Local\Temp\wh.exe
Service Type: 0x10
Service Start Type: 2
Service Account: LocalSystem Everything else in the log line is context.
A path under Program Files or System32Where legitimate services live. A path under a temp or user profile directoryServices do not normally live here. cmd.exe or powershell.exe with argumentsRemote execution tooling frequently registers a service that simply runs a command. A path with an unquoted spaceAn unquoted service path, which is a privilege-escalation weakness regardless of intent. Most of the time it is one of these.
What gives it awayA service pointing at a binary outside normal software directories, with an automatic start type.
ATT&CK T1543.003What gives it awayA short-lived service whose file name is a command interpreter with arguments. This is how several remote-administration tools work, legitimate ones included.
ATT&CK T1569.002What gives it awayA kernel driver service type registered outside a driver installation.
ATT&CK T1547.006What gives it awayA service name resembling a built-in one but with a path that does not match where the real component lives.
ATT&CK T1036.005SecurityEvent | where EventID == 4697 | project TimeGenerated, Computer, ServiceName, ServiceFileName, ServiceAccount, InstalledBy = SubjectUserName | order by TimeGenerated desc SecurityEvent | where EventID == 4697 | where ServiceFileName has_any ('\\Temp\\','\\Users\\','cmd.exe','powershell.exe','%COMSPEC%') | project TimeGenerated, Computer, ServiceName, ServiceFileName index=wineventlog EventCode=4697 | stats count values(dest) as hosts by Service_Name Service_File_Name | sort count asc They record the same thing from different logs. 7045 is written to the System log by the Service Control Manager and is available by default. 4697 is written to the Security log and requires the Audit Security System Extension subcategory to be enabled, but it is the better one to collect because it also records which account performed the installation.
Read the service file name. Legitimate services run binaries from Program Files, System32, or a vendor's own directory. A service pointing at a temp folder, a user profile directory, or a command interpreter with arguments is not a normal software installation, regardless of what the service calls itself.
Because a service starts automatically at boot, runs with high privilege, and needs no one to be signed in. That combination makes it durable access, which is why service installation is one of the most consistently useful persistence signals to monitor.
Last reviewed 28 August 2026