Linux Password Complexity Not Enforced

漏洞信息

漏洞名称: Linux Password Complexity Not Enforced

漏洞类型: 配置问题

漏洞等级: 高危

漏洞描述: 该漏洞涉及Linux系统中密码复杂度要求未强制执行的问题。Linux作为一种广泛使用的操作系统,其安全性对于保护用户数据和系统资源至关重要。密码复杂度是系统安全的基本要求之一,通过强制用户设置包含大小写字母、数字和特殊字符的复杂密码,可以有效防止暴力破解和字典攻击。然而,当系统未正确配置密码复杂度策略时,用户可能会设置过于简单的密码,从而大大增加系统被非法入侵的风险。

漏洞的技术根源在于系统未正确应用或配置密码复杂度检查模块,如pam_pwquality.so,或者相关的配置文件(如/etc/security/pwquality.conf)中未设置足够的密码复杂度要求。例如,密码最小长度不足、不要求包含数字、大写字母、小写字母或特殊字符等。

此漏洞的影响非常严重,因为它直接降低了系统的安全性,使得攻击者更容易通过暴力破解或字典攻击获得用户账户的访问权限。一旦攻击者成功破解密码,他们可以执行未授权的操作,访问敏感数据,甚至完全控制系统。由于此漏洞不需要任何认证即可被利用,且可以自动化执行,因此其风险等级被评估为高危。为了缓解此风险,系统管理员应确保正确配置密码复杂度策略,并定期审计系统配置以确保符合安全最佳实践。

产品名称: Linux

来源: https://github.com/projectdiscovery/nuclei-templates/blob/2c311f6fed63b974ea12dc9a0254c9e034b2f6e1/misconfiguration%2Flinux%2Fpassword-complexity-not-enforced.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: password-complexity-not-enforced

info:
name: Linux Password Complexity Not Enforced
author: songyaeji
severity: high
description: Password complexity requirements are not enforced on this system. This allows weak passwords, making user accounts more susceptible to brute-force and dictionary attacks.
reference:
- https://access.redhat.com/solutions/13090
- https://wiki.debian.org/PasswordStrength
classification:
cvss-metrics: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
cvss-score: 7.8
cwe-id: CWE-521
metadata:
verified: true
max-request: 2
tags: linux,local,configuration,auth,weak-password,compliance

self-contained: true
code:
- engine:
- bash
source: |
cat /etc/security/pwquality.conf 2>/dev/null || true

matchers:
- type: regex
part: code_1_response
regex:
- 'minlen\s*=\s*[0-7]' # minimum length less than 8
- 'dcredit\s*=\s*0' # no digit requirement
- 'ucredit\s*=\s*0' # no uppercase requirement
- 'lcredit\s*=\s*0' # no lowercase requirement
- 'ocredit\s*=\s*0' # no special character requirement
condition: or

- engine:
- bash
source: |
grep pam_pwquality.so /etc/pam.d/system-auth /etc/pam.d/common-password 2>/dev/null || true

matchers:
- type: word
part: code_2_response
words:
- "pam_pwquality.so"
negative: true