Has leveraged malware variants configured to dump credentials from the macOS keychain.123
Keychain T1555.001
- Tactic
- Credential Access
- Platform
- macOS
- Version
- 1.1
- Created
- 12 February 2020
- Last modified
- 12 May 2026
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.
Keychain MITRE reference T1555.001
1 group has been recorded using this technique. Newest first; each entry carries MITRE’s procedure text and a link to the group’s full record. Click a name to filter the rules below.
All 1 groups for this technique
11 software entries are documented implementing this technique. MITRE files each as a tool or as malware; newest first, then by how many groups carry them.
Has collected keys stored within /Library/Keychains/login.keychain-db.12
Has collected keys associated with macOS within /Library/Keychains/login.keychain.123
Performs an in-memory keychain query via SecItemCopyMatching() then formats the retrieved data as a JSON blob for exfiltration.1
Can capture files from a targeted user's keychain directory.1
Can dump credentials from the macOS keychain.1
Can use Keychain Services API functions to find and collect passwords, such as SecKeychainFindInternetPassword and SecKeychainItemCopyAttributesAndData.12
All 11 software entries for this technique · 6 newest in this preview
Offense vs defense T1555.001
Is defensive coverage keeping up with adversary use? Eight counts, each ranked against all 697 ATT&CK techniques. Attack sits left, defense right, so a shape leaning left means adversaries are better documented here than defenders are equipped. Hover any spoke for its percentile and the share of techniques that have more. The timeline below shows when each side arrived.
How it got here
Adversary activity (campaign spans) over cumulative rule output. Each source is plotted independently from zero, so neither line includes the other. Campaign dates are year-granularity.
Keychain detection strategy DET0396
MITRE names one behaviour worth catching for this technique and breaks it into 1 analytic, one per platform. Each carries the log sources it needs and the fields you tune per environment.
Detect Access to macOS Keychain for Credential Theft
AN1112 · macOS
Detects suspicious access to macOS Keychain files and APIs. Observes processes invoking the 'security' utility or accessing Keychain databases directly, correlates these with abnormal parent process lineage or unexpected user context. Monitors attempts to dump, unlock, or read credential storage beyond normal application workflows.
Log sources
The data this analytic draws on. You do not need every component — each one you already collect covers part of it. Each links to its ATT&CK record.
| Data component | Name | Channel |
|---|---|---|
| OS API ExecutionDC0021 | macos:unifiedlog | access or unlock attempt to keychain database |
| Process CreationDC0032 | macos:unifiedlog | execution of security or osascript |
| File AccessDC0055 | macos:unifiedlog | read access to ~/Library/Keychains/login.keychain-db |
Tunable fields
MITRE calls these the analytic’s mutable elements: the thresholds and filters you set for your own environment.
| Field | What you tune |
|---|---|
| AllowedApplications | Whitelist of applications (e.g., Safari, Mail) normally permitted to access Keychain |
| AlertThreshold | Number of failed keychain unlock attempts before raising an alert |
| ParentProcessContext | Legitimate parent-child process relationships for security tool invocations |
The password for the user's login keychain can be changed from the user's login password. This increases the complexity for an adversary because they need to know an additional password.
| # | Test | Platform | Executor | Elevation | Prereqs | Cleanup | Ref | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 01 | Keychain Dump | macos | sh | Required | — | — | ||||||||||
This command will dump keychain credential information from login.keychain. Source: https://www.loobins.io/binaries/security/ ### Keychain File path ~/Library/Keychains/ /Library/Keychains/ /Network/Library/Keychains/ Security Reference Attack command sudo security dump-keychain -d login.keychain GUID12374a15-121a-4e85-b1b3-344e07cbaacb | ||||||||||||||||
| 02 | Export Certificate Item(s) | macos | sh | — | — | Yes | ||||||||||
This command finds all certificate items and sends the output to local file in pem format. Input arguments
Attack command security find-certificate -a -p > #{cert_export}
Cleanup command rm #{cert_export}GUID801dba40-7829-4514-8da6-b59bd8aec73e | ||||||||||||||||
| 03 | Import Certificate Item(s) into Keychain | macos | sh | — | — | — | ||||||||||
This command will import a certificate pem file into a keychain. Input arguments
Attack command security import #{cert_export} -k
GUIDd196ea19-4697-455d-b75a-88570ef63107 | ||||||||||||||||
| 04 | Copy Keychain using cat utility | macos | sh | — | — | Yes | ||||||||||
This command will copy the keychain using the cat utility in a manner similar to Atomic Stealer. Input arguments
Attack command cat ~/Library/Keychains/login.keychain-db > #{keychain_export}
Cleanup command rm #{keychain_export}GUID9054bf84-a62b-4c0b-bd6d-be9902222dce | ||||||||||||||||
Tests from Atomic Red Team (MIT licence) · technique definition