Abstract
To provide a tamper-proof mechanism for mobile apps to check the integrity of the device and their own code/data, Android phone manufacturers have introduced Manufacturer-provided Android Remote Attestation (MARA) frameworks. The MARA framework helps an app conduct a series of integrity checks, signs the check results, and sends them to remote servers for a remote attestation. Nonetheless, we observe that real-world MARA frameworks often adopt two implementations of integrity check (hardware-based and software-based) for compatibility consideration, and this allows an attacker to easily conduct a downgrade attack to force the app to utilize the software-based integrity check and forge checking results, even if the Android device is able to employ hardware-supported remote attestation securely. We demonstrate our MARA bypass approach against MARA frameworks (i.e., Google SafetyNet and Huawei SafetyDetect) on real Android devices, and design an automated measurement pipeline to analyze 35,245 popular Android apps, successfully attacking all 104 apps that use these MARA services, including well-known apps and games such as TikTok Lite, Huawei Wallet, and Pokémon GO. Our study reveals the significant risks against MARA frameworks in use.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
National Computer Network Emergency Response Technical Team/Coordination Center of China, the national CERT of China and responsible for handling severe cyber-security incidents [35].
- 2.
OnePlus5T Hydrogen_43_OTA_065_all_2012030405_03dba2c095454647.
References
Tian, Y., Chen, E., Ma, X., et al.: Swords and shields: a study of mobile game hacks and existing defenses. In: Proceedings of the 32nd Annual Conference on Computer Security Applications, pp. 386–397 (2016)
Karkallis, P., Blasco, J., Suarez-Tangil, G., Pastrana, S.: Detecting video-game injectors exchanged in game cheating communities. In: Bertino, E., Shulman, H., Waidner, M. (eds.) ESORICS 2021. LNCS, vol. 12972, pp. 305–324. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-88418-5_15
Nguyen-Vu, L., Chau, N.T., Kang, S., et al.: Android rooting: an arms race between evasion and detection. Secur. Commun. Netw. 2017 (2017)
Chen, S., Fan, L., Meng, G., et al.: An empirical assessment of security risks of global android banking apps. In: Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering, pp. 1310–1322 (2020)
Sun, S., Yu, L., Zhang, X., et al.: Understanding and detecting mobile ad fraud through the lens of invalid traffic. In: Proceedings of the 2021 ACM SIGSAC Conference on Computer and Communications Security, pp. 287–303 (2021)
Li, L., Bissyandé, T.F., Klein, J.: Rebooting research on detecting repackaged android apps: Literature review and benchmark. IEEE Trans. Software Eng. 47(4), 676–693 (2019)
Song, W., Ming, J., Jiang, L., et al.: App’s auto-login function security testing via android OS-level virtualization. In: 2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE), pp. 1683–1694. IEEE (2021)
Xue, L., Zhou, H., Luo, X., et al.: Happer: unpacking Android apps via a hardware-assisted approach. In: 2021 IEEE Symposium on Security and Privacy (SP), pp. 1641–1658. IEEE (2021)
Pokémon GO. https://play.google.com/store/apps/details?id=com.nianticlabs.Pokemongo &hl=en_US. Accessed 14 May 2023
Pokémon Go hits \$6 billion in player spending. https://play.google.com/store/apps/details?id=com.nianticlabs.Pokemongo &hl=en_US. Accessed 14 May 2023
Pokémon Go Revenue and Usage Statistics (2023). https://www.businessofapps.com/data/pokemon-go-statistics/. Accessed 14 May 2023
Android - Google Mobile Services. https://www.android.com/gms/. Accessed 14 May 2023
Fake GPS Location Spoofer. https://play.google.com/store/apps/details?id=com.incorporateapps.fakegps.fre. Accessed 14 May 2023
HMS Core. https://developer.huawei.com/consumer/en/hms/. Accessed 14 May 2023
Mobile Application Distribution Agreement (Android). https://www.sec.gov/Archives/edgar/containers/fix380/1495569/000119312510271362/dex1012.htm. Accessed 14 May 2023
HMS Core (APK) Preloading Guide: Ecosystem Cooperation. https://developer.huawei.com/consumer/en/doc/development/hmscore-common-Guides/overview-0000001222509146. Accessed 14 May 2023
Google Play Store. https://apkpure.com/google-play-store/com.android.vending. Accessed 14 May 2023
YouTube. https://play.google.com/store/apps/details?id=com.google.android.youtube. Accessed 14 May 2023
HUAWEI Wallet. https://consumer.huawei.com/en/mobileservices/wallet/. Accessed 14 May 2023
HUAWEI Health. https://consumer.huawei.com/en/mobileservices/health/. Accessed 14 May 2023
HMS Core 5.0 launched for the global developers. https://www.huaweicentral.com/hms-core-5-0-launched-for-the-global-developers-comes-with-7-new-kits-and-services/. Accessed 14 May 2023
Google I/O 2023: What’s new in Google Play. https://io.google/2023/program/9019266d-186c-4a61-9cc5-b1c665eb40fb/. Accessed 21 May 2023
Verifying hardware-backed key pairs with Key Attestation. https://developer.android.com/training/articles/security-key-attestation. Accessed 14 May 2023
Protect against security threats with SafetyNet. https://developer.android.com/training/safetynet. Accessed 14 May 2023
Safety Detect. https://developer.huawei.com/consumer/en/hms/huawei-safetydetectkit/. Accessed 14 May 2023
Mulliner, C., Kozyrakis, J.: Inside Android’s SafetyNet Attestation. Black Hat EU (2017)
Thomas, R.: DroidGuard: a deep dive into SafetyNet. Black Hat Asia (2022)
Examining the value of SafetyNet Attestation as an Application Integrity Security Control. https://census-labs.com/news/2017/11/17/examining-the-value-of-safetynet-attestation-as-an-application-integrity-security-control/. Accessed 14 May 2023
How I discovered an easter egg in Android’s security and didn’t land a job at Google. https://habr.com/en/articles/446790/. Accessed 14 May 2023
RFC 9334: Remote ATtestation procedureS (RATS) Architecture. https://datatracker.ietf.org/doc/rfc9334/. Accessed 14 May 2023
Coker, G., Guttman, J., Loscocco, P., et al.: Principles of remote attestation. Int. J. Inf. Secur. 10, 63–81 (2011)
Ibrahim, M., Imran, A., Bianchi, A.: SafetyNOT: on the usage of the SafetyNet attestation API in Android. In: Proceedings of the 19th Annual International Conference on Mobile Systems, Applications, and Services, pp. 150–162 (2021)
Aldoseri, A., Chothia, T., Moreira-Sanchez, J., et al.: Symbolic modelling of remote attestation protocols for device and app integrity on android. In: 18th ACM ASIA Conference on Computer and Communications Security. Association for Computing Machinery (ACM) (2023)
Duan, Y., Zhang, M., Bhaskar, A.V., et al.: Things you may not know about android (un) packers: a systematic study based on whole-system emulation. In: NDSS (2018)
CNCERT/CC: National Computer Network Emergency Response Technical Team/Coordination Center of China. https://www.cert.org.cn/publish/english/index.html. Accessed 14 May 2023
Google Bug Hunters. https://bughunters.google.com/. Accessed 14 May 2023
A Very Powerful Clipboard: Analysis of a Samsung in-the-wild exploit chain. https://googleprojectzero.blogspot.com/2022/11/a-very-powerful-clipboard-samsung-in-the-wild-exploit-chain.html. Accessed 15 May 2023
Upcoming Change: New certificate chain in the API response signature. https://groups.google.com/g/safetynet-api-clients/c/-2ShuYt5kFg. Accessed 17 May 2023
SysIntegrity API. https://developer.huawei.com/consumer/en/doc/development/Security-Guides/dysintegritydevelopment-0000001050156331. Accessed 15 May 2023
CA-certificates. https://android.googlesource.com/platform/system/ca-certificates/. Accessed 15 May 2023
Pin certificates. https://developer.android.com/training/articles/security-config#CertificatePinning. Accessed 15 May 2023
Frida. https://frida.re/. Accessed 15 May 2023
ShakaApktool. https://github.com/rover12421/ShakaApktool. Accessed 15 May 2023
Apktool: A tool for reverse engineering Android APK files. https://ibotpeaches.github.io/Apktool/. Accessed 15 May 2023
Grep. https://www.gnu.org/software/grep/manual/grep.html. Accessed 15 May 2023
Smali. https://github.com/JesusFreke/smali/wiki. Accessed 15 May 2023
Soot. http://soot-oss.github.io/soot/. Accessed 15 May 2023
Application Signing. https://source.android.com/docs/security/features/apksigning. Accessed 15 May 2023
XDA Portal & Forums. https://www.xda-developers.com/. Accessed 15 May 2023
Universal SafetyNet Fix. https://github.com/kdrag0n/safetynet-fix. Accessed 15 May 2023
Shamiko v0.7.2. https://github.com/LSPosed/LSPosed.github.io/releases. Accessed 15 May 2023
Magisk. https://github.com/topjohnwu/Magisk/releases. Accessed 27 May 2023
CVE-2020-0069. https://nvd.nist.gov/vuln/detail/CVE-2020-0069. Accessed 27 May 2023
APKPure: Download APK on Android with Free Online APK Downloader. https://apkpure.com/. Accessed 27 May 2023
360 Mobile Assistant. http://m.app.so.com/. Accessed 27 May 2023
ProGuard: Java Obfuscator and Android App Optimizer. https://www.guardsquare.com/proguard. Accessed 27 May 2023
UI/Application Exerciser Monkey. https://developer.android.com/studio/test/other-testing-tools/monkey. Accessed 27 May 2023
XAPK file. https://apkpure.com/xapk.html. Accessed 27 May 2023
FGL Pro. https://play.google.com/store/apps/details?id=com.ltp.pro.fakelocation &hl=en_US &gl=US. Accessed 27 May 2023
Fake GPS Location-GPS JoyStick. https://play.google.com/store/apps/details?id=com.theappninjas.fakegpsjoystick &hl=en. Accessed 27 May 2023
Cha Cha Helper. https://www.xxzhushou.cn/?channelid=352666. Accessed 27 May 2023
Moloc. https://www.coolapk.com/apk/top.xuante.moloc. Accessed 27 May 2023
Fake GPS Location Spoofer. https://play.google.com/store/apps/details?id=com.incorporateapps.fakegps.fre. Accessed 27 May 2023
Huawei has the highest number of active smartphone users globally: how is this possible? https://www.gizchina.com/2022/08/27/huawei-has-the-highest-number-of-smartphone-users-globally-how-is-this-possible/. Accessed 27 May 2023
One of China’s most popular apps has the ability to spy on its users. https://edition.cnn.com/2023/04/02/tech/china-pinduoduo-malware-cybersecurity-analysis-intl-hnk/index.html. Accessed 27 May 2023
Protocol Buffers. https://protobuf.dev/. Accessed 30 May 2023
Acknowledgments
The authors would like to thank the anonymous reviewers for their valuable feedback to improve the manuscript. This work is partially supported by Shanghai Pujiang Program (No. 22PJ1405700), the National Key Research and Development Program of China (No. 2021YFB3101402) and the Project of Shanghai Science and Technology Innovation Action Program under Grant (No. 22511101300). The authors would like to thank the support from the ZhiXun Crypto Testing Group as well. We also express our sincere appreciation to Professor Douglas Leith from Trinity College Dublin for his patient and detailed responses to our emails. He addressed our confusion regarding his previous research works and generously shared his experimental details with us. Furthermore, we are grateful to Professor Lei Xue from Sun Yat-sen University for his extensive expertise and patient assistance in resolving the technical difficulties we encountered during the experiments. Their contributions have been instrumental in the successful implementation of this study.
Author information
Authors and Affiliations
Corresponding authors
Editor information
Editors and Affiliations
Appendices
Appendix A Integrity Checking Items
1.1 A.1 Device Integrity Checking Items

1.2 A.2 App Integrity Checking Items

Appendix B Bypassing app integrity check
Appendix C Device details
Rights and permissions
Copyright information
© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Zhou, Z., Xiao, X., Hou, T., Hu, Y., Gu, D. (2024). On the (In)Security of Manufacturer-Provided Remote Attestation Frameworks in Android. In: Tsudik, G., Conti, M., Liang, K., Smaragdakis, G. (eds) Computer Security – ESORICS 2023. ESORICS 2023. Lecture Notes in Computer Science, vol 14347. Springer, Cham. https://doi.org/10.1007/978-3-031-51482-1_13
Download citation
DOI: https://doi.org/10.1007/978-3-031-51482-1_13
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-51481-4
Online ISBN: 978-3-031-51482-1
eBook Packages: Computer ScienceComputer Science (R0)