Join our Newsletter — 33% off our NHI Course

How does a SOCKS proxy work?

A SOCKS proxy relays network traffic between a client and a destination server at the session layer, so the destination sees the proxy rather than the original client. Attackers use it to hide source addresses and pivot through compromised systems. Defenders should watch for unusual proxy use, restrict outbound proxying, and alert on unexpected tunnels or chained connections.

What a SOCKS proxy actually does on the wire

A socks proxy sits between a client and a destination service and relays traffic after the client establishes a proxy session. The destination sees the proxy’s address, not the client’s, which makes SOCKS useful for traffic brokering, egress control, and address masking. Because it works below the application layer, it can carry many protocols without needing to understand their content.

That protocol-agnostic design is why SOCKS is often used where a simple application-specific proxy is too narrow. It does not rewrite HTTP headers or inspect payload semantics by default; it forwards bytes once the session is established. In practice, that makes it flexible, but also harder to monitor if teams only look for web proxy patterns.

Why attackers and defenders care about SOCKS

Attackers value SOCKS because it helps them pivot through an intermediate host, hide source addresses, and reuse one tunnel for multiple destinations. Defenders care because the same properties can support lateral movement, covert access, and command relaying when a compromised system becomes a proxy hop. Command and Control (C2) Guide is useful context here because multi-hop proxying and tunneling are common components of adversary infrastructure.

In an enterprise environment, the risk is not just that a proxy exists, but that an unexpected proxy path can turn a single host into an access bridge. If outbound proxy use is normalised too broadly, malicious traffic can blend into legitimate remote access, remote administration, or privacy tooling.

How to recognise and control SOCKS proxy use

Operationally, the key question is whether SOCKS is approved, where it is allowed, and what telemetry proves that it is being used for legitimate work. A SOCKS proxy may be completely valid for controlled admin workflows, but it should still be logged, bounded, and tied to a clear business purpose.

For network control, a Secure Web Gateway and Web Filtering Guide is relevant because proxy policy, PAC files, explicit proxy configuration, and bypass handling are the practical controls that determine whether outbound relaying is visible and governable. Even when SOCKS is not the main web proxy, the same policy logic applies: approved endpoints, allowed ports, exceptions, and logging should be explicit rather than implicit.

Teams should also distinguish between network-layer relaying and application-layer filtering. A SOCKS tunnel can carry non-web traffic, so relying on URL categories alone is usually insufficient. Detection works better when proxy process creation, unusual destination diversity, chained connections, and outbound traffic from systems that should not proxy are monitored together.

Risk and Threat Considerations

SOCKS proxies become risky when they are unmanaged, over-permitted, or installed on systems that already have broad network reach. The main exposure is that one compromised endpoint can become a reusable relay for multiple destinations, which makes attribution harder and can extend attacker access beyond the original foothold.

Failure mechanism: A SOCKS service or client-side proxy setting is abused to forward arbitrary sessions through a host that already has trusted network placement, allowing the proxy hop to conceal origin and support pivoting, tunneling, or chained access.

Impact: Security teams can lose visibility into the true source of traffic, miss lateral movement, and under-estimate blast radius when the proxy path is mistaken for normal remote administration or legitimate privacy 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 addresses the attack and risk surface, while CIS Controls v8 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
MITRE ATT&CK T1090 — Proxy SOCKS is a proxy mechanism used for pivoting and relaying traffic.
Recommendation — Map proxy relays to T1090 and hunt for pivoting, tunneling, and relay abuse.
CIS Controls v8 CIS-13 — Network Monitoring and Defense Detecting unusual proxy use depends on network visibility and alerting.
Recommendation — Monitor proxy flows and alert on unexpected tunnels, relays, and chained connections.
NIST CSF 2.0 DE.CM-01 — Networks and network services are monitored to find potentially adverse events SOCKS abuse is often detected through abnormal network service patterns.
Recommendation — Monitor proxy services and investigate deviations from normal network traffic patterns.

Practitioner Guidance

What to verify: Confirm which systems are permitted to originate SOCKS traffic, which ports and endpoints are allowed, and whether any approved remote-access tooling already depends on SOCKS-like relaying. If a host can create outbound tunnels but is not expected to act as a relay, treat that as a control exception worth investigating.

What to measure: Track proxy use by source host, user, destination diversity, and session duration. A sudden increase in chained connections, nonstandard destinations, or proxy use from servers and admin workstations that normally do not broker traffic is a strong signal that the behaviour deserves review.

Practitioner takeaway: Treat SOCKS as a flexible transport mechanism, not a benign utility. The control problem is less about the protocol itself and more about whether proxying is explicit, constrained, and observable enough that relay abuse cannot blend into normal operations.