191 Commits

Author SHA1 Message Date
Andrea Fioraldi
ceea3e0c14 docs 2021-04-02 11:59:38 +02:00
root
a0550b3154 compile libfuzzer_libpng on windows 2021-03-25 18:50:40 +01:00
Dominik Maier
556141e9a3 ignored frida on windows 2021-03-22 16:54:31 +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
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
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
87fea0971b win32 exceptions 2021-03-18 15:09:44 +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
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
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
toka
ff759e2ca7 add with_timeout constructor for Observer 2021-03-15 10:20:13 +09:00
toka
ae9486814e move timeouts to observer 2021-03-14 07:55:14 +09:00
toka
cad5e339d9 add timeouts for executors 2021-03-13 07:25:28 +09:00
Dominik Maier
8459997d9f volatile for signal handlers 2021-03-06 16:32:42 +01:00
Dominik Maier
edd239ce95 more stable raw mem access in signal handlers 2021-03-05 21:38:48 +01:00
s1341
b048ddf470
Better Unix Signal Handling Abstractions (#22)
* WIP: unix_signal_handling

* WIP: unix_signal_handling, another try

* only emit a single illegal instruction

* unix_signal_handling: Now working

* unix_signal_handling: squash warnings

* unix_signal_handling: formatting

* fix spelling

* unix_signal_handling: add missing file

* unix_signal_handling: port LlmpBroker

* unix_signal_handling: fix missing import

* moving towards no_std compatibility

* unix_signal_handling: get rid of HashMap, Mutex and lazy-static

* unix_signal_handling: formatting

* readme

* no_std fixes

* fixed windows build

Co-authored-by: Dominik Maier <domenukk@gmail.com>
Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com>
2021-03-05 15:36:44 +01:00
Andrea Fioraldi
55def9b966 format 2021-03-05 14:34:25 +01:00
Andrea Fioraldi
0a4a40101a fix executor post exec 2021-03-05 14:19:17 +01:00
s1341
fde48be53e
unix_domain_sockets/ashmem: Add ability to connect over unix domain sockets instead of just TCP; Add ashmem support for android (#19)
* unix_domain_sockets: Added Listener abstraction

Tested and TCP is still working

* unix_domain_sockets: turn off the unstable feature except on android

* unix_domain_sockets: more turn off the unstable feature except on android

* unix_domain_sockets: always import UnixListener

* unix_domain_sockets: Finished implementation. Tested working on android when both sides are root

* unix_domain_sockets: adjust conditional compilation

* unix_domain_sockets: formatting

* unix_domain_sockets/android: implement ashmem hooks

* unix_domain_sockets/android: formatting

* unix_domain_sockets: make Listener abstraction public

* unix_domain_sockets: add cfg(std) to Listener

* unix_domain_sockets: add cfg(std) to imports

* unix_domain_sockets: formatting

* unix_domain_sockets: Handle SIGTERM, SIGQUIT and SIGINT gracefully and cleanup the unix socket

* unix_domain_sockets: formatting

* unix_domain_sockets: fix conditional compilation

* unix_domain_sockets: use String::default instead of a literal

* unix_domain_sockets: socket_name should be an Option<>

* fixed build

* fmt

* fixed warnings

* using volatile reads and writes for shutdown flag

* reordered compiler fence on write

* moved the signal handler method to its own function

* readme

* moved to HasShmId

* unix_domain_sockets: fix warnings

* renamed HasShmId to HasFd

Co-authored-by: Dominik Maier <domenukk@gmail.com>
2021-03-03 12:31:29 +01:00
Dominik Maier
dbd3cbd99c some clippy fixes 2021-03-02 19:33:03 +01:00
s1341
d0d9d2887f
Support running on Android aarch64 (#17)
* android: cleanup build.rs and allow for cross-compilation

* aarch64: use an aarch64 undefined instruction

* android: i8 should be u8

* android: siginfo_t is different on arm

* android: cast to c_char instead of u8/i8

It turns out that c_char is different on android and linux

* android: handle LDFLAGS being empty

* android: formatting

* fixed warning

Co-authored-by: Dominik Maier <domenukk@gmail.com>
2021-03-01 15:18:27 +01:00
Dominik Maier
ea278a0dd6 fixed testcases, removed mutator param from mutators 2021-02-25 18:55:37 +01:00
Dominik Maier
0134b74a39 testcases fixed, no_std fixes 2021-02-25 17:17:55 +01:00
Andrea Fioraldi
a5cc8313db new ondisk corpus 2021-02-22 15:19:35 +01:00
Andrea Fioraldi
3b0883721e rand and queue corpus schedulers 2021-02-22 14:13:00 +01:00
Andrea Fioraldi
ff626a124b compiles 2021-02-22 13:52:53 +01:00
Andrea Fioraldi
c411fec271 scozz 2021-02-22 11:26:11 +01:00
Andrea Fioraldi
93947c44cf executor fix 2021-02-21 14:34:51 +01:00
Andrea Fioraldi
a939f052d3 fuzzer arg missing atm 2021-02-19 15:46:39 +01:00
Andrea Fioraldi
1575a3994b impl serdeany macro 2021-02-16 14:49:18 +01:00
Andrea Fioraldi
e99c2daa41 libafl package 2021-02-15 16:54:33 +01:00