Conversation
feat: Advanced path/FD detection and hook-based obfuscation
|
Why should we block access through |
You can remove them, just ready-made templates. A small correction may be needed here: We do the hooking not directly "inside the Zygote process", but inside the application process that has been forked from Zygote, but before the application code starts running (in the preAppSpecialize phase). This is how Zygisk modules work. blocking access with sensitive_proc_files and keywords is meant to cut off the most common ways apps gather information and detect rooting. Hooking file operations in the preAppSpecialize phase allows us to manipulate the apps interaction with the file system before it can perform these checks, effectively hiding the presence of root or modifications. |
|
Well, but i haven't noticed any changes before/after patch, except the freezing bug due to
Other than that, there's no known detection method yet. |
|
Shamiko uses a more aggressive method for /proc. You could do something similar, but it would require a lot of testing. NativeTest & Built-in Magisk Alpha's Zygisk: "Futile Hide(08) > Leak of mountinfo to process with magisk mounted, was done by getmntent() on /proc/self/mounts The call to is_path_sensitive("/proc/self/mounts") should return true because /proc/self/mounts is in the sensitive_proc_files list and the hooked_fopen function should return nullptr and set errno to EACCES. Anyway, what I'm sending you right now is a pull request, just more flexibility, I haven't tested it but basically you have to implement it. You can reject it and write separate code, just understand the logic |
|
I tried it, and no hope, there's something wrong with the detection of leaked And for finding anomalies I'm planning to make a sort of a rule system with default settings, so when the user uses magic mount to install whatever modification he submits to the system, he can add an entry to the configuration and it will take effect instantly, instead of modifying to add redundant paths. |
Good idea, but if you still want to over-develop this project, use Strace |
feat: Advanced path/FD detection and hook-based obfuscation
!!!
I have not tested this and it can cause applications to crash. So test it thoroughly and if it causes errors, backup the code and develop it in a test environment.
It's a better method but it needs to be tested.
I don't test it because I'm interested in root solutions at kernel level
!!!