Creating bind shells

Bind shells are programs that bind to a port and listen for connections and serves shells. Whenever a connection is received, it runs a shell, such as Bash, and passes off the standard input, output, and error handles to the remote connection. It can listen forever and serve shells to multiple incoming connections.

Bind shells are useful when you want to add persistent access to a machine. You can run the bind shell and then disconnect or inject the bind shell into memory through a remote code execution vulnerability.

The biggest problem with bind shells is that firewalls and the NAT routing can prevent direct remote access to the computer. Incoming connections are usually blocked or routed in a way that prevent connecting ...

Get Security with Go now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.