Week 13
Introduction to Netcat/Ncat and Basic Network Communication
Use Netcat/Ncat in an approved lab to test communication and basic file transfer between two systems.
Lesson recap
Netcat (`nc`, or its modern cousin Ncat that ships with Nmap) is the simplest possible network tool. One side listens on a port, the other connects, and now there's a pipe. Type into one terminal, the words appear in the other. Redirect a file in, the same bytes come out the far side. With Netcat you can test whether a firewall is open, transfer a file when nothing else works, and (in approved security labs) understand exactly how a reverse shell behaves. As with Nmap: useful in friendly hands, dangerous in hostile ones — and only legal on networks you own.
Learning goals
- Explain what Netcat/Ncat does
- Set up a listener and a client
- Send a text message between two systems
- Transfer a file between two systems
- Document the test clearly
Key terms
Netcat / Ncat
The "Swiss Army knife" of networking — read/write data across network connections.
Listener
The side waiting for an incoming connection (server side).
Client
The side initiating the connection.
Loopback Test
A test on the same machine using 127.0.0.1.
Port
The numbered TCP/UDP endpoint both sides agree on.
Curated videos
Netcat Tutorial — Transfer Files
KMDTech
tcpdump — Traffic Capture & Analysis (companion tool)
HackerSploit
Commands
ncat -hncat -l 4444ncat <listener-ip> 4444ncat -l 4444 > received.txtncat <listener-ip> 4444 < tosend.txtncat -zv <listener-ip> 4444ncat -lu 4444Checkpoint checklist
Sign in to save your progress across devices.
- Ncat verified
- Listener started
- Client connected
- Text message exchanged
- Small file transferred
- Wrote short report
- Saved required evidence
- Answered the reflection questions
Pro tips from the instructor
- ★Start the listener BEFORE the client. The client errors out instantly if no one is listening.
- ★Some firewalls block raw TCP on uncommon ports. Test with ports you know are open (8080, 4444) when troubleshooting.
- ★Use Ncat (from Nmap) instead of legacy netcat-traditional — Ncat works the same on Windows, Linux, and macOS.
Try this — stretch exercises
Optional hands-on practice that goes beyond the workbook. Check items off as you complete them — progress saves in this browser.
0/2
- Pipe a directory through tar over ncat: on the listener `ncat -l 4444 | tar xvf -`, on the sender `tar cvf - mydir/ | ncat receiver 4444`.
- Run Wireshark while you do an ncat transfer. Watch the entire conversation in cleartext — that's why production transfers use SSH/SCP, not raw netcat.
Files to save this week
- 📁 Week13_NcatListener_YourLastName.png
- 📁 Week13_NcatClient_YourLastName.png
- 📁 Week13_NcatFileTransfer_YourLastName.png
- 📁 Week13_NcatReport_YourLastName