Currently viewing ATT&CK v8.2 which was live between October 27, 2020 and April 28, 2021. Learn more about the versioning system or see the live site.

Credentials from Password Stores: Securityd Memory

An adversary may obtain root access (allowing them to read securityd’s memory), then they can scan through memory to find the correct sequence of keys in relatively few tries to decrypt the user’s logon keychain. This provides the adversary with all the plaintext passwords for users, WiFi, mail, browsers, certificates, secure notes, etc.[1] [2]

In OS X prior to El Capitan, users with root access can read plaintext keychain passwords of logged-in users because Apple’s keychain implementation allows these credentials to be cached so that users are not repeatedly prompted for passwords. [1] [3] Apple’s securityd utility takes the user’s logon password, encrypts it with PBKDF2, and stores this master key in memory. Apple also uses a set of keys and algorithms to encrypt the user’s password, but once the master key is found, an attacker need only iterate over the other values to unlock the final password.[1]

ID: T1555.002
Sub-technique of:  T1555
Tactic: Credential Access
Platforms: Linux, macOS
Permissions Required: root
Data Sources: Process monitoring
Version: 1.0
Created: 12 February 2020
Last Modified: 17 February 2020

Procedure Examples

Name Description
Keydnap

Keydnap uses the keychaindump project to read securityd memory.[4]

Mitigations

This type of attack technique cannot be easily mitigated with preventive controls since it is based on the abuse of system features.

Detection

Monitor processes and command-line arguments for activity surrounded users searching for credentials or using automated tools to scan memory for passwords.

References