
A Proof of Concept for chaining the CVEs [CVE-2023-36844, CVE-2023-36845, CVE-2023-36846, CVE-2023-36847] developed by @watchTowr to achieve Remote Code Execution in Juniper JunOS within SRX and EX Series products.
watchTowr performed a deep dive into reproducing, chaining and exploiting these vulnerabilities which can be found at: https://labs.watchtowr.com/cve-2023-36844-and-friends-rce-in-juniper-firewalls/
auto_prepend_file directive.PHPRC to load the PHP configuration file from step 2 and trigger the execution of the PHP function declared in step 1.The PHP function can be specified using the flag —payload, however php_uname() is set by default.
python watchtowr-vs-junos_juniper_2023-08-25.py --url http://localhost
python watchtowr-vs-junos_juniper_2023-08-25.py --url http://localhost --payload "get_current_user()"
Update to the latest version of JunOS, and/or apply the patches provided by Juniper. If these actions are not possible, please leverage the provided Juniper workaround.