positive-security / dompdf-rce Goto Github PK
View Code? Open in Web Editor NEWRCE exploit for dompdf
RCE exploit for dompdf
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.
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.
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.