MAGISK MODULE ❯ Universal SafetyNet Fix 2.4.0

Search This thread

bombadier

Senior Member
Jul 3, 2010
3,641
3,562
The Burgh
LG G Watch R
Samsung Galaxy Tab S2
Am looking for some help trying to work out what method my banking app is using to detect root, up until I updated the app yesterday everything was working great with this banking app, Play integrity API Checker reports a tick for Device and basic integrity but a cross for Strong which if I understand right is to be expected, I have a Pixel 4a running Android 13.
I have the Magisk app hidden, am using Shamiko to hide, had to use props config to spoof an andoid 10 fingerprint to get Basic integrity and the banking app is in the deny list, everything has been set up correctly and Google Wallet and Netflix are still working, the bank app was working until the update, as of version 104.03 it detects root.
Now the MOMO checker says my environment is abnormal, found executable file "su", found files modified by Magisk Module and it found Magisk, also debugging is enabled and an unlocked bootloader, I am struggling to find much about MOMO or how to deal with what its reporting, ie how to hide Magisk better from MOMO.
I know its not really relevant for this thread as I am passing safetynet but I know there are plenty knowledgeable sorts that frequent this thread that know a lot more on the subject as I, anybody got any ideas for me to try ?
Thanks in advance,
 

73sydney

Senior Member
Am looking for some help trying to work out what method my banking app is using to detect root, up until I updated the app yesterday everything was working great with this banking app, Play integrity API Checker reports a tick for Device and basic integrity but a cross for Strong which if I understand right is to be expected, I have a Pixel 4a running Android 13.
I have the Magisk app hidden, am using Shamiko to hide, had to use props config to spoof an andoid 10 fingerprint to get Basic integrity and the banking app is in the deny list, everything has been set up correctly and Google Wallet and Netflix are still working, the bank app was working until the update, as of version 104.03 it detects root.
Now the MOMO checker says my environment is abnormal, found executable file "su", found files modified by Magisk Module and it found Magisk, also debugging is enabled and an unlocked bootloader, I am struggling to find much about MOMO or how to deal with what its reporting, ie how to hide Magisk better from MOMO.
I know its not really relevant for this thread as I am passing safetynet but I know there are plenty knowledgeable sorts that frequent this thread that know a lot more on the subject as I, anybody got any ideas for me to try ?
Thanks in advance,

Step 1: Disable MagiskHide Props Config

Step 2: Install Universal SafetyNet Fix (mod 2):


Step 3: Reboot

Step 4: Test

And also check with this (over Momo):

 
  • Like
Reactions: bombadier

bombadier

Senior Member
Jul 3, 2010
3,641
3,562
The Burgh
LG G Watch R
Samsung Galaxy Tab S2
Step 1: Disable MagiskHide Props Config

Step 2: Install Universal SafetyNet Fix (mod 2):


Step 3: Reboot

Step 4: Test

And also check with this (over Momo):

Thanks for the suggestions, have done as you said, Ruru is still detecting magisk and su and the banking app is also still detecting I am rooted, this was a fresh install of the banking app and adding it to the deny list before running for the first time, any ideas how I can better hide magisk and su ? got a feeling the banking app is checking for an unlocked bootloader, with the modded safetynet fix, wallet and netflix is still working, still failing Strong integrity but the fingerprint now matches the release keys, both are android 13 as when I rebooted there was a system update, something play related which I assume is to do with the fingerprint
 

73sydney

Senior Member
Thanks for the suggestions, have done as you said, Ruru is still detecting magisk and su and the banking app is also still detecting I am rooted, this was a fresh install of the banking app and adding it to the deny list before running for the first time, any ideas how I can better hide magisk and su ? got a feeling the banking app is checking for an unlocked bootloader, with the modded safetynet fix, wallet and netflix is still working, still failing Strong integrity but the fingerprint now matches the release keys, both are android 13 as when I rebooted there was a system update, something play related which I assume is to do with the fingerprint

My Ruru detects Su, Busybox, Magisk, and have developer options enabled and unlocked bootloader but my banking apps still work fine...so its not impossible for most banking apps

Have you:

Force closed and cleared data for your bankign app at any point during this?...worth a try

Ever used TWRP on that device?

Which banking app, so i can test?

p.s. as for the update yes, when you change your fingerprint you can find yourself missing updates....and you definitely want to stay on your proper fingerprint where possible to get things like monthly security patches...
 
  • Like
Reactions: bombadier

zgfg

Senior Member
Oct 10, 2016
8,531
6,264
Xiaomi Mi 11 Lite 5G
My Ruru detects Su, Busybox, Magisk, and have developer options enabled and unlocked bootloader but my banking apps still work fine...so its not impossible for most banking apps

Have you:

Force closed and cleared data for your bankign app at any point during this?...worth a try

Ever used TWRP on that device?

Which banking app, so i can test?

p.s. as for the update yes, when you change your fingerprint you can find yourself missing updates....and you definitely want to stay on your proper fingerprint where possible to get things like monthly security patches...
Using Denylist and HMA, and Ruru does not detect anything
 

bombadier

Senior Member
Jul 3, 2010
3,641
3,562
The Burgh
LG G Watch R
Samsung Galaxy Tab S2
My Ruru detects Su, Busybox, Magisk, and have developer options enabled and unlocked bootloader but my banking apps still work fine...so its not impossible for most banking apps

Have you:

Force closed and cleared data for your bankign app at any point during this?...worth a try

Ever used TWRP on that device?

Which banking app, so i can test?

p.s. as for the update yes, when you change your fingerprint you can find yourself missing updates....and you definitely want to stay on your proper fingerprint where possible to get things like monthly security patches...
Only thing is the Halifax Banking app needs an account as it lets you put the username and password in before it fails, have tried using the Adaway DNS logging and there is no unusual outgoing requests( I know the lloyds banking app seems to need some things blocked to work)
Never used TWRP and I know to check for things like that, tried disabling usb debugging but no difference,
I had uninstalled the banking app so no local data, installed it fresh after rebooting my phone and added it to the deny list before opening, this latest update mentions in the changelog something about security updates, as I said google wallet and Netflix are both still working so its something with the app,
yeah me changing the fingerprint was only meant to be a short term thing, at least the fingerprint is fixed cheers
 
  • Like
Reactions: 73sydney

73sydney

Senior Member
Only thing is the Halifax Banking app needs an account as it lets you put the username and password in before it fails, have tried using the Adaway DNS logging and there is no unusual outgoing requests( I know the lloyds banking app seems to need some things blocked to work)
Never used TWRP and I know to check for things like that, tried disabling usb debugging but no difference,
I had uninstalled the banking app so no local data, installed it fresh after rebooting my phone and added it to the deny list before opening, this latest update mentions in the changelog something about security updates, as I said google wallet and Netflix are both still working so its something with the app,
yeah me changing the fingerprint was only meant to be a short term thing, at least the fingerprint is fixed cheers

Needing a username and password before failing is new, and makes it impossible to test here :(
 

bombadier

Senior Member
Jul 3, 2010
3,641
3,562
The Burgh
LG G Watch R
Samsung Galaxy Tab S2
worth a crack, otherwise you might want to give Magisk Delta a go

@zgfg will guide you if needed, smugly :)
Magisk delta might be the way to go. HMA has too many moving parts if you know what I mean, other as Magisk Delta's page any other good resources to check out ? I struggle with Telegram, seems to be too much nonsense floating about
 

73sydney

Senior Member
Magisk delta might be the way to go. HMA has too many moving parts if you know what I mean, other as Magisk Delta's page any other good resources to check out ? I struggle with Telegram, seems to be too much nonsense floating about

HMA is easier to setup than it used to be (you used ot have to rtemember to hit a Save icon on each step, which of course most people failed all the time)

If you change to Delta, remember to disable Shamiko, if youre going to enable Zygisk mode in Delta, you can use the same USNF module or you can use HuskyDG's own Riru/Zygisk version here that covers both options:

 

varunpilankar

Senior Member
Jul 8, 2012
252
66
Sony Xperia SP
Moto X
You may be missing the point of this module.

It's simply to allow you to pass PI deviceIntegrity when you don't!... If you already pass, updating won't help you further (except that it does help OnePlus and some other device users with other issues however, but I believe only if running A12+ w/ official USNF which combination can break fingerprint scanners etc; the @Displax mod builds some updated fixes for these devices/issues connected with spoofing props), and in your case running A10, it may not be needed at all as many devices pass PI deviceIntegrity w/ A10 or less and official USNF...

To put it simply, if you weren't passing deviceIntegrity before installing, then the @Displax USNF mod/fork is doing its job perfectly... There are simply other detected traces of root or apps, folders or other signals associated with custom modding that are being detected by your app and need addressing...

The basics are:
- Zygisk = Yes on Magisk home screen.
- (Bank/other) app in denylist. (Enforce DenyList enabled.)
- PI deviceIntegrity passing.
- Full Magisk App replaced with hidden stub App

Next things to try:
- Shamiko module. (Enforce DenyList disabled.)
- LSPosed module and configure Hide My Applist Xposed module properly.
- Check for and remove/rename folders associated with TWRP etc.
- Run detection apps like Momo to determine what else may be detected on your device...

Nb. Clear app's data after any detection/failure and before any new test...

Hope it helps. 🙂 PW

Thank you for your brief explanation and support. Really appreciate it.

Most of the points were covered already by me. Finally I tried lsposed - hide my applist with its proper configuration.

Finally it's worked!

I have tested it this weekend with 5+ payments using Paytm Tap to pay.

Just to keep a notes of while using lsposed hide my applist. It started breaking my app license for couple of apps like Tasker, Kustom apps, etc which mainly has root access and were added into the list. I fixed that issue by removing them from the list (fingers crossed, for not breaking them again) while keeping take tap to pay working.
 

Arealhooman

Senior Member
Thank you for your brief explanation and support. Really appreciate it.

Most of the points were covered already by me. Finally I tried lsposed - hide my applist with its proper configuration.

Finally it's worked!

I have tested it this weekend with 5+ payments using Paytm Tap to pay.

Just to keep a notes of while using lsposed hide my applist. It started breaking my app license for couple of apps like Tasker, Kustom apps, etc which mainly has root access and were added into the list. I fixed that issue by removing them from the list (fingers crossed, for not breaking them again) while keeping take tap to pay working.
I tried hide my app list on android 13 and I almost got a boot loo (triggered boot loop protection)
 

pndwal

Senior Member
I tried hide my app list on android 13 and I almost got a boot loo (triggered boot loop protection)
Not sure why you're posting this here; there's an HMA thread on XDA now. (Nb. It's a lot of fun too, if you like cats, smartwatches and other unrelated stuff! 😝)... But since it may benefit users here:

For A13 you need HMA 3.x... Some of us have been using 3.x beta... The first stable build, 3.0.6, arrived just 9 hrs ago:
https://github.com/Dr-TSNG/Hide-My-Applist/releases

... If you are using 3.x already, you may not have read release notes... It does pay to... Note this:
3. No longer need the Magisk module, make sure to uninstall it, or you will bootloop

Hope this does it... 😃 PW
 
Last edited:

73sydney

Senior Member
Not sure why you're posting this here; there's an HMA thread on XDA now. (Nb. It's a lot of fun too, if you like cats, smartwatches and other unrelated stuff! 😝)... But since it may benefit users here:

While i thank you for upselling my HMA thread, the bear is upset that you didnt mention him.....unlike me he's a known attention seeker....

It will be a miracle if he doesnt insist i post that pic of him over on the thread before the night is out....

And this is ALL your fault...
 
Last edited:

locolyric

Senior Member
Any one have idea how to make this ewallet run ? I try all hide my app and magisk delta. And It won't work.
 

Attachments

  • Screenshot_20221216-021241_Magisk_Delta.png
    Screenshot_20221216-021241_Magisk_Delta.png
    200.4 KB · Views: 50

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    For those using Canary builds

    Please be aware that in 25207+ major refactoring (of selinux rule patching) has broken many modules etc... This is likely the cause of issues with hiding using recent builds as Shamiko is affected... Please see discussion in Magisk Discussion thread...

    You could revert to 25206 or wait for fixes hopefully in 25211... 👀 PW
    3
    I have a strange behavior. After rebooting the phone I have everything pass in YASNAC. But after opening the bank application YASNAC shows that CTS profile fail. Cannot find in this thread anything related to this problem. Any ideas?

    crDroid9 13Android
    OnePlus 6t
    Magisk hided and seftynet installed
    This module has issues with builds that offer a fix for new Play Integrity deviceIntegrity...

    As mentioned above, you need to pass that now as SafetyNet is depreciated, but you will need to be passing old ctsProfileMatch in order to pass deviceIntegrity...

    @Displax posted links to his working (forked/fixed) builds in a new thread a couple of pages back here:
    https://forum.xda-developers.com/t/magisk-module-universal-safetynet-fix-2-4-0.4217823/post-88149057

    We're hoping that official USNF may get needed attention soon, but it appears @kdrag0n is busy with other matters...

    🙂 PW
    3
    I was on 2.3.1_MOD_3.0 on Android 12 and now 2.4.0_MOD_1.2 on Android 13 and all was now well in both setups.
    3
    I'm on a similar setup although just "2.4.0", I need to look around for "2.4.0_MOD_1.2" in particular to try that out.
    3
    would you be able to share the new displax 2.4.0 1.2 for me I am unable to find it easily. I would appreciate that
  • 312
    Universal SafetyNet Fix
    Magisk module​

    Magisk module to work around Google's SafetyNet attestation.

    This module works around hardware attestation and recent updates to SafetyNet CTS profile checks. You must already be able to pass basic CTS profile attestation, which requires a valid combination of device and model names, build fingerprints, and security patch levels.

    If you still have trouble passing SafetyNet with this module, use MagiskHide Props Config to spoof a certified device profile. This is a common issue on old devices, custom ROMs, and stock ROMs without GMS certification (e.g. Chinese ROMs).

    Android versions up to 13 Beta 3 are supported, including OEM skins such as Samsung One UI and MIUI.

    How does it work?
    The way this workaround works is relatively low-level. An in-depth explanation, as well as source code and ROM changes, can be found on GitHub.

    Ideally, this workaround should be incorporated in custom ROMs instead of injecting code with a Magisk module. See the ProtonAOSP website for more information.

    Downloads
    Downloads and changelogs can be found on GitHub. The topmost release is the latest.

    Latest release
    v2.4.0

    Highlights
    • Play Integrity bypass without breaking device checks or causing other issues
    • Disabled use of hardware attestation on Pixel 7 and newer (@anirudhgupta109)
    Other changes
    • Updated instructions for newer Android and Magisk versions
    • Better debugging for future development
    This version only supports Zygisk (Magisk 24 and newer).

    It's taken a while to find a way to bypass Play Integrity that doesn't require spoofing the build fingerprint permanently, but I wanted to make sure this module doesn't cause any unnecessary breakage. Just like the original goal of Universal SafetyNet Fix, this minimizes adverse effects by spoofing dynamically at runtime only when necessary. Enjoy!

    If you found this helpful, please consider supporting development with a recurring donation for rewards such as early access to updates, exclusive behind-the-scenes development news, and priority support.
    Alternatively, you can also buy me a coffee. All support is appreciated ❤️

    Source code
    213
    So, here is my modification of USNF with Play Integrity API bypass.

    It changes fingerprint to old 7.1.2 6.0 (LOL) and apply it only for GMS SafetyNet process (by Zygisk injection), so your original prints/security path level does not change. This avoids many side effects/problems with global props changing.

    Updated 3.0:
    No words needed, you understand everything yourself 😜

    Updated 2.1:
    Hide "Enable OEM Unlock" setting

    Updated 2.0:
    Bypassing DEVICE_INTEGRITY for devices that shipped with Android 13+ (Pixel`s 7 )

    Updated:
    Drop fingerprint to lowest possible (6.0) to ensure that no one use same Android version

    Usage:
    1. Delete/disable/reset MagiskHidePropsConfig (if installed).
    2. Just install it over old Universal SafetyNet Fix and reboot device.
    3. You may be needed to wipe GMS data (not cache) if there is no result immediately.

    Many thanks to @1nikolas for integrity checker.

    Source code: https://github.com/Displax/safetynet-fix/tree/integrity
    58
    So, here is my new modification of USNF with Play Integrity API bypass.

    It is now based on top of original v2.4.0 codebase instead of v2.3.1, with adding new hiding algorithm for current realities and some code refreshing.

    Changelog:

    Version 1.2
    * Fix crash and endless tests loop/failing on Android < 9.0 (bug from original version 2.4.0).
    * Do not unpatch (revert) changes. To prevent possible tests failing after a while on some ROMs (cross conflicts).

    Version 1.1
    * Fix KeyStore hook desynchronization (tests randomly failing problem).


    Usage:
    1. Delete/disable/reset MagiskHidePropsConfig (if installed).
    2. Just install it over old Universal SafetyNet Fix and reboot device.
    3. You may be needed to wipe GMS data (not cache) if there is no result immediately.

    Source code: https://github.com/Displax/safetynet-fix/tree/dev
    31
    Folks, the SafetyNet API was depreciated last Month with 'full turndown' slated for June 2024 and the introduction of the new Play Integrity API. It has also become clear that Google apps are simply the first to adopt the long foretold Play Integrity API; all responsible banks are bound to follow suit in short order, and at least before the June 2023 migration deadline.

    This means (assuming fully deployed Hardware Key Attestation doesn't come first 😬) that the need for a 'Universal Play Integrity Fix' has become quite urgent.

    We currently have workarounds involving using older fingerprint props by means of MHPC module (similar to fix needed for uncertified ROMs), but success/mileage varies per device and users of regular bank apps / gamers etc on stock devices will all soon be forced to experiment with MHPC prints also... This is hardly ideal.

    So I've made an issue report/request on USNF GitHub as follows. This information may be insightful to users here also...

    Please let me know here if I have missed anything important, or add any technically relevant details there...

    PLEASE DON'T spam that issue with unimportant details or queries... (The previous issue is already burgeoning w/ OT.) That's what this thread is for... 😛 :

    Please make 'Universal Play Integrity Fix' ... #204

    Fixes to expand 'Universal SafetyNet Fix' to become a 'Universal Play Integrity Fix' are needed.

    The SafetyNet Attestation API is deprecated and has been replaced by the Play Integrity API.
    https://developer.android.com/training/safetynet/deprecation-timeline

    New Play Integrity API is rolling out from June 2022, and evidently Google Play Store and Google Pay/Wallet are already using its verdict.

    June 2023 is the Migration Deadline for app developers. This will also allow their older app versions to continue working with SafetyNet API for a limited time.

    June 2024 is the End of life for SafetyNet API; its attestation will no longer work for any app version, and apps will receive an error.

    The new Integrity API has more strict requirements for passing attestation, and this seems to be enforced in Android 11+ particularly.

    Currently (evidently due to this), device security issues are detected by

    1. Google Pay/Wallet, which may state "You can't pay contactless with this device...(Your phone doesn't meet software standards)" on updating or attempting to add a card despite in-app Contactless setup stating "You're ready to pay contactless with your phone (Your phone meets security requirements)", and
    2. Google Play Store, which may no longer show apps like Netflix w/ Android 11+ (developers can 'exclude devices from their app's distribution based on their device integrity . Device exclusion is based on the latest device integrity verdict that the Play Store app receives from the Play Integrity API') despite in-app settings showing Play Protect 'Device is certified' result.
    I'm guessing that the 'passing' messages based on the old SafetyNet API are likely to realigned soon.

    A workaround that evidently allows Play Integrity API attestation to pass (and solve Wallet / Play Store issues also) has been discovered. It involves spoofing an earlier certified ROM, generally by using MagiskHide Props Config module to change fingerprint prop to one for Android 10 or earlier.

    Undoubtedly other apps will begin to detect broken TEE etc / fail as they migrate or begin integrating the Play Integrity API.

    A 'Universal Play Integrity Fix' will evidently require more understanding / research into how the fingerprint prop is used, and possibly other new behaviours.

    Here's hoping... 🙃 PW
    28
    ok so there is a solution

    get the magisk module riru

    after you get riru get LSPosed

    after you get LSPosed get xprivacylua (in the LSPosed app)

    select play services in the xprivacylua settings IN the LSPosed app

    AND in the xprivacylua app itself after you've restarted.

    clear play service data

    check safetynet in magisk - enjoy?

    I would reboot between each step just to be safe but I know it's necessary to load the xprivacylua module

    s/o to saitama_96 for discovering it or so I'm led to believe