NetCat - CraigDonkin/Infrastructure GitHub Wiki

NetCat

Connect to a Server

nc targetIP TargetPort
{enter Commands Here}

Create a Listener

nc -lvvp localportnumber

NC + Bash Shell

nc -l -p portnumber -e /bin/bash
nc remoteIP portnumber

Save Output

nc remoteIP remotePort -v -o /path/to/save

Port Scan

nc -vz remoteIP remotePorts-Range

Delay Port Scan

nc -zvi delay remoteIP remoteports-range

UDP Scan

nc -vzu RemoteIP Remoteports-range

File Transfer

nc -v -p localport -l < /Path/to/file
nc -v remoteIP -port > output

Banner Grab

nc -v remoteIP RemotePort