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

interceptor: Check lib prefix anyways in claiming grafts on arm64 #772

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

mrmacete
Copy link
Contributor

This change is needed because since iOS 17, Xcode can load the /private/preboot/Cryptexes/OS/usr/lib/libLogRedirect.dylib library (there’s also a macOS counterpart:
/System/Cryptexes/OS/usr/lib/libLogRedirect.dylib) which uses interposing for wrapping a bunch of commonly used (and commonly hooked) symbols.

Since those libraries are not in the dyld cache, Frida was flagging them as non-system libraries, making Interceptor fail loudly (instead of silently) if no direct import grafts were found in the loaded binaries for those symbols.

This change adds a check for /private/preboot prefix, and now the prefix check is in OR with the dyld cache one instead of being mutually exclusive.

@mrmacete mrmacete requested a review from oleavr January 15, 2024 11:07
This change is needed because since iOS 17, Xcode can load the
`/private/preboot/Cryptexes/OS/usr/lib/libLogRedirect.dylib` library
(there’s also a macOS counterpart:
`/System/Cryptexes/OS/usr/lib/libLogRedirect.dylib`) which uses
interposing for wrapping a bunch of commonly used (and commonly hooked)
symbols.

Since those libraries are not in the dyld cache, we were flagging them
as non-system libraries, making Interceptor fail loudly (instead of
silently) if no direct import grafts were found in the loaded binaries
for those symbols.

This change adds a check for the `/private/preboot` prefix, and now the
prefix check is in OR with the dyld cache one instead of being mutually
exclusive.
@oleavr oleavr force-pushed the fix/graft-import-chek-prefix-anyways branch from f39be75 to 7937503 Compare January 17, 2024 13:11
@oleavr oleavr merged commit 232c47e into main Jan 17, 2024
18 checks passed
@oleavr oleavr deleted the fix/graft-import-chek-prefix-anyways branch January 17, 2024 13:26
@oleavr
Copy link
Member

oleavr commented Jan 17, 2024

Nice catch!! Thanks! 🙌

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

Successfully merging this pull request may close these issues.

2 participants