Ncat
Ncat is the Nmap project's modern "netcat": it reads and writes data across networks and can act as a client, server, relay or simple chat tool.
Legal & ethical use. Use this tool only on systems, networks and data that you own or have explicit written permission to test. Unauthorised access or scanning can break computer-misuse laws (for example Pakistan's Prevention of Electronic Crimes Act, 2016, and equivalents elsewhere). Practise in your own lab or in authorised environments such as CTFs.
What it is used for
- Test whether a TCP port is reachable
- Transfer a file between two lab machines
Key features
- TCP/UDP/SCTP and SSL support
- Listen and connect modes
- Access control and proxying
Installation
Included with the Nmap installer.
Beginner usage guide
Start a listener on one lab host and connect from another to see how raw TCP connections behave.
Example commands
Run these only against your own lab or authorised targets. Placeholder addresses such as 192.0.2.x are documentation ranges.
Listen on a port
ncat -l 4444-l listens for an incoming connection on port 4444.
Connect to it
ncat 192.0.2.50 4444Connects to the listener; text you type is sent to the other side.
References
Source verification
Last reviewed: 2026-10-27
Links checked over HTTP: 2026-10-27 07:51 UTC — official: 200, docs: 200, repo: 200
Commands were written from the official documentation and have not been executed on this site; test them in your lab.
