the_open_door
coffee
ESEN
← Tools

netcatLOLBIN

Network listener and swiss-army knife; catches reverse shells.

Legitimate system binary (LOLBIN): not an offensive tool as such, but an attacker leverages it because it is usually already installed and raises fewer suspicions than dropping a dedicated tool.

Netcat, the network Swiss-army knife: opens and listens for raw TCP/UDP connections. In pentesting it is used mostly as a listener to catch reverse shells, but also to transfer files, talk to services by hand and confirm SSRF by seeing the raw inbound request.

Family Access, shells & transfer

Flags -lvnp -e

Concepts OS Command Injection

Cheatsheet Reverse shells

Installation

sudo apt install -y netcat-traditional

Useful commands5 commands

When it fails

  • bash: cannot set terminal process group (25): Inappropriate ioctl for deviceThe shell did land, but with no TTY: no job control, no su, no sudo, no line editing. It is the normal state of a freshly caught reverse shell and it is fixed by upgrading the TTY (Python pty, stty raw -echo) or catching it with Penelope.seen in Domain

Appears in

Some machines where its use is documented; not an exhaustive list.