info: name: Linux Password File Not Properly Protected author: songyaeji severity: high description:> If password hashes are stored in/etc/passwd, which is world-readable, they can be exposed to non-privileged users. Proper configurations should ensure password hashes are stored only in/etc/shadow, which is restricted. reference: - https://isms.kisa.or.kr/main/csap/notice/ - Cloud Vulnerability Assessment Guide (2024) by KISA tags: linux,local,misconfiguration,passwd,shadow,password,compliance metadata: verified:true os: linux max-request:2 classification: cwe-id: CWE-256 cvss-metrics: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N cvss-score:5.5
self-contained:true
code: -engine: - bash source: | ls -l /etc/shadow2>/dev/null|| echo "no-shadow-file" matchers: -type: word part: code_1_response words: -"no-shadow-file"