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

好奇 #2

Closed
enenH opened this issue Sep 29, 2023 · 3 comments
Closed

好奇 #2

enenH opened this issue Sep 29, 2023 · 3 comments

Comments

@enenH
Copy link

enenH commented Sep 29, 2023

应该可以直接将要注入的so内容写入游戏中,然后通过调用memfd_create 再DlopenMem 类似
https://github.com/Dr-TSNG/ZygiskOnKernelSU/blob/42503e7cfe13bc0c089652f4a57cd07094a1e3ca/loader/src/common/dl.cpp#L47
这样就能绕过 namespace限制了吧

@MJx0
Copy link
Owner

MJx0 commented Oct 10, 2023

应该可以直接将要注入的so内容写入游戏中,然后通过调用memfd_create 再DlopenMem 类似 https://github.com/Dr-TSNG/ZygiskOnKernelSU/blob/42503e7cfe13bc0c089652f4a57cd07094a1e3ca/loader/src/common/dl.cpp#L47 这样就能绕过 namespace限制了吧

You will need to call memfd_create inside the remote process or inject into zygote, create fd then use it after remote process fork. Its more complicated approach and I don't see any point to use it in this example.
BTW I don't speak Chinese.

@enenH
Copy link
Author

enenH commented Oct 10, 2023

The so path cannot be found in the maps, and the library path can be loaded no matter what path it is in.

@MJx0
Copy link
Owner

MJx0 commented Oct 11, 2023

The so path cannot be found in the maps, and the library path can be loaded no matter what path it is in.

Its still visible in maps as "memfd (deleted)", but it's a good method to bypass path restrictions like you said. I will add it soon. 👍

@MJx0 MJx0 closed this as completed Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants