T1555.001

Keychain

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. Adversaries may gather user credentials from Keychain storage/memory using the security command-line utility (e.g., security dump-keychain -d), by directly reading Keychain database files from ~/Library/Keychains/, or programmatically via Keychain Services API functions like SecKeychainFindInternetPassword and SecItemCopyMatching.

Microsoft Sentinel / Defender
kusto
let KeychainCommands = dynamic(["dump-keychain", "find-generic-password", "find-internet-password", "find-certificate", "export -k", "SecKeychainFindInternetPassword", "SecKeychainItemCopyAttributesAndData", "SecItemCopyMatching", "keychaindump"]);
let KeychainFiles = dynamic(["login.keychain", "login.keychain-db", "System.keychain", "/Library/Keychains/", "keychain-2.db"]);
DeviceProcessEvents
| where Timestamp > ago(24h)
| where ProcessCommandLine has_any (KeychainCommands)
    or (FileName =~ "security" and ProcessCommandLine has_any ("dump-keychain", "find-generic-password", "find-internet-password", "find-certificate"))
| extend KeychainDump = ProcessCommandLine has "dump-keychain"
| extend PasswordQuery = ProcessCommandLine has_any ("find-generic-password", "find-internet-password")
| extend CertExport = ProcessCommandLine has "find-certificate"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
         InitiatingProcessFileName, InitiatingProcessCommandLine,
         KeychainDump, PasswordQuery, CertExport
| sort by Timestamp desc
high severity high confidence

Data Sources

Process: Process Creation Command: Command Execution File: File Access

Required Tables

DeviceProcessEvents

False Positives

  • macOS developers using security command-line tool to manage certificates during code signing workflows
  • IT automation scripts that query Keychain for WiFi or VPN credentials during device provisioning
  • Backup software that reads Keychain files as part of system-level backup operations
  • Apple software update processes that interact with the System Keychain

Unlock Pro Content

Get the full detection package for T1555.001 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections