mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-14 11:08:06 +00:00
renamed examples/ to utils/
This commit is contained in:
36
GNUmakefile
36
GNUmakefile
@ -500,8 +500,8 @@ code-format:
|
|||||||
./.custom-format.py -i instrumentation/*.c
|
./.custom-format.py -i instrumentation/*.c
|
||||||
@#./.custom-format.py -i custom_mutators/*/*.c* # destroys libfuzzer :-(
|
@#./.custom-format.py -i custom_mutators/*/*.c* # destroys libfuzzer :-(
|
||||||
@#./.custom-format.py -i custom_mutators/*/*.h # destroys honggfuzz :-(
|
@#./.custom-format.py -i custom_mutators/*/*.h # destroys honggfuzz :-(
|
||||||
./.custom-format.py -i examples/*/*.c*
|
./.custom-format.py -i utils/*/*.c*
|
||||||
./.custom-format.py -i examples/*/*.h
|
./.custom-format.py -i utils/*/*.h
|
||||||
./.custom-format.py -i test/*.c
|
./.custom-format.py -i test/*.c
|
||||||
./.custom-format.py -i qemu_mode/libcompcov/*.c
|
./.custom-format.py -i qemu_mode/libcompcov/*.c
|
||||||
./.custom-format.py -i qemu_mode/libcompcov/*.cc
|
./.custom-format.py -i qemu_mode/libcompcov/*.cc
|
||||||
@ -547,9 +547,9 @@ clean:
|
|||||||
-$(MAKE) -f GNUmakefile.gcc_plugin clean
|
-$(MAKE) -f GNUmakefile.gcc_plugin clean
|
||||||
$(MAKE) -C libdislocator clean
|
$(MAKE) -C libdislocator clean
|
||||||
$(MAKE) -C libtokencap clean
|
$(MAKE) -C libtokencap clean
|
||||||
$(MAKE) -C examples/afl_network_proxy clean
|
$(MAKE) -C utils/afl_network_proxy clean
|
||||||
$(MAKE) -C examples/socket_fuzzing clean
|
$(MAKE) -C utils/socket_fuzzing clean
|
||||||
$(MAKE) -C examples/argv_fuzzing clean
|
$(MAKE) -C utils/argv_fuzzing clean
|
||||||
$(MAKE) -C qemu_mode/unsigaction clean
|
$(MAKE) -C qemu_mode/unsigaction clean
|
||||||
$(MAKE) -C qemu_mode/libcompcov clean
|
$(MAKE) -C qemu_mode/libcompcov clean
|
||||||
ifeq "$(IN_REPO)" "1"
|
ifeq "$(IN_REPO)" "1"
|
||||||
@ -572,10 +572,10 @@ distrib: all
|
|||||||
-$(MAKE) -f GNUmakefile.gcc_plugin
|
-$(MAKE) -f GNUmakefile.gcc_plugin
|
||||||
$(MAKE) -C libdislocator
|
$(MAKE) -C libdislocator
|
||||||
$(MAKE) -C libtokencap
|
$(MAKE) -C libtokencap
|
||||||
$(MAKE) -C examples/aflpp_driver
|
$(MAKE) -C utils/aflpp_driver
|
||||||
$(MAKE) -C examples/afl_network_proxy
|
$(MAKE) -C utils/afl_network_proxy
|
||||||
$(MAKE) -C examples/socket_fuzzing
|
$(MAKE) -C utils/socket_fuzzing
|
||||||
$(MAKE) -C examples/argv_fuzzing
|
$(MAKE) -C utils/argv_fuzzing
|
||||||
-cd qemu_mode && sh ./build_qemu_support.sh
|
-cd qemu_mode && sh ./build_qemu_support.sh
|
||||||
-cd unicorn_mode && unset CFLAGS && sh ./build_unicorn_support.sh
|
-cd unicorn_mode && unset CFLAGS && sh ./build_unicorn_support.sh
|
||||||
|
|
||||||
@ -583,9 +583,9 @@ distrib: all
|
|||||||
binary-only: all
|
binary-only: all
|
||||||
$(MAKE) -C libdislocator
|
$(MAKE) -C libdislocator
|
||||||
$(MAKE) -C libtokencap
|
$(MAKE) -C libtokencap
|
||||||
$(MAKE) -C examples/afl_network_proxy
|
$(MAKE) -C utils/afl_network_proxy
|
||||||
$(MAKE) -C examples/socket_fuzzing
|
$(MAKE) -C utils/socket_fuzzing
|
||||||
$(MAKE) -C examples/argv_fuzzing
|
$(MAKE) -C utils/argv_fuzzing
|
||||||
-cd qemu_mode && sh ./build_qemu_support.sh
|
-cd qemu_mode && sh ./build_qemu_support.sh
|
||||||
-cd unicorn_mode && unset CFLAGS && sh ./build_unicorn_support.sh
|
-cd unicorn_mode && unset CFLAGS && sh ./build_unicorn_support.sh
|
||||||
|
|
||||||
@ -595,7 +595,7 @@ source-only: all
|
|||||||
-$(MAKE) -f GNUmakefile.gcc_plugin
|
-$(MAKE) -f GNUmakefile.gcc_plugin
|
||||||
$(MAKE) -C libdislocator
|
$(MAKE) -C libdislocator
|
||||||
$(MAKE) -C libtokencap
|
$(MAKE) -C libtokencap
|
||||||
$(MAKE) -C examples/aflpp_driver
|
$(MAKE) -C utils/aflpp_driver
|
||||||
|
|
||||||
%.8: %
|
%.8: %
|
||||||
@echo .TH $* 8 $(BUILD_DATE) "afl++" > $@
|
@echo .TH $* 8 $(BUILD_DATE) "afl++" > $@
|
||||||
@ -628,11 +628,11 @@ install: all $(MANPAGES)
|
|||||||
@if [ -f libtokencap.so ]; then set -e; install -m 755 libtokencap.so $${DESTDIR}$(HELPER_PATH); fi
|
@if [ -f libtokencap.so ]; then set -e; install -m 755 libtokencap.so $${DESTDIR}$(HELPER_PATH); fi
|
||||||
@if [ -f libcompcov.so ]; then set -e; install -m 755 libcompcov.so $${DESTDIR}$(HELPER_PATH); fi
|
@if [ -f libcompcov.so ]; then set -e; install -m 755 libcompcov.so $${DESTDIR}$(HELPER_PATH); fi
|
||||||
@if [ -f afl-fuzz-document ]; then set -e; install -m 755 afl-fuzz-document $${DESTDIR}$(BIN_PATH); fi
|
@if [ -f afl-fuzz-document ]; then set -e; install -m 755 afl-fuzz-document $${DESTDIR}$(BIN_PATH); fi
|
||||||
@if [ -f socketfuzz32.so -o -f socketfuzz64.so ]; then $(MAKE) -C examples/socket_fuzzing install; fi
|
@if [ -f socketfuzz32.so -o -f socketfuzz64.so ]; then $(MAKE) -C utils/socket_fuzzing install; fi
|
||||||
@if [ -f argvfuzz32.so -o -f argvfuzz64.so ]; then $(MAKE) -C examples/argv_fuzzing install; fi
|
@if [ -f argvfuzz32.so -o -f argvfuzz64.so ]; then $(MAKE) -C utils/argv_fuzzing install; fi
|
||||||
@if [ -f examples/afl_network_proxy/afl-network-server ]; then $(MAKE) -C examples/afl_network_proxy install; fi
|
@if [ -f utils/afl_network_proxy/afl-network-server ]; then $(MAKE) -C utils/afl_network_proxy install; fi
|
||||||
@if [ -f examples/aflpp_driver/libAFLDriver.a ]; then set -e; install -m 644 examples/aflpp_driver/libAFLDriver.a $${DESTDIR}$(HELPER_PATH); fi
|
@if [ -f utils/aflpp_driver/libAFLDriver.a ]; then set -e; install -m 644 utils/aflpp_driver/libAFLDriver.a $${DESTDIR}$(HELPER_PATH); fi
|
||||||
@if [ -f examples/aflpp_driver/libAFLQemuDriver.a ]; then set -e; install -m 644 examples/aflpp_driver/libAFLQemuDriver.a $${DESTDIR}$(HELPER_PATH); fi
|
@if [ -f utils/aflpp_driver/libAFLQemuDriver.a ]; then set -e; install -m 644 utils/aflpp_driver/libAFLQemuDriver.a $${DESTDIR}$(HELPER_PATH); fi
|
||||||
-$(MAKE) -f GNUmakefile.llvm install
|
-$(MAKE) -f GNUmakefile.llvm install
|
||||||
-$(MAKE) -f GNUmakefile.gcc_plugin install
|
-$(MAKE) -f GNUmakefile.gcc_plugin install
|
||||||
ln -sf afl-cc $${DESTDIR}$(BIN_PATH)/afl-gcc
|
ln -sf afl-cc $${DESTDIR}$(BIN_PATH)/afl-gcc
|
||||||
|
@ -55,6 +55,7 @@ behaviours and defaults:
|
|||||||
* a caching of testcases can now be performed and can be modified by
|
* a caching of testcases can now be performed and can be modified by
|
||||||
editing config.h for TESTCASE_CACHE or by specifying the env variable
|
editing config.h for TESTCASE_CACHE or by specifying the env variable
|
||||||
`AFL_TESTCACHE_SIZE` (in MB). Good values are between 50-500 (default: 50).
|
`AFL_TESTCACHE_SIZE` (in MB). Good values are between 50-500 (default: 50).
|
||||||
|
* utils/ got renamed to utils/
|
||||||
|
|
||||||
## Contents
|
## Contents
|
||||||
|
|
||||||
@ -760,10 +761,10 @@ cd unicorn_mode
|
|||||||
|
|
||||||
If the goal is to fuzz a dynamic library then there are two options available.
|
If the goal is to fuzz a dynamic library then there are two options available.
|
||||||
For both you need to write a small hardness that loads and calls the library.
|
For both you need to write a small hardness that loads and calls the library.
|
||||||
Faster is the frida solution: [examples/afl_frida/README.md](examples/afl_frida/README.md)
|
Faster is the frida solution: [utils/afl_frida/README.md](utils/afl_frida/README.md)
|
||||||
|
|
||||||
Another, less precise and slower option is using ptrace with debugger interrupt
|
Another, less precise and slower option is using ptrace with debugger interrupt
|
||||||
instrumentation: [examples/afl_untracer/README.md](examples/afl_untracer/README.md)
|
instrumentation: [utils/afl_untracer/README.md](utils/afl_untracer/README.md)
|
||||||
|
|
||||||
### More
|
### More
|
||||||
|
|
||||||
@ -1037,7 +1038,7 @@ Here are some of the most important caveats for AFL:
|
|||||||
wholly wrap the actual data format to be tested.
|
wholly wrap the actual data format to be tested.
|
||||||
|
|
||||||
To work around this, you can comment out the relevant checks (see
|
To work around this, you can comment out the relevant checks (see
|
||||||
examples/libpng_no_checksum/ for inspiration); if this is not possible,
|
utils/libpng_no_checksum/ for inspiration); if this is not possible,
|
||||||
you can also write a postprocessor, one of the hooks of custom mutators.
|
you can also write a postprocessor, one of the hooks of custom mutators.
|
||||||
See [docs/custom_mutators.md](docs/custom_mutators.md) on how to use
|
See [docs/custom_mutators.md](docs/custom_mutators.md) on how to use
|
||||||
`AFL_CUSTOM_MUTATOR_LIBRARY`
|
`AFL_CUSTOM_MUTATOR_LIBRARY`
|
||||||
|
@ -11,6 +11,7 @@ sending a mail to <afl-users+subscribe@googlegroups.com>.
|
|||||||
|
|
||||||
### Version ++3.00a (develop)
|
### Version ++3.00a (develop)
|
||||||
- llvm_mode/ and gcc_plugin/ moved to instrumentation/
|
- llvm_mode/ and gcc_plugin/ moved to instrumentation/
|
||||||
|
- examples/ renamed to utils/
|
||||||
- all compilers combined to afl-cc which emulates the previous ones
|
- all compilers combined to afl-cc which emulates the previous ones
|
||||||
- afl-llvm/gcc-rt.o merged into afl-compiler-rt.o
|
- afl-llvm/gcc-rt.o merged into afl-compiler-rt.o
|
||||||
- afl-fuzz
|
- afl-fuzz
|
||||||
|
@ -63,7 +63,7 @@ x10 - that is a x100 difference!).
|
|||||||
If modifying the source is not an option (e.g. because you only have a binary
|
If modifying the source is not an option (e.g. because you only have a binary
|
||||||
and perform binary fuzzing) you can also use a shared library with AFL_PRELOAD
|
and perform binary fuzzing) you can also use a shared library with AFL_PRELOAD
|
||||||
to emulate the network. This is also much faster than the real network would be.
|
to emulate the network. This is also much faster than the real network would be.
|
||||||
See [examples/socket_fuzzing/](../examples/socket_fuzzing/).
|
See [utils/socket_fuzzing/](../utils/socket_fuzzing/).
|
||||||
|
|
||||||
There is an outdated afl++ branch that implements networking if you are
|
There is an outdated afl++ branch that implements networking if you are
|
||||||
desperate though: [https://github.com/AFLplusplus/AFLplusplus/tree/networking](https://github.com/AFLplusplus/AFLplusplus/tree/networking) -
|
desperate though: [https://github.com/AFLplusplus/AFLplusplus/tree/networking](https://github.com/AFLplusplus/AFLplusplus/tree/networking) -
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
high enough. Otherwise try retrowrite, afl-dyninst and if these
|
high enough. Otherwise try retrowrite, afl-dyninst and if these
|
||||||
fail too then try standard qemu_mode with AFL_ENTRYPOINT to where you need it.
|
fail too then try standard qemu_mode with AFL_ENTRYPOINT to where you need it.
|
||||||
|
|
||||||
If your target is a library use examples/afl_frida/.
|
If your target is a library use utils/afl_frida/.
|
||||||
|
|
||||||
If your target is non-linux then use unicorn_mode/.
|
If your target is non-linux then use unicorn_mode/.
|
||||||
|
|
||||||
@ -65,14 +65,14 @@
|
|||||||
## AFL FRIDA
|
## AFL FRIDA
|
||||||
|
|
||||||
If you want to fuzz a binary-only shared library then you can fuzz it with
|
If you want to fuzz a binary-only shared library then you can fuzz it with
|
||||||
frida-gum via examples/afl_frida/, you will have to write a harness to
|
frida-gum via utils/afl_frida/, you will have to write a harness to
|
||||||
call the target function in the library, use afl-frida.c as a template.
|
call the target function in the library, use afl-frida.c as a template.
|
||||||
|
|
||||||
|
|
||||||
## AFL UNTRACER
|
## AFL UNTRACER
|
||||||
|
|
||||||
If you want to fuzz a binary-only shared library then you can fuzz it with
|
If you want to fuzz a binary-only shared library then you can fuzz it with
|
||||||
examples/afl_untracer/, use afl-untracer.c as a template.
|
utils/afl_untracer/, use afl-untracer.c as a template.
|
||||||
It is slower than AFL FRIDA (see above).
|
It is slower than AFL FRIDA (see above).
|
||||||
|
|
||||||
|
|
||||||
|
@ -268,8 +268,8 @@ afl-fuzz /path/to/program
|
|||||||
|
|
||||||
## 4) Example
|
## 4) Example
|
||||||
|
|
||||||
Please see [example.c](../examples/custom_mutators/example.c) and
|
Please see [example.c](../utils/custom_mutators/example.c) and
|
||||||
[example.py](../examples/custom_mutators/example.py)
|
[example.py](../utils/custom_mutators/example.py)
|
||||||
|
|
||||||
## 5) Other Resources
|
## 5) Other Resources
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ make fairly broad use of environmental variables instead:
|
|||||||
in your `$PATH`.
|
in your `$PATH`.
|
||||||
|
|
||||||
- `AFL_PATH` can be used to point afl-gcc to an alternate location of afl-as.
|
- `AFL_PATH` can be used to point afl-gcc to an alternate location of afl-as.
|
||||||
One possible use of this is examples/clang_asm_normalize/, which lets
|
One possible use of this is utils/clang_asm_normalize/, which lets
|
||||||
you instrument hand-written assembly when compiling clang code by plugging
|
you instrument hand-written assembly when compiling clang code by plugging
|
||||||
a normalizer into the chain. (There is no equivalent feature for GCC.)
|
a normalizer into the chain. (There is no equivalent feature for GCC.)
|
||||||
|
|
||||||
|
@ -78,10 +78,10 @@ Be sure to check out docs/sister_projects.md before writing your own.
|
|||||||
|
|
||||||
## Need to fuzz the command-line arguments of a particular program?
|
## Need to fuzz the command-line arguments of a particular program?
|
||||||
|
|
||||||
You can find a simple solution in examples/argv_fuzzing.
|
You can find a simple solution in utils/argv_fuzzing.
|
||||||
|
|
||||||
## Attacking a format that uses checksums?
|
## Attacking a format that uses checksums?
|
||||||
|
|
||||||
Remove the checksum-checking code or use a postprocessor!
|
Remove the checksum-checking code or use a postprocessor!
|
||||||
See examples/custom_mutators/ for more.
|
See utils/custom_mutators/ for more.
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ Because of this, fuzzing with ASAN is recommended only in four scenarios:
|
|||||||
- Precisely gauge memory needs using http://jwilk.net/software/recidivm .
|
- Precisely gauge memory needs using http://jwilk.net/software/recidivm .
|
||||||
|
|
||||||
- Limit the memory available to process using cgroups on Linux (see
|
- Limit the memory available to process using cgroups on Linux (see
|
||||||
examples/asan_cgroups).
|
utils/asan_cgroups).
|
||||||
|
|
||||||
To compile with ASAN, set AFL_USE_ASAN=1 before calling 'make clean all'. The
|
To compile with ASAN, set AFL_USE_ASAN=1 before calling 'make clean all'. The
|
||||||
afl-gcc / afl-clang wrappers will pick that up and add the appropriate flags.
|
afl-gcc / afl-clang wrappers will pick that up and add the appropriate flags.
|
||||||
@ -74,7 +74,7 @@ There are also cgroups, but they are Linux-specific, not universally available
|
|||||||
even on Linux systems, and they require root permissions to set up; I'm a bit
|
even on Linux systems, and they require root permissions to set up; I'm a bit
|
||||||
hesitant to make afl-fuzz require root permissions just for that. That said,
|
hesitant to make afl-fuzz require root permissions just for that. That said,
|
||||||
if you are on Linux and want to use cgroups, check out the contributed script
|
if you are on Linux and want to use cgroups, check out the contributed script
|
||||||
that ships in examples/asan_cgroups/.
|
that ships in utils/asan_cgroups/.
|
||||||
|
|
||||||
In settings where cgroups aren't available, we have no nice, portable way to
|
In settings where cgroups aren't available, we have no nice, portable way to
|
||||||
avoid counting the ASAN allocation toward the limit. On 32-bit systems, or for
|
avoid counting the ASAN allocation toward the limit. On 32-bit systems, or for
|
||||||
|
@ -152,7 +152,7 @@ write a simple script that performs two actions:
|
|||||||
done
|
done
|
||||||
```
|
```
|
||||||
|
|
||||||
There is an example of such a script in examples/distributed_fuzzing/.
|
There is an example of such a script in utils/distributed_fuzzing/.
|
||||||
|
|
||||||
There are other (older) more featured, experimental tools:
|
There are other (older) more featured, experimental tools:
|
||||||
* https://github.com/richo/roving
|
* https://github.com/richo/roving
|
||||||
|
Binary file not shown.
@ -147,7 +147,7 @@ The numerical value specified within the loop controls the maximum number
|
|||||||
of iterations before AFL will restart the process from scratch. This minimizes
|
of iterations before AFL will restart the process from scratch. This minimizes
|
||||||
the impact of memory leaks and similar glitches; 1000 is a good starting point.
|
the impact of memory leaks and similar glitches; 1000 is a good starting point.
|
||||||
|
|
||||||
A more detailed template is shown in ../examples/persistent_mode/.
|
A more detailed template is shown in ../utils/persistent_mode/.
|
||||||
Similarly to the previous mode, the feature works only with afl-gcc-fast or
|
Similarly to the previous mode, the feature works only with afl-gcc-fast or
|
||||||
afl-clang-fast; #ifdef guards can be used to suppress it when using other
|
afl-clang-fast; #ifdef guards can be used to suppress it when using other
|
||||||
compilers.
|
compilers.
|
||||||
|
@ -11,7 +11,7 @@ and that its state can be resetted so that multiple calls can be performed
|
|||||||
without resource leaks and former runs having no impact on following runs
|
without resource leaks and former runs having no impact on following runs
|
||||||
(this can be seen by the `stability` indicator in the `afl-fuzz` UI).
|
(this can be seen by the `stability` indicator in the `afl-fuzz` UI).
|
||||||
|
|
||||||
Examples can be found in [examples/persistent_mode](../examples/persistent_mode).
|
Examples can be found in [utils/persistent_mode](../utils/persistent_mode).
|
||||||
|
|
||||||
## 2) TLDR;
|
## 2) TLDR;
|
||||||
|
|
||||||
@ -150,7 +150,7 @@ the impact of memory leaks and similar glitches; 1000 is a good starting point,
|
|||||||
and going much higher increases the likelihood of hiccups without giving you
|
and going much higher increases the likelihood of hiccups without giving you
|
||||||
any real performance benefits.
|
any real performance benefits.
|
||||||
|
|
||||||
A more detailed template is shown in ../examples/persistent_mode/.
|
A more detailed template is shown in ../utils/persistent_mode/.
|
||||||
Similarly to the previous mode, the feature works only with afl-clang-fast; #ifdef
|
Similarly to the previous mode, the feature works only with afl-clang-fast; #ifdef
|
||||||
guards can be used to suppress it when using other compilers.
|
guards can be used to suppress it when using other compilers.
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@ match.
|
|||||||
## 12) Gotchas, feedback, bugs
|
## 12) Gotchas, feedback, bugs
|
||||||
|
|
||||||
If you need to fix up checksums or do other cleanup on mutated test cases, see
|
If you need to fix up checksums or do other cleanup on mutated test cases, see
|
||||||
examples/custom_mutators/ for a viable solution.
|
utils/custom_mutators/ for a viable solution.
|
||||||
|
|
||||||
Do not mix QEMU mode with ASAN, MSAN, or the likes; QEMU doesn't appreciate
|
Do not mix QEMU mode with ASAN, MSAN, or the likes; QEMU doesn't appreciate
|
||||||
the "shadow VM" trick employed by the sanitizers and will probably just
|
the "shadow VM" trick employed by the sanitizers and will probably just
|
||||||
|
@ -172,4 +172,4 @@ and so the input_buf variables of the hook becomes meaningful. Otherwise,
|
|||||||
you have to read the input from a file like stdin.
|
you have to read the input from a file like stdin.
|
||||||
|
|
||||||
An example that you can use with little modification for your target can
|
An example that you can use with little modification for your target can
|
||||||
be found here: [examples/qemu_persistent_hook](../examples/qemu_persistent_hook)
|
be found here: [utils/qemu_persistent_hook](../utils/qemu_persistent_hook)
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
utility has right now is to be able to skip them gracefully and allow the
|
utility has right now is to be able to skip them gracefully and allow the
|
||||||
compilation process to continue.
|
compilation process to continue.
|
||||||
|
|
||||||
That said, see examples/clang_asm_normalize/ for a solution that may
|
That said, see utils/clang_asm_normalize/ for a solution that may
|
||||||
allow clang users to make things work even with hand-crafted assembly. Just
|
allow clang users to make things work even with hand-crafted assembly. Just
|
||||||
note that there is no equivalent for GCC.
|
note that there is no equivalent for GCC.
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
$ECHO "$BLUE[*] Testing: custom mutator"
|
$ECHO "$BLUE[*] Testing: custom mutator"
|
||||||
test "1" = "`../afl-fuzz | grep -i 'without python' >/dev/null; echo $?`" && {
|
test "1" = "`../afl-fuzz | grep -i 'without python' >/dev/null; echo $?`" && {
|
||||||
# normalize path
|
# normalize path
|
||||||
CUSTOM_MUTATOR_PATH=$(cd $(pwd)/../examples/custom_mutators;pwd)
|
CUSTOM_MUTATOR_PATH=$(cd $(pwd)/../utils/custom_mutators;pwd)
|
||||||
test -e test-custom-mutator.c -a -e ${CUSTOM_MUTATOR_PATH}/example.c -a -e ${CUSTOM_MUTATOR_PATH}/example.py && {
|
test -e test-custom-mutator.c -a -e ${CUSTOM_MUTATOR_PATH}/example.c -a -e ${CUSTOM_MUTATOR_PATH}/example.py && {
|
||||||
unset AFL_CC
|
unset AFL_CC
|
||||||
# Compile the vulnerable program for single mutator
|
# Compile the vulnerable program for single mutator
|
||||||
@ -29,8 +29,8 @@ test "1" = "`../afl-fuzz | grep -i 'without python' >/dev/null; echo $?`" && {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
# Compile the custom mutator
|
# Compile the custom mutator
|
||||||
cc -D_FIXED_CHAR=0x41 -g -fPIC -shared -I../include ../examples/custom_mutators/simple_example.c -o libexamplemutator.so > /dev/null 2>&1
|
cc -D_FIXED_CHAR=0x41 -g -fPIC -shared -I../include ../utils/custom_mutators/simple_example.c -o libexamplemutator.so > /dev/null 2>&1
|
||||||
cc -D_FIXED_CHAR=0x42 -g -fPIC -shared -I../include ../examples/custom_mutators/simple_example.c -o libexamplemutator2.so > /dev/null 2>&1
|
cc -D_FIXED_CHAR=0x42 -g -fPIC -shared -I../include ../utils/custom_mutators/simple_example.c -o libexamplemutator2.so > /dev/null 2>&1
|
||||||
test -e test-custom-mutator -a -e ./libexamplemutator.so && {
|
test -e test-custom-mutator -a -e ./libexamplemutator.so && {
|
||||||
# Create input directory
|
# Create input directory
|
||||||
mkdir -p in
|
mkdir -p in
|
||||||
@ -109,7 +109,7 @@ test "1" = "`../afl-fuzz | grep -i 'without python' >/dev/null; echo $?`" && {
|
|||||||
|
|
||||||
#test "$CODE" = 1 && { $ECHO "$YELLOW[!] custom mutator tests currently will not fail travis" ; CODE=0 ; }
|
#test "$CODE" = 1 && { $ECHO "$YELLOW[!] custom mutator tests currently will not fail travis" ; CODE=0 ; }
|
||||||
|
|
||||||
make -C ../examples/custom_mutators clean > /dev/null 2>&1
|
make -C ../utils/custom_mutators clean > /dev/null 2>&1
|
||||||
rm -f test-custom-mutator
|
rm -f test-custom-mutator
|
||||||
rm -f test-custom-mutators
|
rm -f test-custom-mutators
|
||||||
} || {
|
} || {
|
||||||
|
@ -94,7 +94,7 @@ test -e ../afl-gcc-fast -a -e ../afl-compiler-rt.o && {
|
|||||||
CODE=1
|
CODE=1
|
||||||
}
|
}
|
||||||
rm -f test-compcov test.out instrumentlist.txt
|
rm -f test-compcov test.out instrumentlist.txt
|
||||||
../afl-gcc-fast -o test-persistent ../examples/persistent_mode/persistent_demo.c > /dev/null 2>&1
|
../afl-gcc-fast -o test-persistent ../utils/persistent_mode/persistent_demo.c > /dev/null 2>&1
|
||||||
test -e test-persistent && {
|
test -e test-persistent && {
|
||||||
echo foo | ../afl-showmap -m ${MEM_LIMIT} -o /dev/null -q -r ./test-persistent && {
|
echo foo | ../afl-showmap -m ${MEM_LIMIT} -o /dev/null -q -r ./test-persistent && {
|
||||||
$ECHO "$GREEN[+] gcc_plugin persistent mode feature works correctly"
|
$ECHO "$GREEN[+] gcc_plugin persistent mode feature works correctly"
|
||||||
|
@ -57,7 +57,7 @@ test -e ../afl-clang-lto -a -e ../afl-llvm-lto-instrumentation.so && {
|
|||||||
CODE=1
|
CODE=1
|
||||||
}
|
}
|
||||||
rm -f test-compcov test.out instrumentlist.txt
|
rm -f test-compcov test.out instrumentlist.txt
|
||||||
../afl-clang-lto -o test-persistent ../examples/persistent_mode/persistent_mode.c > /dev/null 2>&1
|
../afl-clang-lto -o test-persistent ../utils/persistent_mode/persistent_mode.c > /dev/null 2>&1
|
||||||
test -e test-persistent && {
|
test -e test-persistent && {
|
||||||
echo foo | ../afl-showmap -m none -o /dev/null -q -r ./test-persistent && {
|
echo foo | ../afl-showmap -m none -o /dev/null -q -r ./test-persistent && {
|
||||||
$ECHO "$GREEN[+] llvm_mode LTO persistent mode feature works correctly"
|
$ECHO "$GREEN[+] llvm_mode LTO persistent mode feature works correctly"
|
||||||
|
@ -209,7 +209,7 @@ test -e ../afl-clang-fast -a -e ../split-switches-pass.so && {
|
|||||||
INCOMPLETE=1
|
INCOMPLETE=1
|
||||||
}
|
}
|
||||||
rm -rf errors test-cmplog in core.*
|
rm -rf errors test-cmplog in core.*
|
||||||
../afl-clang-fast -o test-persistent ../examples/persistent_mode/persistent_demo.c > /dev/null 2>&1
|
../afl-clang-fast -o test-persistent ../utils/persistent_mode/persistent_demo.c > /dev/null 2>&1
|
||||||
test -e test-persistent && {
|
test -e test-persistent && {
|
||||||
echo foo | ../afl-showmap -m ${MEM_LIMIT} -o /dev/null -q -r ./test-persistent && {
|
echo foo | ../afl-showmap -m ${MEM_LIMIT} -o /dev/null -q -r ./test-persistent && {
|
||||||
$ECHO "$GREEN[+] llvm_mode persistent mode feature works correctly"
|
$ECHO "$GREEN[+] llvm_mode persistent mode feature works correctly"
|
||||||
|
@ -45,7 +45,7 @@ Here's a quick overview of the stuff you can find in this directory:
|
|||||||
- socket_fuzzing - a LD_PRELOAD library 'redirects' a socket to stdin
|
- socket_fuzzing - a LD_PRELOAD library 'redirects' a socket to stdin
|
||||||
for fuzzing access with afl++
|
for fuzzing access with afl++
|
||||||
|
|
||||||
Note that the minimize_corpus.sh tool has graduated from the examples/
|
Note that the minimize_corpus.sh tool has graduated from the utils/
|
||||||
directory and is now available as ../afl-cmin. The LLVM mode has likewise
|
directory and is now available as ../afl-cmin. The LLVM mode has likewise
|
||||||
graduated to ../instrumentation/*.
|
graduated to ../instrumentation/*.
|
||||||
|
|
@ -13,7 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
// Find patch points for untracer tools (e.g. afl++ examples/afl_untracer)
|
// Find patch points for untracer tools (e.g. afl++ utils/afl_untracer)
|
||||||
//
|
//
|
||||||
// Copy to ..../Ghidra/Features/Search/ghidra_scripts/
|
// Copy to ..../Ghidra/Features/Search/ghidra_scripts/
|
||||||
// Writes the results to ~/Desktop/patches.txt
|
// Writes the results to ~/Desktop/patches.txt
|
Reference in New Issue
Block a user