Security event 4697
A service was installed in the system
Channel: Security. Category: System (Audit Security System Extension).
What it records
Generated (Windows Server 2016 / Windows 10 and later) when a new service is registered with the Service Control Manager, recording the service name, the Service File Name (binary path, including any command-line parameters), Service Type, Service Start Type, and the Service Account it runs as.
Why it matters
A primary event for detecting service-based persistence and lateral movement. Attackers frequently install a malicious service, or abuse tools like PsExec (which installs a temporary service), to gain SYSTEM-level execution or persist across reboots. Microsoft's own guidance flags a Service File Name outside %windir%/Program Files, driver-type Service Types (0x1/0x2/0x8), or a non-default Service Account as red flags. This is well-established as a detection artifact for MITRE ATT&CK T1543.003 (Create or Modify System Process: Windows Service), since installing a Windows service is exactly the action the technique describes.
What triggers it
Legitimate software/driver installation and IT tooling, as well as malicious service creation for persistence or lateral movement (e.g., PsExec-style remote execution, malware installing itself as an auto-start service).
Fields that carry the answer
| Field | What it tells you |
|---|---|
| Service Name | Name of the newly registered service. |
| Service File Name | Full path (plus any command-line parameters) to the binary the Service Control Manager will execute. Microsoft flags anything outside %windir%/Program Files as a red flag. |
| Service Type | Kernel/file-system driver vs. Win32 own/share process. Driver-type services (0x1/0x2/0x8) get near-unrestricted OS access from boot and are rarely installed. |
| Service Start Type | Boot/System/Automatic/Manual/Disabled: Microsoft flags Boot(0)/System(1) start types (unrestricted driver access) and a brand-new service starting Disabled(4) as worth reviewing. |
| Service Account | The account context the service will run as, anything other than LocalSystem/LocalService/NetworkService means the service runs under a user account and is worth reviewing. |
In practice
A 4697 shows Service Name PSEXESVC, Service File Name C:\Windows\PSEXESVC.exe, Service Type user mode service, Service Start Type Demand (3), and Service Account LocalSystem on a host reached from another machine: a temporary service dropped in %windir%\ and started on demand under LocalSystem is the textbook signature PsExec leaves behind for remote command execution.
Sample record
A service was installed in the system. Subject: Security ID: S-1-5-21-3457937927-2839227994-823803824-1104 Account Name: jsmith Account Domain: CORP Logon ID: 0x2A9F31 Service Information: Service Name: WinDefragSvc Service File Name: C:\Windows\Temp\update.exe Service Type: 0x10 Service Start Type: 2 Service Account: LocalSystem
ATT&CK techniques
- T1543.003: Windows Service
Sources
Paste a record into Event XML or open a log in EVTX Reader.