Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Are Reverse and Bind Shells?

A bind shell listens on the compromised host and waits for the attacker to connect; a reverse shell makes the compromised host call out instead. The direction is what decides which one works.

Illustration for the cybersecurity term Reverse and Bind Shells
Home / Blog / Cybersecurity Terms / What Are Reverse and Bind Shells?
17 November 2026

What Are Reverse and Bind Shells?

What Are Reverse and Bind Shells?

Both terms describe the same goal: interactive command-line access to a machine somebody else owns. The difference is who opens the connection.

A bind shell starts a listener on the compromised host and binds a command interpreter to it. The attacker connects inbound to that port and types commands. A reverse shell inverts the arrangement: the attacker runs the listener, and the compromised host connects outbound to it, then hands its own shell over the connection.

Why Direction Decides Everything

Bind shells were the original pattern and are now the weaker option, because almost nothing on a modern network accepts arbitrary inbound connections. Perimeter firewalls block unsolicited traffic, hosts behind NAT have no routable address, cloud security groups default to deny, and endpoint firewalls reject new listeners.

Reverse shells work with that grain rather than against it. Outbound connections are generally permitted, since users need the web and servers need updates. Port 443 is the obvious choice, because it is open almost everywhere and the traffic can be wrapped in TLS so inspection sees an ordinary encrypted session.

Bind shellReverse shell
Who listensThe victimThe attacker
Blocked byInbound filtering, NATEgress filtering, proxy enforcement
Survives a rebootOnly with persistenceOnly with persistence
Practical todayMostly internal networksThe default choice

There is a third variant worth knowing. A bind shell in reverse, sometimes described as a listener on the attacker side that the victim polls, blurs into the beaconing model used by command and control frameworks, where the implant checks in periodically rather than holding a session open. That is harder to spot than a continuously open socket.

How They Arrive

Shells are the payoff rather than the vulnerability. The usual routes are command injection in a web application, an upload that lands a web shell, deserialisation flaws, exploitation of an unpatched service, or a macro in a document. Once arbitrary code runs, the attacker needs an interactive channel, and a shell is the simplest one.

The code required is short, which is why it is widely available in every scripting language a target might have installed. Operators generally upgrade a basic shell quickly, because the initial connection has no terminal control: no tab completion, no command history, no ability to use an editor, and a single interrupt kills the session. Tools such as socat or a pseudo-terminal spawned from Python turn it into a fully interactive session.

What Defenders See

The shell itself is only a socket, so detection focuses on the circumstances around it. The strongest signals are process relationships: a web server spawning bash, sh, cmd.exe, or powershell.exe is almost never legitimate, and the same applies to a database service, a print spooler, or a Java application server starting an interpreter. Endpoint telemetry catches this reliably, whether from EDR or Sysmon process creation events.

Network signals follow. A server in a segment that has no business browsing the internet suddenly opening an outbound session, a long-lived connection with low but steady traffic in both directions, TLS on port 443 that carries no SNI or presents a self-signed certificate, and connections to addresses with no reputation history all stand out in Zeek or proxy logs. On the host side, a new listening socket on an unusual high port is the giveaway for a bind shell.

Controls That Actually Help

Our Web Application Security Services test whether an injection flaw in your applications can be turned into exactly this kind of interactive access, and whether your egress controls stop it.

FAQ – Frequently Asked Questions

Which Is More Common, Reverse or Bind?

Reverse shells, by a wide margin. Inbound connections to a compromised host are blocked by firewalls, NAT, and cloud security groups in almost every environment, whereas outbound traffic is usually permitted so that users and servers can function. Bind shells still appear inside flat internal networks where host firewalls are disabled and filtering between segments is minimal.

Can Encryption Hide a Reverse Shell?

It hides the content, not the behaviour. Wrapping a shell in TLS prevents inspection of the commands, but the connection pattern remains visible: an unusual source, a long-lived session, steady bidirectional traffic, and a destination with no history. Certificate characteristics and TLS fingerprints often identify the tooling even when the payload cannot be read.

How Does Egress Filtering Stop Shells?

A default-deny outbound policy means the compromised host cannot open a connection to the attacker’s listener at all, so the reverse shell never establishes. Attackers respond by tunnelling through permitted channels such as an HTTP proxy or DNS, which is slower, noisier, and much easier to detect than a direct socket on port 443.

What Makes a Shell Fully Interactive?

A basic shell has no terminal attached, so there is no command history, no tab completion, no working text editor, and pressing an interrupt kills the connection rather than the running command. Attackers upgrade by spawning a pseudo-terminal and adjusting terminal settings, which gives them the same experience as a normal remote session.

Related Terms

You May Be Interested In These

What Is Red Team?

Cybersecurity Terms

30 March 2021

What Is Red Team?

Read More
What Are Random Number Generators and Entropy?

Cybersecurity Terms

17 November 2026

What Are Random Number Generators and Entropy?

Read More
What Are Zones and Conduits?

Cybersecurity Terms

17 November 2026

What Are Zones and Conduits?

Read More