## https://sploitus.com/exploit?id=4B1110EB-8D0D-5342-B6DA-DDAA7556EEA1
> [!IMPORTANT]
> This repository is intended for learning about vulnerabilities.
> Be sure to complete this hands-on exercise on a computer that you control. Do not engage in any illegal activities.
> Furthermore, the author assumes no liability for any damages or responsibilities arising from this repository.
# CVE-2024-4367-hands-on
Hands-on Exercise for CVE-2024-4367
## Creating poc.pdf
```bash
python CVE-2024-4367-PoC/CVE-2024-4367.py "alert('document.domain')"
```
Source: https://github.com/LOURC0D3/CVE-2024-4367-PoC
A poc.pdf file for the attack will be created.
For detailed usage instructions, please refer to the following:
https://github.com/LOURC0D3/CVE-2024-4367-PoC
## Launch the Vulnerable Firefox and Verify the Attack
```bash
python firefox.py 125
```
Open `poc.pdf` using a vulnerable version of Firefox Nightly.
The first time you launch it, it will take some time to download Firefox Nightly.
Verify that JavaScript executes and an alert is displayed.
## Verification with a Patched Version of Firefox
```bash
python firefox.py 135
```
Open `poc.pdf` in the new version of Firefox Nightly and verify that no alert is displayed, confirming that the vulnerability has been patched.
## Comparing PDF.js Source Code
There are two versions: [vulnerable-pdf.js](vulnerable-pdf.js), which contains the vulnerability, and [invulnerable-pdf.js](invulnerable-pdf.js), where the vulnerability has been fixed.
[pdfjs_diff_font_renderer.js](pdfjs_diff_font_renderer.js) compares [vulnerable-pdf.js/src/core/font_renderer.js] (vulnerable-pdf.js/src/core/font_renderer.js) and [invulnerable-pdf.js/src/core/font_renderer.js](invulnerable-pdf.js/src/core/font_renderer.js).