Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
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.

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.
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 shell | Reverse shell | |
|---|---|---|
| Who listens | The victim | The attacker |
| Blocked by | Inbound filtering, NAT | Egress filtering, proxy enforcement |
| Survives a reboot | Only with persistence | Only with persistence |
| Practical today | Mostly internal networks | The 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.
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.
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.
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.
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.
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.
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.
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.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.