Event ID 7045: A service was installed in the system
Written by the Service Control Manager when a new service is registered. It records the service name, the binary that will run, how it starts and the account it runs as.
- Channel
- System
- Logged by default
- Yes
- Written on
- Any host
- Volume
- Low
- Provider
- Service Control Manager
- Needs a SACL
- No
Key fields
Exact XML field names, as they appear in <Data Name="…"> and in SIEM field extractions.
| Field | What it tells you |
|---|---|
| ServiceName | Display/registration name of the new service. Random or single-character names (e.g. a GUID or 'mYsErViCe') are a common red flag |
| ImagePath | Command line the service executes. Watch for cmd.exe, powershell.exe -enc, rundll32, paths in C:\Windows\Temp or user profiles, or a raw .exe dropped recently (PsExec drops PSEXESVC here) |
| ServiceType | Service type, e.g. 'user mode service' or 'kernel mode driver'. A kernel driver install is high-signal and often tied to BYOVD or rootkits |
| StartType | Start mode: 'auto start', 'demand start', 'system start' or 'boot start'. demand start is typical of remote-exec tools that run once and uninstall |
| AccountName | Account the service runs under, e.g. LocalSystem. A service running as LocalSystem gives SYSTEM-level execution |
Analyst notes
- 017045 is logged in the System log by default, even where the Security equivalent 4697 is not enabled, and it often survives when the Security log has rolled over or been cleared.
- 02Lateral movement with PsExec, and many C2 'service' execution modules, install a short-lived service: correlate the time with 7036 state changes and with Security 4624 Type 3 and 4672 for the same host.
- 03A kernel mode driver (ServiceType) installed from an odd path is a strong BYOVD indicator; pivot to code-integrity events for the same driver.
- 04Benign software and patching install services constantly; triage on ImagePath, StartType and how recently the binary was written to disk, not on the event alone.
Pull this event
Retrieval queries for a live host, a collected .evtx file and common SIEMs. Filter further on the key fields above.
Get-WinEvent -LogName 'System' -FilterXPath "*[System[(EventID=7045)]]" -MaxEvents 50 |
Select-Object TimeCreated, Id, MachineName, Message-FilterXPath supports exact matches only. For substring matching, filter in Where-Object.
Where it shows up
Investigations, attack signals and lateral movement techniques that rely on this event.
- Attack signalService persistenceA new service was installed by the Service Control Manager.
- Lateral movementPsExec and service-based executionDestination: Service install: ServiceName PSEXESVC (Sysinternals) or a random name; ImagePath in %SystemRoot%.
- Lateral movementsmbexecDestination: Service install per command; ImagePath begins %COMSPEC% /Q /c echo and redirects to __output.
- Lateral movementRemote service creationDestination: Service installed; ServiceName, ImagePath, start type, and account are recorded.
- InvestigationWhat persistence did the attacker create?Services
- InvestigationWhere did this account log on, and was it used for lateral movement?Confirm lateral movement by technique
- InvestigationWhen did the attacker first get in? Building the initial access timelineFind the first execution
ATT&CK mapping
Techniques this event can help detect. Most of these depend on specific field values; the event alone does not mean the technique happened.
Also relevant, depending on field values
Related events
Common questions
- What does Windows event ID 7045 mean?
- Written by the Service Control Manager when a new service is registered. It records the service name, the binary that will run, how it starts and the account it runs as. It is written to the System log (System).
- Is event 7045 logged by default?
- Yes, a default Windows installation records it.
- Where is event 7045 recorded?
- In the System channel on the any host.
Decode a real event
Paste the XML and every value gets explained. Nothing leaves your browser.
Open decoderWritten by the Service Control Manager when a new service is registered. It records the service name, the binary that will run, how it starts and the account it runs as. Key fields, logging requirements, ATT&CK mapping and ready-to-run queries.