Sub-technique of T1555 Credentials from Password Stores.View on attack.mitre.org
Adversaries may acquire credentials from Keychain. Keychain (or Keychain Services) is the macOS credential management system that stores account names, passwords, private keys, certificates, sensitive application data, payment data, and secure notes. There are three types of Keychains: Login Keychain, System Keychain, and Local Items (iCloud) Keychain. The default Keychain is the Login Keychain, which stores user passwords and information. The System Keychain stores items accessed by the operating system, such as items shared among users on a host. The Local Items (iCloud) Keychain is used for items synced with Apple’s iCloud service.
Keychains can be viewed and edited through the Keychain Access application or using the command-line utility security. Keychain files are located in ~/Library/Keychains/, /Library/Keychains/, and /Network/Library/Keychains/.
Adversaries may gather user credentials from Keychain storage/memory. For example, the command security dump-keychain –d will dump all Login Keychain credentials from ~/Library/Keychains/login.keychain-db. Adversaries may also directly read Login Keychain credentials from the ~/Library/Keychains/login.keychain file. Both methods require a password, where the default password for the Login Keychain is the current user’s password to login to the macOS host.
Rules on DetectionCode tagged with T1555.001.
| Rule | Level | Log source |
|---|---|---|
| Credentials from Password Stores - Keychain | medium | macos / process_creation |
| Rule | Type | Risk | Data source |
|---|---|---|---|
| MacOS Keychains Dumped | TTP | NULL | Osquery Results |
None recorded.
| Used by | Procedure example |
|---|---|
| GroupContagious Interview | Contagious Interview has leveraged malware variants configured to dump credentials from the macOS keychain. |
| Used by | Procedure example |
|---|---|
| MalwareBeaverTail | BeaverTail has collected keys associated with macOS within `/Library/Keychains/login.keychain`. |
| MalwareCalisto | Calisto collects Keychain storage data and copies those passwords/tokens to a file. |
| MalwareCuckoo Stealer | Cuckoo Stealer can capture files from a targeted user's keychain directory. |
| ToolEmpire | Empire uses the command `/usr/bin/security dump-keychain -d` to read the keychain credential. |
| MalwareGlassWorm | GlassWorm has collected keys stored within `/Library/Keychains/login.keychain-db`. |
| MalwareGreen Lambert | Green Lambert can use Keychain Services API functions to find and collect passwords, such as `SecKeychainFindInternetPassword` and `SecKeychainItemCopyAttributesAndData`. |
| MalwareiKitten | iKitten collects the keychains on the system. |
| ToolLaZagne | LaZagne can obtain credentials from macOS Keychains. |
Data from MITRE ATT&CK® (Enterprise). ATT&CK® is a registered trademark of The MITRE Corporation.