Written by Ruben Selby, founder and penetration tester at Wolfcore. Last reviewed 19 November 2026.
In one sentence: Event ID 7045 is the Windows record made when a new background service is added to a computer, which is normal for software installs and also a favourite way for attackers to stay on a machine or run code on another one.
What it is
A Windows service is a program that starts with the computer and runs in the background, without anyone signed in. Antivirus, backup agents and print drivers are all services. When a new one is registered, the Service Control Manager writes an event. MITRE ATT&CK quotes one such record as “Service Control Manager/7045” with the service name, the file it runs, the type, the start type and the account (MITRE ATT&CK T1569.002).
Attackers like services for three reasons that MITRE spells out. Services are started at boot, so they persist. Services may be created with administrator privileges but are executed under SYSTEM privileges, so an adversary can use one to escalate privileges. And tools such as PsExec use a temporary Windows service to run a command on a remote machine (MITRE ATT&CK T1543.003).
Windows has a sister event in the Security log, 4697, which also says who installed the service. Microsoft documents it as generated when a new service is installed, and it belongs to the Audit Security System Extension setting (Microsoft Learn, event 4697).
How it works
- Something calls the Service Control Manager to register a service. That can be an installer, the
sc.execommand, a PowerShell command, or a remote administration tool. - Windows records the service name and the full path of the file to run, plus its type, start type and the account it will run as.
- If the account is not specified for a standard service, Microsoft’s 4697 notes say LocalSystem is used. That account is very powerful on the machine.
- The service starts, now or at boot, and runs the file named in the path.
- For remote execution, an attacker with an admin account creates the service on another machine, starts it, and often removes it afterwards. MITRE records tools such as Winexe that install a service on the remote system, run the command, then uninstall the service.
What it does not do: a 7045 is written when the service is created. Microsoft’s 4697 documentation notes that if the path is changed afterwards, the change is not logged, and that would have to be tracked through process creation events.
Who it affects and how badly
- Sole trader to 10 staff: you will see 7045 when software is installed. Worst case: a service installed by malware keeps coming back after every reboot.
- 10 to 50 staff (construction and trades, retail and hospitality, accountancy): remote support tools are common, so legitimate 7045 events are common too. Worst case: a ransomware operator uses a service to start the encryptor across several PCs.
- 50 to 250 and regulated firms (healthcare, fintech, insurance, MSPs): the same pattern at larger scale. Worst case: services created on many servers within minutes, leading to long downtime and notification duties.
Real examples
MITRE ATT&CK lists publicly reported cases. WannaCry created the service “mssecsvc2.0” with the display name “Microsoft Security Center (2.0) Service”. INC Ransom is recorded as running a file encryption executable through a service, quoted as “Service Control Manager/7045” with the service name winupd. LockBit 3.0 can use PsExec to execute commands and payloads. These come from MITRE’s technique pages and the threat reports they cite (T1543.003, T1569.002).
What we check on a test
This is the method, not a finding.
- Which accounts can create services on servers and PCs. Services run as SYSTEM, so this is a privilege boundary.
- Whether any existing service has a file path in a folder an ordinary user can write to. MITRE’s mitigation for T1569.002 says to ensure high-privilege service binaries cannot be replaced by lower-privileged users.
- Whether administrator accounts are reused across machines, which makes remote service creation easy.
- Whether a service created during an authorised test appears in logs your team reads, and how quickly.
Rules and regulators
- UK: the NCSC’s logging guidance asks for logs of administrative changes and process execution detail, and says logs should be kept for a minimum of 6 months (NCSC).
- US: CISA advises small and medium businesses to enable logging on servers and endpoint devices, centralise it and alert on high-risk events (CISA).
- EU: NIS2 Article 21 requires incident handling and basic cyber hygiene among minimum measures for essential and important entities (Article 21).
A worked example (illustration only)
A 90-person manufacturer has one IT manager. Late on a Friday a 7045 appears on a production file server: service name winupd, file path in a Temp folder, running as LocalSystem. Remote support tools normally install from Program Files, so the IT manager phones the MSP. They find a matching admin sign-in from a laptop in the office, disable the service, isolate the server, reset the admin account and check for similar services on other machines. A single check of the file path turned an unknown into a decision within the hour.
How to detect it
- Event Viewer, Windows Logs, System, filter for Event ID 7045 and source Service Control Manager.
- Read the file path first. Microsoft’s guidance for the sister event 4697 says to monitor all events where the service file name is not in %windir% or Program Files, because new services are typically located there.
- Microsoft also says to report service types 0x1, 0x2 and 0x8 (kernel and file system drivers), which start first and have almost unlimited access, and start types 0 and 1, which are used by drivers.
- Report a service account other than localSystem, localService or networkService, and a new service installed in the disabled state.
- Watch for a network sign-in (4624) shortly before the 7045, and a fan-out where the same source creates services on many machines.
- Where you can, also enable Audit Security System Extension, so 4697 records who installed the service.
- MITRE’s detection strategy points at service executions started by
sc.exe,net.exeor PsExec, andservices.exestarting unusual programs.
How to fix or prevent it
- Limit local administrator rights, and never share one admin password across machines, so a stolen account cannot create services everywhere.
- Turn on Audit Security System Extension (event 4697) as well as watching 7045.
- Send System and Security logs to a central place, kept for at least six months.
- On Windows 10 and 11, enable Microsoft’s Attack Surface Reduction rule that blocks processes created by PsExec, which MITRE lists as a mitigation.
- Enable Driver Signature Enforcement and the Microsoft Vulnerable Driver Blocklist, as MITRE recommends for malicious service drivers.
- Keep an inventory of the services each server should run, and review new ones.
Related terms
windows event id 4688 process creation, windows event id 4624 successful logon, windows event id 4672 special privileges assigned, how privilege escalation works, indicators of compromise
Back to the Detection and response hub.
FAQ
Is a new service always suspicious? No. Software installs and updates create them. Check the file path, the account and the time.
What is the difference between 7045 and 4697? Both record a new service. 4697 is in the Security log, needs the Audit Security System Extension setting and shows who installed it.
Why do attackers use services? MITRE says services start at boot, run as SYSTEM, and can run commands remotely through tools such as PsExec.
Sources opened for this entry
- https://attack.mitre.org/techniques/T1543/003/
- https://attack.mitre.org/techniques/T1569/002/
- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4697
- https://www.ncsc.gov.uk/guidance/introduction-logging-security-purposes
- https://www.cisa.gov/audiences/small-and-medium-businesses/secure-your-business/use-logging-on-business-systems
- https://nis2resources.eu/directive-2022-2555-nis2/article-21/
How Wolfcore helps
Wolfcore’s vulnerability management and SOC monitoring keep watch for this after the test is over. See SOC and SIEM monitoring. For a hands-on view, see our penetration testing service.
A stolen or phished password is one way an attacker gets a valid account. Phishy, our phishing simulation software, lets you test whether your staff would hand one over, safely. You can also start the Phishy free trial.
Wolfcore
Would your staff click a phishing email?
Run a real, safe phishing test on your team with Phishy. Free for 14 days, up to 10 staff, no card. We help you set it up.
Start a free phishing testFree website security scanor book a 30 minute call