-
Notifications
You must be signed in to change notification settings - Fork 934
Description
Hello,
I'm currently testing a Cordova plugin which sets access control flags like the following
SecAccessControlRef accessControlRef = SecAccessControlCreateWithFlags( kCFAllocatorDefault, kSecAttrAccessibleWhenUnlockedThisDeviceOnly, kSecAccessControlUserPresence, &accessControlError);
From my understanding and after research, the kSecAccessControlUserPresence
flag is equivalent to specifying kSecAccessControlBiometryAny,
kSecAccessControlOr,
and kSecAccessControlDevicePasscode.
The materials stored in the Keychain or filesystem are protected with protection classes (such as kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly
and kSecAttrAccessibleWhenUnlockedThisDeviceOnly),
and the SecAccessControlCreateFlags is set either with kSecAccessControlDevicePasscode
(for passcodes), kSecAccessControlUserPresence
(passcode or touchid), kSecAccessControlTouchIDAny
(Touch ID) or kSecAccessControlTouchIDCurrentSet
(Touch ID: but current fingerprints only).
So based on the statement in the wiki
What should be clear now is that this 'bypass' is purely a local bypass for when a target application calls evaluatePolicy and a failed response is received. This 'bypass' will not work in cases where keychain items are protected with access control flags such as kSecAccessControlTouchIDAny or kSecAccessControlTouchIDCurrentSet.
https://github.com/sensepost/objection/wiki/Understanding-the-TouchID-Bypass
The plugin sets the correct flags which should protect against the bypass, but it is currently not the case.
What I can't understand now is how can these flags protect against Objection's bypass when it returns a True
to whatever the [LAContext evaluatePolicy:localizedReason:reply:]
replies.
Thanks.