topjohnwu / Magisk

The Magic Mask for Android
GNU General Public License v3.0
47.6k stars 12.09k forks source link

Samsung Pass is bypassing Magisk hide. #2673

Closed ytrezq closed 4 years ago

ytrezq commented 4 years ago

Samsung Pass is a Universal password manager which works across all applications regardless of specific support.

As soon as it detects a rooted device, it refuses to work. Even enabling MagiskHide on it doesn’t change anything (though I may have an idea why because the bootloader is adding something related to it on the cmdline which would require an additional patch of the kernel).

I agree for remote control for debugging purposes. I’m using the latest versions.

osm0sis commented 4 years ago

1152

ytrezq commented 4 years ago

@osm0sis but this is about a new filter. I mean preventing androidboot.warranty_bit=1 to be passed on the cmdline.

Didgeridoohan commented 4 years ago

It's a Samsung app. Are you sure it's not just checking Knox (in which case there's nothing to do about it)?

Of course, that would only happen on a Samsung device, but you've not given any information about that...

osm0sis commented 4 years ago

That cmdline becomes the props modified here: https://github.com/topjohnwu/Magisk/blob/master/native/jni/magiskhide/hide_policy.cpp#L14

I don't think there's anything else that can be done with cmdline, IIRC. @topjohnwu, can you confirm?

ytrezq commented 4 years ago

It's a Samsung app. Are you sure it's not just checking Knox (in which case there's nothing to do about it)?

@Didgeridoohan I think it’s checking through the cmdline.

I don't think there's anything else that can be done with cmdline, IIRC. @topjohnwu, can you confirm?

@osm0sis in my case the bootloader (not the boot image) was recently patched after an official ota. Since this is the bootloader which is putting that argument, it should be possible to patch it too (though there would no longer be any odin/download mode in case of failure).

Didgeridoohan commented 4 years ago

But apps do not have access to cmdline... They use the props, which MagiskHide changes.

Are you using a Samsung device?

osm0sis commented 4 years ago

Nope, can't control the bootloader, again, IIRC. Hopefully @topjohnwu can chime in to explain for certain.

osm0sis commented 4 years ago

I think I remember custom kernels being able to modify the cmdline bootloader state to green, so someone with kernel source for your device could do something similar for the cmdline arg you're talking about, but again that's outside of the scope of Magisk.

brad-hue commented 4 years ago

I'm sorry I think, it is a virus..I downloaded something :( On Apr 11, 2020 8:41 PM, "Chris Renshaw" notifications@github.com wrote:

I think I remember custom kernels being able to modify the cmdline bootloader state to green, but again that's outside of the scope of Magisk.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/topjohnwu/Magisk/issues/2673#issuecomment-612412275, or unsubscribe https://github.com/notifications/unsubscribe-auth/APC7ZKQQ4PT24FJAFZOIF53RMBQPNANCNFSM4MFU3QKQ .

ytrezq commented 4 years ago

But apps do not have access to cmdline... They use the props, which MagiskHide changes.

Are you using a Samsung device?

@osm0sis yes of course as Samsung if for Samsung devices only as far I’m aware.

In fact this is by just changing the cmdline that I can boot on my sdcard instead of the Internal storage (by changing the root= parameter which changes the symlink of the matching block devices). I don’t think they use this, but both on Linux and Android the cmdline is available through /proc/cmdline.

osm0sis commented 4 years ago

It can be read there, yes, but not technically changed AFAIK. @Zackptg5, you've worked with some cmdline, props and verity stuff too, any idea?

Didgeridoohan commented 4 years ago

Regular apps can't read /proc/cmdline, you'd need root for that.

I still maintain that the most likely scenario is that the app checks the Knox counter.