/etc/passwd and /etc/shadow
Parent: T1003
Description
Adversaries may attempt to dump the contents of <code>/etc/passwd</code> and <code>/etc/shadow</code> to enable offline password cracking. Most modern Linux operating systems use a combination of <code>/etc/passwd</code> and <code>/etc/shadow</code> to store user account information, including password hashes in <code>/etc/shadow</code>. By default, <code>/etc/shadow</code> is only readable by the root user.(Citation: Linux Password and Shadow File Formats) Linux stores user information such as user ID, group ID, home directory path, and login shell in <code>/etc/passwd</code>. A "user" on the system may belong to a person or a service. All password hashes are stored in <code>/etc/shadow</code> - including entries for users with no passwords and users with locked or disabled accounts.(Citation: Linux Password and Shadow File Formats) Adversaries may attempt to read or dump the <code>/etc/passwd</code> and <code>/etc/shadow</code> files on Linux systems via command line utilities such as the <code>cat</code> command.(Citation: Arctic Wolf) Additionally, the Linux utility <code>unshadow</code> can be used to combine the two files in a format suited for password cracking utilities such as John the Ripper - for example, via the command <code>/usr/bin/unshadow /etc/passwd /etc/shadow > /tmp/crack.password.db</code>(Citation: nixCraft - John the Ripper). Since the user information stored in <code>/etc/passwd</code> are linked to the password hashes in <code>/etc/shadow</code>, an adversary would need to have access to both.
Mapped SPARTA techniques
No techniques mapped to this control.
Cross-framework references
Relationships published by the source frameworks themselves, reproduced here with attribution. They are not SafeMode Space mappings and carry no confidence rating of ours.
Countered by 22 in MITRE D3FEND (Defensive Techniques)
- D3-ANCIAuthentication Cache Invalidation
- D3-CCSACredential Compromise Scope Analysis
- D3-CFContent Filtering
- D3-CHCredential Hardening
- D3-CMContent Modification
- D3-CQContent Quarantine
- D3-CRCredential Revocation
- D3-CROCredential Rotation
- D3-CTSCredential Transmission Scoping
- D3-DFDecoy File
- D3-DIData Inventory
- D3-DUCDecoy User Credential
- D3-FAFile Analysis
- D3-FEFile Encryption
- D3-FEVFile Eviction
- D3-FIMFile Integrity Monitoring
- D3-LFPLocal File Permissions
- D3-MFAMulti-factor Authentication
- D3-RDRestore Database
- D3-RFRestore File
- D3-RFAMRemote File Access Mediation
- D3-RICReissue Credential
Cite as SafeMode Space, mitre-attack-enterprise T1003.008.