Not To Be Trusted - A Fiasco in Android TEEs
Trusted Execution Environments (TEEs) based on ARM TrustZone form the backbone
of modern Android devices' security architecture. The word "Trusted" in
this context means that **you**, as in "the owner of the device", don't
get to execute code in this execution environment. Even when you unlock
the bootloader and Magisk-root your device, only vendor-signed code will
be accepted by the TEE. This unfortunate setup limits third-party
security research to the observation of input/output behavior and static
manual reverse engineering of TEE components.
In this talk, we take you with us on our journey to regain power over
the highest privilege level on Xiaomi devices. Specifically, we are
targeting the Xiaomi Redmi 11s and will walk through the steps necessary
to escalate our privileges from a rooted user space (N-EL0) to the
highest privilege level in the Secure World (S-EL3). We will revisit old
friends like Trusted Application rollback attacks and GlobalPlatform's
design flaw, and introduce novel findings like the literal fiasco you
can achieve when you're introducing micro kernels without knowing what
you're doing. In detail, we will elaborate on the precise exploitation
steps taken and mitigations overcome at each stage of our exploit chain,
and finally demo our exploits on stage.
Regaining full control over our devices is the first step to deeply
understand popular TEE-protected use cases including, but not limited
to, mobile payment, mobile DRM solutions, and the mechanisms protecting your biometric
authentication data.