Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove further detection points #104

Closed
wants to merge 14 commits into from
Closed

Conversation

ThePedroo
Copy link
Member

Changes

This PR is focused on doing vast things to remove the amount of detection points in ReZygisk, them being futile or not.

Why

This allows users to have less trouble with applications that use huge amount of detections to prohibit the use of their app.

Checkmarks

  • The modified functions have been tested.
  • Used the same indentation as the rest of the project.
  • Updated documentation (changelog).

@ThePedroo ThePedroo added confirmed This issue or pull request is confirmed to be done. enhancement New feature or request labels Dec 28, 2024
@ThePedroo ThePedroo force-pushed the remove/detection-points branch from ab27ffe to c030760 Compare December 29, 2024 07:01
@JingMatrix
Copy link
Contributor

The DenyList is still buggy, don't merge it too soon.

@JingMatrix
Copy link
Contributor

Now the implementation of DenyList is stable, you can pick my latest two commits into ReZygisk.

@ThePedroo ThePedroo force-pushed the remove/detection-points branch 3 times, most recently from b547cdc to 3d99db3 Compare December 29, 2024 22:24
@ThePedroo ThePedroo force-pushed the remove/detection-points branch 2 times, most recently from d848693 to 11103f2 Compare January 6, 2025 08:01
This commit fixes the mismatch between types sent by lizygisk.so and read by Zygiskd, causing issues.
This commit improves the code for multiple files by making "read_string" function already make the string NULL-terminated, avoiding code duplication. Also for "companion.c" fixes an "if" where it would read "client_fd" and check if "fd" is equal to "-1", instead of "client_fd", also does some overall code improvements there like detaching the thread, avoiding memory leaks in the exit, of the thread itself.
This commit allows ReZygisk to u(n)mount mounted paths in KSU and APatch environments using magic mount.
This commit improves how we decide to close the fd that connects the injected module with the companion, avoiding both double close and fd leaks.
This commit removes a detection point by caching mountinfo. Native Test Futile Hide (01) is a detection which is able to detect "/proc/self/mountinfo" reads in unshare, due to that it is not possible to read that file in the unshare syscall. To bypass that we cache the Magisk/KSU/APatch mounts and umount all of them in unshare.
This commit changes logs from LOGI to LOGD. This change is explained by the fact that libzygisk.so logs inside the app, which is easily detectable, and LOGI is not removed in release builds, where LOGD and LOGV are, being a better solution in the meanwhile.
This commit focuses in porting JingMatrix/NeoZygisk@2814712#diff-e00e4b92e648c073b9ee1644fba5f7948b2d0b77fcfcdc26b7a4144290e321a3R379 to ReZygisk. Further explanation is given in NeoZygisk commit.
This commit fixes/reverts the removal of SELinux rules, which can be necessary hence causing issues: "The cause is userdebug build has different sepolicy label from user build rom for tmpfs". Thanks aviraxp for reporting this.
This commit is taken from JingMatrix/NeoZygisk@2bf90c1. Note that this will still cause issue with some modules due unused rules being taken out.
This commit both improves the umount system, by properly switching mount namespaces to avoid doing it all the time and also avoid cause gaps, and also remove logging backed by ReZygiskd, as it will later on have its connection cut and end up logging locally, making this futile.
This commit removes the last loggings in release mode for libzygisk.so, that way avoiding logging detections.
@ThePedroo ThePedroo force-pushed the remove/detection-points branch from 00356d1 to 32aa4e5 Compare January 11, 2025 09:40
This commit fixes merge conflicts with main branch.
@ThePedroo ThePedroo changed the base branch from main to add/ptbr-readme January 11, 2025 09:45
@ThePedroo ThePedroo changed the base branch from add/ptbr-readme to main January 11, 2025 09:45
@ThePedroo
Copy link
Member Author

Superseded by #111 due to conflicts in merge.

@ThePedroo ThePedroo closed this Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed This issue or pull request is confirmed to be done. enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants