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

Hooking function on macOS Ventura does not work anymore #1594

Open
vanhauser-thc opened this issue Nov 23, 2022 · 6 comments
Open

Hooking function on macOS Ventura does not work anymore #1594

vanhauser-thc opened this issue Nov 23, 2022 · 6 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@vanhauser-thc
Copy link
Member

vanhauser-thc commented Nov 23, 2022

libtokencap and libdislocator do not work anymore on macOS in the newest OS release.

to reproduce:

make -C utils/libtokencap
make -C utils/libdislocator
test/test-libextensions.sh

DYLD_INSERT_LIBRARIES still works (constructors are triggered), however trying to hook libc functions do not seem to work.
e.g. strcmp, _strcmp, __impl__strcmp, __platform_strcmp - none of them are called in a lib that hooks these and a program that uses strcmp() in its code and compiled with -O0

Apparently this is an issue since Monterey (12.2.1) https://developer.apple.com/forums/thread/702374

@vanhauser-thc
Copy link
Member Author

@devnexen any idea?

@devnexen
Copy link
Contributor

No real idea but no surprise it is becoming increasingly difficult in that area.
However, would using calls interposition work ?

@vanhauser-thc
Copy link
Member Author

hmmm that seems to work. but results in a major rework of everything preload. damn.

@vanhauser-thc vanhauser-thc added bug Something isn't working help wanted Extra attention is needed labels Feb 28, 2023
@seanm
Copy link
Contributor

seanm commented Feb 2, 2024

libtokencap and libdislocator do not work anymore on macOS in the newest OS release.

What does this mean concretely for afl++ Mac users? i.e. those of us that know nothing about how afl++ is implemented, but merely use it? Is afl++ totally broken on Ventura? Do only some features not work?

@vanhauser-thc
Copy link
Member Author

reading the docs will answer your question. short: everything documented should work, these two libs a not essential.

@seanm
Copy link
Contributor

seanm commented Feb 3, 2024

short: everything documented should work, these two libs a not essential.

Thanks. I'm trying to use afl++ again after giving up some months ago, I thought maybe this Issue explained #1865. But I guess not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants