diff options
author | vanhauser-thc <vh@thc.org> | 2020-12-09 11:30:04 +0100 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2020-12-09 11:30:04 +0100 |
commit | a8e568f248628c39e0bc34173470988034723627 (patch) | |
tree | b4677724560bfcd2bda784c9f4e714ff26fbf490 | |
parent | 39a4fac941177387578ec856aacea2187588fc13 (diff) | |
download | afl++-a8e568f248628c39e0bc34173470988034723627.tar.gz |
move libdislocator, libtokencap and qbdi_mode to utils/
-rw-r--r-- | GNUmakefile | 18 | ||||
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | docs/Changelog.md | 1 | ||||
-rw-r--r-- | docs/life_pro_tips.md | 2 | ||||
-rw-r--r-- | docs/notes_for_asan.md | 2 | ||||
-rw-r--r-- | utils/libdislocator/Makefile (renamed from libdislocator/Makefile) | 14 | ||||
-rw-r--r-- | utils/libdislocator/README.md (renamed from libdislocator/README.md) | 0 | ||||
-rw-r--r-- | utils/libdislocator/libdislocator.so.c (renamed from libdislocator/libdislocator.so.c) | 0 | ||||
-rw-r--r-- | utils/libtokencap/Makefile (renamed from libtokencap/Makefile) | 14 | ||||
-rw-r--r-- | utils/libtokencap/README.md (renamed from libtokencap/README.md) | 0 | ||||
-rw-r--r-- | utils/libtokencap/libtokencap.so.c (renamed from libtokencap/libtokencap.so.c) | 0 | ||||
-rwxr-xr-x | utils/qbdi_mode/README.md (renamed from qbdi_mode/README.md) | 0 | ||||
-rw-r--r-- | utils/qbdi_mode/assets/screen1.png (renamed from qbdi_mode/assets/screen1.png) | bin | 88333 -> 88333 bytes | |||
-rwxr-xr-x | utils/qbdi_mode/build.sh (renamed from qbdi_mode/build.sh) | 4 | ||||
-rwxr-xr-x | utils/qbdi_mode/demo-so.c (renamed from qbdi_mode/demo-so.c) | 0 | ||||
-rwxr-xr-x | utils/qbdi_mode/template.cpp (renamed from qbdi_mode/template.cpp) | 0 |
16 files changed, 29 insertions, 29 deletions
diff --git a/GNUmakefile b/GNUmakefile index 309a7d4c..de398ed7 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -493,8 +493,6 @@ endif code-format: ./.custom-format.py -i src/*.c ./.custom-format.py -i include/*.h - ./.custom-format.py -i libdislocator/*.c - ./.custom-format.py -i libtokencap/*.c ./.custom-format.py -i instrumentation/*.h ./.custom-format.py -i instrumentation/*.cc ./.custom-format.py -i instrumentation/*.c @@ -545,8 +543,8 @@ clean: rm -f $(PROGS) libradamsa.so afl-fuzz-document afl-as as afl-g++ afl-clang afl-clang++ *.o src/*.o *~ a.out core core.[1-9][0-9]* *.stackdump .test .test1 .test2 test-instr .test-instr0 .test-instr1 afl-qemu-trace afl-gcc-fast afl-gcc-pass.so afl-g++-fast ld *.so *.8 test/unittests/*.o test/unittests/unit_maybe_alloc test/unittests/preallocable .afl-* afl-gcc afl-g++ afl-clang afl-clang++ test/unittests/unit_hash test/unittests/unit_rand -$(MAKE) -f GNUmakefile.llvm clean -$(MAKE) -f GNUmakefile.gcc_plugin clean - $(MAKE) -C libdislocator clean - $(MAKE) -C libtokencap clean + $(MAKE) -C utils/libdislocator clean + $(MAKE) -C utils/libtokencap clean $(MAKE) -C utils/afl_network_proxy clean $(MAKE) -C utils/socket_fuzzing clean $(MAKE) -C utils/argv_fuzzing clean @@ -570,8 +568,8 @@ deepclean: clean distrib: all -$(MAKE) -f GNUmakefile.llvm -$(MAKE) -f GNUmakefile.gcc_plugin - $(MAKE) -C libdislocator - $(MAKE) -C libtokencap + $(MAKE) -C utils/libdislocator + $(MAKE) -C utils/libtokencap $(MAKE) -C utils/aflpp_driver $(MAKE) -C utils/afl_network_proxy $(MAKE) -C utils/socket_fuzzing @@ -581,8 +579,8 @@ distrib: all .PHONY: binary-only binary-only: all - $(MAKE) -C libdislocator - $(MAKE) -C libtokencap + $(MAKE) -C utils/libdislocator + $(MAKE) -C utils/libtokencap $(MAKE) -C utils/afl_network_proxy $(MAKE) -C utils/socket_fuzzing $(MAKE) -C utils/argv_fuzzing @@ -593,8 +591,8 @@ binary-only: all source-only: all -$(MAKE) -f GNUmakefile.llvm -$(MAKE) -f GNUmakefile.gcc_plugin - $(MAKE) -C libdislocator - $(MAKE) -C libtokencap + $(MAKE) -C utils/libdislocator + $(MAKE) -C utils/libtokencap $(MAKE) -C utils/aflpp_driver %.8: % diff --git a/README.md b/README.md index 94d5008e..16c85e26 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,7 @@ behaviours and defaults: 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). * examples/ got renamed to utils/ + * libtokencap/ libdislocator/ and qdbi_mode/ were moved to utils/ ## Contents @@ -547,7 +548,7 @@ something is already included for your data format, and tell afl-fuzz to load that dictionary by adding `-x dictionaries/FORMAT.dict`. With afl-clang-lto you have an autodictionary generation for which you need to do nothing except to use afl-clang-lto as the compiler. You also have the option to generate -a dictionary yourself, see [libtokencap/README.md](libtokencap/README.md). +a dictionary yourself, see [utils/libtokencap/README.md](utils/libtokencap/README.md). afl-fuzz has a variety of options that help to workaround target quirks like specific locations for the input file (`-f`), not performing deterministic diff --git a/docs/Changelog.md b/docs/Changelog.md index 5201eb8b..1a47d18f 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -12,6 +12,7 @@ sending a mail to <afl-users+subscribe@googlegroups.com>. ### Version ++3.00a (develop) - llvm_mode/ and gcc_plugin/ moved to instrumentation/ - examples/ renamed to utils/ + - moved libdislocator, libtokencap and qdbi_mode to utils/ - all compilers combined to afl-cc which emulates the previous ones - afl-llvm/gcc-rt.o merged into afl-compiler-rt.o - afl-fuzz diff --git a/docs/life_pro_tips.md b/docs/life_pro_tips.md index 77845c63..50ad75d4 100644 --- a/docs/life_pro_tips.md +++ b/docs/life_pro_tips.md @@ -13,7 +13,7 @@ See [parallel_fuzzing.md](parallel_fuzzing.md) for step-by-step tips. ## Improve the odds of spotting memory corruption bugs with libdislocator.so! -It's easy. Consult [libdislocator/README.md](../libdislocator/README.md) for usage tips. +It's easy. Consult [utils/libdislocator/README.md](../utils/libdislocator/README.md) for usage tips. ## Want to understand how your target parses a particular input file? diff --git a/docs/notes_for_asan.md b/docs/notes_for_asan.md index f08ae3fb..2b3bc028 100644 --- a/docs/notes_for_asan.md +++ b/docs/notes_for_asan.md @@ -35,7 +35,7 @@ no sanitizers compiled in. There is also the option of generating a corpus using a non-ASAN binary, and then feeding it to an ASAN-instrumented one to check for bugs. This is faster, and can give you somewhat comparable results. You can also try using -libdislocator (see libdislocator/README.dislocator.md in the parent directory) as a +libdislocator (see [utils/libdislocator/README.dislocator.md](../utils/libdislocator/README.dislocator.md) in the parent directory) as a lightweight and hassle-free (but less thorough) alternative. ## 2) Long version diff --git a/libdislocator/Makefile b/utils/libdislocator/Makefile index 1c2fcaa7..2942c3c3 100644 --- a/libdislocator/Makefile +++ b/utils/libdislocator/Makefile @@ -16,28 +16,28 @@ PREFIX ?= /usr/local HELPER_PATH = $(PREFIX)/lib/afl -VERSION = $(shell grep '^\#define VERSION ' ../config.h | cut -d '"' -f2) +VERSION = $(shell grep '^\#define VERSION ' ../../config.h | cut -d '"' -f2) CFLAGS ?= -O3 -funroll-loops -D_FORTIFY_SOURCE=2 -CFLAGS += -I ../include/ -Wall -g -Wno-pointer-sign +CFLAGS += -I ../../include/ -Wall -g -Wno-pointer-sign CFLAGS_ADD=$(USEHUGEPAGE:1=-DUSEHUGEPAGE) CFLAGS += $(CFLAGS_ADD) all: libdislocator.so -VPATH = .. -libdislocator.so: libdislocator.so.c ../config.h - $(CC) $(CFLAGS) $(CPPFLAGS) -shared -fPIC libdislocator.so.c -o ../$@ $(LDFLAGS) +libdislocator.so: libdislocator.so.c ../../config.h + $(CC) $(CFLAGS) $(CPPFLAGS) -shared -fPIC libdislocator.so.c -o $@ $(LDFLAGS) + cp -fv libdislocator.so ../../ .NOTPARALLEL: clean clean: rm -f *.o *.so *~ a.out core core.[1-9][0-9]* - rm -f ../libdislocator.so + rm -f ../../libdislocator.so install: all install -m 755 -d $${DESTDIR}$(HELPER_PATH) - install -m 755 ../libdislocator.so $${DESTDIR}$(HELPER_PATH) + install -m 755 ../../libdislocator.so $${DESTDIR}$(HELPER_PATH) install -m 644 -T README.md $${DESTDIR}$(HELPER_PATH)/README.dislocator.md diff --git a/libdislocator/README.md b/utils/libdislocator/README.md index 1785463e..1785463e 100644 --- a/libdislocator/README.md +++ b/utils/libdislocator/README.md diff --git a/libdislocator/libdislocator.so.c b/utils/libdislocator/libdislocator.so.c index 2324e390..2324e390 100644 --- a/libdislocator/libdislocator.so.c +++ b/utils/libdislocator/libdislocator.so.c diff --git a/libtokencap/Makefile b/utils/libtokencap/Makefile index 2343125f..8bbdc259 100644 --- a/libtokencap/Makefile +++ b/utils/libtokencap/Makefile @@ -18,10 +18,10 @@ HELPER_PATH = $(PREFIX)/lib/afl DOC_PATH ?= $(PREFIX)/share/doc/afl MAN_PATH ?= $(PREFIX)/share/man/man8 -VERSION = $(shell grep '^\#define VERSION ' ../config.h | cut -d '"' -f2) +VERSION = $(shell grep '^\#define VERSION ' ../../config.h | cut -d '"' -f2) CFLAGS ?= -O3 -funroll-loops -D_FORTIFY_SOURCE=2 -CFLAGS += -I ../include/ -Wall -g -Wno-pointer-sign +CFLAGS += -I ../../include/ -Wall -g -Wno-pointer-sign UNAME_S =$(shell uname -s)# GNU make @@ -68,9 +68,9 @@ LDFLAGS += $(_____OS_DL) #endif all: $(TARGETS) -VPATH = .. -libtokencap.so: libtokencap.so.c ../config.h - $(CC) $(CFLAGS) $(CPPFLAGS) -shared -fPIC $< -o ../$@ $(LDFLAGS) +libtokencap.so: libtokencap.so.c ../../config.h + $(CC) $(CFLAGS) $(CPPFLAGS) -shared -fPIC $< -o $@ $(LDFLAGS) + cp -f libtokencap.so ../../ .NOTPARALLEL: clean @@ -86,9 +86,9 @@ debug: clean: rm -f *.o *.so *~ a.out core core.[1-9][0-9]* - rm -f ../libtokencap.so + rm -fv ../../libtokencap.so install: all install -m 755 -d $${DESTDIR}$(HELPER_PATH) - install -m 755 ../libtokencap.so $${DESTDIR}$(HELPER_PATH) + install -m 755 ../../libtokencap.so $${DESTDIR}$(HELPER_PATH) install -m 644 -T README.md $${DESTDIR}$(DOC_PATH)/README.tokencap.md diff --git a/libtokencap/README.md b/utils/libtokencap/README.md index 13a440da..13a440da 100644 --- a/libtokencap/README.md +++ b/utils/libtokencap/README.md diff --git a/libtokencap/libtokencap.so.c b/utils/libtokencap/libtokencap.so.c index 3629e804..3629e804 100644 --- a/libtokencap/libtokencap.so.c +++ b/utils/libtokencap/libtokencap.so.c diff --git a/qbdi_mode/README.md b/utils/qbdi_mode/README.md index 641a6e85..641a6e85 100755 --- a/qbdi_mode/README.md +++ b/utils/qbdi_mode/README.md diff --git a/qbdi_mode/assets/screen1.png b/utils/qbdi_mode/assets/screen1.png index 3cf1cb76..3cf1cb76 100644 --- a/qbdi_mode/assets/screen1.png +++ b/utils/qbdi_mode/assets/screen1.png Binary files differdiff --git a/qbdi_mode/build.sh b/utils/qbdi_mode/build.sh index b10971d9..2527bd26 100755 --- a/qbdi_mode/build.sh +++ b/utils/qbdi_mode/build.sh @@ -51,7 +51,7 @@ ${compiler_prefix}${CC} -shared -o libdemo.so demo-so.c -w -g echo "[+] Building afl-fuzz for Android" # build afl-fuzz -cd .. -${compiler_prefix}${CC} -DANDROID_DISABLE_FANCY=1 -O3 -funroll-loops -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign -I include/ -DAFL_PATH=\"/usr/local/lib/afl\" -DBIN_PATH=\"/usr/local/bin\" -DDOC_PATH=\"/usr/local/share/doc/afl\" -Wno-unused-function src/afl-fuzz-*.c src/afl-fuzz.c src/afl-common.c src/afl-sharedmem.c src/afl-forkserver.c -o qbdi_mode/afl-fuzz -ldl -w +cd ../.. +${compiler_prefix}${CC} -DANDROID_DISABLE_FANCY=1 -O3 -funroll-loops -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign -I include/ -DAFL_PATH=\"/usr/local/lib/afl\" -DBIN_PATH=\"/usr/local/bin\" -DDOC_PATH=\"/usr/local/share/doc/afl\" -Wno-unused-function src/afl-fuzz-*.c src/afl-fuzz.c src/afl-common.c src/afl-sharedmem.c src/afl-forkserver.c -o utils/qbdi_mode/afl-fuzz -ldl -w echo "[+] All done. Enjoy!" diff --git a/qbdi_mode/demo-so.c b/utils/qbdi_mode/demo-so.c index dd367036..dd367036 100755 --- a/qbdi_mode/demo-so.c +++ b/utils/qbdi_mode/demo-so.c diff --git a/qbdi_mode/template.cpp b/utils/qbdi_mode/template.cpp index b2066cc8..b2066cc8 100755 --- a/qbdi_mode/template.cpp +++ b/utils/qbdi_mode/template.cpp |