Detection rules › Sigma

macOS Suspicious Keychain Access

Status
experimental
Severity
high
Log source
product macos, service unifiedlog
Author
Eric Brown - Nebulock, Inc.
Source
github.com/Nebulock-Inc/macos-coresigma

Detects suspicious access to the macOS Keychain, which stores passwords, certificates, and encryption keys. Attackers may attempt to dump credentials or access stored secrets.

MITRE ATT&CK coverage

Rule body yaml

title: macOS Suspicious Keychain Access
id: d4e5f6a7-b8c9-4012-def0-123456789012
status: experimental
description: |
  Detects suspicious access to the macOS Keychain, which stores passwords,
  certificates, and encryption keys. Attackers may attempt to dump credentials
  or access stored secrets.
references:
  - https://attack.mitre.org/techniques/T1555/001/
  - https://www.sentinelone.com/blog/macos-keychain-extraction/
author: Eric Brown - Nebulock, Inc.
date: 2025/01/22
modified: 2025/01/22
logsource:
  product: macos
  service: unifiedlog
detection:
  selection_subsystem:
    subsystem: com.apple.securityd
  selection_keychain:
    message|contains:
      - 'keychain'
      - 'SecKeychainItemCopyContent'
      - 'SecKeychainFindGenericPassword'
      - 'SecKeychainFindInternetPassword'
      - 'security find-generic-password'
      - 'security find-internet-password'
      - 'security dump-keychain'
  selection_suspicious:
    message|contains:
      - 'denied'
      - 'unauthorized'
      - 'failed'
      - 'dump'
      - 'export'
  condition: selection_subsystem and selection_keychain and selection_suspicious
falsepositives:
  - Legitimate password manager applications
  - System services accessing credentials
  - SSH key access
level: high
tags:
  - attack.credential_access
  - attack.t1555.001

Stages and Predicates

Stage 0: condition

selection_subsystem and selection_keychain and selection_suspicious

Stage 1: selection_subsystem

selection_subsystem:
  subsystem: com.apple.securityd

Stage 2: selection_keychain

selection_keychain:
  message|contains:
    - 'keychain'
    - 'SecKeychainItemCopyContent'
    - 'SecKeychainFindGenericPassword'
    - 'SecKeychainFindInternetPassword'
    - 'security find-generic-password'
    - 'security find-internet-password'
    - 'security dump-keychain'

Stage 3: selection_suspicious

selection_suspicious:
  message|contains:
    - 'denied'
    - 'unauthorized'
    - 'failed'
    - 'dump'
    - 'export'

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
messagematch
  • SecKeychainFindGenericPassword
  • SecKeychainFindInternetPassword
  • SecKeychainItemCopyContent
  • denied
  • dump
  • export
  • failed
  • keychain
  • security dump-keychain
  • security find-generic-password
  • security find-internet-password
  • unauthorized
subsystemeq
  • com.apple.securityd