pwncat
pwncat is an enhanced Netcat implementation with firewall and IDS/IPS evasion capabilities, supporting bind and reverse shells, self-injecting shells, and port forwarding. It is fully scriptable with Python (PSE).
Description
pwncat provides Netcat functionality on steroids, featuring advanced techniques for firewall and intrusion detection/prevention system evasion. It supports multiple modes including connect, listen, zero-I/O scanning, and port forwarding, making it suitable for penetration testing and red team operations requiring persistent connections and stealthy network communication.
The tool is particularly useful for establishing reliable shell access across network security measures. Features like automatic reconnection, self-injecting reverse shells, and customizable scripting enable operators to maintain control over compromised hosts even in hostile environments with active defenses.
pwncat's Python scripting engine allows for custom data transformers and automation, extending its utility beyond basic connectivity to sophisticated command and control scenarios.
How It Works
pwncat operates as a Python (2/3) implementation of enhanced Netcat with IPv4/IPv6 dualstack support (configurable to single stack), TCP/UDP protocols, and IP ToS manipulation. It supports four primary modes: connect (client to remote endpoint with optional reconnection), listen (server accepting incoming connections with optional keep-open), zero-I/O (port scanning/status reporting), and forwarding (L/R modes for port redirection). Advanced features include self-injection for deploying persistent reverse shells upon incoming connections, CRLF line ending normalization, source address/port binding, and a Python scripting engine where user-defined 'transform' functions process data before transmission. Firewall/IDS evasion relies on these low-level protocol tweaks, rebinding, and retry mechanisms.
Installation
sudo apt install pwncatFlags
Examples
pwncat -hpwncat hostname portpwncat -l [hostname] portpwncat -z hostname portpwncat -L [addr:]port hostname portpwncat -R addr:port hostname portpwncat -k -l port