Netcat (nc)

The TCP/IP “swiss-army knife”.

KaliParrotLinuxmedium

pkg: netcat-traditional

Netcat reads/writes data across network connections — used for port checks, banner grabbing, file transfer and bind/reverse shells.

Syntax

nc [-lvnp port] {host} {port}

Example

nc -lvnp 4444

Listens on 4444 for an incoming reverse shell connection.

Options & flags

What each switch does. Toggle them in the builder below to assemble a command.

-lListen mode (server).
-vVerbose.
-nNo DNS resolution (use raw IPs).
-p <4444>Local port to bind/listen on.
-zZero-I/O — just scan for open ports.
-w <3>Connection timeout in seconds.

Command builder

Tick options (and fill any values) to build a ready-to-copy command.

nc HOST PORT

Usage examples

nc -lvnp 4444

Listen for a reverse shell on 4444.

nc -zv target.tld 1-1000

Simple port scan of 1-1000.

nc target.tld 80

Open a raw TCP connection (banner grab).

Advantages
  • Tiny, universal, endlessly useful
  • Listeners, transfers and shells
  • Great for quick connectivity tests
Disadvantages
  • Plaintext (no encryption)
  • Variants differ (-e not always present)
  • Bare-bones features
Tags
#shell#networking#transfer

Official docs: ncat (modern)

Related commands

Frequently asked questions

What is Netcat (nc) used for?
Netcat reads/writes data across network connections — used for port checks, banner grabbing, file transfer and bind/reverse shells.
What is an example Netcat (nc) command?
A common example is: nc -lvnp 4444 — Listens on 4444 for an incoming reverse shell connection.
Is Netcat (nc) part of Kali Linux?
Yes. Netcat (nc) ships with Kali Linux (and Parrot OS). If missing, install it with: sudo apt install netcat-traditional.
What category of security tool is Netcat (nc)?
Netcat (nc) is a Post-Exploitation tool with a medium-risk profile when run against a live target.

Try recon tools live

Run real scans against a domain you control, stage by stage.

Open the lab →