Skip to content

Conversation

@yangzao
Copy link
Contributor

@yangzao yangzao commented Nov 18, 2023

Hi @vanhauser-thc, I added some code which allows AFL++ to run a script each time after it executes the target program. It gets the path of the script from environment variable "AFL_POST_RUN_TARGET_SCRIPT". Do you think the code is fine or if I need to change anything?

Thanks!

@vanhauser-thc
Copy link
Member

Hi,
I tried to point you on discord into the right direction - it should be a custom mutator function.
You try to use an environment variable with a command to be executed. This has a huge performance impact. For your specific case where you might only have 1 exec/s that does not make a big difference, however for other uses this would be an unacceptable slow down.
The correct way is to add another custom mutator function like afl_custom_fuzz_send.
This way you can specify a python script or native shared library to do whatever you need to do. You could execute a command from there, but also just put the code you need in the python/shared lib and enjoy a much lower performance penality.

@yangzao
Copy link
Contributor Author

yangzao commented Nov 18, 2023

Thanks! I will modify the code.

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