very interesting. Do you have more details on which part of the "device status" are they checking with attestation? I'm curious about how TEE can retrieve info about the overall system in a "trusted" / non hackable way
Conversation
Replying to
They can check RootOfTrust and VerifiedBootState in the metadata. And since proper implementation will do the attestation on a remote device, we cannot fake it on device (unless we exploit TEE of course)
4
2
60
There are two kinds of hardware keystores, both of which provide key attestation support. The traditional implementation uses the TEE, but newer generation devices like the Pixel 3 and some newer Samsung devices provide a StrongBox keystore implemented via a secure element.
1
3
SafetyNet attestation isn't a particularly strong use of key attestation. It performs validation of a massive number of devices at scale, without any kind of pairing in advance. That means they depend on verifying devices via the root certificate, which isn't high assurance.
1
1
3
Bypassing it doesn't necessarily require exploiting the TEE or SE on the device being checked, since there's no pairing with that specific device. An attacker could perform an attestation, modify verified boot state, and sign it with a valid batch key extracted from any device.
1
5
To bypass this kind of unpaired verification, an attacker only need a batch key from *any* device, not necessarily the one on the device being checked. That's why they have a way to revoke leaked/compromised keys:
android.googleapis.com/attestation/st
Unclear if SafetyNet checks revocation.
3
5
So, an attacker only needs to exploit the TEE on one device to get a batch key for faking unpaired attestations on any device. They can choose a device without updated TEE firmware.
The Auditor app (attestation.app/about) uses pairing rather than just verifying via the root.
1
1
If they notice a batch key was extracted and is being used to sign fake attestations, they can respond with revocation. Can see they've already revoked keys at android.googleapis.com/attestation/st. This is good enough for things like anti-cheat or DRM, but real security checks need pairing.
1
3
Ideally, they would improve key attestation with better support for the pairing approach. Pairing is well suited to device manager workflows where there's already a propositioning step. At the moment, the cert for the app's key is directly signed with the provisioned batch key.
2
1
Batch keys aren't unique largely for privacy reasons. Ideally, they would generate a internal key for the app when it requests attestation, and use that as an extra link in the signing chain for all the attestations by the app. The key would get cleared when app data is cleared.
Current implementation:
app's keystore key -> batch -> intermediate -> root
Improved approach for pairing:
app's keystore key -> internal key for the app -> batch -> intermediate -> root
1
1
Then, this extra internal key would be pinned as part of the pairing, and allows strongly verifying future attestations from the app. Even if an attacker compromises the batch key on another device, attestation with a Trust On First Use pairing system would still remain secure.
1
1
Show replies



