November 17, 2026

Taking a Look at Recent Android Remote Key Provisioning Attacks

In a previous article, we described how advanced users and attackers are abusing leaked keyboxes and relaying attestation requests to remote devices in order to bypass the Key Attestation API. We also covered how Remote Key Provisioning (RKP) replaces factory-provisioned attestation credentials with regularly renewed certificates.

Guardsquare has observed that, through a series of vulnerabilities found on Qualcomm and Mediatek’s Trusted Execution Environment (TEE) implementations, RKP keyboxes are being extracted from vulnerable devices and shared through social media. Recently published research around these SoC manufacturer’s TEE implementations explains how these keys can end up outside secure hardware, allowing users to exfiltrate them from vulnerable devices and load them into other modified devices. 

Once an RKP keybox has been obtained through these vulnerabilities, modified devices can use it –for as long as it remains unrevoked and isn’t expired– to generate valid Key Attestation responses locally, without having to rely on the device that generates said RKP keybox at all.

Throughout this post we will explain what this means for developers who use the Key Attestation API, how these different attacks against RKP work on different devices, as well as a reminder of how you can stay alert and detect abuse proactively from your backend.

What do these attacks mean for app developers who rely on Key Attestation?

Before RKP, attacks against Android’s Key Attestation consisted of attacking and extracting from a vulnerable device the factory-fused Key Attestation keybox (i.e., the specific certificates and private keys needed to sign Key Attestation requests like an Android device would), requiring complex attacks against the device’s secure hardware; or obtaining leaked keyboxes from the factory or the Original Equipment Manufacturer (OEM). These attacks and leaks had a remarkably low rate that allowed Google and app developers to keep them under control with an up-to-date Certificate Revocation List (CRL).

Google developed Remote Key Provisioning (RKP) with the purpose of having stricter controls over which devices’ keys can be revoked: In a factory-fused keybox scenario, revoking a single key meant that all of the devices that shared that same key (i.e., same batch, or sometimes device model) would all be affected by a revocation, and would not be able to pass attestation checks. This sometimes caused revocation wait times until the OEMs were able to roll out device over-the-air updates that allowed them to roll over the provisioned key material on the affected models. With RKP, each device gets a uniquely provisioned keybox, meaning that if it leaks, it can be instantly revoked with no wait time. Additionally, RKP-provisioned certificates are by default short-lived (between days to weeks, rather than years), which mitigates the impact of potential leaks.

These novel attacks against RKP allow obtaining an indefinite amount of short-lived, yet recurrent Key Attestation keyboxes. This means that, while it’s possible to still revoke these certificates through a CRL, given the rate at which these RKP keyboxes can be generated, it wouldn’t be feasible to keep them controlled with a CRL. This lowers the guarantees that hardware Key Attestation provides to app developers, having to resort to other mechanisms such as through backend monitoring in order to spot and prevent abuse. These techniques will be covered in depth later in this post, but before that, we will show how RKP works in order to understand what these vulnerabilities and subsequent attacks are capable of in vulnerable devices.

A quick glance at Remote Key Provisioning (RKP)

RKP is a mechanism developed by Google that changes the way in which devices sign Key Attestation requests. Here’s how it works: instead of the Key Attestation certificates being provisioned at the factory (i.e., added/fused onto the devices), the device is asked to generate a secret while still at the factory, for which its (KDF-derived) public key gets extracted and sent to Google. Then, when the device arrives to the user, it will contact Google’s RKP servers using these device secrets and request a new short-lived keybox it can use for Key Attestation.

Guardsquare_In-Blog-Images_Taking-a-Look-at-Recent-Android-Remote-Key-Provisioning-Attacks_1200w_1

Remote Key Provisioning flow, as documented by Google

Underneath, this works through a mechanism that combines the device’s secret generated at the factory with a set of device-specific identifiers that include its firmware, secure boot status and other variables. These allow measuring whether a device has been compromised or not. This process ends up generating a final compound identifier which will be used to authenticate a certificate signing request (CSR) that will be sent to Google. However, these components aren’t used for Key Attestation itself – they are only used for RKP.

In order to perform Key Attestation, the device’s KeyMint Trusted Application (TA) will generate a Key Attestation public and private key, which will be used to sign the app’s certificates later on. This keypair’s public key is added, among other things, to the RKP CSR that will be sent to Google.

Once the RKP CSR is prepared on the device and sent to Google, Google will generate and send back the requested certificates signed. Through this process, the device obtains the certificates needed to produce valid Key Attestation responses.

Guardsquare_In-Blog-Images_Taking-a-Look-at-Recent-Android-Remote-Key-Provisioning-Attacks_1200w_2

Diagram showing the overall steps of a regular RKP process

Abusing Qualcomm’s KeyMint to request certificates

The Qualcomm vulnerability consists of targeting a flaw in its KeyMint TA: in vulnerable Qualcomm devices, a root user is able to specify which Key Attestation public key it wants added to the RKP CSR, rather than having the TA generate it. This means that a program running as root on Android can generate a keypair and send its public key directly to the TA.

The KeyMint TA then uses the device’s identity to generate and authenticate the RKP CSR, including the user-supplied Key Attestation public key, allowing to obtain signed certificates from Google (if the request is allowed). Here, the TEE acts as a provisioning oracle, allowing an Android program running as root to take advantage of the device’s own identity, without having to extract its factory-generated secret or compound device identifiers.

Guardsquare_In-Blog-Images_Taking-a-Look-at-Recent-Android-Remote-Key-Provisioning-Attacks_1200w_3

Simplified diagram showing the vulnerable area (red) 
during an RKP process with custom public keys on Qualcomm

Since this vulnerability relies on an exposed interface that allows requests coming from Android to specify the public key, it’s possible to mitigate it by updating the KeyMint TA on the device to one that isn’t vulnerable. This can only be done via a device firmware update. Qualcomm has already addressed this issue on recent Android security patches; however, outdated devices without recent security patches may remain exposed to this attack.

Several community tools already exploit this vulnerability. For example, the open-source tool Duck ToolBox implements this process and combines the software-generated private key with Google’s returned certificates to export a keybox. These can be loaded into compatible software, such as TrickyStore or TEESimulator on other modified devices, allowing to spoof and bypass Key Attestation on them.

Extracting secret keys from MediaTek devices

Another approach can be to modify the components running inside the device’s TEE so that the device’s secrets can be extracted. In this scenario, a set of early boot-chain weaknesses, which can be exploited with tools such as fenrir, allows modifying the device’s TEE before it gets loaded. This allows taking control of the device’s TAs and using them as oracles to leak attestation secrets from the device.

For example, on a Nothing Phone (2a), a researcher reported being able to extract the Key Attestation private keys (i.e., not the device’s factory-generated secrets or compound identifiers, but rather, the keys generated inside the TA that will be used for Key Attestation) after they were generated inside a modified Trustonic KeyMint TA. The researcher placed the generated keys from the KeyMint TA memory, as well as Google-generated certificates on a location that could be read by Android. This ultimately allowed crafting a valid RKP keybox that can be used on other devices.

Guardsquare_In-Blog-Images_Taking-a-Look-at-Recent-Android-Remote-Key-Provisioning-Attacks_1200w_4

Simplified diagram showing the vulnerable area (red) during a 
Key Attestation key leak at a modified Trustonic KeyMint TA

Another example is a MiTEE research done on a Xiaomi Redmi K70E, which described how to extract the final compound identifier’s secret, used to authenticate provisioning requests. Having access to this, and the corresponding provisioning evidence, allows to not only generate cryptographically valid CSRs that can be sent to Google, but also allows obtaining valid RKP certificates directly, without relying on the original phone. This constitutes a much more powerful exploit, where only a revocation of the exploited device’s factory generated secrets or compound identifiers can stop the abuse. Community tools that support supplying these secrets already exist, like google-rkp-sw, although these remain a proof-of-concept until real device secrets can be leaked.

Guardsquare_In-Blog-Images_Taking-a-Look-at-Recent-Android-Remote-Key-Provisioning-Attacks_1200w_5

Simplified diagram showing the vulnerable area (red) during a 
final compound device identifier leak at a modified MiTEE KeyMint TA

Why certificate expiry does not end keybox sharing

The certificates in an exported keybox have a very short lifetime, usually of a few days or weeks, and can still be revoked through CRLs. 

However, someone with access to a vulnerable Qualcomm device can abuse it to generate an indefinite amount of keyboxes, and share them online. Likewise, someone with extracted provisioning credentials (such as the device’s factory-generated secret, or the final compound identifier) may be able to do the same from devices other than those which run vulnerable software, as long as Google continues accepting the requests with those credentials. 

For these reasons, collecting leaked certificate serial numbers and adding them to a Certificate Revocation List (CRL) does not stop new keyboxes from being generated and shared.

Regular app developers do not get behind-the-scenes access to the RKP process, nor to which device credentials were used to authenticate the RKP’s CSR. For this reason, apps cannot detect abuse for these kinds of attacks from a purely local, on-device perspective, and relying on backend-based checks that monitor RKP Key Attestation keys’ abuse makes sense in these scenarios.

Detecting Key Attestation abuse on the backend

As these RKP vulnerabilities demonstrate, relying solely on local attestation checks is a losing battle. A locked bootloader does not guarantee an uncompromised device, and extracted provisioning credentials allow attackers to generate valid keyboxes from entirely different hardware. Because developers lack behind-the-scenes access to the RKP process, detecting abuse requires an active server-side monitoring strategy. 

To spot and mitigate Key Attestation abuse, consider implementing these backend telemetry and enforcement strategies:

  • Monitor for cross-device key reuse: Track whether identical Key Attestation keys appear across disparate devices. If the same key is used in sessions claiming to originate from, for example, both a Samsung and a Xiaomi device, it is a strong indicator of keybox sharing.
  • Analyze provisioning metadata: RKP keys rotate regularly, meaning a single key cannot serve as a permanent identifier. However, you can leverage the certs_issued metadata within Key Attestation’s provisioning information extension. An unusually high count of certificates issued to a source device over a 30-day window is a strong signal of automated abuse.
  • Correlate attestation with behavioral anomalies: Do not evaluate attestation in a vacuum. Combine key reuse telemetry with account activity and transaction patterns. For example, if a device's session suddenly switches from OEM A’s key material to OEM B’s, this tampering signal should immediately trigger rate limits, step-up authentication, or feature restrictions.
  • Deploy dynamic app attestation: Supplement Key Attestation with a robust mobile app attestation to detect abuse patterns in real-time. This enables dynamic backend policy enforcement, allowing you to revoke access or restrict sensitive operations without requiring an app update. 

Learn more about Guardsquare’s answer to mobile app attestation: Mobile API security: Prevent abuse and automated bot attacks

Sergio Castell - Security Researcher

Discover how Guardsquare provides industry-leading protection for mobile apps.

Request Pricing

Other posts you might be interested in