Displax / safetynet-fix

SafetyNet & Play Integrity API workarounds for Magisk
MIT License
2.01k stars 52 forks source link

Remove problematic hiding scripts #4

Closed aviraxp closed 1 year ago

aviraxp commented 1 year ago

Issue 1: According to user reports, setting Xiaomi region props will break booting. This may be caused by some framework internal check. As this is for cross-region flash which is not used for hide, remove it.

Issue 2: We have seen applications using new ways to detect abnormal environments. One of them is /sys/fs/selinux, as this dir has +x permission for all users. This makes running 'stat' command on nodes possible.

Here we have a problem. Running busybox's 'cat' on files will change its access time (not seen on toybox's 'cat' though). This can be easily detected by 'stat /sys/fs/selinux', seeing access time which does not start with '1970-01-01'.

This check is actually useless at all. Chmod +644 the node will make 'stat' impossible, thus leading to more detection. Thus remove the check. This method is seen on multiple apps in recent research.

AbdelrahmanMohamedDesoky commented 1 year ago

3 weeks ago, why was this not accepted/merged yet?

Displax commented 1 year ago

Leave SELinux check for now. Removing causes attestation failing on some ROMs.

RecursiveRegistrations commented 1 year ago

Is it possible that this is the reason why I encountered the issue with Blind?

https://github.com/LSPosed/LSPosed/issues/2570