-
-
Notifications
You must be signed in to change notification settings - Fork 331
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
Make libafl_frida run executables #777
Comments
ok I am currently seeing it but Can you please elaborate it in detail. |
hey |
Hello, I just wanted to make sure that I'm starting contributing to this issue correctly. So, initially I should fork the |
no unlike AFL++ there's no dev branch in libafl |
Hi! Just updating that I've been going through the frida_libpng example and I believe I understood how it loads the library and the function from the library, given as CLI arguments, in the fuzzer file. Also, I gave a look at the
And then it links with libpng to create the shared object:
So that it can finally execute the fuzzer, passing the shared object as a CLI argument:
Which will then be parsed and assigned to variables here:
I'm quite confused where you said "[...] just hook libc start main, compile the fuzzer as a shared object and inject into the target with LD_PRELOAD", so the idea would be to trick the target program into beginning execution on the fuzzers's main (by using LD_PRELOAD and the hook), so that the fuzzer would execute instead of the target? |
yes that's what it means in frida_libpng you compiled .so, shared library and your fuzzer run that harness as the shared lib but we want to do the opposite. |
Sorry for bothering you guys, I've been trying to solve this issue to recently too. (Please refer to #1117 draft PR as reference) I think this what tokatoka mean by hooking libc_start_main. (maybe) Instead of executing library by using default GNU libc_start_main, we use PRELOAD to overwrite existing libc_start_main with libc_start_main defined by so library. |
Oh nice you probably have developed more than me in this issue! So, I guess I should work on something else (?) or if you want any help I could do that too! |
This issue has been fixed in this #1117 pr |
We have to add too some code to run binaries not just shared objects. Should be easy, just hook libc start main, compile the fuzzer as a shared object and inject into the target with LD_PRELOAD.
Originally posted by @andreafioraldi in #307 (comment)
Now, libafl_frida can fuzz only shared library (.so, .dll), but we want to extend it to executables.
The text was updated successfully, but these errors were encountered: