Sophos Firewall SQL injection - CVE-2020-12271

漏洞信息

漏洞名称: Sophos Firewall SQL injection - CVE-2020-12271

漏洞编号:

  • CVE: CVE-2020-12271

漏洞类型: SQL注入

漏洞等级: 严重

漏洞描述: Sophos XG Firewall是一款广泛使用的企业级防火墙产品,旨在为组织提供网络安全保护,包括入侵防御、恶意软件防护和网络流量管理等功能。该产品通常部署在企业网络的边界,用于保护内部网络不受外部威胁的侵害。由于其广泛的应用,该产品的安全性对许多组织至关重要。

该漏洞是一个SQL注入问题,存在于Sophos XG Firewall的17.0、17.1、17.5和18.0版本中,这些版本在2020年4月25日之前发布。漏洞的技术根源在于设备配置了管理(HTTPS)服务或用户门户暴露在WAN区域时,未能正确处理用户输入,导致攻击者可以构造恶意的SQL查询,从而执行未经授权的数据库操作。这种类型的漏洞通常是由于应用程序未能充分验证和清理用户提供的输入而导致的。

成功利用此漏洞的攻击者可以实现远程代码执行,进而泄露本地设备管理员、门户管理员和用于远程访问的用户账户的用户名和哈希密码(但不包括外部Active Directory或LDAP密码)。这种攻击不需要认证即可执行,且可以自动化利用,因此对受影响系统的安全构成了严重威胁。攻击者可以利用泄露的凭证进一步渗透网络,可能导致数据泄露、服务中断或其他恶意活动。由于Sophos XG Firewall的广泛使用,此漏洞的影响范围较大,需要及时修补以防止潜在的安全事件。

产品厂商: Sophos

产品名称: Sophos XG Firewall

影响版本: 17.0, 17.1, 17.5, and 18.0 before 2020-04-25

来源: https://github.com/projectdiscovery/nuclei-templates/blob/5cd8630fea2726b1a7475daafb32b1b3cc7b06c3/http%2Fcves%2F2020%2FCVE-2020-12271.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114

id: CVE-2020-12271

info:
name: Sophos Firewall SQL injection - CVE-2020-12271
author: redperfect1847
severity: critical
description: |
A SQL injection issue was found in SFOS 17.0, 17.1, 17.5, and 18.0 before 2020-04-25 on Sophos XG Firewall devices, as exploited in the wild in April 2020. This affected devices configured with either the administration (HTTPS) service or the User Portal exposed on the WAN zone. A successful attack may have caused remote code execution that exfiltrated usernames and hashed passwords for the local device admin(s), portal admins, and user accounts used for remote access (but not external Active Directory or LDAP passwords).
tags: sql-injection
reference:
- https://news.sophos.com/en-us/2020/04/26/asnarok/

http:
- raw:
- |
GET /sp/Install.sh HTTP/1.1
Host: {{Hostname}}
matchers-condition: or
matchers:
- type: word
part: body
words:
- "#!/bin/bash"
- "chmod +x"
- type: regex
part: header
regex:
- "content-type: application/x-sh"

- raw:
- |
GET /sh_guard/lc HTTP/1.1
Host: {{Hostname}}
matchers-condition: or
matchers:
- type: word
part: body
words:
- "#!/bin/bash"
- "downloaded lp"
- type: regex
part: header
regex:
- "content-type: application/x-sh"

- raw:
- |
GET /sp/sophos.dat HTTP/1.1
Host: {{Hostname}}
matchers-condition: or
matchers:
- type: word
part: body
words:
- "ELF"
- "binaries"
- type: regex
part: header
regex:
- "content-type: application/octet-stream"

- raw:
- |
GET /sp/ae.sh HTTP/1.1
Host: {{Hostname}}
matchers-condition: or
matchers:
- type: word
part: body
words:
- "#!/bin/bash"
- "Modified scripts"
- type: regex
part: header
regex:
- "content-type: application/x-sh"

- raw:
- |
GET /sp/patch.sh HTTP/1.1
Host: {{Hostname}}
matchers-condition: or
matchers:
- type: word
part: body
words:
- "#!/bin/bash"
- "patching system"
- type: regex
part: header
regex:
- "content-type: application/x-sh"

- raw:
- |
GET /bkin HTTP/1.1
Host: {{Hostname}}
matchers-condition: or
matchers:
- type: word
part: body
words:
- "ELF"
- "Executable"
- type: regex
part: header
regex:
- "content-type: application/octet-stream"

stop-at-first-match: true




Sophos Firewall SQL injection - CVE-2020-12271
http://example.com/2025/07/08/github_1783558013/
作者
lianccc
发布于
2025年7月8日
许可协议