← Attack pathsreverse shells beat firewalls by calling home instead

reverse shells beat firewalls by calling home instead

why your firewall might be watching the wrong door

most people picture a firewall as a wall. it's actually more like a bouncer who only checks id at the front door and completely ignores the back door where everyone's leaving from. that gap is exactly why reverse shells work, and if you run a network, understanding that gap is how you actually close it.

bind shell vs reverse shell, in plain english

a bind shell is when malware or a payload opens a listening port on the target machine and waits for someone to connect in. think of it as the machine yelling "hey, connect to me on port 4444." the problem for an attacker is that most networks, home routers included, block unsolicited inbound connections by default. that bind shell just sits there screaming into a room nobody's allowed into.

a reverse shell flips the direction. instead of waiting to be called, the compromised machine calls out. it connects from the inside to a listener sitting on the attacker's box, outbound, on a port that looks like normal traffic. the listener side is usually something dead simple, a netcat listener waiting for that connection to land. once it connects, the attacker has a shell, and from the firewall's point of view, nothing weird happened. it just saw a device on the network make an outbound connection, which is the thing firewalls are built to allow by default.

why outbound is the blind spot

most firewall configs, whether it's a home router, a small business appliance, or even a lot of enterprise setups, are built around one assumption: bad stuff comes from outside trying to get in. so inbound traffic gets scrutinized and outbound traffic gets a free pass, because blocking outbound by default breaks a hundred things employees need, like updates, browsing, cloud apps, email. that asymmetry is not a bug, it's a design tradeoff, and it's the exact tradeoff a reverse shell is built to exploit. the connection direction is legitimate even though the intent behind it isn't.

what this actually looks like from the defender's chair

if a device on your network is calling home to something it shouldn't, you're not going to see it as a scary red alert. you're going to see it as a normal-looking outbound connection to an ip or domain your systems have never talked to before, often on a common port like 443 or 80 to blend in, sometimes at weird hours, sometimes with a suspiciously steady beacon pattern. the giveaway usually isn't the port, it's the destination, the timing, and the fact that the process making the connection has no business talking to the internet at all.

a quick habit worth building: periodically check what's actually holding open connections on your own machines.

netstat -ano | findstr ESTABLISHED
lsof -i -P | grep ESTABLISHED

you're not hunting for anything exotic here, you're looking for a process you don't recognize talking to an address you don't recognize, especially one that keeps reconnecting on its own.

how to actually shrink the blind spot

you can't block all outbound traffic and still have a functioning network, but you can stop treating it as a free pass.

set up egress filtering so devices can only reach the destinations and ports they actually need. a workstation almost never needs to open a raw connection to a random ip on an uncommon port, so default-deny outbound and allowlist what's necessary.

use dns monitoring or a filtering resolver to flag lookups to freshly registered or known-bad domains, since a lot of reverse shell setups rely on dns before they ever make the tcp connection.

watch for beaconing patterns, meaning connections that repeat on a suspiciously regular interval, that's a classic sign of a callback rather than a human clicking around.

segment your network so a compromised device can't quietly reach out on behalf of your whole environment, and keep endpoint logging on so you can actually see which process initiated a connection, not just that a connection happened.

the takeaway

a reverse shell doesn't beat your firewall with some clever trick, it beats it by exploiting the trust you already gave outbound traffic. the fix isn't paranoia, it's visibility: know what's supposed to be calling out from your network, restrict the rest, and actually look at your outbound connections once in a while instead of assuming the front door being locked means you're covered. the back door only stays a blind spot if you never check it.

watch the reel ↗
the weekly drop

one command a week that makes you harder to hack.

a single tool, explained in plain english, every week. straight to your inbox.

no spam. one email a week. unsubscribe anytime.