Check: ANIX-00-000770
Anduril NixOS STIG:
ANIX-00-000770
(in version v1 r1)
Title
NixOS must store only encrypted representations of passwords. (Cat I impact)
Discussion
Passwords need to be protected at all times, and encryption is the standard method for protecting passwords. If passwords are not encrypted, they can be plainly read (i.e., clear text) and easily compromised.
Check Content
Verify NixOS stores only encrypted representations of passwords with the following command: $ grep ENCRYPT_METHOD /etc/login.defs ENCRYPT_METHOD SHA512 If "ENCRYPT_METHOD" does not equal SHA512 or greater, is commented out, or is missing, this is a finding.
Fix Text
Configure NixOS to store only encrypted representations of passwords. Add/modify /etc/nixos/configuration.nix to include the following lines: environment.etc."login.defs".text = pkgs.lib.mkForce '' ENCRYPT_METHOD SHA256 ''; Rebuild the system with the following command: $ sudo nixos-rebuild switch
Additional Identifiers
Rule ID: SV-268130r1039278_rule
Vulnerability ID: V-268130
Group Title: SRG-OS-000073-GPOS-00041
Expert Comments
CCIs
Number | Definition |
---|---|
CCI-004062 |
For password-based authentication, store passwords using an approved salted key derivation function, preferably using a keyed hash. |
Controls
Number | Title |
---|---|
No controls are assigned to this check |