repositories

daemon-sec-cheatsheet

The cheatsheet vault for operators: AD, enumeration, exploitation, priv-esc, web, DFIR

clonegit clone https://git.daemon-sec.xyz/daemon-sec-cheatsheet.git
service-triggers.mdMarkdown180 lines10.4 KiBsource raw download

title: "Windows Service Triggers: Enumeration and Abuse" section: "Windows" sectionSlug: "windows-hardening" sourcePath: "src/windows-hardening/windows-local-privilege-escalation/service-triggers.md" sourceUrl: "https://github.com/HackTricks-wiki/hacktricks/blob/188de82beb54e70956b2952367a0af91d26758b8/src/windows-hardening/windows-local-privilege-escalation/service-triggers.md" sha: "188de82beb54e70956b2952367a0af91d26758b8" isIndex: false modified: true license: "CC-BY-NC-4.0"#

Windows Service Triggers: Enumeration and Abuse#

Windows Service Triggers allow the Service Control Manager (SCM) to start/stop a service when a condition occurs (e.g., an IP address becomes available, a named pipe connection is attempted, an ETW event is published). Even when you lack SERVICE_START rights on a target service, you may still be able to start it by causing its trigger to fire.[1]

This page focuses on attacker-friendly enumeration and low-friction ways to activate common triggers.

Tip: Starting a privileged built-in service (e.g., RemoteRegistry, WebClient/WebDAV, EFS) can expose new RPC/named-pipe listeners and unlock further abuse chains.

Enumerating Service Triggers#

High-Value Trigger Types and How to Activate Them#

Network Endpoint Triggers#

These start a service when a client attempts to talk to an IPC endpoint. Useful to low-priv users because the SCM will auto-start the service before your client can actually connect.[1]

Custom (ETW) Triggers#

A service can register a trigger bound to an ETW provider/event. If no additional filters (keyword/level/binary/string) are configured, any event from that provider will start the service.[1]

Group Policy Triggers#

Subtypes: Machine/User. On domain-joined hosts where the corresponding policy exists, the trigger runs at boot. gpupdate alone won’t trigger without changes, but:[1]

IP Address Available#

Fires when the first IP is obtained (or last is lost). Often triggers at boot.[1]

Device Interface Arrival#

Starts a service when a matching device interface arrives. If no data item is specified, any device matching the trigger subtype GUID will fire the trigger. Evaluated at boot and upon hot‑plug.[1]

Domain Join State#

Despite confusing MSDN wording, this evaluates domain state at boot:[1]

System State Change – WNF (undocumented)#

Some services use undocumented WNF-based triggers (SERVICE_TRIGGER_TYPE 0x7). Activation requires publishing the relevant WNF state; specifics depend on the state name. Research background: Windows Notification Facility internals.

Aggregate Service Triggers (undocumented)#

Observed on Windows 11 for some services (e.g., CDPSvc). The aggregated configuration is stored in:

A service’s Trigger value is a GUID; the subkey with that GUID defines the aggregated event. Triggering any constituent event starts the service.[1]

Firewall Port Event (quirks and DoS risk)#

A trigger scoped to a specific port/protocol has been observed to start on any firewall rule change (disable/delete/add), not just the specified port. Worse, configuring a port without a protocol can corrupt BFE startup across reboots, cascading into many service failures and breaking firewall management. Treat with extreme caution.[1]

Practical Workflow#

  1. Enumerate triggers on interesting services (RemoteRegistry, WebClient, EFS, …):
  1. If a Network Endpoint trigger exists:
  1. If an ETW trigger exists:
  1. For Group Policy/IP/Device/Domain triggers:

Named Pipe Client Impersonation

Quick command recap#

Gotchas / Operator Notes#

Detection and Hardening Notes#

References#