An adversary with root access may gather credentials by reading `securityd`’s memory. `securityd` is a service/daemon responsible for implementing security protocols such as encryption and authorization.(Citation: Apple Dev SecurityD) A privileged adversary may be able to scan through `securityd`'s memory to find the correct sequence of keys to decrypt the user’s logon keychain. This may provide the adversary with various plaintext passwords, such as those for users, WiFi, mail, browsers, certificates, secure notes, etc.(Citation: OS X Keychain)(Citation: OSX Keydnap malware)

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.(Citation: OS X Keychain)(Citation: External to DA, the OS X Way) 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 adversary need only iterate over the other values to unlock the final password.(Citation: OS X Keychain)
Securityd Memory
source_name: mitre-attack  url: https://attack.mitre.org/techniques/T1555/002  external_id: T1555.002     source_name: External to DA, the OS X Way  description: Alex Rymdeko-Harvey, Steve Borosh. (2016, May 14). External to DA, the OS X Way. Retrieved July 3, 2017.  url: http://www.slideshare.net/StephanBorosh/external-to-da-the-os-x-way     source_name: Apple Dev SecurityD  description: Apple. (n.d.). Security Server and Security Agent. Retrieved March 29, 2024.  url: https://developer.apple.com/library/archive/documentation/Security/Conceptual/Security_Overview/Architecture/Architecture.html     source_name: OS X Keychain  description: Juuso Salonen. (2012, September 5). Breaking into the OS X keychain. Retrieved July 15, 2017.  url: http://juusosalonen.com/post/30923743427/breaking-into-the-os-x-keychain     source_name: OSX Keydnap malware  description: Marc-Etienne M.Leveille. (2016, July 6). New OSX/Keydnap malware is hungry for credentials. Retrieved July 3, 2017.  url: https://www.welivesecurity.com/2016/07/06/new-osxkeydnap-malware-hungry-credentials/     