CsEnox / CVE-2021-22911

Pre-Auth Blind NoSQL Injection leading to Remote Code Execution in Rocket Chat 3.12.1
54 stars 8 forks source link

CVE-2021-22911

Pre-Auth Blind NoSQL Injection leading to Remote Code Execution in Rocket Chat 3.12.1

Explanation

1) Hijacking user's account ( Unauthenticated )

2) Privilege Escalation to admin ( Authenticated )

3) RCE ( Autenticated - Admin )

Usage

python3 exploit.py -u "user@rocket.local" -a "admin@rocket.local" -t "http://rocket.local"

Environment

- Enable Password Policy
- Enable 2FA for Admin
- Register a normal user.

NOTE: If you don't want Administrator protected with 2FA you can do the following.
1) Send forget password mail 
2) Get resettoken for admin
3) Change the password using the reset token retrieved
```py
# Admin Account Takover [ No 2fa ]
forgotpassword(adminmail,target)
token = resettoken(target)
changingpassword(target,token)

Credits

Exploit-db