sensepost / objection

📱 objection - runtime mobile exploration
GNU General Public License v3.0
7.46k stars 854 forks source link

(fix) keychain dumper misses entries with kSecAttrSynchronizable=true #448

Closed jpstotz closed 3 years ago

jpstotz commented 3 years ago

In a practical test with an iOS app on iOS 14.4 I discovered that the keychain dumper does not dump all keychain entries.

In detail all keychain entries were missing that had been created using the option query[kSecAttrSynchronizable]=kCFBooleanTrue.

This behavior can be changed by adding query[kSecAttrSynchronizable]=kSecAttrSynchronizableAny to the keychain query. The present pull requests contains these changes so the keychain dumper can return all entries no matter if kSecAttrSynchronizable has been set to true or false (the latter is the default value).

Tested on iOS 14.4

Edit: The function for deleting all keychain entries was also ignoring entries with query[kSecAttrSynchronizable]=kCFBooleanTrue. I have added a commit that changes theempty()` method to also delete such entries.

leonjza commented 3 years ago

Thank you! 🙌