820 Commits

Author SHA1 Message Date
Toka
82f5dad784
Add mutator stats method (#40)
* add LogMutation trait

* change &self to &mut self

* move self.scheduler out of StdFuzzer

* reorder generics?, implement post_exec

* append metadata to the corresponding testcase in the corpus

* turn mutations into Mutators

* impl Named for mutations

* add LoggerScheduledMutator, add fn get_name() to MutatorTuple

* Fix BytesDeleteMutator, and format

* remove TupleList bound on Tail

* turn TokenInsert, TokenReplace into Mutator, fill havoc_mutations

* libfuzzer_libpng

* libfuzzer_libpng_cmpalloc

* libfuzzer_libmozjpeg

* fix tests

* fix libfuzzer_libmozjpeg

* fix tests

* fix LoggerScheduledMutator::mutate

* use vec<u8> instead of String

* fix post_exec and get_name

* fmt

* NamedTuple and HasNameIdTuple

* always clear mutations log

* fix tests

* format

* remove libafl_targets default features

* use vec<string> instead of vec<vec<u8>>

* add alloc::string::String

* format

Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com>
2021-03-25 13:04:18 +01:00
Andrea Fioraldi
9c0fdee007 complete libfuzzer_libpng example with compiler wrapper 2021-03-24 16:15:07 +01:00
Dominik Maier
7f72d70977
Windows Fuzzing Example (#41)
* windows fuzzer target and minor changes - breaks android support and maybe linux build

* adapted windows example

* removed warnings from build.rs

* fixed build on unix

* fixed no_std

* build fix, silenced warnings

* no_std warning silenced

* clippy fixes

* fmt

* windows fuzzer target and minor changes - breaks android support and maybe linux build

* adapted windows example

* removed warnings from build.rs

* fixed build on unix

* fixed no_std

* build fix, silenced warnings

* no_std warning silenced

* clippy fixes

* fmt

* clippy

* trying to add clang support

* debugging win build

* debugging win build more

* debuggin..

* debuggin....

* more debugging

* giving up

Co-authored-by: richinseattle <richinseattle@gmail.com>
2021-03-23 13:50:22 +01:00
Dominik Maier
556141e9a3 ignored frida on windows 2021-03-22 16:54:31 +01:00
Dominik Maier
33654dbf04 fixed no_std 2021-03-22 15:09:47 +01:00
s1341
a02cc39bba
Frida Executor Example (#27)
* inprocess: Allow InProcessExecutor to take a function pointer or a closure

* frida: initial working (but slow + buggy) frida helper

Issues:
- it's slow as ****
- there is an Llmp exception after the 227th corpus entry is found
- Cargo.toml lines currently import from a local ../frida-rust dir, as frida-rust is still under development

* inprocess: let the InProcessExecutor take a closure or a function pointer

* frida: working FridaHelper with InProcessExecutor

* frida: Apply suggestions; Move to RefCell; Cleanup warnings

* frida: link libstdc++_static.a on android

* take an FnMut in InProcessExecutor

* adapt libfuzzer_libpng to FnMut in InProcessExecutor

* create FridaInProcessExecutor and FridaEdgeCoverageHelper

* fix frida build.rs

* frida: move gum to main, get rid of lazy_static; use PageProtection enum

* stalker exclude

* frida: implement inline map-update for x86_64

* inprocess: add harness/harness_mut accessors

* format

* remove get_module_size from FridaEdgeCoverageHelper

* frida: implement aarch64 inline map update

* frida: add missing IndexMode

* add timeouts for executors

* move timeouts to observer

* add with_timeout constructor for Observer

* cast to i64 later in pre_exec

* add cfg(unix) guards

* add TimeoutExecutor

* add TimeoutFeedback and send ExitKind::Timeout from the handler

* pass Duration and move timeout stuff to post_exec

* format

* add timeouts to libpng_libfuzzer

* 10 sec timeout

* timeout executor file

* fix timeout executor no_std

* format

* todos

* Win32ShMem

* win32 exceptions

* fixes

* fix win32 build.rs

* fix win32 build.rs

* fixes fro win32

* fixes for win32

* fixes for win32

* fixes for win32

* fixes for win32

* fixes for win32

* fixes for win32

* fixes for win32

* fixes for win32

* fixes for win32

* fixes for win32

* inprocess::windows_exception_handler

* inprocess::windows_exception_handler fixes

* windows_exception_handler in InProcessExecutor

* inprocess::windows_exception_handler fix

* fix windows exceptions mapping

* format

* format

* inprocess: Allow InProcessExecutor to take a function pointer or a closure

* frida: initial working (but slow + buggy) frida helper

Issues:
- it's slow as ****
- there is an Llmp exception after the 227th corpus entry is found
- Cargo.toml lines currently import from a local ../frida-rust dir, as frida-rust is still under development

* inprocess: let the InProcessExecutor take a closure or a function pointer

* frida: Apply suggestions; Move to RefCell; Cleanup warnings

* take an FnMut in InProcessExecutor

* adapt libfuzzer_libpng to FnMut in InProcessExecutor

* reenabled ci for prs

* frida: update to frida-rust 0.3.2

* frida: fix buid errors

* frida: fix build_and_test.yml

* frida: uses crates.io for frida-gum and frida-gum-sys

* fix merge errors

* fix typo

* frida: x86_64 now working

Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com>
Co-authored-by: toka <tokazerkje@outlook.com>
Co-authored-by: Dominik Maier <domenukk@gmail.com>
2021-03-22 12:45:38 +01:00
Dominik Maier
245379c020 added fuzz_loop_for 2021-03-21 23:38:06 +01:00
Dominik Maier
ab9a2485f7 llmp cleanups 2021-03-21 22:56:28 +01:00
Takayuki Maeda
39d33ce7ff
Fix clippy warnings (#37)
* fix some clippy warnings

* add a actions job for linting

* remove needless line

* add `run-on` to build_and_test.yml
2021-03-21 22:05:25 +01:00
Andrea Fioraldi
9bad737f52 format 2021-03-19 05:52:56 -07:00
Andrea Fioraldi
6840016f7d Merge branch 'windows' of github.com:AFLplusplus/LibAFL into windows 2021-03-19 03:44:18 -07:00
Andrea Fioraldi
68b8aa81cd fix windows exceptions mapping 2021-03-19 03:43:59 -07:00
Andrea Fioraldi
efe3d31cc2 format 2021-03-18 17:43:29 +01:00
Andrea Fioraldi
9a527e4a9c inprocess::windows_exception_handler fix 2021-03-18 17:24:12 +01:00
Andrea Fioraldi
3f013c481f windows_exception_handler in InProcessExecutor 2021-03-18 17:22:47 +01:00
Andrea Fioraldi
7cf559eb85 inprocess::windows_exception_handler fixes 2021-03-18 17:12:00 +01:00
Andrea Fioraldi
b4e061750b inprocess::windows_exception_handler 2021-03-18 17:04:59 +01:00
Andrea Fioraldi
35782d2e9a fixes for win32 2021-03-18 16:46:34 +01:00
Andrea Fioraldi
38368c121b fixes for win32 2021-03-18 16:45:54 +01:00
Andrea Fioraldi
301f152d39 fixes for win32 2021-03-18 16:42:05 +01:00
Andrea Fioraldi
c5d8b7fc62 fixes for win32 2021-03-18 16:41:10 +01:00
Andrea Fioraldi
c0b3d25ae2 fixes for win32 2021-03-18 16:38:04 +01:00
Andrea Fioraldi
acdc70b0a6 fixes for win32 2021-03-18 16:35:02 +01:00
Andrea Fioraldi
1e7a5ebe81 fixes for win32 2021-03-18 16:33:12 +01:00
Andrea Fioraldi
cc0da780ef fixes for win32 2021-03-18 16:32:16 +01:00
Andrea Fioraldi
6f1058f8d1 fixes for win32 2021-03-18 16:30:57 +01:00
Andrea Fioraldi
147a6c53b8 fixes for win32 2021-03-18 16:26:03 +01:00
Andrea Fioraldi
5604f3d826 fixes fro win32 2021-03-18 16:22:05 +01:00
Andrea Fioraldi
c447db6db6 fix win32 build.rs 2021-03-18 16:16:31 +01:00
Andrea Fioraldi
b769ae433b fix win32 build.rs 2021-03-18 16:06:46 +01:00
Andrea Fioraldi
59604a03ae fixes 2021-03-18 15:55:07 +01:00
Andrea Fioraldi
87fea0971b win32 exceptions 2021-03-18 15:09:44 +01:00
Andrea Fioraldi
898c178c3b Win32ShMem 2021-03-18 11:34:26 +01:00
Andrea Fioraldi
8a3e4301fb format 2021-03-17 17:19:33 +01:00
Andrea Fioraldi
2b2599833c fix timeout executor no_std 2021-03-17 17:14:46 +01:00
Andrea Fioraldi
cd7030443e timeout executor file 2021-03-17 17:08:17 +01:00
Andrea Fioraldi
5d92871b27
Merge pull request #31 from AFLplusplus/timeout_executors
add timeouts for executors
2021-03-17 16:49:07 +01:00
Andrea Fioraldi
774dbc82d1 10 sec timeout 2021-03-17 16:46:29 +01:00
Andrea Fioraldi
46c69aeee8 add timeouts to libpng_libfuzzer 2021-03-17 15:36:56 +01:00
toka
088b54d614 format 2021-03-16 19:26:36 +09:00
toka
e4a584c02a pass Duration and move timeout stuff to post_exec 2021-03-16 19:20:40 +09:00
Andrea Fioraldi
21301f2cf8 more doc 2021-03-16 10:53:32 +01:00
toka
b321675aa9 add TimeoutFeedback and send ExitKind::Timeout from the handler 2021-03-16 18:48:40 +09:00
toka
ab3d070f1a add TimeoutExecutor 2021-03-16 18:13:18 +09:00
s1341
058f88977e
Make unix sockets abstract and fix ashmem device path (#33)
* Make unix sockets abstract

Also fix ashmem device path. These two changes allow us to run on Android without root

* fmt

* make the dependency on uds cfg(unix)
2021-03-15 22:00:04 +01:00
toka
b259e57524 add cfg(unix) guards 2021-03-15 10:37:46 +09:00
toka
30716e2483 cast to i64 later in pre_exec 2021-03-15 10:23:33 +09:00
toka
ff759e2ca7 add with_timeout constructor for Observer 2021-03-15 10:20:13 +09:00
Dominik Maier
b33cb5d721 debugging llmp 2021-03-14 19:58:04 +01:00
Dominik Maier
8315f9200d no restarts on crash 2021-03-14 18:43:10 +01:00