Join our Newsletter — 33% off our NHI Course
Home› FAQ› Cyber Security› How does a named pipe work?
Cyber Security

How does a named pipe work?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated October 18, 2026 Domain: Cyber Security

A named pipe is an interprocess communication channel identified by a name, usually for processes on the same host and sometimes across hosts. It carries data between clients and servers without using files. Attackers abuse named pipes for stealthy command-and-control or privilege separation, so defenders monitor unusual pipe creation, access and traffic patterns.

How a named pipe works as an IPC channel

A named pipe is a kernel-managed interprocess communication endpoint that behaves like a stream rather than a file you read later. One process creates or opens the pipe by name, another process connects to that same name, and the operating system moves bytes between them while handling buffering, blocking, and access checks. On a single host this is a fast handoff mechanism; in some environments it can also be exposed for remote access through the platform’s IPC plumbing.

The important practical distinction is that the name is the rendezvous point, not the data store. The sender writes to the pipe, the receiver reads from it, and the application decides the message format, framing, and whether the interaction is one-way or bidirectional. Because the pipe lives outside the normal filesystem workflow, it can be used for tightly coupled client-server exchange without creating an ordinary file artifact.

Named pipes are usually created with permissions that control who can connect, who can read, and who can write. That access model matters because the pipe itself becomes a trust boundary: if a low-trust process can open a high-trust pipe, it may be able to inject commands, impersonate a peer, or observe sensitive traffic. Defensive reference material such as the MITRE D3FEND Guide is useful here because it maps pipe-related artefacts to detection and hardening concepts, including named pipe metadata and IPC traffic analysis.

How processes coordinate over a named pipe

In practice, the server side usually creates the pipe first, then waits for a client to connect. The client discovers the pipe by its name, opens it, and begins exchanging data through the operating system’s IPC interface. Once connected, both sides can keep using the same endpoint until one side closes or the session ends, at which point the pipe instance is released and may be recreated.

That lifecycle makes named pipes useful for command-and-response patterns, service control, and local orchestration. They are also common in systems that need short-lived communication without the overhead of opening and closing files or sockets for every transaction. The design is simple, but the implementation details vary by platform, especially around blocking behavior, message mode versus byte-stream mode, and whether multiple clients can connect to the same named endpoint.

Because named pipes are often used for service-to-service interaction, the security model depends heavily on the surrounding platform controls. A strong baseline is to treat pipe names, permissions, and peer identity as part of the interface contract, not as incidental implementation details. The D3FEND guidance on relay-pattern analysis, process lineage analysis, and IPC traffic analysis is relevant because those techniques help distinguish normal service communication from suspicious pipe use.

Why named pipes are attractive to defenders and attackers

Defenders like named pipes because they can be monitored for unusual creation patterns, unexpected clients, and abnormal access sequences. Attackers like them because pipe traffic can look like ordinary local interprocess chatter, which makes it useful for stealthy staging, privilege separation, or passing instructions between cooperating processes. The same convenience that makes the channel efficient also makes it easy to hide in plain sight when process and pipe telemetry are weak.

One common failure mode is overly broad pipe permissions. If a sensitive service exposes a pipe that any local user or service can open, the pipe can become a lateral movement or privilege abuse path. Another is poor observability: if teams do not baseline which pipe names are normal, a malicious process can choose a benign-looking name and blend into routine activity. In those cases, the issue is not the pipe mechanism itself, but the mismatch between its trust boundary and its actual access control.

For readers who want a broader threat-detection frame, the MITRE ATT&CK Enterprise Matrix is a strong companion because named pipe abuse often shows up alongside credential access, lateral movement, persistence, or privilege escalation behaviours. ATT&CK gives the defender a way to connect pipe anomalies to a larger adversary path rather than treating them as isolated oddities.

Risk and Threat Considerations

Named pipes are risky when they become an implicit trust channel between processes with different privilege levels. If access is not tightly controlled, an attacker can exploit the pipe as a hidden command path, a data exfiltration channel, or a way to move from an initial foothold into a more trusted process boundary.

Failure mechanism: Weak pipe ACLs, predictable naming, or missing peer validation allow an untrusted process to connect to a privileged pipe, inject messages, or observe sensitive IPC traffic.

Impact: The result can be stealthy command execution, privilege escalation, service impersonation, or persistence that is harder to spot than file-based tooling.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

MITRE ATT&CK and OWASP Non-Human Identity Top 10 address the attack and risk surface, while CIS Controls v8 and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
MITRE ATT&CKEnterprise MatrixNamed pipe abuse maps to attacker tactics like privilege escalation and lateral movement.
Recommendation — Map pipe anomalies to ATT&CK techniques and hunt for credential-access or lateral-movement chains.
CIS Controls v8CIS-5 — Account ManagementPipe access depends on tightly scoped accounts and authorized service principals.
Recommendation — Restrict pipe-accessing accounts to only the services that need them.
NIST SP 800-53 Rev 5AC-6 — Least PrivilegePipe permissions should enforce minimal access to reduce unauthorized IPC abuse.
AU-12 — Audit Record GenerationPipe creation and access need auditability for detection of suspicious IPC activity.
Recommendation — Limit named-pipe access to the minimum set of processes and users required. Log named-pipe creation, connection, and access events for anomaly detection.
OWASP Non-Human Identity Top 10NHI-05 — Overprivileged NHIService and machine identities using pipes can be abused when granted excess privilege.
Recommendation — Review service identities behind pipe endpoints for excess permissions.

Practitioner Guidance

What to verify: Confirm which services create named pipes, which principals can connect, and whether the pipe name is stable, randomised, or predictable. If the pipe is part of a high-trust workflow, validate that the peer process identity and expected access pattern are actually enforced.

What good looks like: Legitimate pipe use is boring, repeatable, and narrowly scoped. The same pipe names should appear consistently, access should be limited to the minimum expected processes, and monitoring should explain why each connection exists rather than just recording that it happened.

Common mistake: Teams often monitor only file creation and network flows, then miss the IPC layer where local privilege abuse is actually happening. If a named pipe is part of the control plane, treat it as a protected interface, not as a low-priority implementation detail.

Practitioner takeaway: A named pipe is safe only when its name, permissions, and peer trust are designed together; if any one of those is loose, the pipe becomes a covert access path instead of a convenience mechanism.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 18, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org