keychaineditor icon indicating copy to clipboard operation
keychaineditor copied to clipboard

Enhancement: Support dumping Keys DB

Open hubert3 opened this issue 9 years ago • 3 comments

Some apps use kSecClassKey to store IDs, passwords and credentials, even though these items are not really private keys. These credentials are currently invisible to keychaineditor.

It would be nice if they could be dumped and edited like passwords. Sogeti's keychain_dump (iphone-dataprotection.keychainviewer/Keychain/keychain_dump.c) supports dumping them.

hubert3 avatar Feb 04 '16 10:02 hubert3

Thanks for the suggestion @hubert3. I am fixing couple of bugs by end of this week. I will try to incorporate this as well.

NitinJami avatar Feb 04 '16 19:02 NitinJami

I implemented basic support for --action dump-keys in my fork here:

https://github.com/hubert3/keychaineditor/commit/ca32d8e0bf47aa41d1ece6e9951293a31f9b6a0c

It assumes that kSecClassKey items contain strings as their data. It won't work for dumping RSA private keys or similar yet.

Adding --find xxx will only print key items where the Access Group field contains xxx.

kSecClassKey items do not have "Account" and "Service" like genp, instead they are identified by kSecAttrAccessGroup and kSecAttrApplicationTag. Some refactoring would be required to integrate this neatly into the existing keychaineditor commands because the existing code assumes every item has a "Service" and "Account" attribute.

hubert3 avatar Mar 29 '16 06:03 hubert3

Feb 4, 2016 - I am fixing couple of bugs by end of this week. I will try to incorporate this as well.

hi, did you eventually incorporate the suggestion?

mailinglists35 avatar Feb 17 '18 02:02 mailinglists35