Event ID 4697: A service was installed in the system
Event ID 4697, "A service was installed in the system", is the Security log record of a new Windows service: the service name, the program it runs, its type, start type and account, and, unlike the System log's 7045, the account and Logon ID that installed it.
What event 4697 records
Services are the classic place for attackers to persist and the classic way to run code on another host, because they start automatically and can run as SYSTEM. Windows records new services twice when the auditing allows: 7045 in the System log, always, and 4697 in the Security log, when "Audit Security System Extension" is enabled. The second is off by default, so many hosts will only have 7045.
When 4697 is present, it is the better record. Its Subject section names the account and Logon ID that created the service, which turns "a service appeared" into "this session created this service", and the Logon ID leads straight to the 4624 that says where that session came from.
4697 vs 7045
| 4697 | 7045 | |
|---|---|---|
| Log | Security | System |
| Enabled by default | No (Audit Security System Extension) | Yes |
| Who installed it | Yes: account and Logon ID | No |
| Service name, file name, type, start type, account | Yes | Yes |
| Cleared with | The Security log (leaves 1102) | The System log (leaves 104) |
| Read access | Administrators and auditors only | Any user |
Read both when you have them. A 7045 without a 4697 on a host where the auditing is on is worth a second look, as is the reverse.
Service type and start type values
The Security event shows the type and start type as codes:
| Service Type | Meaning | Service Start Type | Meaning |
|---|---|---|---|
| 0x1 | Kernel driver | 0 | Boot |
| 0x2 | File system driver | 1 | System |
| 0x10 | Own process | 2 | Automatic (or automatic delayed) |
| 0x20 | Shared process | 3 | Manual (demand start) |
| 0x110, 0x120 | Interactive own or shared process | 4 | Disabled |
Two combinations deserve attention. A kernel driver (0x1) from a user-writable folder is a common way to load a vulnerable driver and switch off security tools. An own-process service (0x10) with manual start, created and removed within minutes, is the remote-execution pattern of PsExec and its imitators. Service Account is filled in only for process services; when it is empty, the service runs as LocalSystem.
Triage: malicious or legitimate?
- The installer. Software deployment tools install services under their own service accounts. A service installed by a user's network logon from a workstation is unusual.
- The file name. Real services run executables from Program Files or System32. Command lines (
cmd.exe /c,powershell.exe -enc), scripts and paths in ProgramData, Users, Public or Temp are red flags. - The name. Random eight-letter names and imitations of Windows service names are typical of attack frameworks.
- The timing. A service created seconds after a type 3 logon from another host, and deleted soon after, is remote execution.
Event 4697 fields
The fields an investigator reads first, what they mean, and where Arcsentry stores them.
| Field | Meaning | Arcsentry field |
|---|---|---|
| Subject: Account Name, Account Domain, Logon ID | The account and session that installed the service. | user_name, event_log_logon_id |
| Service Name | The service's name. | service_name |
| Service File Name | The program or command the service runs. | process_executable |
| Service Type | Driver, own process, shared process (codes above). | event_log_service_type |
| Service Start Type | Boot, system, automatic, manual or disabled. | event_log_service_start_type |
| Service Account | The account the service runs as; LocalSystem when empty. | $serviceaccount |
What event 4697 proves, and what it does not
It shows
- That this account, in this logon session, installed a service with this name and command at this time.
It does not show
- That the service ran or what it did. Check service state events (7036), process creation and the program itself.
- That the person behind the account was the attacker. Stolen credentials produce the same event.
Attacker activity it reveals
Persistence
An automatic-start service running a script or a binary from ProgramData, installed during an interactive or RDP session. MITRE ATT&CK T1543.003
Remote execution
A manual-start service installed from a network logon, run once and deleted: PsExec, Impacket and many attack frameworks work this way. MITRE ATT&CK T1569.002
Bring your own vulnerable driver
A kernel driver service from an unusual path, installed shortly before security tools stop reporting. MITRE ATT&CK T1068
Finding event 4697 in Arcsentry
Arcsentry parses every channel in Windows\System32\winevt\Logs, whether it comes from an Arcsentry Collector archive, a KAPE or Velociraptor collection, or a disk image. Security log records are the event type evtx_security. In Hunt, with that event type selected:
filter event_code == "4697"
derive {svc = service_name, img = process_executable, by = user_name, logon = event_log_logon_id}
select {timestamp, by, logon, svc, img}
sort {-timestamp} Every service installed, newest first, with the installing account and Logon ID to join to its 4624.
Or ask in plain English, for example "show event 4697 on every host, oldest first", and Arcsentry shows the AQL it wrote before it runs. The AQL reference lists the operators used here, and the AI investigator reads the same events, citing each one by its event ID when it reports a finding.
Related event IDs
- Event ID 7045: Service installed
- Event ID 4624: Successful logon
- Event ID 4688: Process created
- Event ID 4698: Scheduled task created
- Event ID 5145: Share object access checked
All events by investigation question: Windows security event IDs for incident response. Logon types in full: Windows logon types. The log files themselves: Windows event logs.
Frequently asked
What does event ID 4697 mean?
A new service was installed. The Security log records the service name, program, type, start type and account, and the account and Logon ID that installed it.
What is the difference between event ID 4697 and 7045?
Both record a new service. 7045 is in the System log and always written. 4697 is in the Security log, needs "Audit Security System Extension", and also names who installed the service.
How do I enable event ID 4697?
Enable "Audit Security System Extension" (success) under Advanced Audit Policy Configuration › System, through Group Policy or with auditpol.
Sources
- Microsoft Learn: 4697(S) A service was installed in the system; Audit Security System Extension
- MITRE ATT&CK: T1543.003 Windows Service; T1569.002 Service Execution; T1068 Exploitation for Privilege Escalation
Checked 2 December 2026 by Venema Labs against Microsoft's audit documentation and, where an example is shown, the named lab case. Field availability varies by Windows version.
Find event 4697 across every host in minutes.
Load your collections, ask what happened, and check every finding against the event behind it. Free for 7 days.
Request a trial