🔐Spoof locked bootloader | "Bypass" TEE check

Search This thread

the.art.m

Member
Jun 13, 2023
5
1
Hi. Has anyone researched Bet365 authenticator? It uses appdome and since new versions it started checking bootloader state. This app doesn't work, probably because it checks certificate issuer. Could someone help me with it?
 

westruk

Senior Member
Nov 17, 2022
98
28
Hi. Has anyone researched Bet365 authenticator? It uses appdome and since new versions it started checking bootloader state. This app doesn't work, probably because it checks certificate issuer. Could someone help me with it?
In previous appdome versions attestationspoofer works well?
 

chiteroman

Senior Member
Nov 4, 2019
514
556
22
Oviedo
Xiaomi Poco X3 Pro
Hi. Has anyone researched Bet365 authenticator? It uses appdome and since new versions it started checking bootloader state. This app doesn't work, probably because it checks certificate issuer. Could someone help me with it?
Yeah, it checks your bootloader status and detect injection like Xposed. Sorry but I can't help you more, if you want to use that app you must lock your bootloader :(
 

the.art.m

Member
Jun 13, 2023
5
1
Yeah, it checks your bootloader status and detect injection like Xposed. Sorry but I can't help you more, if you want to use that app you must lock your bootloader :(
I could bypass xposed detection but not bootloader... It checks that certificate issuer is Google and detects it as Strong play integrity does. That's sad
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    I found that only conscrypt.jar works but not framework.jar
    Yep, you must make your super.img partitions read-write and modify it from recovery. You can modify it unpacking the .img or using systemRW script from here link this:
    1692866764027.png


    In TWRP after reboot use:

    adb shell mount -w -v /system_root

    adb push modifiedFramework.jar /system_root/system/framework/framework.jar

    adb shell umount -v /system_root

    In some roms framework directory is an overlay so you must modify it from recovery, also check group and permission to be the same or system won't boot. Also zipalign to 4 bytes the framework.jar always.

    Now you can modify framework.jar and include hooks like mine (POCO X3 Pro MIUI 14.0.3 Indonesian stock rom):

    My source code of es.chiteroman.Hooks:

    You must implement Pine:

    And remember to move libpine.so to /system/lib64 (check your CPU arch)

    Now you can hook any class :)
    2
    Uber driver requires Strong integrity, you must install stock rom and lock bootloader to use it.
    This has (happily) proved to be incorrect.

    A user has been running Uber Driver on old Samsung Galaxy A5 (launched with Android 6.01) for some time and has now published newly devised method to make it run on Xiaomi Mi A3 (LV Android 9.0, Android One OS) here:
    A long trial and error procedure, I will attach the procedure below...

    Key elements were Zygisk on KernelSU running in Magisk, Alpha Magisk or KernelSU and use of Android Faker, xPrivacyLua, and App Manager modding utilities...

    Hope it helps Uber Driver modders! 😋 PW
    1

    chiteroman

    Just want to say thank you for your opensource code(y), now I managed to write my own frida script based on your lsposed code to spoof the bootloader locally on my pixel 3a with stock rom. But there is a slightly difference between the momo app and keyattestation app, in keyattestation app, it seems the class of the certificates[] return from 'KeyStore.getCertificateChain' is NOT 'com.android.org.conscrypt.OpenSSLX509Certificate' but 'com.google.android.gms.org.conscrypt.OpenSSLX509Certificate' which seems it is from google play service, and I need to cast the certificate instance to 'com.google.android.gms.org.conscrypt.OpenSSLX509Certificate' so I can hook the
    'getExtensionValue' method.

    Besides, I tried to build the stock rom, and using overlay to mount the modified conscrypt.jar and framework.jar before starting zygote, I found that only conscrypt.jar works but not framework.jar, and it only works for momo app. So right now I have no idea to find a way to hook the getExtensionValue method for 'com.google.android.gms.org.conscrypt' in my AOSP, any ideas?
    1
    As I said, this generally means OEM messed up... And I've never heard of post production fixes for this...

    I believe even China hardware/firmware should support AVB/key attestation correctly even when Google APIs are not used...

    So you could complain/enquire of Xiaomi but doubtful if they can/will help...

    Or continue using rooted with root fixes supporting broken keymaster, but when/if banks start enforcing strongIntegrity you would be able to restore that by locking...

    There is a slim chance you've messed up /persist as Poco users (notably) experienced, but Symptoms look different to me... You have L1 and other stuff working it seems... Please say if you have issues with SIM, BT, WiFi, seeing IMEI and S/N etc (normally /persist corruption signs, even if stock/locked)...

    🙃 PW
    As I said even I locked bootloader still tee broken and can't restore strongintegrity so I will continue using device with root and ignore this bank app cause everything is working good no issues faced.
  • 10

    Modify the root of trust in local attestations.



    This module modify the byte array obtained from certificate extensions (link) to spoof a fake root of trust, so we get a fake attestation with a locked bootloader.

    238394157-b597a1f7-f71e-4b1d-a70a-2d13bf5a80b7.jpg238394225-181e37cc-bdca-4d1c-b0f4-633095a0f9ed.jpg


    More info about certificate extensions:


    NOTES:
    - This module doesn't work with devices which TEE is broken, like OnePlus.
    - You won't pass MEETS_STRONG_INTEGRITY using this.


    Source code and download:


    Apps detecting a locked bootloader:

    - Key Attestation Demo (WORKING)
    - CIB Egypt Mobile Banking (WORKING)
    - Bet365 Authenticator (NOT WORKING)
    4
    Screenshot_2023-06-16-22-46-33-351_io.github.vvb2060.keyattestation.jpgScreenshot_2023-06-16-22-46-58-311_io.github.vvb2060.magisk.jpg

    Finally Pine Injector works, now we can hook like LSPosed but without using it.

    I will try to bypass that app protection.
    3
    Not exactly what I was hoping for but thanks for your answer nonetheless
    I tried it before but with Magisk magic and it worked! But I will need to study how to implement this in better way. I just throw an exception in engineGetCertificateChain, Momo don't detect it due it's not injection.
    It's a first step 🙃
    3
    I found that only conscrypt.jar works but not framework.jar
    Yep, you must make your super.img partitions read-write and modify it from recovery. You can modify it unpacking the .img or using systemRW script from here link this:
    1692866764027.png


    In TWRP after reboot use:

    adb shell mount -w -v /system_root

    adb push modifiedFramework.jar /system_root/system/framework/framework.jar

    adb shell umount -v /system_root

    In some roms framework directory is an overlay so you must modify it from recovery, also check group and permission to be the same or system won't boot. Also zipalign to 4 bytes the framework.jar always.

    Now you can modify framework.jar and include hooks like mine (POCO X3 Pro MIUI 14.0.3 Indonesian stock rom):

    My source code of es.chiteroman.Hooks:

    You must implement Pine:

    And remember to move libpine.so to /system/lib64 (check your CPU arch)

    Now you can hook any class :)