ToolsFebruary 9, 20261 min readby 0xt0pus

Netcat

Network utility for reading and writing data across TCP/UDP connections and reverse shells


Netcat (nc)

Description

Netcat is a networking utility for reading from and writing to network connections. It is used for reverse shells, bind shells, port scanning, file transfers, and banner grabbing.

Usage 1: Reverse Shell Listener

Command:

nc -lvnp 9001

Command:

nc -lvp 4444

Usage 2: TCP Port Scanning

Command:

nc -nvv -w 1 -z 192.168.50.152 3388-3390

Usage 3: UDP Port Scanning

Command:

nc -nv -u -z -w 1 192.168.50.149 120-123

Usage 4: Connect to Service (Banner Grab)

Command:

nc 192.168.23.23 25

Usage 5: File Transfer - Receiver

Command:

nc -l -l 1234 > linenum.sh

Usage 6: File Transfer - Sender

Command:

nc -w 3 TARGETIP 1234 < LinEnum.sh