Windows API reference
ImpersonateNamedPipeClient
Impersonates the security context of the client connected to a named pipe; the impersonation level is negotiated when the pipe is created.
- Library
- Advapi32.dll
- Category
- Privilege Escalation
- Suspicion
- high
Detection summary
Named-pipe privilege escalation: a service impersonates a connecting client, sometimes without checking the negotiated impersonation level, letting a low-privileged client run in the service context; detect Sysmon 17/18 pipe creation/connection, Security 4624 logon type 3/5 and 4672, services creating world-writable or predictable pipes, and EDR hooks on ImpersonateNamedPipeClient. No direct Sysmon event exists for the impersonation call.
- Sysmon: No Sysmon event mapped
- ETW: Microsoft-Windows-Security-Auditing
- Notes: Security-Auditing logs the resulting logon/impersonation events only when audit policy enables them; Sysmon 17/18 shows pipe activity but not the API call.
Sources and documentation
- Microsoft Learn documentation (direct documentation)
Not yet human-reviewed. Page metadata generated .
Legitimate use
Windows services, SQL Server, IIS, print spooler, backup agents and management tools that service named-pipe clients.