GithubHelp home page GithubHelp logo

unicordev / exploit-cve-2022-25765 Goto Github PK

View Code? Open in Web Editor NEW
16.0 1.0 3.0 39 KB

Exploit for CVE-2022–25765 (pdfkit) - Command Injection

Home Page: https://unicord.dev/exploit-CVE-2022–25765

Python 97.02% Dockerfile 2.98%
cve exploit penetration-testing unicord hackthebox htb pdfkit python cve-2022-25765 command-injection

exploit-cve-2022-25765's Introduction

Exploit for CVE-2022–25765 (pdfkit) - Command Injection

GitHub CVE Cover

Like this repo? Give us a ⭐!

For educational and authorized security research purposes only.

Exploit Author

@UNICORDev by (@NicPWNs and @Dev-Yeoj)

Vulnerability Description

The package pdfkit from 0.0.0 are vulnerable to Command Injection where the URL is not properly sanitized.

Exploit Description

A ruby gem pdfkit is commonly used for converting websites or HTML to PDF documents. Vulnerable versions (< 0.8.7.2) of this software can be passed a specially crafted URL containing a command that will be executed. This exploit generates executable URLs or sends them to a vulnerable website running pdfkit.

Usage

  python3 exploit-CVE-2022–25765.py -c <command>
  python3 exploit-CVE-2022–25765.py -s <local-IP> <local-port>
  python3 exploit-CVE-2022–25765.py -c <command> [-w <http://target.com/index.html> -p <parameter>]
  python3 exploit-CVE-2022–25765.py -s <local-IP> <local-port> [-w <http://target.com/index.html> -p <parameter>]
  python3 exploit-CVE-2022–25765.py -h

Options

  -c    Custom command mode. Provide command to generate custom payload with.
  -s    Reverse shell mode. Provide local IP and port to generate reverse shell payload with.
  -w    URL of website running vulnerable pdfkit. (Optional)
  -p    POST parameter on website running vulnerable pdfkit. (Optional)
  -h    Show this help menu.

Download

Download exploit-CVE-2022-25765.py from GitHub

Download exploit-CVE-2022-25765.py from ExploitDB

Searchsploit (ExploitDB)

searchsploit -u
searchsploit -m 51293

Exploit Requirements

  • python3
  • python3:requests
  • python3:urllib3

Demo

Custom Command Mode

cropped command

Reverse Shell Sent to Target Website Mode

exploit-CVE-2022–25765

Tested On

pdfkit Version 0.8.6

Applies To

pdfkit Versions < 0.8.7.2

Test Environment

gem install pdfkit -v 0.8.6

Credits

exploit-cve-2022-25765's People

Contributors

nicpwns avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

exploit-cve-2022-25765's Issues

searchsploit: Could not find EDB-ID #51293

I am trying to access this exploit but when I perform searchsploit -u and then searchsploit -m 51293, it shows me the following error:

[!] Could not find EDB-ID #51293

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.