All Projects → AFLplusplus → Afl Snapshot Lkm

AFLplusplus / Afl Snapshot Lkm

A Linux Kernel Module that implements a fast snapshot mechanism for fuzzing.

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Afl Snapshot Lkm

Awesome Directed Fuzzing
A curated list of awesome directed fuzzing research papers
Stars: ✭ 77 (-20.62%)
Mutual labels:  fuzzing
Samsung Trustzone Research
Reverse-engineering tools and exploits for Samsung's implementation of TrustZone
Stars: ✭ 85 (-12.37%)
Mutual labels:  fuzzing
Crlf Injection Scanner
Command line tool for testing CRLF injection on a list of domains.
Stars: ✭ 91 (-6.19%)
Mutual labels:  fuzzing
Brundlefuzz
BrundleFuzz is a distributed fuzzer for Windows and Linux using dynamic binary instrumentation.
Stars: ✭ 78 (-19.59%)
Mutual labels:  fuzzing
Archeap
ArcHeap: Automatic Techniques to Systematically Discover New Heap Exploitation Primitives
Stars: ✭ 80 (-17.53%)
Mutual labels:  fuzzing
V8 Profiler Next
node bindings for the v8 profiler
Stars: ✭ 88 (-9.28%)
Mutual labels:  snapshot
Aws Maintenance
Collection of scripts and Lambda functions used for maintaining AWS resources
Stars: ✭ 75 (-22.68%)
Mutual labels:  snapshot
Cazador unr
Hacking tools
Stars: ✭ 95 (-2.06%)
Mutual labels:  fuzzing
Fuzzan
FuZZan: Efficient Sanitizer Metadata Design for Fuzzing
Stars: ✭ 81 (-16.49%)
Mutual labels:  fuzzing
Firmae
Towards Large-Scale Emulation of IoT Firmware for Dynamic Analysis
Stars: ✭ 91 (-6.19%)
Mutual labels:  fuzzing
Storm
A blackbox mutational fuzzer for detecting critical bugs in SMT solvers
Stars: ✭ 79 (-18.56%)
Mutual labels:  fuzzing
Slides
won't maintain
Stars: ✭ 79 (-18.56%)
Mutual labels:  fuzzing
Test Each
🤖 Repeat tests. Repeat tests. Repeat tests.
Stars: ✭ 89 (-8.25%)
Mutual labels:  fuzzing
Optee fuzzer
This repository contains the code for a fuzzing prototype for the OP-TEE system call interface using AFL.
Stars: ✭ 78 (-19.59%)
Mutual labels:  fuzzing
Unityheapcrawler
Reflection based heap shapshot tool for Unity game engine
Stars: ✭ 91 (-6.19%)
Mutual labels:  snapshot
Afl Patches
Patches to afl to fix bugs or add enhancements
Stars: ✭ 76 (-21.65%)
Mutual labels:  fuzzing
Ble Security Attack Defence
✨ Purpose only! The dangers of Bluetooth Low Energy(BLE)implementations: Unveiling zero day vulnerabilities and security flaws in modern Bluetooth LE stacks.
Stars: ✭ 88 (-9.28%)
Mutual labels:  fuzzing
Octo
A fuzzing library in JavaScript. ✨
Stars: ✭ 96 (-1.03%)
Mutual labels:  fuzzing
Amdh
Android Mobile Device Hardening
Stars: ✭ 95 (-2.06%)
Mutual labels:  snapshot
Domato
DOM fuzzer
Stars: ✭ 1,303 (+1243.3%)
Mutual labels:  fuzzing

AFL++ Snapshot LKM

A Linux Kernel Module that implements a fast snapshot mechanism for fuzzing. Written by Andrea Fioraldi [email protected]. First port to a LKM written by Nick "kallsyms" Gregory. Originally inspired by https://github.com/sslab-gatech/perf-fuzz.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

PLEASE NOTE: Due to syscall hooking and the never ending changes in the kernel we are unable to maintain it as we are busy working on libafl. If you would like to take over the development, just create an issue and let us start a discussion. We still accept pull requests in the mean time.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Why?

fork() is slow and we want to fuzz faster. The speed gain currently varies between 20-360% depending on the target.

Persistent mode in llvm_mode will give you a better performance bump though, however adding this snapshot module will still be a small improvement.

Speed comparison

project program exec/s with snapshot exec/s normal speed factor
afl++ test-instr 25k 8234 x3
unrar unrar 7044 1938 x3.6
jpeg djpeg 1911 1502 x1.3
tiff thumbnail 5058 3114 x1.6
libxml xmllint 7835 3450 x2.3
afl++ test_persistent_new 106k 89k x1.2

Usage

Load it using ./load.sh, unload it using ./unload.sh.

./load.sh will compile the module for you, you need also python3.

While the module is loaded, AFL++ will detect it and automatically switch from fork() to snapshot mode. (Note: currently llvm_mode only, available from v2.66d/v2.67c onwards)

API

int afl_snapshot_init();

This is the initialization routine that opens the ioctl device.

void afl_snapshot_exclude_vmrange(void* start, void* end);

Add a range of addresses (with page granularity) in the blocklist. These pages will not be snapshotted.

void afl_snapshot_include_vmrange(void* start, void* end);

Add a range of addresses (with page granularity) in the allowlist. These pages will be snapshotted.

int afl_snapshot_take(int config);

Take the snapshot in this program point. Returns 1 when the snapshot is taken, if there is already one snapshot does nothing and return 0.

The config mask can have the following options OR-ed:

  • AFL_SNAPSHOT_MMAP Trace new mmaped ares and unmap them on restore.
  • AFL_SNAPSHOT_BLOCK Do not snapshot any page (by default all writeable not-shared pages are shanpshotted.
  • AFL_SNAPSHOT_FDS Snapshot file descriptor state, close newly opened descriptors
  • AFL_SNAPSHOT_REGS Snapshot registers state
  • AFL_SNAPSHOT_EXIT Perform a restore when exit_group is invoked
  • AFL_SNAPSHOT_NOSTACK Do not snapshot Stack pages
void afl_snapshot_restore(void);

Restore the snapshot. If registers are snapshotted, this function never returns.

void afl_snapshot_clean(void);

Remove the snapshot, you can not call afl_snapshot_take in another program point.

TODOs

  • support for multithreaded applications
  • file descriptors state restore (lseek)
  • switch from kprobe to ftrace for hooking (faster)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].