Linux Password Complexity Not Enforced

漏洞信息

漏洞名称: Linux Password Complexity Not Enforced

漏洞类型: 弱口令

漏洞等级: 高危

漏洞描述: 该漏洞涉及Linux系统中密码复杂性要求未强制执行的问题。具体来说,系统未强制实施密码复杂性策略,如密码最小长度、数字、大写字母、小写字母和特殊字符的使用要求,从而导致用户账户可能使用弱密码。这种情况使得用户账户更容易受到暴力破解和字典攻击的威胁。

受影响产品:Linux操作系统,广泛应用于服务器、个人计算机和嵌入式系统中。作为开源操作系统,Linux在企业和个人用户中都有广泛的应用,特别是在服务器领域占据重要地位。

漏洞解释:此漏洞属于弱口令漏洞,其技术根源在于系统配置中未正确设置或强制执行密码复杂性策略。具体表现为/etc/security/pwquality.conf文件中密码复杂性参数(如minlendcreditucreditlcreditocredit)设置不当,或/etc/pam.d/system-auth/etc/pam.d/common-password文件中未正确配置pam_pwquality.so模块以强制执行密码复杂性要求。

影响分析:此漏洞可能导致严重的安全风险,攻击者可以利用弱密码轻易破解用户账户,进而获取系统访问权限。由于不需要任何认证即可尝试破解,这种漏洞可以被自动化工具大规模利用,导致数据泄露、服务中断或其他恶意活动。特别是在root账户未强制执行密码复杂性要求的情况下,风险更为严重,可能导致整个系统被完全控制。

产品名称: Linux

来源: https://github.com/projectdiscovery/nuclei-templates/blob/9735bf3e2f56045fec37934ebc703ce95ef9a2da/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

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
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]' # 길이 8자 미만
- 'dcredit\s*=\s*0' # 숫자 없음
- 'ucredit\s*=\s*0' # 대문자 없음
- 'lcredit\s*=\s*0' # 소문자 없음
- 'ocredit\s*=\s*0' # 특수문자 없음

- 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"
- type: negative_word
part: code_2_response
words:
- "enforce_for_root" # root 계정에 강제 적용 없음