fixes for frida mode for win and checks in rust 1.56 (#334)
* fixes for frida mode for win * missing bracket * fix docs * fix docs, add windows ci * disable breaking ci
This commit is contained in:
parent
77e0be218a
commit
3f1130a8a4
2
.github/workflows/build_and_test.yml
vendored
2
.github/workflows/build_and_test.yml
vendored
@ -143,6 +143,8 @@ jobs:
|
|||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: clippy
|
command: clippy
|
||||||
|
#- name: Build frida
|
||||||
|
# run: cd fuzzers/frida_libpng/ && cargo build --release
|
||||||
macos:
|
macos:
|
||||||
runs-on: macOS-latest
|
runs-on: macOS-latest
|
||||||
steps:
|
steps:
|
||||||
|
1
fuzzers/frida_libpng/.gitignore
vendored
1
fuzzers/frida_libpng/.gitignore
vendored
@ -2,3 +2,4 @@ libpng-*
|
|||||||
corpus_discovered
|
corpus_discovered
|
||||||
libafl_frida
|
libafl_frida
|
||||||
frida_libpng
|
frida_libpng
|
||||||
|
zlib*
|
@ -38,15 +38,16 @@ You can also fuzz libpng-1.6.37 on windows with frida mode!
|
|||||||
2. Build libpng1.6.37
|
2. Build libpng1.6.37
|
||||||
- Open libpng-1.6.37/projects/vstudio/vstudio.sln
|
- Open libpng-1.6.37/projects/vstudio/vstudio.sln
|
||||||
- Open Build->Configuration Manager
|
- Open Build->Configuration Manager
|
||||||
- select Release for Active soltuion configuration and
|
- select Release for Active solution configuration and
|
||||||
- select <New>->x64 for Active solution platform (Copy settings from Win32)
|
- select <New>->x64 for Active solution platform (Copy settings from Win32)
|
||||||
- Then for libpng, pngstest, pngtest, pngunknown, pngvalid, zlib in Solution Explorer, choose General -> Configuration Type -> Static library(.lib)
|
- Then for libpng, pngstest, pngtest, pngunknown, pngvalid, zlib in Solution Explorer, choose General -> Configuration Type -> Static library(.lib)
|
||||||
- C/C++ -> Treat Warnings As Errors -> No
|
- C/C++ -> Treat Warnings As Errors -> No
|
||||||
- C/C++ -> Code Generation -> Runtime Library -> Multi-threaded (/MT)
|
- C/C++ -> Code Generation -> Runtime Library -> Multi-threaded (/MT)
|
||||||
- Finally you can build libpng-1.6.37
|
- Finally, you can build libpng-1.6.37
|
||||||
3. Compile the harness
|
3. Compile the harness
|
||||||
Fire up a powershell at this directory.
|
Fire up a powershell at this directory.
|
||||||
```
|
```
|
||||||
|
cargo build --release
|
||||||
cp .\libpng-1.6.37\projects\vstudio\x64\Release\libpng16.lib .
|
cp .\libpng-1.6.37\projects\vstudio\x64\Release\libpng16.lib .
|
||||||
cp .\libpng-1.6.37\projects\vstudio\x64\Release\zlib.lib .
|
cp .\libpng-1.6.37\projects\vstudio\x64\Release\zlib.lib .
|
||||||
cp .\target\release\frida_libpng.exe .
|
cp .\target\release\frida_libpng.exe .
|
||||||
|
@ -593,7 +593,7 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Variadic macro to create a chain of AndFeedback
|
/// Variadic macro to create a chain of [`AndFeedback`](EagerAndFeedback)
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! feedback_and {
|
macro_rules! feedback_and {
|
||||||
( $last:expr ) => { $last };
|
( $last:expr ) => { $last };
|
||||||
@ -604,7 +604,7 @@ macro_rules! feedback_and {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
///
|
///
|
||||||
/// Variadic macro to create a chain of (fast) AndFeedback
|
/// Variadic macro to create a chain of (fast) [`AndFeedback`](FastAndFeedback)
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! feedback_and_fast {
|
macro_rules! feedback_and_fast {
|
||||||
( $last:expr ) => { $last };
|
( $last:expr ) => { $last };
|
||||||
@ -615,7 +615,7 @@ macro_rules! feedback_and_fast {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Variadic macro to create a chain of OrFeedback
|
/// Variadic macro to create a chain of [`OrFeedback`](EagerOrFeedback)
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! feedback_or {
|
macro_rules! feedback_or {
|
||||||
( $last:expr ) => { $last };
|
( $last:expr ) => { $last };
|
||||||
@ -636,7 +636,7 @@ macro_rules! feedback_or_fast {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Variadic macro to create a NotFeedback
|
/// Variadic macro to create a [`NotFeedback`]
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! feedback_not {
|
macro_rules! feedback_not {
|
||||||
( $last:expr ) => {
|
( $last:expr ) => {
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
//! Tracing of expressions in a serialized form.
|
//! Tracing of expressions in a serialized form.
|
||||||
|
|
||||||
use std::num::NonZeroUsize;
|
|
||||||
|
|
||||||
pub use libafl::observers::concolic::serialization_format::StdShMemMessageFileWriter;
|
pub use libafl::observers::concolic::serialization_format::StdShMemMessageFileWriter;
|
||||||
use libafl::observers::concolic::SymExpr;
|
use libafl::observers::concolic::SymExpr;
|
||||||
|
|
||||||
@ -32,7 +30,7 @@ impl TracingRuntime {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A macro to generate the boilerplate for declaring a runtime function for SymCC that simply logs the function call
|
/// A macro to generate the boilerplate for declaring a runtime function for `SymCC` that simply logs the function call
|
||||||
/// according to [`concolic::SymExpr`].
|
/// according to [`concolic::SymExpr`].
|
||||||
macro_rules! expression_builder {
|
macro_rules! expression_builder {
|
||||||
($method_name:ident ( $($param_name:ident : $param_type:ty ),+ ) => $message:ident) => {
|
($method_name:ident ( $($param_name:ident : $param_type:ty ),+ ) => $message:ident) => {
|
||||||
|
@ -249,7 +249,7 @@ fn pc(context: &CpuContext) -> usize {
|
|||||||
context.pc() as usize
|
context.pc() as usize
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_arch = "x86_64")]
|
#[cfg(all(target_arch = "x86_64", not(windows)))]
|
||||||
fn pc(context: &CpuContext) -> usize {
|
fn pc(context: &CpuContext) -> usize {
|
||||||
context.rip() as usize
|
context.rip() as usize
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user