Skip to main content
7045SystemSystemSecurity tier 1

Event ID 7045: A new service was installed in the system

Event ID 7045 is logged by the Service Control Manager to the System log every time a new service is registered on a Windows host, whether by an installer, an admin using sc.exe, or an attacker using PsExec-style remote execution. It records the service name, image path, start mode, and account.

What Triggers Event 7045

Event 7045 comes from the Service Control Manager, the component that owns every Windows service's lifecycle, and it lands in the System log rather than Security because service creation itself is not a security-auditing subcategory the way logons or object access are.

Windows fires it the instant a process calls CreateService successfully, whether that call comes from an MSI installer, sc.exe, PowerShell's New-Service cmdlet, or a remote administration tool pushing a service definition over SMB. There is no auditing policy to enable and no subcategory to turn on: 7045 is unconditional, which is exactly why it is more reliable in practice than its closer Security-log cousin.

That cousin is Event 4697, "A service was installed in the system," which lives under the Audit Security System Extension subcategory. 4697 carries slightly richer subject information (a resolvable SID plus logon ID you can pivot to a 4624 network logon), but it only fires if that specific audit subcategory is enabled, and in most environments it is not.

Auditpol defaults and GPO baselines rarely turn on System Extension auditing, so 4697 sits at zero events on the majority of endpoints SOC teams actually monitor. 7045 is the fallback signal for exactly that reason: it captures the same event class unconditionally, at the cost of a shallower subject (frequently just SYSTEM for built-in components, since the Service Control Manager itself performs the registration on behalf of whoever called it).

The event's fields are what make it useful for triage. ServiceName is the internal name registered with the SCM, which may differ from the friendly display name shown in services.msc. ImagePath is the fully qualified path (plus any command-line arguments) that the SCM will execute when the service starts; this is captured at creation time only, so a later binary swap through registry edits will not regenerate 7045.

ServiceType tells you whether this is a Win32 process service (the common case for applications), a Win32 share-process service (svchost-hosted), or a kernel/file-system driver, and driver installations deserve outsized attention because they run with kernel-level privilege before any user session exists.

StartType records whether the service auto-starts at boot, starts manually, or is delayed-auto, and AccountName shows the security context, typically LocalSystem, LocalService, NetworkService, or a specific domain or local account for services that need particular rights.

A typical SOC shift sees 7045 constantly from entirely benign activity: patch Tuesday installing updated driver services, endpoint security agents re-registering their scanning service after an upgrade, backup software installing a new agent service, or a help desk technician deploying a printer driver package. None of that is noise to filter blindly, because the same event class is how service-based persistence and remote execution both surface.

Ransomware operators frequently drop an encryptor as a service so it survives a reboot and to run under SYSTEM without needing a logged-on user. Remote access trojans install a service stub that respawns the implant if the process is killed.

And red-team and criminal tooling built around PsExec, PAExec, or similar SMB-based execution frameworks work by copying a small service binary to the target's ADMIN$ share, remotely creating a service pointing at it, starting the service to run the attacker's command, and then deleting the service, all of which produces one or more 7045 events with a very recognizable shape: a service name like PSEXESVC (or a randomized variant used by PsExec clones), an ImagePath sitting in a temp or ADMIN$-mapped location, and a start type of Demand Start rather than Auto.

Neighboring events worth pairing with 7045 include 7040 (a service's start type was changed, useful for spotting an attacker flipping a disabled service back to automatic), 7036 (a service entered the running or stopped state, which tells you the newly installed service actually executed), and on hosts with Sysmon deployed, Event ID 6 (driver loaded), which corroborates a kernel-driver 7045 with the actual load and its file hash.

On the network side, a 4624 logon with LogonType 3 immediately preceding a 7045 on the same host is the classic signature of remote service installation, since the SCM connection over SMB requires an authenticated session first. An analyst triaging 7045 should always ask where the corresponding install request came from: local console activity, a software deployment tool like SCCM or Intune, or an unexplained network logon that has no ticket or change record behind it.

Event 7045 Fields

FieldWhat it tells youSimulated value
ServiceNameInternal name the Service Control Manager registered the service under; can differ from the display name shown in services.msc.simulated-servicename-42AD61
ImagePathFully qualified executable path (or full command line, including arguments) the SCM will run when the service starts. Captured only at creation time.C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
ServiceTypeWhether the service is a Win32 own-process app, a Win32 share-process (svchost-hosted) app, or a kernel/file-system driver.simulated-servicetype-45C9EF
StartTypeWhether the service auto-starts at boot, starts on demand, is delayed-auto, or is disabled.simulated-starttype-96E40B
AccountNameSecurity context the service runs under, typically LocalSystem, LocalService, NetworkService, or a named account.svc.inventory

Inspect Event 7045 Values

Click a field to inspect the full simulated value, the way you would expand it in a SIEM event view.

Example Event 7045 Log

A representative System entry for Event 7045, generated deterministically by our telemetry engine so every field holds a realistic, internally consistent value.

Simulated example generated by SOCSimulator Research
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Service Control Manager" />
    <EventID>7045</EventID>
    <Version>0</Version>
    <Level>0</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8020000000000000</Keywords>
    <TimeCreated SystemTime="2025-01-08T10:53:16.000Z" />
    <EventRecordID>536978</EventRecordID>
    <Channel>System</Channel>
    <Computer>WS-SIM-001.corp.socsimulator.example</Computer>
    <Security />
  </System>
  <EventData>
    <Data Name="ServiceName">simulated-servicename-42AD61</Data>
    <Data Name="ImagePath">C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe</Data>
    <Data Name="ServiceType">simulated-servicetype-45C9EF</Data>
    <Data Name="StartType">simulated-starttype-96E40B</Data>
    <Data Name="AccountName">svc.inventory</Data>
  </EventData>
</Event>

Detecting Event 7045

PsExec/PAExec-style service installation

index=wineventlog source="WinEventLog:System" EventCode=7045 (ServiceName="PSEXESVC" OR ImagePath="*\\PSEXESVC.exe" OR ImagePath="*paexec*") | table _time, ComputerName, ServiceName, ImagePath, ServiceType, StartType, AccountName

Suspicious ImagePath (temp/appdata paths, encoded PowerShell, cmd one-liners)

index=wineventlog source="WinEventLog:System" EventCode=7045 (ImagePath="*\\Temp\\*" OR ImagePath="*\\AppData\\*" OR ImagePath="*\\ADMIN$\\*" OR ImagePath="*powershell*-enc*" OR ImagePath="*cmd.exe*/c*") | table _time, ComputerName, ServiceName, ImagePath, AccountName

Newly installed kernel driver services

index=wineventlog source="WinEventLog:System" EventCode=7045 (ServiceType="kernel mode driver" OR ServiceType="file system driver") | table _time, ComputerName, ServiceName, ImagePath, ServiceType

LocalSystem services created outside normal deployment tooling

index=wineventlog source="WinEventLog:System" EventCode=7045 AccountName="LocalSystem" NOT [| inputlookup approved_deployment_hosts.csv | fields host] | table _time, ComputerName, ServiceName, ImagePath, AccountName

Service start type flipped to auto shortly after a suspicious 7045 install

Lucene is the base filter; sequence 7045 to 7040 by ServiceName in your SIEM.

index=wineventlog source="WinEventLog:System" (EventCode=7045 OR EventCode=7040) | transaction ServiceName maxspan=10m | search EventCode=7045 AND EventCode=7040 | table _time, ComputerName, ServiceName, ImagePath, StartType

True Positive vs False Positive

The benign baseline for 7045 is high and it is worth knowing what it looks like before hunting through it. Windows Update and cumulative patches routinely install or update driver services (ServiceType 0x1 or 0x2) with ImagePath values under %SystemRoot%\System32\drivers. EDR and antivirus agents re-register their kernel filter drivers and user-mode scanning services on every version bump, usually with a vendor-signed path under Program Files.

Backup, monitoring, and remote-support software (the legitimate kind: Datto, N-able, TeamViewer's host service, and similar) installs its own long-running service the first time it is deployed to a machine, and that single 7045 per install is expected. None of these carry an ImagePath outside standard system or vendor directories, none use ServiceType/StartType combinations that look improvised, and the AccountName is consistently LocalSystem or a documented service account, not a plain domain user.

The judgment calls that separate true from false positive start with ImagePath. A path under %TEMP%, a user's \AppData\Local or \AppData\Roaming, \Users\Public, \ProgramData\ with a randomized subfolder name, or an ADMIN$-relative path is a strong indicator of malicious or attacker-tool installation, because legitimate software vendors do not install service binaries into user-writable, non-persistent locations.

The next tier of suspicion is an ImagePath that is not a path to an executable at all but a command line: cmd.exe /c followed by a one-liner, powershell.exe with -enc, -nop, -w hidden, or -sta flags, or an embedded .DownloadString( / .DownloadFile( call. The Service Control Manager will happily run any command line you register, and attackers use this to avoid dropping a second-stage binary entirely, since the payload lives in the ImagePath string itself and is decoded/executed at service start.

ServiceName is the second signal an analyst should check. PSEXESVC is the literal name Sysinternals PsExec uses by default; PAExec and its many forks generate a similarly formatted but randomized service name, often with a numeric or hex suffix, specifically to dodge a static PSEXESVC allow/deny rule.

Legitimate remote administration through PsExec inside change-managed IT work is common, so ServiceName alone is not a verdict; it needs to be read against whether the account performing the install matches a known admin workflow, whether there is a change ticket, and whether the ImagePath and target host make sense for that admin's normal duties.

ServiceType and AccountName round out the picture. A newly installed kernel driver (0x1 or 0x2) outside of a patch cycle or known EDR/AV vendor is rare in a healthy environment and should always get a second look, because a malicious driver bypasses user-mode defenses entirely and is a hallmark of BYOVD (bring-your-own-vulnerable-driver) privilege escalation and rootkit tooling.

Similarly, a Win32 service installed to run as a specific domain user rather than LocalSystem or one of the built-in service accounts is unusual outside of documented service-account patterns (SQL Server, IIS app pools, and similar), and becomes more suspicious if that account was not provisioned through the normal service-account request process, or if the install originates from a workstation rather than a server or deployment tool.

Finally, a service created by a non-administrative workflow, meaning the Subject in the paired 4697 (when available) or the preceding logon session resolves to an account that has no business installing software, running as LocalSystem, is the pattern most consistent with privilege escalation via service abuse rather than a routine software rollout.

MITRE ATT&CK® Techniques

Event 7045 telemetry feeds detections for these ATT&CK® techniques:

Practice Investigating Event 7045

Reading about a new service was installed in the system is one thing. Working the detection inside a live console is another. These free SOCSimulator operations cover the attack techniques Event 7045 helps you detect:

Start investigating free

Frequently Asked Questions

What is event ID 7045?
Event ID 7045 is logged by the Service Control Manager to the Windows System log whenever a new service is registered on the machine. It captures the service name, the executable or command line it will run (ImagePath), the service type, the start mode, and the account it runs under, regardless of whether audit policies are configured.
Is event ID 7045 a security event?
It is not part of the Windows Security auditing subsystem; it lives in the System log and requires no audit policy to be enabled, unlike its Security-log counterpart, Event 4697. That unconditional logging is exactly why defenders rely on 7045 as the practical, always-on signal for new service installs.
How do I fix event ID 7045?
Event 7045 is informational, not an error, so there is nothing to fix by default. If it is appearing unexpectedly, the fix is to identify the service (via ServiceName and ImagePath in the event), confirm whether the install was legitimate (software update, agent deployment, admin task), and if it was not, stop and delete the service and investigate how it was created.
What is the difference between event ID 7045 and 4697?
Both record new service installations, but 4697 is a Security-log event gated behind the Audit Security System Extension subcategory, which most environments never enable, while 7045 is a System-log event the Service Control Manager writes unconditionally. Where both are present, 4697 offers a more resolvable Subject (SID plus logon ID); where only one fires, it is almost always 7045.
Can PsExec be detected with event ID 7045?
Yes. PsExec creates a service named PSEXESVC (its forks and clones use randomized variants) with an ImagePath pointing at a binary copied to the target's ADMIN$ share, and the service is created with Demand Start rather than Auto. That combination in a 7045 event, especially preceded by a network logon (Event 4624, LogonType 3), is the standard fingerprint SOC teams hunt for.

Sources

Field descriptions and subcategory for the Security-log sibling event 4697, and the auditing-gap context (subcategory must be enabled).

Confirms the exact 7045 field names (ServiceName, ImagePath, ServiceType, StartType, AccountName), the remote-installation caveat, and a real sc.exe-based install example.

SigmaHQ 'Suspicious Service Installation' rule grounding the ImagePath keyword patterns (PowerShell flags, Temp paths, ADMIN$, download cmdlets) used in the detection queries.

SigmaHQ PsExec service-installation rule confirming the PSEXESVC ServiceName/ImagePath pattern used for the PsExec detection query.

Confirms T1543 (Create or Modify System Process) as a current Enterprise parent technique, with T1543.003 Windows Service as the relevant sub-technique.

Confirms T1569 (System Services) as a current Enterprise parent technique, with T1569.002 Service Execution covering PsExec-style remote service abuse.

Glossary

What is Log Management? SOC Glossary

Log management is the process of collecting, normalizing, storing, retaining, and analyzing log data from across the IT …

Read more
Glossary

What is Persistence? SOC Glossary

Persistence is the set of techniques an adversary uses to keep access to a compromised system after whatever gave them t…

Read more
Glossary

What is Incident Response? SOC Glossary

Incident response (IR) is the structured, repeatable process an organization follows before, during, and after a securit…

Read more
Career Path

SOC Analyst (Tier 2) Career Guide: Salary & Skills

Tier 2 SOC Analysts handle the investigations that Tier 1 escalates. You dig into multi-stage attacks, coordinate contai…

Read more
Career Path

Incident Responder Career Guide: Salary & Skills

Incident Responders lead the technical response when confirmed breaches happen. You coordinate containment, run forensic…

Read more
Technique

Create or Modify System Process (T1543): Detection Training

Create or Modify System Process establishes persistence by installing a new service or altering an existing one so a pay…

Read more
Technique

System Services (T1569): Detection Training

This technique executes code by creating or starting system services and daemons, which run with high privilege and can …

Read more
Comparison

SOCSimulator vs. LetsDefend: Platform Comparison

SOCSimulator wins on operational realism. You get multi-tool shift simulation with SLA pressure, noise injection, and al…

Read more
Event ID

Windows Event ID Library: SOC Reference

Windows Security and Sysmon event IDs with simulated log samples, field tables, and tested detection queries.

Read more
Feature

Shift Mode: Real-Time SOC Simulation

Practice alert triage under realistic time pressure with SLA timers and noise injection.

Read more
Feature

Operations: Guided Training Operations

Structured CTF-style investigation operations covering real-world attack scenarios.

Read more
Blog

SOCSimulator Blog: Security Training Insights

Articles on SOC analyst skills, detection engineering, and career development.

Read more