Play Integrity Attestation Bypass (SafetyNet Replacement)
Tip
Aprende y practica Hacking en AWS:
HackTricks Training AWS Red Team Expert (ARTE)
Aprende y practica Hacking en GCP:HackTricks Training GCP Red Team Expert (GRTE)
Aprende y practica Hacking en Azure:
HackTricks Training Azure Red Team Expert (AzRTE)
Apoya a HackTricks
- Revisa los planes de suscripción!
- Únete al 💬 grupo de Discord o al grupo de telegram o síguenos en Twitter 🐦 @hacktricks_live.
- Comparte trucos de hacking enviando PRs a los HackTricks y HackTricks Cloud repositorios de github.
Qué hace Play Integrity
Play Integrity es el sucesor de SafetyNet de Google para la atestación de aplicaciones. La app llama a la API, Google Play Services recopila señales de software/hardware, las envía cifradas a googleapis.com, y Google devuelve un JWT que está firmado y cifrado por Google. La app reenvía el token a su backend, que valida la firma con la clave pública de Google, descifra la carga útil y aplica la política basada en los campos de veredicto:
appIntegrity: coincidencia de compilación/firma del APK (sin repack/alteración).deviceIntegrity: dispositivo genuino y certificado, bootloader bloqueado, sin root/alteración del sistema.accountDetails: instalación vía Google Play.
Indicadores clave de veredicto comúnmente aplicados:
MEETS_BASIC_INTEGRITY: token generado por Play Services genuino (no emulador/transporte manipulado).MEETS_DEVICE_INTEGRITY: dispositivo genuino/certificado, bootloader bloqueado, sin root/alteración del sistema.MEETS_STRONG_INTEGRITY: requiereDEVICEmás parches de seguridad recientes en todas las particiones (OS + vendor).
Bypass Model
En lugar de forjar el JWT de Google, suplantar (spoof) las señales que Google evalúa para que correspondan a un perfil de dispositivo legítimo diferente. La cadena de ataque:
- Ocultar root para que las comprobaciones locales y las sondas de Play Services no vean Magisk/su.
- Reemplazar la key attestation certificate chain (
keybox.xml) con una de un dispositivo genuino para que Play Integrity detecte un dispositivo certificado/bloqueado. - Suplantar el security patch level para satisfacer
MEETS_STRONG_INTEGRITY.
Google mitiga revocando keyboxes abusados; se requiere rotación cuando un keybox queda bloqueado.
Prerrequisitos y herramientas
- Root hiding: ReZygisk (o ZygiskNext). Disable Zygisk, enable Magisk Hide, install module, reboot.
- Key attestation spoofing: TrickyStore + Tricky Addon (Magisk modules).
- UI helper: KSU Web UI para manejar TrickyStore.
- Validation: Play Integrity API Checker y Key Attestation APKs.
- Opcional sobre material de clave de attestation: https://tryigit.dev/android-keybox-attestation-analysis
Conseguir MEETS_BASIC_INTEGRITY + MEETS_DEVICE_INTEGRITY
- Instalar módulos y reiniciar: Flashea TrickyStore y Tricky Addon en Magisk, reinicia.
- Configurar TrickyStore (vía KSU Web UI): Selecciona
TrickyStore→Select All→Deselect Unnecessary→ Save. - Inyectar un keybox válido: En
Keybox, elige Valid para descargar/aplicar un nuevokeybox.xml(credenciales de attestation del vendor). Este archivo sustenta la key attestation de hardware y ahora está suplantado desde un dispositivo certificado/bloqueado. - Verificar: Ejecuta Play Integrity API Checker →
MEETS_BASIC_INTEGRITYyMEETS_DEVICE_INTEGRITYdeberían pasar. En Key Attestation el bootloader aparece locked porque la cadena de attestation fue reemplazada.
Conseguir MEETS_STRONG_INTEGRITY (Patch-Level Spoof)
STRONG falla si los niveles de parche están desactualizados. TrickyStore puede falsificar una fecha moderna de security patch para todas las particiones:
- En TrickyStore, elige Set Security Patch → Get Security Patch Date → Save.
- Vuelve a ejecutar Play Integrity API Checker;
MEETS_STRONG_INTEGRITYdebería pasar ahora.
Notas operativas
- Riesgo de revocación: Usar repetidamente la misma
keybox.xmlcontra la API puede marcarla y bloquearla. Si es bloqueada, reemplázala por un keybox válido y fresco. - Carrera armamentística: Los keyboxes compartidos públicamente se agotan rápido; mantén copias privadas y sigue las actualizaciones de módulos en la comunidad (XDA/Telegram/GitHub) para nuevas cadenas funcionales.
- Alcance: Este bypass solo suplantaría las entradas de attestation; la verificación de firma en el backend por Google sigue teniendo éxito porque el JWT en sí es genuino.
Referencias
- Play Integrity API: How It Works & How to Bypass It
- ReZygisk
- TrickyStore
- Tricky Addon
- KSU Web UI
- Play Integrity API Checker
- Key Attestation
- Android keybox attestation analysis
Tip
Aprende y practica Hacking en AWS:
HackTricks Training AWS Red Team Expert (ARTE)
Aprende y practica Hacking en GCP:HackTricks Training GCP Red Team Expert (GRTE)
Aprende y practica Hacking en Azure:
HackTricks Training Azure Red Team Expert (AzRTE)
Apoya a HackTricks
- Revisa los planes de suscripción!
- Únete al 💬 grupo de Discord o al grupo de telegram o síguenos en Twitter 🐦 @hacktricks_live.
- Comparte trucos de hacking enviando PRs a los HackTricks y HackTricks Cloud repositorios de github.


