Linux Password Complexity Not Enforced

漏洞信息

漏洞名称: Linux Password Complexity Not Enforced

漏洞类型: 弱口令

漏洞等级: 高危

漏洞描述: 该漏洞涉及Linux系统中密码复杂性要求未强制执行的问题。Linux作为一个广泛使用的操作系统,其安全性对于保护用户数据和系统资源至关重要。密码复杂性要求是系统安全的基础组成部分,旨在通过强制用户设置强密码来减少被暴力破解和字典攻击的风险。当这些要求未被强制执行时,用户可能会设置弱密码,从而大大增加了系统被未授权访问的风险。漏洞的技术根源在于系统配置文件(如/etc/security/pwquality.conf)中的密码复杂性参数(如minlen、dcredit、ucredit、lcredit、ocredit)设置不当,或者PAM(可插拔认证模块)配置文件中未正确启用或配置pam_pwquality.so模块。此外,如果配置中缺少’enforce_for_root’选项,即使是root账户也可能不受密码复杂性要求的约束。这种配置问题可能导致攻击者更容易通过猜测或自动化工具破解用户密码,进而获得系统访问权限,执行未授权操作,甚至完全控制系统。由于该漏洞不依赖于特定的Linux版本,且影响广泛部署的系统,因此其安全风险被评估为高危。

产品名称: Linux

来源: https://github.com/projectdiscovery/nuclei-templates/blob/a727d0f20b9f060695f53aa17295243ccc4442ea/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://isms.kisa.or.kr/main/csap/notice/
- Cloud Vulnerability Assessment Guide(2024) by KISA
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]'
- '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"



Linux Password Complexity Not Enforced
http://example.com/2025/07/29/github_3285776166/
作者
lianccc
发布于
2025年7月29日
许可协议