j-hc / revanced-magisk-module

Extensive ReVanced builder. Builds both modules and APKs. Updated daily.
https://t.me/rvc_magisk
GNU General Public License v3.0
4.04k stars 796 forks source link

base.apk mountpoint can be exposed #56

Closed HuskyDG closed 2 years ago

HuskyDG commented 2 years ago

Many banking apps detect the mountpoint of base.apk for no reason. You should find a way to hide mountpoint of revanced.

:/ # magiskhide exec grep base.apk /proc/mounts
/data/app/~~ZxixEheqWH69_lQZKcX5DQ==/com.google.android.youtube-82g8HhHe78e==/base.apk ext4 rw,seclabel,nosuid,nodev,noatime,nodiratime,resgid=1065,data=ordered 0 0
j-hc commented 2 years ago

that issue was already fixed https://github.com/j-hc/revanced-magisk-module/issues/46 it doesnt work for you?

HuskyDG commented 2 years ago

that issue was already fixed #46 it doesnt work for you?

Remember it is always a cat-mouse game, your solution is temporary and later some banking apps will update and detect base.apk mountpoint, you can check:

su -c magisk --denylist exec grep base.apk /proc/mounts
j-hc commented 2 years ago

revanced/revanced-cli#122

this doesnt even work, thats why i dont have it here. are you even using the module? if not, do not create issues blindly.

HuskyDG commented 2 years ago

Well, I open this issue not really blindly. And I just to tell you that some banking apps even detect the mountpoint of base.apk in /proc/mounts not just the base.apk bind mount inside /data/adb/modules like #46 😂

:/ # magiskhide exec grep base.apk /proc/mounts
/data/app/~~ZxixEheqWH69_lQZKcX5DQ==/com.google.android.youtube-82g8HhHe78e==/base.apk ext4 rw,seclabel,nosuid,nodev,noatime,nodiratime,resgid=1065,data=ordered 0 0

If you don't understand, i will end my talk here. Thanks!

j-hc commented 2 years ago

any app can view all the mounts in the global mount namespace including those from the base dir of magisk. so anywhere without the mention of magisk looks ok so far. the commit you sent literally doesnt work, i dont get what you are wanting me to change here from something that actually works (mounting from /data/local/tmp) and doesnt trip any magisk detection?

HuskyDG commented 2 years ago

any app can view all the mounts in the global mount namespace including those from the base dir of magisk.

Nah, you might not know due to the nature of mount namespace, every app will see different /proc/mounts, that is what MagiskHide used to rely on and why app are not in hide list can still get root access.

j-hc commented 2 years ago

any app can view all the mounts in the global mount namespace including those from the base dir of magisk.

Nah, you might not know due to the nature of mount namespace, every app will see different /proc/mounts, that is what MagiskHide used to rely on and why app are not in hide list can still get root access.

well im pretty sure almost all processes can see the bind mounts. if there is something magisk internal that can hide that idk. but i tested both revanced cli's mount and mounting from /data/local/tmp and mine worked so i keep it as is rn. i might write a zygisk module, that will hook into pm and fake the signature, some time later that could get rid of all this, i will see.

HuskyDG commented 2 years ago

well im pretty sure almost all processes can see the bind mounts. if there is something magisk internal that can hide that idk. but i tested both revanced cli's mount and mounting from /data/local/tmp and mine worked so i keep it as is rn. i might write a zygisk module, that will hook into pm and fake the signature, some time later that could get rid of all this, i will see.

Random thought. How about dynamic bind mount? Bind mount in youtube namespace everytime it starts

j-hc commented 2 years ago

i dont think the overhead of that kind of thing would be worth it

HuskyDG commented 2 years ago

i might write a zygisk module, that will hook into pm and fake the signature, some time later that could get rid of all this, i will see.

remember that inject zygote will make it more detectable than hidden, especially there are the big rabbit holes in zygisk, that's why partial users have switched back to riru to avoid inject detection of some banking apps