Giter Club home page Giter Club logo

qdpm9.1_exploit's Introduction

qdPM v9.1 Authenticated RCE Exploit

This is an exploit to automatically upload a PHP web shell to the qdPM 9.1 platform via the "upload a profile photo" feature. This method also bypasses the fix put into place from a previous CVE

Vulnerability Information

CVE: CVE-2020-7246
NVD Published Date: 01/21/2020
Base Score 8.8 (HIGH)
Vulnerability Type Web Exploit / RCE

Official CVE Description:

A remote code execution (RCE) vulnerability exists in qdPM 9.1 and earlier. An attacker can upload a malicious PHP code file via the profile photo functionality, by leveraging a path traversal vulnerability in the users['photop_preview'] delete photo feature, allowing bypass of .htaccess protection. NOTE: this issue exists because of an incomplete fix for CVE-2015-3884.

What is qdPM?

As published by the developers: "qdPM is a free web-based [LAMP] project management tool suitable for a small team working on multiple projects. It is fully configurable. You can easy manage Projects, Tasks and People. Customers interact using a Ticket System that is integrated into Task management."

Exploit Usage

To use this exploit, you must know the credentials of at least one user. They don’t need to have any kind of elevated privilege. You also need to have a .php web shell that you want to upload.

Configuring your webshell

You can upload your own PHP webshell with this script, however, this exploit was tested using the exploit built by Pentestmonkey (which is included in this repo). You want to make sure that you configure your webshell to call out to the attacker machine, and that you also make note of the port that it is sending the reverse shell through. If you are using the webshell that is included then you should open the .php file and modify the following two lines found near the top:

$ip = '127.0.0.1';  // CHANGE THIS
$port = 1234;       // CHANGE THIS

Configuring the Exploit Script

Next, you need to open the qdPM9.1_exploit.py script and then modify the values near the top of the script:

login_url = "http://[victim_domain]/path/to/qdPM/index.php/login"
username = "[email protected]" # This should be a real user's email
password = "Pa$$w0rd" # This should be the real user's password
payload = "/path/to/payload.php"
listner_port = 1234 # This should match your PHP payload
connection_delay = 2 # Increase this value if you have a slow connection and are experiencing issues

Running the Exploit

Once the payload and exploit script has been updated, you simply run the script by executing it via the terminal:

python3 ./qdPM9.1_exploit.py

If you get hit with dependency errors you may need to install BeaufifulSoup4 and/or requests:

pip3 install bs4
pip3 install requests

A Full PoC Walkthrough + Written Guide

If you want to see how this exploit works in detail along with a breakdown of how the script was developed then check out my blog post on the subject!

Disclaimer

This script was developed to better understand CVE-2020-7246 and build upon the PoC that already exists. This script should only be used for educational purposes.

qdpm9.1_exploit's People

Contributors

tobinshields avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.