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

AFL_PRELOAD #1

Open
WorksButNotTested opened this issue Dec 16, 2021 · 3 comments
Open

AFL_PRELOAD #1

WorksButNotTested opened this issue Dec 16, 2021 · 3 comments

Comments

@WorksButNotTested
Copy link

AFLTriage is great, super easy to use. I've run into a small issue though. I would like to LD_PRELOAD a library into my target when it is run. However, I cannot seem to see a way to pass an environment variable to the target without it also being passed to afl-triage itself. Whilst in the most part, environment variables can just be allowed to propagate from parent to the child, in the case of LD_PRELOAD this causes an issue.

Obviously, you can't simply replace your target with a script, since the target then won't be the direct child of afl-triage, so for now, I've managed to workaround by making a small loader application which calls setenv and execve, but it would be awesome if you could just pass environment variables direct to afl-triage.

Maybe something like...

afl-triage -e LD_PRELOAD=mylib.so ...

@vanhauser-thc
Copy link

why not AFL_PRELOAD=… instead so it is compatible to afl?

@WorksButNotTested
Copy link
Author

That should work fine for me. Just wondered if any other environment variables caused issues and something more generic was required? If not then similarity to AFL++ is probably more desirable.

@quic-ghernand
Copy link
Contributor

Hey there, thanks for the issue. This has been on my mental TODO for a bit. I like the idea of -e or -D to pass arbitrary environment variables. I'll work on getting this for you

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

3 participants