Event ID 7045: A service was installed in the system
Event ID 7045, "A service was installed in the system", is written to the System log by the Service Control Manager whenever a new service is created, with its name, the program it runs, its start type and the account it runs as.
What event 7045 records
Services start automatically, run as SYSTEM if their creator chooses, and survive reboots, which is why attackers use them both for persistence and for remote execution. Every new service is logged as 7045 in the System log, which is not governed by the audit policy and is on by default. (The Security log has its own version, 4697, only when "Audit Security System Extension" is enabled.)
Legitimate software installs services too, so the value is in the details: the Service File Name (the command the service runs), the account and the start type.
Malicious or legitimate?
| Sign | Why it matters |
|---|---|
| Service File Name runs cmd.exe, powershell.exe, mshta, rundll32 or a script | Real services are executables or drivers, not command lines |
| The binary is in ProgramData, Users, Public, Temp or a random folder | Installed software lives in Program Files or System32 |
| Encoded or very long command line (-enc, FromBase64String, %COMSPEC%) | Typical of remote execution frameworks |
| Random service name (eight random letters) or a name imitating a Windows service | PsExec-style tools and attack frameworks create such names |
| Demand start, installed and then deleted minutes later | Remote execution: install, run once, remove |
| Installed by an account that logged on over the network seconds earlier | Remote service creation |
PsExec itself creates a service called PSEXESVC (renamable with -r) that runs PSEXESVC.exe from the ADMIN$ share; other tools follow the same pattern with different names.
Event 7045 fields
The fields an investigator reads first, what they mean, and where Arcsentry stores them.
| Field | Meaning | Arcsentry field |
|---|---|---|
| Service Name | The display name of the service. | event data |
| Service File Name | The image path: the program or command the service runs. | event data |
| Service Type | User mode service, kernel mode driver, and so on. | event_log_service_type |
| Service Start Type | Auto start, demand start, disabled, boot or system start. | event_log_service_start_type |
| Service Account | The account it runs as, usually LocalSystem. | event data |
In Arcsentry the name, path and account are readable as service_name, $imagepath and $accountname.
What event 7045 proves, and what it does not
It shows
- That a service with this name and command was created at this time.
It does not show
- That it ran, or what it did. Check 7036 (state changes), process creation and the service's own artifacts.
- Who created it. Join on time to the logon and process events, or to 4697 in the Security log if "Audit Security System Extension" was on.
Attacker activity it reveals
Persistence
An auto-start service running PowerShell or a script from ProgramData, created during an interactive session. The service also appears in the registry under HKLM\SYSTEM\CurrentControlSet\Services, which survives log clearing. MITRE ATT&CK T1543.003
Remote execution
A short-lived service created from another host over the admin share, preceded by a type 3 4624 and often deleted after one run. MITRE ATT&CK T1569.002
Malicious drivers
Kernel driver services (Service Type: kernel mode driver) from unusual paths, used to disable security tools.
In a real investigation: Halden Freight office intrusion
At 22:10:02 UTC on HF-WS01, the System log recorded 7045 for "HF Update Service": LocalSystem, auto start, running powershell.exe … -File C:\ProgramData\HFUpdate\hfupdate.ps1. The same second, process creation auditing shows sc.exe create HFUpdateSvc, and the service was still in the registry when the host was collected. A PowerShell script in ProgramData run by an auto-start SYSTEM service is two of the signs above at once.
Finding event 7045 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. System log records are the event type evtx_system. In Hunt, with that event type selected:
filter event_code == "7045"
derive {svc = service_name, img = $imagepath, acct = $accountname}
filter !(img ~= "(?i)^c:[\\\\](windows|program files)")
select {timestamp, svc, img, acct}
sort {-timestamp} New services whose program is outside the Windows and Program Files folders, newest first. A variant of this query is in the AQL reference, checked on the Halden case.
Or ask in plain English, for example "show event 7045 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 4688: Process created
- Event ID 4624: Successful logon
- Event ID 4698: Scheduled task created
- Event ID 4104: PowerShell script block
- Event ID 1102: Security log cleared
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 7045 mean?
A new service was installed. The System log records its name, the program or command it runs, its start type and its account. Attackers create services for persistence and for remote execution.
What is the difference between 7045 and 4697?
Both record service installation. 7045 is in the System log and always on. 4697 is in the Security log and only written when "Audit Security System Extension" is enabled; it also names the account that installed the service.
How do I detect PsExec with event 7045?
Look for a service named PSEXESVC (or a renamed one) running an executable from C:\Windows, installed right after a network logon, and often removed minutes later. Other remote execution tools create services with random names and command-line image paths. The PsExec forensics guide covers the full sequence on both hosts.
Sources
- Microsoft Learn: Service Control Manager events; 4697(S) A service was installed in the system
- MITRE ATT&CK: T1543.003 Windows Service; T1569.002 Service Execution
- Venema Labs lab case: Halden Freight office intrusion, HF-WS01 System log
Checked 1 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 7045 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