16

I failed to find the path to iCloud keychain to do just security dump-keychain - the iCloud keychain isn't shown when I try security list-keychains. What is the path to that keychain (or, if it cannot be obtained, how to dump the whole iCloud keychain)?

Or, maybe, Apple Script could help to do that?

4
  • 1
    You only need to see it with the Terminal ?
    – Chris
    Commented May 14, 2016 at 16:00
  • 1
    @Chris, actually, in Single-user mode Commented May 14, 2016 at 16:05
  • 1
    So did you figure out anything?
    – Uko
    Commented Feb 15, 2018 at 8:02
  • It would be interesting if there is a python / api bridge to access all the internal code? there are some details at developer.apple.com/documentation/security/keychain_services/… after looking into the /Library/Keychains file you might lookup how to access "binary" keychain "sqlite" data via python?
    – Asher
    Commented Jul 18, 2020 at 18:16

2 Answers 2

10
+50

iCloud Keychain is stored on disk in a different format than a traditional keychain ref1, ref2. It's located at ~/Library/Keychains/ in a folder named as a long UUID. You can see the modified timestamp change on the contents of that folder as you change something in your iCloud keychain.

Whilst you can use AppleScript and Usable Keychain Scripting to work with the system and login keychains, there's no way to access the iCloud keychain.

So the only option you're left with is to AppleScript GUI operation of the Keychain Access app.

3
  • 1
    The UUID is your system's hardware platform UUID (IOPlatformUUID), which you can read using the following shell command (Ref): ioreg -d2 -c IOPlatformExpertDevice | awk -F\" "/IOPlatformUUID/{print \$(NF-1)}" Commented Apr 28, 2023 at 7:41
  • Anything changed as of Sep 2023?
    – luckman212
    Commented Sep 12, 2023 at 2:37
  • @luckman212 no, IMHO it's unlikely to become less secure in the future. Commented Sep 15, 2023 at 16:53
5

So I've been trying to figure out something similar for about a year or so - and at this point, I'm willing to say that without super ninja magic it's really not possible to do this using the 'security' command. I have seen countless questions without an answer.

Although there is no actual confirmation its impossible there seems to be a preponderance of evidence suggesting it is not possible.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .