1*08b48e0bSAndroid Build Coastguard Worker# Fuzzing binary-only targets 2*08b48e0bSAndroid Build Coastguard Worker 3*08b48e0bSAndroid Build Coastguard WorkerAFL++, libfuzzer, and other fuzzers are great if you have the source code of the 4*08b48e0bSAndroid Build Coastguard Workertarget. This allows for very fast and coverage guided fuzzing. 5*08b48e0bSAndroid Build Coastguard Worker 6*08b48e0bSAndroid Build Coastguard WorkerHowever, if there is only the binary program and no source code available, then 7*08b48e0bSAndroid Build Coastguard Workerstandard `afl-fuzz -n` (non-instrumented mode) is not effective. 8*08b48e0bSAndroid Build Coastguard Worker 9*08b48e0bSAndroid Build Coastguard WorkerFor fast, on-the-fly instrumentation of black-box binaries, AFL++ still offers 10*08b48e0bSAndroid Build Coastguard Workervarious support. The following is a description of how these binaries can be 11*08b48e0bSAndroid Build Coastguard Workerfuzzed with AFL++. 12*08b48e0bSAndroid Build Coastguard Worker 13*08b48e0bSAndroid Build Coastguard Worker## TL;DR: 14*08b48e0bSAndroid Build Coastguard Worker 15*08b48e0bSAndroid Build Coastguard WorkerFRIDA mode and QEMU mode in persistent mode are the fastest - if persistent mode 16*08b48e0bSAndroid Build Coastguard Workeris possible and the stability is high enough. 17*08b48e0bSAndroid Build Coastguard Worker 18*08b48e0bSAndroid Build Coastguard WorkerOtherwise, try Zafl, RetroWrite, Dyninst, and if these fail, too, then try 19*08b48e0bSAndroid Build Coastguard Workerstandard FRIDA/QEMU mode with `AFL_ENTRYPOINT` to where you need it. 20*08b48e0bSAndroid Build Coastguard Worker 21*08b48e0bSAndroid Build Coastguard WorkerIf your target is non-linux, then use unicorn_mode. 22*08b48e0bSAndroid Build Coastguard Worker 23*08b48e0bSAndroid Build Coastguard Worker## Fuzzing binary-only targets with AFL++ 24*08b48e0bSAndroid Build Coastguard Worker 25*08b48e0bSAndroid Build Coastguard Worker### QEMU mode 26*08b48e0bSAndroid Build Coastguard Worker 27*08b48e0bSAndroid Build Coastguard WorkerQEMU mode is the "native" solution to the program. It is available in the 28*08b48e0bSAndroid Build Coastguard Worker./qemu_mode/ directory and, once compiled, it can be accessed by the afl-fuzz -Q 29*08b48e0bSAndroid Build Coastguard Workercommand line option. It is the easiest to use alternative and even works for 30*08b48e0bSAndroid Build Coastguard Workercross-platform binaries. 31*08b48e0bSAndroid Build Coastguard Worker 32*08b48e0bSAndroid Build Coastguard WorkerFor linux programs and its libraries, this is accomplished with a version of 33*08b48e0bSAndroid Build Coastguard WorkerQEMU running in the lesser-known "user space emulation" mode. QEMU is a project 34*08b48e0bSAndroid Build Coastguard Workerseparate from AFL++, but you can conveniently build the feature by doing: 35*08b48e0bSAndroid Build Coastguard Worker 36*08b48e0bSAndroid Build Coastguard Worker```shell 37*08b48e0bSAndroid Build Coastguard Workercd qemu_mode 38*08b48e0bSAndroid Build Coastguard Worker./build_qemu_support.sh 39*08b48e0bSAndroid Build Coastguard Worker``` 40*08b48e0bSAndroid Build Coastguard Worker 41*08b48e0bSAndroid Build Coastguard WorkerThe following setup to use QEMU mode is recommended: 42*08b48e0bSAndroid Build Coastguard Worker 43*08b48e0bSAndroid Build Coastguard Worker* run 1 afl-fuzz -Q instance with CMPLOG (`-c 0` + `AFL_COMPCOV_LEVEL=2`) 44*08b48e0bSAndroid Build Coastguard Worker* run 1 afl-fuzz -Q instance with QASAN (`AFL_USE_QASAN=1`) 45*08b48e0bSAndroid Build Coastguard Worker* run 1 afl-fuzz -Q instance with LAF (`AFL_PRELOAD=libcmpcov.so` + 46*08b48e0bSAndroid Build Coastguard Worker `AFL_COMPCOV_LEVEL=2`), alternatively you can use FRIDA mode, just switch `-Q` 47*08b48e0bSAndroid Build Coastguard Worker with `-O` and remove the LAF instance 48*08b48e0bSAndroid Build Coastguard Worker 49*08b48e0bSAndroid Build Coastguard WorkerThen run as many instances as you have cores left with either -Q mode or - even 50*08b48e0bSAndroid Build Coastguard Workerbetter - use a binary rewriter like Dyninst, RetroWrite, ZAFL, etc. 51*08b48e0bSAndroid Build Coastguard WorkerThe binary rewriters all have their own advantages and caveats. 52*08b48e0bSAndroid Build Coastguard WorkerZAFL is the best but cannot be used in a business/commercial context. 53*08b48e0bSAndroid Build Coastguard Worker 54*08b48e0bSAndroid Build Coastguard WorkerIf a binary rewriter works for your target then you can use afl-fuzz normally 55*08b48e0bSAndroid Build Coastguard Workerand it will have twice the speed compared to QEMU mode (but slower than QEMU 56*08b48e0bSAndroid Build Coastguard Workerpersistent mode). 57*08b48e0bSAndroid Build Coastguard Worker 58*08b48e0bSAndroid Build Coastguard WorkerThe speed decrease of QEMU mode is at about 50%. However, various options exist 59*08b48e0bSAndroid Build Coastguard Workerto increase the speed: 60*08b48e0bSAndroid Build Coastguard Worker- using AFL_ENTRYPOINT to move the forkserver entry to a later basic block in 61*08b48e0bSAndroid Build Coastguard Worker the binary (+5-10% speed) 62*08b48e0bSAndroid Build Coastguard Worker- using persistent mode 63*08b48e0bSAndroid Build Coastguard Worker [qemu_mode/README.persistent.md](../qemu_mode/README.persistent.md) this will 64*08b48e0bSAndroid Build Coastguard Worker result in a 150-300% overall speed increase - so 3-8x the original QEMU mode 65*08b48e0bSAndroid Build Coastguard Worker speed! 66*08b48e0bSAndroid Build Coastguard Worker- using AFL_CODE_START/AFL_CODE_END to only instrument specific parts 67*08b48e0bSAndroid Build Coastguard Worker 68*08b48e0bSAndroid Build Coastguard WorkerFor additional instructions and caveats, see 69*08b48e0bSAndroid Build Coastguard Worker[qemu_mode/README.md](../qemu_mode/README.md). If possible, you should use the 70*08b48e0bSAndroid Build Coastguard Workerpersistent mode, see 71*08b48e0bSAndroid Build Coastguard Worker[qemu_mode/README.persistent.md](../qemu_mode/README.persistent.md). The mode is 72*08b48e0bSAndroid Build Coastguard Workerapproximately 2-5x slower than compile-time instrumentation, and is less 73*08b48e0bSAndroid Build Coastguard Workerconducive to parallelization. 74*08b48e0bSAndroid Build Coastguard Worker 75*08b48e0bSAndroid Build Coastguard WorkerNote that there is also honggfuzz: 76*08b48e0bSAndroid Build Coastguard Worker[https://github.com/google/honggfuzz](https://github.com/google/honggfuzz) which 77*08b48e0bSAndroid Build Coastguard Workernow has a QEMU mode, but its performance is just 1.5% ... 78*08b48e0bSAndroid Build Coastguard Worker 79*08b48e0bSAndroid Build Coastguard WorkerIf you like to code a customized fuzzer without much work, we highly recommend 80*08b48e0bSAndroid Build Coastguard Workerto check out our sister project libafl which supports QEMU, too: 81*08b48e0bSAndroid Build Coastguard Worker[https://github.com/AFLplusplus/LibAFL](https://github.com/AFLplusplus/LibAFL) 82*08b48e0bSAndroid Build Coastguard Worker 83*08b48e0bSAndroid Build Coastguard Worker### WINE+QEMU 84*08b48e0bSAndroid Build Coastguard Worker 85*08b48e0bSAndroid Build Coastguard WorkerWine mode can run Win32 PE binaries with the QEMU instrumentation. It needs 86*08b48e0bSAndroid Build Coastguard WorkerWine, python3, and the pefile python package installed. 87*08b48e0bSAndroid Build Coastguard Worker 88*08b48e0bSAndroid Build Coastguard WorkerIt is included in AFL++. 89*08b48e0bSAndroid Build Coastguard Worker 90*08b48e0bSAndroid Build Coastguard WorkerFor more information, see 91*08b48e0bSAndroid Build Coastguard Worker[qemu_mode/README.wine.md](../qemu_mode/README.wine.md). 92*08b48e0bSAndroid Build Coastguard Worker 93*08b48e0bSAndroid Build Coastguard Worker### FRIDA mode 94*08b48e0bSAndroid Build Coastguard Worker 95*08b48e0bSAndroid Build Coastguard WorkerIn FRIDA mode, you can fuzz binary-only targets as easily as with QEMU mode. 96*08b48e0bSAndroid Build Coastguard WorkerFRIDA mode is most of the times slightly faster than QEMU mode. It is also 97*08b48e0bSAndroid Build Coastguard Workernewer, and has the advantage that it works on MacOS (both intel and M1). 98*08b48e0bSAndroid Build Coastguard Worker 99*08b48e0bSAndroid Build Coastguard WorkerTo build FRIDA mode: 100*08b48e0bSAndroid Build Coastguard Worker 101*08b48e0bSAndroid Build Coastguard Worker```shell 102*08b48e0bSAndroid Build Coastguard Workercd frida_mode 103*08b48e0bSAndroid Build Coastguard Workergmake 104*08b48e0bSAndroid Build Coastguard Worker``` 105*08b48e0bSAndroid Build Coastguard Worker 106*08b48e0bSAndroid Build Coastguard WorkerFor additional instructions and caveats, see 107*08b48e0bSAndroid Build Coastguard Worker[frida_mode/README.md](../frida_mode/README.md). 108*08b48e0bSAndroid Build Coastguard Worker 109*08b48e0bSAndroid Build Coastguard WorkerIf possible, you should use the persistent mode, see 110*08b48e0bSAndroid Build Coastguard Worker[instrumentation/README.persistent_mode.md](../instrumentation/README.persistent_mode.md). 111*08b48e0bSAndroid Build Coastguard WorkerThe mode is approximately 2-5x slower than compile-time instrumentation, and is 112*08b48e0bSAndroid Build Coastguard Workerless conducive to parallelization. But for binary-only fuzzing, it gives a huge 113*08b48e0bSAndroid Build Coastguard Workerspeed improvement if it is possible to use. 114*08b48e0bSAndroid Build Coastguard Worker 115*08b48e0bSAndroid Build Coastguard WorkerYou can also perform remote fuzzing with frida, e.g., if you want to fuzz on 116*08b48e0bSAndroid Build Coastguard WorkeriPhone or Android devices, for this you can use 117*08b48e0bSAndroid Build Coastguard Worker[https://github.com/ttdennis/fpicker/](https://github.com/ttdennis/fpicker/) as 118*08b48e0bSAndroid Build Coastguard Workeran intermediate that uses AFL++ for fuzzing. 119*08b48e0bSAndroid Build Coastguard Worker 120*08b48e0bSAndroid Build Coastguard WorkerIf you like to code a customized fuzzer without much work, we highly recommend 121*08b48e0bSAndroid Build Coastguard Workerto check out our sister project libafl which supports Frida, too: 122*08b48e0bSAndroid Build Coastguard Worker[https://github.com/AFLplusplus/LibAFL](https://github.com/AFLplusplus/LibAFL). 123*08b48e0bSAndroid Build Coastguard WorkerWorking examples already exist :-) 124*08b48e0bSAndroid Build Coastguard Worker 125*08b48e0bSAndroid Build Coastguard Worker### Nyx mode 126*08b48e0bSAndroid Build Coastguard Worker 127*08b48e0bSAndroid Build Coastguard WorkerNyx is a full system emulation fuzzing environment with snapshot support that is 128*08b48e0bSAndroid Build Coastguard Workerbuilt upon KVM and QEMU. It is only available on Linux and currently restricted 129*08b48e0bSAndroid Build Coastguard Workerto x86_x64. 130*08b48e0bSAndroid Build Coastguard Worker 131*08b48e0bSAndroid Build Coastguard WorkerFor binary-only fuzzing a special 5.10 kernel is required. 132*08b48e0bSAndroid Build Coastguard Worker 133*08b48e0bSAndroid Build Coastguard WorkerSee [nyx_mode/README.md](../nyx_mode/README.md). 134*08b48e0bSAndroid Build Coastguard Worker 135*08b48e0bSAndroid Build Coastguard Worker### Unicorn 136*08b48e0bSAndroid Build Coastguard Worker 137*08b48e0bSAndroid Build Coastguard WorkerUnicorn is a fork of QEMU. The instrumentation is, therefore, very similar. In 138*08b48e0bSAndroid Build Coastguard Workercontrast to QEMU, Unicorn does not offer a full system or even userland 139*08b48e0bSAndroid Build Coastguard Workeremulation. Runtime environment and/or loaders have to be written from scratch, 140*08b48e0bSAndroid Build Coastguard Workerif needed. On top, block chaining has been removed. This means the speed boost 141*08b48e0bSAndroid Build Coastguard Workerintroduced in the patched QEMU Mode of AFL++ cannot be ported over to Unicorn. 142*08b48e0bSAndroid Build Coastguard Worker 143*08b48e0bSAndroid Build Coastguard WorkerFor non-Linux binaries, you can use AFL++'s unicorn_mode which can emulate 144*08b48e0bSAndroid Build Coastguard Workeranything you want - for the price of speed and user written scripts. 145*08b48e0bSAndroid Build Coastguard Worker 146*08b48e0bSAndroid Build Coastguard WorkerTo build unicorn_mode: 147*08b48e0bSAndroid Build Coastguard Worker 148*08b48e0bSAndroid Build Coastguard Worker```shell 149*08b48e0bSAndroid Build Coastguard Workercd unicorn_mode 150*08b48e0bSAndroid Build Coastguard Worker./build_unicorn_support.sh 151*08b48e0bSAndroid Build Coastguard Worker``` 152*08b48e0bSAndroid Build Coastguard Worker 153*08b48e0bSAndroid Build Coastguard WorkerFor further information, check out 154*08b48e0bSAndroid Build Coastguard Worker[unicorn_mode/README.md](../unicorn_mode/README.md). 155*08b48e0bSAndroid Build Coastguard Worker 156*08b48e0bSAndroid Build Coastguard Worker### Shared libraries 157*08b48e0bSAndroid Build Coastguard Worker 158*08b48e0bSAndroid Build Coastguard WorkerIf the goal is to fuzz a dynamic library, then there are two options available. 159*08b48e0bSAndroid Build Coastguard WorkerFor both, you need to write a small harness that loads and calls the library. 160*08b48e0bSAndroid Build Coastguard WorkerThen you fuzz this with either FRIDA mode or QEMU mode and either use 161*08b48e0bSAndroid Build Coastguard Worker`AFL_INST_LIBS=1` or `AFL_QEMU/FRIDA_INST_RANGES`. 162*08b48e0bSAndroid Build Coastguard Worker 163*08b48e0bSAndroid Build Coastguard WorkerAnother, less precise and slower option is to fuzz it with utils/afl_untracer/ 164*08b48e0bSAndroid Build Coastguard Workerand use afl-untracer.c as a template. It is slower than FRIDA mode. 165*08b48e0bSAndroid Build Coastguard Worker 166*08b48e0bSAndroid Build Coastguard WorkerFor more information, see 167*08b48e0bSAndroid Build Coastguard Worker[utils/afl_untracer/README.md](../utils/afl_untracer/README.md). 168*08b48e0bSAndroid Build Coastguard Worker 169*08b48e0bSAndroid Build Coastguard Worker### Coresight 170*08b48e0bSAndroid Build Coastguard Worker 171*08b48e0bSAndroid Build Coastguard WorkerCoresight is ARM's answer to Intel's PT. With AFL++ v3.15, there is a coresight 172*08b48e0bSAndroid Build Coastguard Workertracer implementation available in `coresight_mode/` which is faster than QEMU, 173*08b48e0bSAndroid Build Coastguard Workerhowever, cannot run in parallel. Currently, only one process can be traced, it 174*08b48e0bSAndroid Build Coastguard Workeris WIP. 175*08b48e0bSAndroid Build Coastguard Worker 176*08b48e0bSAndroid Build Coastguard WorkerFore more information, see 177*08b48e0bSAndroid Build Coastguard Worker[coresight_mode/README.md](../coresight_mode/README.md). 178*08b48e0bSAndroid Build Coastguard Worker 179*08b48e0bSAndroid Build Coastguard Worker## Binary rewriters 180*08b48e0bSAndroid Build Coastguard Worker 181*08b48e0bSAndroid Build Coastguard WorkerAn alternative solution are binary rewriters. They are faster than the solutions 182*08b48e0bSAndroid Build Coastguard Workernative to AFL++ but don't always work. 183*08b48e0bSAndroid Build Coastguard Worker 184*08b48e0bSAndroid Build Coastguard Worker### ZAFL 185*08b48e0bSAndroid Build Coastguard Worker 186*08b48e0bSAndroid Build Coastguard WorkerZAFL is a static rewriting platform supporting x86-64 C/C++, 187*08b48e0bSAndroid Build Coastguard Workerstripped/unstripped, and PIE/non-PIE binaries. Beyond conventional 188*08b48e0bSAndroid Build Coastguard Workerinstrumentation, ZAFL's API enables transformation passes (e.g., laf-Intel, 189*08b48e0bSAndroid Build Coastguard Workercontext sensitivity, InsTrim, etc.). 190*08b48e0bSAndroid Build Coastguard Worker 191*08b48e0bSAndroid Build Coastguard WorkerIts baseline instrumentation speed typically averages 90-95% of 192*08b48e0bSAndroid Build Coastguard Workerafl-clang-fast's. 193*08b48e0bSAndroid Build Coastguard Worker 194*08b48e0bSAndroid Build Coastguard Worker[https://git.zephyr-software.com/opensrc/zafl](https://git.zephyr-software.com/opensrc/zafl) 195*08b48e0bSAndroid Build Coastguard Worker 196*08b48e0bSAndroid Build Coastguard Worker### RetroWrite 197*08b48e0bSAndroid Build Coastguard Worker 198*08b48e0bSAndroid Build Coastguard WorkerRetroWrite is a static binary rewriter that can be combined with AFL++. If you 199*08b48e0bSAndroid Build Coastguard Workerhave an x86_64 or arm64 binary that does not contain C++ exceptions and - if 200*08b48e0bSAndroid Build Coastguard Workerx86_64 - still has it's symbols and compiled with position independent code 201*08b48e0bSAndroid Build Coastguard Worker(PIC/PIE), then the RetroWrite solution might be for you. 202*08b48e0bSAndroid Build Coastguard WorkerIt decompiles to ASM files which can then be instrumented with afl-gcc. 203*08b48e0bSAndroid Build Coastguard Worker 204*08b48e0bSAndroid Build Coastguard WorkerBinaries that are statically instrumented for fuzzing using RetroWrite are close 205*08b48e0bSAndroid Build Coastguard Workerin performance to compiler-instrumented binaries and outperform the QEMU-based 206*08b48e0bSAndroid Build Coastguard Workerinstrumentation. 207*08b48e0bSAndroid Build Coastguard Worker 208*08b48e0bSAndroid Build Coastguard Worker[https://github.com/HexHive/retrowrite](https://github.com/HexHive/retrowrite) 209*08b48e0bSAndroid Build Coastguard Worker 210*08b48e0bSAndroid Build Coastguard Worker### Dyninst 211*08b48e0bSAndroid Build Coastguard Worker 212*08b48e0bSAndroid Build Coastguard WorkerDyninst is a binary instrumentation framework similar to Pintool and DynamoRIO. 213*08b48e0bSAndroid Build Coastguard WorkerHowever, whereas Pintool and DynamoRIO work at runtime, Dyninst instruments the 214*08b48e0bSAndroid Build Coastguard Workertarget at load time and then let it run - or save the binary with the changes. 215*08b48e0bSAndroid Build Coastguard WorkerThis is great for some things, e.g., fuzzing, and not so effective for others, 216*08b48e0bSAndroid Build Coastguard Workere.g., malware analysis. 217*08b48e0bSAndroid Build Coastguard Worker 218*08b48e0bSAndroid Build Coastguard WorkerSo, what you can do with Dyninst is taking every basic block and putting AFL++'s 219*08b48e0bSAndroid Build Coastguard Workerinstrumentation code in there - and then save the binary. Afterwards, just fuzz 220*08b48e0bSAndroid Build Coastguard Workerthe newly saved target binary with afl-fuzz. Sounds great? It is. The issue 221*08b48e0bSAndroid Build Coastguard Workerthough - it is a non-trivial problem to insert instructions, which change 222*08b48e0bSAndroid Build Coastguard Workeraddresses in the process space, so that everything is still working afterwards. 223*08b48e0bSAndroid Build Coastguard WorkerHence, more often than not binaries crash when they are run. 224*08b48e0bSAndroid Build Coastguard Worker 225*08b48e0bSAndroid Build Coastguard WorkerThe speed decrease is about 15-35%, depending on the optimization options used 226*08b48e0bSAndroid Build Coastguard Workerwith afl-dyninst. 227*08b48e0bSAndroid Build Coastguard Worker 228*08b48e0bSAndroid Build Coastguard Worker[https://github.com/vanhauser-thc/afl-dyninst](https://github.com/vanhauser-thc/afl-dyninst) 229*08b48e0bSAndroid Build Coastguard Worker 230*08b48e0bSAndroid Build Coastguard Worker### Mcsema 231*08b48e0bSAndroid Build Coastguard Worker 232*08b48e0bSAndroid Build Coastguard WorkerTheoretically, you can also decompile to llvm IR with mcsema, and then use 233*08b48e0bSAndroid Build Coastguard Workerllvm_mode to instrument the binary. Good luck with that. 234*08b48e0bSAndroid Build Coastguard Worker 235*08b48e0bSAndroid Build Coastguard Worker[https://github.com/lifting-bits/mcsema](https://github.com/lifting-bits/mcsema) 236*08b48e0bSAndroid Build Coastguard Worker 237*08b48e0bSAndroid Build Coastguard Worker## Binary tracers 238*08b48e0bSAndroid Build Coastguard Worker 239*08b48e0bSAndroid Build Coastguard Worker### Pintool & DynamoRIO 240*08b48e0bSAndroid Build Coastguard Worker 241*08b48e0bSAndroid Build Coastguard WorkerPintool and DynamoRIO are dynamic instrumentation engines. They can be used for 242*08b48e0bSAndroid Build Coastguard Workergetting basic block information at runtime. Pintool is only available for Intel 243*08b48e0bSAndroid Build Coastguard Workerx32/x64 on Linux, Mac OS, and Windows, whereas DynamoRIO is additionally 244*08b48e0bSAndroid Build Coastguard Workeravailable for ARM and AARCH64. DynamoRIO is also 10x faster than Pintool. 245*08b48e0bSAndroid Build Coastguard Worker 246*08b48e0bSAndroid Build Coastguard WorkerThe big issue with DynamoRIO (and therefore Pintool, too) is speed. DynamoRIO 247*08b48e0bSAndroid Build Coastguard Workerhas a speed decrease of 98-99%, Pintool has a speed decrease of 99.5%. 248*08b48e0bSAndroid Build Coastguard Worker 249*08b48e0bSAndroid Build Coastguard WorkerHence, DynamoRIO is the option to go for if everything else fails and Pintool 250*08b48e0bSAndroid Build Coastguard Workeronly if DynamoRIO fails, too. 251*08b48e0bSAndroid Build Coastguard Worker 252*08b48e0bSAndroid Build Coastguard WorkerDynamoRIO solutions: 253*08b48e0bSAndroid Build Coastguard Worker* [https://github.com/vanhauser-thc/afl-dynamorio](https://github.com/vanhauser-thc/afl-dynamorio) 254*08b48e0bSAndroid Build Coastguard Worker* [https://github.com/mxmssh/drAFL](https://github.com/mxmssh/drAFL) 255*08b48e0bSAndroid Build Coastguard Worker* [https://github.com/googleprojectzero/winafl/](https://github.com/googleprojectzero/winafl/) 256*08b48e0bSAndroid Build Coastguard Worker <= very good but windows only 257*08b48e0bSAndroid Build Coastguard Worker 258*08b48e0bSAndroid Build Coastguard WorkerPintool solutions: 259*08b48e0bSAndroid Build Coastguard Worker* [https://github.com/vanhauser-thc/afl-pin](https://github.com/vanhauser-thc/afl-pin) 260*08b48e0bSAndroid Build Coastguard Worker* [https://github.com/mothran/aflpin](https://github.com/mothran/aflpin) 261*08b48e0bSAndroid Build Coastguard Worker* [https://github.com/spinpx/afl_pin_mode](https://github.com/spinpx/afl_pin_mode) 262*08b48e0bSAndroid Build Coastguard Worker <= only old Pintool version supported 263*08b48e0bSAndroid Build Coastguard Worker 264*08b48e0bSAndroid Build Coastguard Worker### Intel PT 265*08b48e0bSAndroid Build Coastguard Worker 266*08b48e0bSAndroid Build Coastguard WorkerIf you have a newer Intel CPU, you can make use of Intel's processor trace. The 267*08b48e0bSAndroid Build Coastguard Workerbig issue with Intel's PT is the small buffer size and the complex encoding of 268*08b48e0bSAndroid Build Coastguard Workerthe debug information collected through PT. This makes the decoding very CPU 269*08b48e0bSAndroid Build Coastguard Workerintensive and hence slow. As a result, the overall speed decrease is about 270*08b48e0bSAndroid Build Coastguard Worker70-90% (depending on the implementation and other factors). 271*08b48e0bSAndroid Build Coastguard Worker 272*08b48e0bSAndroid Build Coastguard WorkerThere are two AFL intel-pt implementations: 273*08b48e0bSAndroid Build Coastguard Worker 274*08b48e0bSAndroid Build Coastguard Worker1. [https://github.com/junxzm1990/afl-pt](https://github.com/junxzm1990/afl-pt) 275*08b48e0bSAndroid Build Coastguard Worker => This needs Ubuntu 14.04.05 without any updates and the 4.4 kernel. 276*08b48e0bSAndroid Build Coastguard Worker 277*08b48e0bSAndroid Build Coastguard Worker2. [https://github.com/hunter-ht-2018/ptfuzzer](https://github.com/hunter-ht-2018/ptfuzzer) 278*08b48e0bSAndroid Build Coastguard Worker => This needs a 4.14 or 4.15 kernel. The "nopti" kernel boot option must be 279*08b48e0bSAndroid Build Coastguard Worker used. This one is faster than the other. 280*08b48e0bSAndroid Build Coastguard Worker 281*08b48e0bSAndroid Build Coastguard WorkerNote that there is also honggfuzz: 282*08b48e0bSAndroid Build Coastguard Worker[https://github.com/google/honggfuzz](https://github.com/google/honggfuzz). But 283*08b48e0bSAndroid Build Coastguard Workerits IPT performance is just 6%! 284*08b48e0bSAndroid Build Coastguard Worker 285*08b48e0bSAndroid Build Coastguard Worker## Non-AFL++ solutions 286*08b48e0bSAndroid Build Coastguard Worker 287*08b48e0bSAndroid Build Coastguard WorkerThere are many binary-only fuzzing frameworks. Some are great for CTFs but don't 288*08b48e0bSAndroid Build Coastguard Workerwork with large binaries, others are very slow but have good path discovery, 289*08b48e0bSAndroid Build Coastguard Workersome are very hard to set up... 290*08b48e0bSAndroid Build Coastguard Worker 291*08b48e0bSAndroid Build Coastguard Worker* Jackalope: 292*08b48e0bSAndroid Build Coastguard Worker [https://github.com/googleprojectzero/Jackalope](https://github.com/googleprojectzero/Jackalope) 293*08b48e0bSAndroid Build Coastguard Worker* Manticore: 294*08b48e0bSAndroid Build Coastguard Worker [https://github.com/trailofbits/manticore](https://github.com/trailofbits/manticore) 295*08b48e0bSAndroid Build Coastguard Worker* QSYM: 296*08b48e0bSAndroid Build Coastguard Worker [https://github.com/sslab-gatech/qsym](https://github.com/sslab-gatech/qsym) 297*08b48e0bSAndroid Build Coastguard Worker* S2E: [https://github.com/S2E](https://github.com/S2E) 298*08b48e0bSAndroid Build Coastguard Worker* TinyInst: 299*08b48e0bSAndroid Build Coastguard Worker [https://github.com/googleprojectzero/TinyInst](https://github.com/googleprojectzero/TinyInst) 300*08b48e0bSAndroid Build Coastguard Worker* ... please send me any missing that are good 301*08b48e0bSAndroid Build Coastguard Worker 302*08b48e0bSAndroid Build Coastguard Worker## Closing words 303*08b48e0bSAndroid Build Coastguard Worker 304*08b48e0bSAndroid Build Coastguard WorkerThat's it! News, corrections, updates? Send an email to [email protected]. 305