Code Monkey home page Code Monkey logo

dompdf-rce's People

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

dompdf-rce's Issues

Font is not loaded on clean run

When cloning into the application, the file already is in the fonts folder:
application/dompdf/lib/fonts/exploitfont_normal_3f83639933428d70e74a061f39009622.php

If you delete this file so that the server is like it would be on a real world system (not preloaded with the attack) and run the instructions on the readme the file will never be added back making it imposssible to achive the RCE.
Screenshot 2023-01-25 at 12 33 02

As you can se in the above screenshot exploit_font.php is never requested.

Installing the packages in the pull request that is not merged does not make a difference.

(Unsure if this is related)
I am ALSO running the same exploit on a different php system (Symfony + Dompdf V1.2.0) results in:
Uncaught PHP Exception Symfony\Component\Debug\Exception\ContextErrorException: "Warning: Invalid argument supplied for foreach()" at ...vendor/phenx/php-font-lib/src/FontLib/AdobeFontMetrics.php line 57

To fix the above fonts issue using a different payload font worked.

Hoping this is just a config issue on my system.

Bad instructions

Using this in a CTF and in the README you use PHP to host the css and php file for the exploit. In order for this exploit to work you need to return the php file with the tags but it gets executed when you use a PHP server of course.

Hosting with python works:

python3 -m http.server 9001

Misleading instructions

The exploit server should not be php, otherwise, it will just execute phpinfo on the attacker side, use a python HTTP server instead

Please fix this as this is misleading

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.