Format all tomls with taplo fmt
(#2436)
Co-authored-by: Dominik Maier <domenukk@gmail.com>
This commit is contained in:
parent
76e1b4cb1e
commit
afbdc02c54
74
Cargo.toml
74
Cargo.toml
@ -1,48 +1,48 @@
|
||||
[workspace]
|
||||
resolver = "2"
|
||||
members = [
|
||||
"libafl",
|
||||
"libafl_bolts",
|
||||
"libafl_cc",
|
||||
"libafl_derive",
|
||||
"libafl_targets",
|
||||
"libafl_sugar",
|
||||
"libafl_concolic/test/dump_constraints",
|
||||
"libafl_concolic/test/runtime_test",
|
||||
"utils/build_and_test_fuzzers",
|
||||
"utils/deexit",
|
||||
"utils/libafl_benches",
|
||||
"utils/gramatron/construct_automata",
|
||||
"libafl",
|
||||
"libafl_bolts",
|
||||
"libafl_cc",
|
||||
"libafl_derive",
|
||||
"libafl_targets",
|
||||
"libafl_sugar",
|
||||
"libafl_concolic/test/dump_constraints",
|
||||
"libafl_concolic/test/runtime_test",
|
||||
"utils/build_and_test_fuzzers",
|
||||
"utils/deexit",
|
||||
"utils/libafl_benches",
|
||||
"utils/gramatron/construct_automata",
|
||||
]
|
||||
default-members = [
|
||||
"libafl",
|
||||
"libafl_bolts",
|
||||
"libafl_cc",
|
||||
"libafl_derive",
|
||||
"libafl_targets",
|
||||
"libafl",
|
||||
"libafl_bolts",
|
||||
"libafl_cc",
|
||||
"libafl_derive",
|
||||
"libafl_targets",
|
||||
]
|
||||
|
||||
exclude = [
|
||||
"bindings",
|
||||
"fuzzers",
|
||||
"utils/noaslr",
|
||||
"utils/gdb_qemu",
|
||||
"utils/libafl_fmt",
|
||||
"utils/desyscall",
|
||||
"utils/multi_machine_generator",
|
||||
"scripts",
|
||||
# additional crates
|
||||
"libafl_concolic/symcc_runtime",
|
||||
"libafl_concolic/symcc_libafl",
|
||||
"libafl_frida",
|
||||
"libafl_libfuzzer",
|
||||
"libafl_libfuzzer_runtime",
|
||||
"libafl_nyx",
|
||||
"libafl_qemu",
|
||||
"libafl_tinyinst",
|
||||
"libafl_qemu/libafl_qemu_build",
|
||||
"libafl_qemu/libafl_qemu_sys",
|
||||
"libafl_concolic/test/symcc/util/symcc_fuzzing_helper",
|
||||
"bindings",
|
||||
"fuzzers",
|
||||
"utils/noaslr",
|
||||
"utils/gdb_qemu",
|
||||
"utils/libafl_fmt",
|
||||
"utils/desyscall",
|
||||
"utils/multi_machine_generator",
|
||||
"scripts",
|
||||
# additional crates
|
||||
"libafl_concolic/symcc_runtime",
|
||||
"libafl_concolic/symcc_libafl",
|
||||
"libafl_frida",
|
||||
"libafl_libfuzzer",
|
||||
"libafl_libfuzzer_runtime",
|
||||
"libafl_nyx",
|
||||
"libafl_qemu",
|
||||
"libafl_tinyinst",
|
||||
"libafl_qemu/libafl_qemu_build",
|
||||
"libafl_qemu/libafl_qemu_sys",
|
||||
"libafl_concolic/test/symcc/util/symcc_fuzzing_helper",
|
||||
]
|
||||
|
||||
[workspace.package]
|
||||
|
@ -6,11 +6,17 @@ edition = "2021"
|
||||
[dependencies]
|
||||
pyo3 = { version = "0.18.3", features = ["extension-module"] }
|
||||
pyo3-log = "0.8.1"
|
||||
libafl_sugar = { path = "../../libafl_sugar", version = "0.13.2", features = ["python"] }
|
||||
libafl_bolts = { path = "../../libafl_bolts", version = "0.13.2", features = ["python"] }
|
||||
libafl_sugar = { path = "../../libafl_sugar", version = "0.13.2", features = [
|
||||
"python",
|
||||
] }
|
||||
libafl_bolts = { path = "../../libafl_bolts", version = "0.13.2", features = [
|
||||
"python",
|
||||
] }
|
||||
|
||||
[target.'cfg(target_os = "linux")'.dependencies]
|
||||
libafl_qemu = { path = "../../libafl_qemu", version = "0.13.2", features = ["python"] }
|
||||
libafl_qemu = { path = "../../libafl_qemu", version = "0.13.2", features = [
|
||||
"python",
|
||||
] }
|
||||
|
||||
[build-dependencies]
|
||||
pyo3-build-config = { version = "0.17" }
|
||||
|
@ -8,12 +8,12 @@ version = "0.10.1"
|
||||
description = "Advanced Fuzzing Library for Python"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.8"
|
||||
license = {text = "Apache-2.0"}
|
||||
license = { text = "Apache-2.0" }
|
||||
classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Programming Language :: Rust",
|
||||
"Topic :: Security",
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Programming Language :: Rust",
|
||||
"Topic :: Security",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "baby_fuzzer"
|
||||
version = "0.10.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "baby_fuzzer_gramatron"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
@ -21,4 +24,6 @@ debug = true
|
||||
[dependencies]
|
||||
libafl = { path = "../../../libafl/" }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/" }
|
||||
postcard = { version = "1.0", features = ["alloc"], default-features = false } # no_std compatible serde serialization format
|
||||
postcard = { version = "1.0", features = [
|
||||
"alloc",
|
||||
], default-features = false } # no_std compatible serde serialization format
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "baby_fuzzer_grimoire"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
|
@ -1,7 +1,11 @@
|
||||
[package]
|
||||
name = "baby_fuzzer_minimizing"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>", "Addison Crump <research@addisoncrump.info>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
"Addison Crump <research@addisoncrump.info>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
|
@ -1,7 +1,11 @@
|
||||
[package]
|
||||
name = "baby_fuzzer_multi"
|
||||
version = "0.10.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>", "Addison Crump <me@addisoncrump.info>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
"Addison Crump <me@addisoncrump.info>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "baby_fuzzer_nautilus"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
|
@ -27,7 +27,12 @@ cc = "1.0"
|
||||
[dependencies]
|
||||
libafl = { path = "../../../libafl" }
|
||||
libafl_bolts = { path = "../../../libafl_bolts" }
|
||||
libafl_targets = { path = "../../../libafl_targets", features = ["sancov_pcguard_hitcounts", "libfuzzer", "sancov_cmplog", "pointer_maps"] }
|
||||
libafl_targets = { path = "../../../libafl_targets", features = [
|
||||
"sancov_pcguard_hitcounts",
|
||||
"libfuzzer",
|
||||
"sancov_cmplog",
|
||||
"pointer_maps",
|
||||
] }
|
||||
mimalloc = { version = "*", default-features = false }
|
||||
|
||||
libafl_cc = { path = "../../../libafl_cc/" }
|
||||
|
@ -1,23 +1,25 @@
|
||||
# Variables
|
||||
[env]
|
||||
FUZZER_NAME='fuzzer_sd'
|
||||
FUZZER_NAME = 'fuzzer_sd'
|
||||
PROJECT_DIR = { script = ["pwd"] }
|
||||
CARGO_TARGET_DIR = { value = "target", condition = { env_not_set = ["CARGO_TARGET_DIR"] } }
|
||||
CARGO_TARGET_DIR = { value = "target", condition = { env_not_set = [
|
||||
"CARGO_TARGET_DIR",
|
||||
] } }
|
||||
PROFILE = { value = "release" }
|
||||
PROFILE_DIR = {value = "release" }
|
||||
PROFILE_DIR = { value = "release" }
|
||||
LIBAFL_CC = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc'
|
||||
FUZZER = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/${FUZZER_NAME}'
|
||||
|
||||
# Compilers
|
||||
[tasks.cc]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}", "--bin", "libafl_cc"]
|
||||
args = ["build", "--profile", "${PROFILE}", "--bin", "libafl_cc"]
|
||||
|
||||
# Harness
|
||||
[tasks.fuzzer]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}", "--bin", "${FUZZER_NAME}"]
|
||||
dependencies = [ "cc" ]
|
||||
args = ["build", "--profile", "${PROFILE}", "--bin", "${FUZZER_NAME}"]
|
||||
dependencies = ["cc"]
|
||||
|
||||
[tasks.build]
|
||||
alias = "fuzzer"
|
||||
@ -25,7 +27,7 @@ alias = "fuzzer"
|
||||
# Run the fuzzer
|
||||
[tasks.run]
|
||||
command = "${CARGO_TARGET_DIR}/${PROFILE_DIR}/${FUZZER_NAME}"
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
# Test
|
||||
[tasks.test]
|
||||
@ -35,7 +37,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
timeout 30s ${CARGO_TARGET_DIR}/${PROFILE_DIR}/${FUZZER_NAME} | tee fuzz_stdout.log || true
|
||||
if grep -qa "objectives: 1" fuzz_stdout.log; then
|
||||
echo "Fuzzer is working"
|
||||
@ -44,13 +46,13 @@ else
|
||||
exit 1
|
||||
fi
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
# Clean up
|
||||
[tasks.clean]
|
||||
# Disable default `clean` definition
|
||||
clear = true
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cargo clean
|
||||
'''
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "baby_fuzzer_tokens"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "baby_fuzzer_unicode"
|
||||
version = "0.10.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
|
@ -1,10 +1,10 @@
|
||||
[env]
|
||||
FUZZER_NAME="fuzzer"
|
||||
FUZZER_NAME = "fuzzer"
|
||||
PROJECT_DIR = { script = ["pwd"] }
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Cargo-make not integrated yet on this"
|
||||
'''
|
||||
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "baby_fuzzer_with_forkexecutor"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "baby_no_std"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[profile.dev]
|
||||
@ -21,4 +24,3 @@ static-alloc = "0.2.3"
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
libc = "0.2"
|
||||
|
||||
|
@ -1,19 +1,28 @@
|
||||
[env]
|
||||
FUZZER_NAME="fuzzer"
|
||||
FUZZER_NAME = "fuzzer"
|
||||
PROJECT_DIR = { script = ["pwd"] }
|
||||
PROFILE = { value = "release", condition = {env_not_set = ["PROFILE"]} }
|
||||
PROFILE_DIR = {value = "release", condition = {env_not_set = ["PROFILE_DIR"] }}
|
||||
PROFILE = { value = "release", condition = { env_not_set = ["PROFILE"] } }
|
||||
PROFILE_DIR = { value = "release", condition = { env_not_set = [
|
||||
"PROFILE_DIR",
|
||||
] } }
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Cargo-make not integrated yet on this"
|
||||
'''
|
||||
|
||||
# Fuzzer
|
||||
[tasks.build]
|
||||
command = "cargo"
|
||||
args = ["build", "--profile", "${PROFILE}", "-Zbuild-std=core,alloc", "--target", "x86_64-unknown-linux-gnu"]
|
||||
args = [
|
||||
"build",
|
||||
"--profile",
|
||||
"${PROFILE}",
|
||||
"-Zbuild-std=core,alloc",
|
||||
"--target",
|
||||
"x86_64-unknown-linux-gnu",
|
||||
]
|
||||
|
||||
# Test
|
||||
[tasks.test]
|
||||
@ -22,7 +31,7 @@ mac_alias = "unsupported"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix]
|
||||
script='''
|
||||
script = '''
|
||||
cargo run -Zbuild-std=core,alloc --target x86_64-unknown-linux-gnu || true
|
||||
'''
|
||||
dependencies = ["build"]
|
||||
|
@ -26,7 +26,11 @@ nix = { version = "0.29", features = ["signal"] }
|
||||
libafl = { path = "../../../libafl/" }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/" }
|
||||
libafl_cc = { path = "../../../libafl_cc/" }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = ["sancov_pcguard_hitcounts", "libfuzzer", "pointer_maps"] }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = [
|
||||
"sancov_pcguard_hitcounts",
|
||||
"libfuzzer",
|
||||
"pointer_maps",
|
||||
] }
|
||||
env_logger = "0.11"
|
||||
|
||||
[lib]
|
||||
|
@ -1,17 +1,21 @@
|
||||
# Variables
|
||||
[env]
|
||||
FUZZER_NAME='fuzzer_libafl_cc'
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = ["CARGO_TARGET_DIR"] } }
|
||||
PROFILE = { value = "release", condition = {env_not_set = ["PROFILE"]} }
|
||||
PROFILE_DIR = {value = "release", condition = {env_not_set = ["PROFILE_DIR"] }}
|
||||
FUZZER_NAME = 'fuzzer_libafl_cc'
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = [
|
||||
"CARGO_TARGET_DIR",
|
||||
] } }
|
||||
PROFILE = { value = "release", condition = { env_not_set = ["PROFILE"] } }
|
||||
PROFILE_DIR = { value = "release", condition = { env_not_set = [
|
||||
"PROFILE_DIR",
|
||||
] } }
|
||||
LIBAFL_CC = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc'
|
||||
LIBAFL_CXX = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx'
|
||||
FUZZER = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/${FUZZER_NAME}'
|
||||
PROJECT_DIR = { script = ["pwd"] }
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Cargo-make not integrated yet on this"
|
||||
'''
|
||||
|
||||
@ -23,7 +27,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.cxx_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile","${PROFILE}"]
|
||||
args = ["build", "--profile", "${PROFILE}"]
|
||||
|
||||
[tasks.cc]
|
||||
linux_alias = "cc_unix"
|
||||
@ -32,7 +36,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.cc_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}"]
|
||||
args = ["build", "--profile", "${PROFILE}"]
|
||||
|
||||
[tasks.crash_cxx]
|
||||
linux_alias = "crash_cxx_unix"
|
||||
@ -41,7 +45,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.crash_cxx_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}", "--features=crash"]
|
||||
args = ["build", "--profile", "${PROFILE}", "--features=crash"]
|
||||
|
||||
[tasks.crash_cc]
|
||||
linux_alias = "crash_cc_unix"
|
||||
@ -50,7 +54,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.crash_cc_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}", "--features=crash"]
|
||||
args = ["build", "--profile", "${PROFILE}", "--features=crash"]
|
||||
|
||||
# Harness
|
||||
[tasks.fuzzer]
|
||||
@ -61,7 +65,7 @@ windows_alias = "unsupported"
|
||||
[tasks.fuzzer_unix]
|
||||
command = "${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc"
|
||||
args = ["${PROJECT_DIR}/src/program.c", "-o", "${FUZZER_NAME}", "-lm"]
|
||||
dependencies = [ "cxx", "cc" ]
|
||||
dependencies = ["cxx", "cc"]
|
||||
|
||||
# Crashing Harness
|
||||
[tasks.fuzzer_crash]
|
||||
@ -72,7 +76,7 @@ windows_alias = "unsupported"
|
||||
[tasks.fuzzer_crash_unix]
|
||||
command = "${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc"
|
||||
args = ["${PROJECT_DIR}/src/program.c", "-o", "${FUZZER_NAME}_crash", "-lm"]
|
||||
dependencies = [ "crash_cxx", "crash_cc" ]
|
||||
dependencies = ["crash_cxx", "crash_cc"]
|
||||
|
||||
# Run the fuzzer
|
||||
[tasks.run]
|
||||
@ -82,10 +86,10 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.run_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
taskset -c 1 ${CARGO_TARGET_DIR}/${PROFILE_DIR}/${CARGO_MAKE_PROJECT_NAME} ./${FUZZER_NAME} ./corpus/ -t 1000
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
|
||||
# Run the fuzzer with a crash
|
||||
@ -96,10 +100,10 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.crash_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
taskset -c 1 ${CARGO_TARGET_DIR}/${PROFILE_DIR}/${CARGO_MAKE_PROJECT_NAME} ./${FUZZER_NAME}_crash ./corpus/ -t 1000
|
||||
'''
|
||||
dependencies = [ "fuzzer_crash" ]
|
||||
dependencies = ["fuzzer_crash"]
|
||||
|
||||
# Test
|
||||
[tasks.test]
|
||||
@ -109,7 +113,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
timeout 30s ${CARGO_TARGET_DIR}/${PROFILE_DIR}/${CARGO_MAKE_PROJECT_NAME} ./${FUZZER_NAME} ./corpus/ -t 1000 | tee fuzz_stdout.log || true
|
||||
if grep -qa "objectives: 1" fuzz_stdout.log; then
|
||||
echo "Fuzzer is working"
|
||||
@ -119,7 +123,7 @@ else
|
||||
fi
|
||||
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
# Clean up
|
||||
[tasks.clean]
|
||||
@ -130,8 +134,8 @@ windows_alias = "unsupported"
|
||||
[tasks.clean_unix]
|
||||
# Disable default `clean` definition
|
||||
clear = true
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -f ./${FUZZER_NAME}
|
||||
cargo clean
|
||||
'''
|
||||
|
@ -18,11 +18,22 @@ opt-level = 3
|
||||
debug = true
|
||||
|
||||
[dependencies]
|
||||
libafl = { path = "../../../libafl/", features = [ "std", "llmp_compression", "llmp_bind_public", "frida_cli" ] } #, "llmp_small_maps", "llmp_debug"]}
|
||||
libafl = { path = "../../../libafl/", features = [
|
||||
"std",
|
||||
"llmp_compression",
|
||||
"llmp_bind_public",
|
||||
"frida_cli",
|
||||
] } #, "llmp_small_maps", "llmp_debug"]}
|
||||
libafl_bolts = { path = "../../../libafl_bolts/" }
|
||||
frida-gum = { version = "0.13.6", features = [ "auto-download", "event-sink", "invocation-listener"] }
|
||||
frida-gum = { version = "0.13.6", features = [
|
||||
"auto-download",
|
||||
"event-sink",
|
||||
"invocation-listener",
|
||||
] }
|
||||
libafl_frida = { path = "../../../libafl_frida", features = ["cmplog"] }
|
||||
libafl_targets = { path = "../../../libafl_targets", features = ["sancov_cmplog"] }
|
||||
libafl_targets = { path = "../../../libafl_targets", features = [
|
||||
"sancov_cmplog",
|
||||
] }
|
||||
libc = "0.2"
|
||||
libloading = "0.7"
|
||||
num-traits = "0.2"
|
||||
|
@ -1,12 +1,16 @@
|
||||
# Variables
|
||||
[env]
|
||||
CARGO_TARGET_DIR = { value = "target", condition = { env_not_set = ["CARGO_TARGET_DIR"] } }
|
||||
PROFILE = { value = "release", condition = {env_not_set = ["PROFILE"]} }
|
||||
PROFILE_DIR = {value = "release", condition = {env_not_set = ["PROFILE_DIR"] }}
|
||||
CARGO_TARGET_DIR = { value = "target", condition = { env_not_set = [
|
||||
"CARGO_TARGET_DIR",
|
||||
] } }
|
||||
PROFILE = { value = "release", condition = { env_not_set = ["PROFILE"] } }
|
||||
PROFILE_DIR = { value = "release", condition = { env_not_set = [
|
||||
"PROFILE_DIR",
|
||||
] } }
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Cargo-make not integrated yet on this"
|
||||
'''
|
||||
|
||||
@ -17,9 +21,9 @@ mac_alias = "unsupported"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.libpng_unix]
|
||||
condition = { files_not_exist = ["./libpng-1.6.37"]}
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { files_not_exist = ["./libpng-1.6.37"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
wget https://github.com/glennrp/libpng/archive/refs/tags/v1.6.37.tar.gz
|
||||
tar -xvf v1.6.37.tar.gz
|
||||
'''
|
||||
@ -31,13 +35,13 @@ mac_alias = "unsupported"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.lib_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cd libpng-1.6.37 && ./configure --enable-shared=no --with-pic=yes --enable-hardware-optimizations=yes
|
||||
cd ..
|
||||
make -C libpng-1.6.37
|
||||
'''
|
||||
dependencies = [ "libpng" ]
|
||||
dependencies = ["libpng"]
|
||||
|
||||
# Harness
|
||||
[tasks.harness]
|
||||
@ -46,12 +50,12 @@ mac_alias = "unsupported"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.harness_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
clang++ -O0 -c -fPIC harness.cc -o harness.o
|
||||
clang++ -O0 harness.cc libpng-1.6.37/.libs/libpng16.a -lz -o libpng-harness -g
|
||||
'''
|
||||
dependencies = [ "lib" ]
|
||||
dependencies = ["lib"]
|
||||
|
||||
# Fuzzer
|
||||
[tasks.fuzzer]
|
||||
@ -60,8 +64,8 @@ mac_alias = "unsupported"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.fuzzer_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cargo build --profile ${PROFILE}
|
||||
'''
|
||||
|
||||
@ -73,10 +77,10 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.run_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
LD_PRELOAD=$CARGO_TARGET_DIR/${PROFILE_DIR}/libfrida_executable_fuzzer.so ./libpng-harness -i corpus -o out -H ./libpng-harness
|
||||
'''
|
||||
dependencies = [ "fuzzer", "harness" ]
|
||||
dependencies = ["fuzzer", "harness"]
|
||||
|
||||
# Test
|
||||
[tasks.test]
|
||||
@ -86,7 +90,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
LD_PRELOAD=$CARGO_TARGET_DIR/${PROFILE_DIR}/libfrida_executable_fuzzer.so ./libpng-harness -i corpus -o out -H ./libpng-harness > fuzz_stdout.log &
|
||||
sleep 10s && pkill libpng-harness
|
||||
@ -97,7 +101,7 @@ else
|
||||
exit 1
|
||||
fi
|
||||
'''
|
||||
dependencies = [ "fuzzer", "harness" ]
|
||||
dependencies = ["fuzzer", "harness"]
|
||||
|
||||
# Clean up
|
||||
[tasks.clean]
|
||||
@ -108,8 +112,8 @@ windows_alias = "unsupported"
|
||||
[tasks.clean_unix]
|
||||
# Disable default `clean` definition
|
||||
clear = true
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -f ./libpng-harness
|
||||
make -C libpng-1.6.37 clean
|
||||
cargo clean
|
||||
|
@ -15,15 +15,26 @@ opt-level = 3
|
||||
debug = true
|
||||
|
||||
[dependencies]
|
||||
libafl = { path = "../../../libafl/", features = [ "std", "llmp_compression",
|
||||
"llmp_bind_public", "frida_cli", "errors_backtrace" ] } #, "llmp_small_maps", "llmp_debug"]}
|
||||
libafl = { path = "../../../libafl/", features = [
|
||||
"std",
|
||||
"llmp_compression",
|
||||
"llmp_bind_public",
|
||||
"frida_cli",
|
||||
"errors_backtrace",
|
||||
] } #, "llmp_small_maps", "llmp_debug"]}
|
||||
libafl_bolts = { path = "../../../libafl_bolts/" }
|
||||
frida-gum = { version = "0.13.6", features = ["auto-download", "event-sink", "invocation-listener"] }
|
||||
frida-gum = { version = "0.13.6", features = [
|
||||
"auto-download",
|
||||
"event-sink",
|
||||
"invocation-listener",
|
||||
] }
|
||||
libafl_frida = { path = "../../../libafl_frida", features = ["cmplog"] }
|
||||
libafl_targets = { path = "../../../libafl_targets", features = ["sancov_cmplog"] }
|
||||
libafl_targets = { path = "../../../libafl_targets", features = [
|
||||
"sancov_cmplog",
|
||||
] }
|
||||
libloading = "0.7"
|
||||
mimalloc = { version = "*", default-features = false }
|
||||
dlmalloc ={version = "0.2.6", features = ["global"]}
|
||||
dlmalloc = { version = "0.2.6", features = ["global"] }
|
||||
color-backtrace = "0.5"
|
||||
env_logger = "0.10.0"
|
||||
iced-x86 = { version = "1.20.0", features = ["code_asm"] }
|
||||
|
@ -1,13 +1,17 @@
|
||||
# Variables
|
||||
[env]
|
||||
CARGO_TARGET_DIR = { value = "target", condition = { env_not_set = ["CARGO_TARGET_DIR"] } }
|
||||
FUZZER_NAME={ source = "${CARGO_MAKE_RUST_TARGET_OS}", default_value = "frida_gdiplus", mapping = {"linux" = "frida_gdiplus", "macos" = "frida_gdiplus", "windows" = "frida_gdiplus.exe"} }
|
||||
PROFILE = { value = "release", condition = {env_not_set = ["PROFILE"]} }
|
||||
PROFILE_DIR = {value = "release", condition = {env_not_set = ["PROFILE_DIR"] }}
|
||||
CARGO_TARGET_DIR = { value = "target", condition = { env_not_set = [
|
||||
"CARGO_TARGET_DIR",
|
||||
] } }
|
||||
FUZZER_NAME = { source = "${CARGO_MAKE_RUST_TARGET_OS}", default_value = "frida_gdiplus", mapping = { "linux" = "frida_gdiplus", "macos" = "frida_gdiplus", "windows" = "frida_gdiplus.exe" } }
|
||||
PROFILE = { value = "release", condition = { env_not_set = ["PROFILE"] } }
|
||||
PROFILE_DIR = { value = "release", condition = { env_not_set = [
|
||||
"PROFILE_DIR",
|
||||
] } }
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Cargo-make not integrated yet on this"
|
||||
'''
|
||||
|
||||
@ -19,14 +23,14 @@ windows_alias = "harness_windows"
|
||||
|
||||
|
||||
[tasks.harness_windows]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cl.exe /LD harness.cc /link /dll gdiplus.lib ole32.lib
|
||||
'''
|
||||
|
||||
[tasks.harness_windows_cmplog_test]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
ml64 cmplog_test.asm /subsystem:windows /link /dll /def:cmplog_test.def /entry:dll_main /out:cmplog.dll
|
||||
'''
|
||||
|
||||
@ -37,8 +41,8 @@ mac_alias = "unsupported"
|
||||
windows_alias = "fuzzer_windows"
|
||||
|
||||
[tasks.fuzzer_windows]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cargo build --profile ${PROFILE}
|
||||
cp ./target/${PROFILE_DIR}/${FUZZER_NAME} .
|
||||
'''
|
||||
@ -51,10 +55,10 @@ windows_alias = "run_windows"
|
||||
|
||||
[tasks.run_windows]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
./${FUZZER_NAME} -H harness.dll -i corpus -o output --libs-to-instrument gdi32.dll --libs-to-instrument gdi32full.dll --libs-to-instrument gdiplus.dll --libs-to-instrument WindowsCodecs.dll --disable-excludes
|
||||
'''
|
||||
dependencies = [ "fuzzer", "harness" ]
|
||||
dependencies = ["fuzzer", "harness"]
|
||||
|
||||
# Test
|
||||
[tasks.test]
|
||||
@ -69,7 +73,7 @@ windows_alias = "test_windows_cmplog"
|
||||
|
||||
[tasks.test_windows_cmplog]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
@echo off
|
||||
|
||||
for %%i in (t1 t2 t3 t4 t5 t6 t7) do (
|
||||
@ -82,14 +86,14 @@ for %%i in (t1 t2 t3 t4 t5 t6 t7) do (
|
||||
|
||||
echo All tests done
|
||||
'''
|
||||
dependencies = [ "fuzzer", "harness_windows_cmplog_test" ]
|
||||
dependencies = ["fuzzer", "harness_windows_cmplog_test"]
|
||||
|
||||
[tasks.test_windows]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
start "" "frida_gdiplus.exe" -H harness.dll -i corpus -o output --libs-to-instrument gdi32.dll --libs-to-instrument gdi32full.dll --libs-to-instrument gdiplus.dll --libs-to-instrument WindowsCodecs.dll --disable-excludes
|
||||
#ping is for timeout
|
||||
ping -n 10 127.0.0.1>NUL && taskkill /im frida_gdiplus.exe /F
|
||||
>nul 2>nul dir /a-d "corpus_discovered\*" && (echo Files exist) || (exit /b 1337)
|
||||
'''
|
||||
dependencies = [ "fuzzer", "harness" ]
|
||||
dependencies = ["fuzzer", "harness"]
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "frida_fuzzer"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
@ -15,12 +18,23 @@ opt-level = 3
|
||||
debug = true
|
||||
|
||||
[dependencies]
|
||||
libafl = { path = "../../../libafl/", features = [ "std", "llmp_compression",
|
||||
"llmp_bind_public", "frida_cli", "errors_backtrace" ] } #, "llmp_small_maps", "llmp_debug"]}
|
||||
libafl = { path = "../../../libafl/", features = [
|
||||
"std",
|
||||
"llmp_compression",
|
||||
"llmp_bind_public",
|
||||
"frida_cli",
|
||||
"errors_backtrace",
|
||||
] } #, "llmp_small_maps", "llmp_debug"]}
|
||||
libafl_bolts = { path = "../../../libafl_bolts/" }
|
||||
frida-gum = { version = "0.13.6", features = ["auto-download", "event-sink", "invocation-listener"] }
|
||||
frida-gum = { version = "0.13.6", features = [
|
||||
"auto-download",
|
||||
"event-sink",
|
||||
"invocation-listener",
|
||||
] }
|
||||
libafl_frida = { path = "../../../libafl_frida", features = ["cmplog"] }
|
||||
libafl_targets = { path = "../../../libafl_targets", features = ["sancov_cmplog"] }
|
||||
libafl_targets = { path = "../../../libafl_targets", features = [
|
||||
"sancov_cmplog",
|
||||
] }
|
||||
libloading = "0.7"
|
||||
mimalloc = { version = "*", default-features = false }
|
||||
color-backtrace = "0.5"
|
||||
|
@ -1,13 +1,17 @@
|
||||
# Variables
|
||||
[env]
|
||||
CARGO_TARGET_DIR = { value = "target", condition = { env_not_set = ["CARGO_TARGET_DIR"] } }
|
||||
FUZZER_NAME={ source = "${CARGO_MAKE_RUST_TARGET_OS}", default_value = "frida_fuzzer", mapping = {"linux" = "frida_fuzzer", "macos" = "frida_fuzzer", "windows" = "frida_fuzzer.exe"} }
|
||||
PROFILE = { value = "release", condition = {env_not_set = ["PROFILE"]} }
|
||||
PROFILE_DIR = {value = "release", condition = {env_not_set = ["PROFILE_DIR"] }}
|
||||
CARGO_TARGET_DIR = { value = "target", condition = { env_not_set = [
|
||||
"CARGO_TARGET_DIR",
|
||||
] } }
|
||||
FUZZER_NAME = { source = "${CARGO_MAKE_RUST_TARGET_OS}", default_value = "frida_fuzzer", mapping = { "linux" = "frida_fuzzer", "macos" = "frida_fuzzer", "windows" = "frida_fuzzer.exe" } }
|
||||
PROFILE = { value = "release", condition = { env_not_set = ["PROFILE"] } }
|
||||
PROFILE_DIR = { value = "release", condition = { env_not_set = [
|
||||
"PROFILE_DIR",
|
||||
] } }
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Cargo-make not integrated yet on this"
|
||||
'''
|
||||
|
||||
@ -18,9 +22,9 @@ mac_alias = "libpng_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.libpng_unix]
|
||||
condition = { files_not_exist = ["./libpng-1.6.37"]}
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { files_not_exist = ["./libpng-1.6.37"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
wget https://github.com/glennrp/libpng/archive/refs/tags/v1.6.37.tar.gz
|
||||
tar -xvf v1.6.37.tar.gz
|
||||
'''
|
||||
@ -32,13 +36,13 @@ mac_alias = "lib_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.lib_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cd libpng-1.6.37 && ./configure --enable-shared=no --with-pic=yes --enable-hardware-optimizations=yes --disable-dependency-tracking
|
||||
cd ..
|
||||
make -C libpng-1.6.37
|
||||
'''
|
||||
dependencies = [ "libpng" ]
|
||||
dependencies = ["libpng"]
|
||||
|
||||
# Harness
|
||||
[tasks.harness]
|
||||
@ -47,16 +51,16 @@ mac_alias = "harness_unix"
|
||||
windows_alias = "harness_windows"
|
||||
|
||||
[tasks.harness_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
clang++ -O3 -c -fPIC harness.cc -o harness.o
|
||||
clang++ -O3 harness.o libpng-1.6.37/.libs/libpng16.a -shared -lz -o libpng-harness.so
|
||||
'''
|
||||
dependencies = [ "lib" ]
|
||||
dependencies = ["lib"]
|
||||
|
||||
[tasks.harness_windows]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cl /c harness_win.cpp && link harness_win.obj /dll
|
||||
'''
|
||||
|
||||
@ -67,15 +71,15 @@ mac_alias = "fuzzer_unix"
|
||||
windows_alias = "fuzzer_windows"
|
||||
|
||||
[tasks.fuzzer_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cargo build --profile ${PROFILE}
|
||||
cp ${CARGO_TARGET_DIR}/${PROFILE_DIR}/${FUZZER_NAME} .
|
||||
'''
|
||||
|
||||
[tasks.fuzzer_windows]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cargo build --profile ${PROFILE}
|
||||
cp ./target/${PROFILE_DIR}/${FUZZER_NAME} .
|
||||
'''
|
||||
@ -88,17 +92,17 @@ windows_alias = "run_windows"
|
||||
|
||||
[tasks.run_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
./${FUZZER_NAME} -F LLVMFuzzerTestOneInput -H ./libpng-harness.so -l ./libpng-harness.so
|
||||
'''
|
||||
dependencies = [ "fuzzer", "harness" ]
|
||||
dependencies = ["fuzzer", "harness"]
|
||||
|
||||
[tasks.run_windows]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
./${FUZZER_NAME} -F LLVMFuzzerTestOneInput -H ./harness_win.dll -l ./harness_win.dll --cores=0
|
||||
'''
|
||||
dependencies = [ "fuzzer", "harness" ]
|
||||
dependencies = ["fuzzer", "harness"]
|
||||
|
||||
# Test
|
||||
[tasks.test]
|
||||
@ -108,7 +112,7 @@ windows_alias = "test_windows"
|
||||
|
||||
[tasks.test_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
timeout 30s ./${FUZZER_NAME} -F LLVMFuzzerTestOneInput -H ./libpng-harness.so -l ./libpng-harness.so | tee fuzz_stdout.log 2>/dev/null || true
|
||||
if grep -qa "corpus: 70" fuzz_stdout.log; then
|
||||
@ -118,26 +122,26 @@ else
|
||||
exit 1
|
||||
fi
|
||||
'''
|
||||
dependencies = [ "fuzzer", "harness" ]
|
||||
dependencies = ["fuzzer", "harness"]
|
||||
|
||||
# Don't grep and check the result on macOS because it's unstable
|
||||
[tasks.test_mac]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
timeout 30s ./${FUZZER_NAME} -F LLVMFuzzerTestOneInput -H ./libpng-harness.so -l ./libpng-harness.so | tee fuzz_stdout.log 2>/dev/null || true
|
||||
'''
|
||||
dependencies = [ "fuzzer", "harness" ]
|
||||
dependencies = ["fuzzer", "harness"]
|
||||
|
||||
[tasks.test_windows]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
start "" "frida_fuzzer.exe" -F LLVMFuzzerTestOneInput -H ./harness_win.dll -l ./harness_win.dll --cores=0
|
||||
#ping is for timeout
|
||||
ping -n 10 127.0.0.1>NUL && taskkill /im frida_fuzzer.exe /F
|
||||
>nul 2>nul dir /a-d "corpus_discovered\*" && (echo Files exist) || (exit /b 1337)
|
||||
'''
|
||||
dependencies = [ "fuzzer", "harness" ]
|
||||
dependencies = ["fuzzer", "harness"]
|
||||
|
||||
# Clean up
|
||||
[tasks.clean]
|
||||
@ -148,8 +152,8 @@ windows_alias = "unsupported"
|
||||
[tasks.clean_unix]
|
||||
# Disable default `clean` definition
|
||||
clear = true
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -f ./${FUZZER_NAME}
|
||||
make -C libpng-1.6.37 clean
|
||||
cargo clean
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "fuzzbench"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
@ -27,7 +30,11 @@ which = "6.0"
|
||||
[dependencies]
|
||||
libafl = { path = "../../../libafl/" }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/" }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = ["sancov_pcguard_hitcounts", "sancov_cmplog", "libfuzzer"] }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = [
|
||||
"sancov_pcguard_hitcounts",
|
||||
"sancov_cmplog",
|
||||
"libfuzzer",
|
||||
] }
|
||||
# TODO Include it only when building cc
|
||||
libafl_cc = { path = "../../../libafl_cc/" }
|
||||
clap = { version = "4.5", features = ["default"] }
|
||||
|
@ -1,13 +1,17 @@
|
||||
[env]
|
||||
PROJECT_DIR = { script = ["pwd"] }
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = ["CARGO_TARGET_DIR"] } }
|
||||
FUZZER_NAME="fuzzer"
|
||||
PROFILE = { value = "release", condition = {env_not_set = ["PROFILE"]} }
|
||||
PROFILE_DIR = {value = "release", condition = {env_not_set = ["PROFILE_DIR"] }}
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = [
|
||||
"CARGO_TARGET_DIR",
|
||||
] } }
|
||||
FUZZER_NAME = "fuzzer"
|
||||
PROFILE = { value = "release", condition = { env_not_set = ["PROFILE"] } }
|
||||
PROFILE_DIR = { value = "release", condition = { env_not_set = [
|
||||
"PROFILE_DIR",
|
||||
] } }
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Cargo-make not integrated yet on this"
|
||||
'''
|
||||
|
||||
@ -59,8 +63,8 @@ mac_alias = "run_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.run_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
mkdir in || true
|
||||
echo a > in/a
|
||||
@ -76,8 +80,8 @@ mac_alias = "test_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
mkdir in || true
|
||||
echo a > in/a
|
||||
@ -101,8 +105,8 @@ mac_alias = "clean_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.clean_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm ./${FUZZER_NAME} || true
|
||||
rm fuzz.o || true
|
||||
'''
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "fuzzbench_ctx"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
@ -27,7 +30,12 @@ which = "6.0"
|
||||
[dependencies]
|
||||
libafl = { path = "../../../libafl/" }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/" }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = ["sancov_pcguard_hitcounts", "sancov_cmplog", "libfuzzer", "sancov_ctx"] }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = [
|
||||
"sancov_pcguard_hitcounts",
|
||||
"sancov_cmplog",
|
||||
"libfuzzer",
|
||||
"sancov_ctx",
|
||||
] }
|
||||
# TODO Include it only when building cc
|
||||
libafl_cc = { path = "../../../libafl_cc/" }
|
||||
clap = { version = "4.5", features = ["default"] }
|
||||
|
@ -1,13 +1,17 @@
|
||||
[env]
|
||||
PROJECT_DIR = { script = ["pwd"] }
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = ["CARGO_TARGET_DIR"] } }
|
||||
FUZZER_NAME="fuzzer"
|
||||
PROFILE = { value = "release", condition = {env_not_set = ["PROFILE"]} }
|
||||
PROFILE_DIR = {value = "release", condition = {env_not_set = ["PROFILE_DIR"] }}
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = [
|
||||
"CARGO_TARGET_DIR",
|
||||
] } }
|
||||
FUZZER_NAME = "fuzzer"
|
||||
PROFILE = { value = "release", condition = { env_not_set = ["PROFILE"] } }
|
||||
PROFILE_DIR = { value = "release", condition = { env_not_set = [
|
||||
"PROFILE_DIR",
|
||||
] } }
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Cargo-make not integrated yet on this"
|
||||
'''
|
||||
|
||||
@ -59,8 +63,8 @@ mac_alias = "run_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.run_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
mkdir in || true
|
||||
echo a > in/a
|
||||
@ -76,8 +80,8 @@ mac_alias = "test_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
mkdir in || true
|
||||
echo a > in/a
|
||||
@ -101,8 +105,8 @@ mac_alias = "clean_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.clean_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm ./${FUZZER_NAME} || true
|
||||
rm fuzz.o || true
|
||||
'''
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "fuzzbench_fork_qemu"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
@ -22,7 +25,10 @@ strip = true
|
||||
[dependencies]
|
||||
libafl = { path = "../../../libafl/" }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/" }
|
||||
libafl_qemu = { path = "../../../libafl_qemu/", features = ["x86_64", "usermode"] }
|
||||
libafl_qemu = { path = "../../../libafl_qemu/", features = [
|
||||
"x86_64",
|
||||
"usermode",
|
||||
] }
|
||||
|
||||
clap = { version = "4.5", features = ["default"] }
|
||||
nix = { version = "0.29", features = ["fs"] }
|
||||
|
@ -1,13 +1,15 @@
|
||||
# Variables
|
||||
[env]
|
||||
FUZZER_NAME='libpng_harness'
|
||||
FUZZER_NAME = 'libpng_harness'
|
||||
PROJECT_DIR = { script = ["pwd"] }
|
||||
PROFILE = { value = "release", condition = {env_not_set = ["PROFILE"]} }
|
||||
PROFILE_DIR = {value = "release", condition = {env_not_set = ["PROFILE_DIR"] }}
|
||||
PROFILE = { value = "release", condition = { env_not_set = ["PROFILE"] } }
|
||||
PROFILE_DIR = { value = "release", condition = { env_not_set = [
|
||||
"PROFILE_DIR",
|
||||
] } }
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Qemu fuzzer not supported on windows"
|
||||
'''
|
||||
|
||||
@ -18,9 +20,9 @@ mac_alias = "libpng_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.libpng_unix]
|
||||
condition = { files_not_exist = [ "./libpng-1.6.37" ] }
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { files_not_exist = ["./libpng-1.6.37"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
wget https://github.com/glennrp/libpng/archive/refs/tags/v1.6.37.tar.gz
|
||||
tar -xvf v1.6.37.tar.gz
|
||||
'''
|
||||
@ -42,8 +44,8 @@ mac_alias = "harness_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.harness_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cd libpng-1.6.37 && ./configure --enable-shared=no --with-pic=yes --enable-hardware-optimizations=yes
|
||||
cd "${PROJECT_DIR}"
|
||||
make -C libpng-1.6.37
|
||||
@ -67,8 +69,19 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.run_unix]
|
||||
command = "cargo"
|
||||
args = ["run", "--profile", "${PROFILE_DIR}", "./${FUZZER_NAME}", "--", "--libafl-in", "../libfuzzer_libpng/corpus", "--libafl-out", "./out", "./${FUZZER_NAME}"]
|
||||
dependencies = [ "harness", "fuzzer" ]
|
||||
args = [
|
||||
"run",
|
||||
"--profile",
|
||||
"${PROFILE_DIR}",
|
||||
"./${FUZZER_NAME}",
|
||||
"--",
|
||||
"--libafl-in",
|
||||
"../libfuzzer_libpng/corpus",
|
||||
"--libafl-out",
|
||||
"./out",
|
||||
"./${FUZZER_NAME}",
|
||||
]
|
||||
dependencies = ["harness", "fuzzer"]
|
||||
|
||||
# Run the fuzzer
|
||||
[tasks.test]
|
||||
@ -79,10 +92,10 @@ windows_alias = "unsupported"
|
||||
# Short test
|
||||
[tasks.test_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
echo "This test is skipped. QEMU-based fuzzer doesn't work on Github runners"
|
||||
'''
|
||||
dependencies = [ "harness", "fuzzer" ]
|
||||
dependencies = ["harness", "fuzzer"]
|
||||
|
||||
# Clean up
|
||||
[tasks.clean]
|
||||
@ -93,8 +106,8 @@ windows_alias = "unsupported"
|
||||
[tasks.clean_unix]
|
||||
# Disable default `clean` definition
|
||||
clear = true
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -f ./${FUZZER_NAME} libfuzzer_main.o
|
||||
make -C libpng-1.6.37 clean
|
||||
cargo clean
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "fuzzbench_forkserver"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[profile.release]
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "fuzzbench_forkserver_cmplog"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[profile.release]
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "fuzzbench_qemu"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
@ -22,8 +25,10 @@ strip = true
|
||||
[dependencies]
|
||||
libafl = { path = "../../../libafl/" }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/" }
|
||||
libafl_qemu = { path = "../../../libafl_qemu/", features = ["x86_64", "usermode"] }
|
||||
libafl_qemu = { path = "../../../libafl_qemu/", features = [
|
||||
"x86_64",
|
||||
"usermode",
|
||||
] }
|
||||
|
||||
clap = { version = "4.5", features = ["default"] }
|
||||
nix = { version = "0.29", features = ["fs"] }
|
||||
|
||||
|
@ -1,13 +1,15 @@
|
||||
# Variables
|
||||
[env]
|
||||
FUZZER_NAME='libpng_harness'
|
||||
FUZZER_NAME = 'libpng_harness'
|
||||
PROJECT_DIR = { script = ["pwd"] }
|
||||
PROFILE = { value = "release", condition = {env_not_set = ["PROFILE"]} }
|
||||
PROFILE_DIR = {value = "release", condition = {env_not_set = ["PROFILE_DIR"] }}
|
||||
PROFILE = { value = "release", condition = { env_not_set = ["PROFILE"] } }
|
||||
PROFILE_DIR = { value = "release", condition = { env_not_set = [
|
||||
"PROFILE_DIR",
|
||||
] } }
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Qemu fuzzer not supported on windows"
|
||||
'''
|
||||
|
||||
@ -18,9 +20,9 @@ mac_alias = "libpng_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.libpng_unix]
|
||||
condition = { files_not_exist = [ "./libpng-1.6.37" ] }
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { files_not_exist = ["./libpng-1.6.37"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
wget https://github.com/glennrp/libpng/archive/refs/tags/v1.6.37.tar.gz
|
||||
tar -xvf v1.6.37.tar.gz
|
||||
'''
|
||||
@ -42,8 +44,8 @@ mac_alias = "harness_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.harness_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cd libpng-1.6.37 && ./configure --enable-shared=no --with-pic=yes --enable-hardware-optimizations=yes
|
||||
cd "${PROJECT_DIR}"
|
||||
make -C libpng-1.6.37
|
||||
@ -67,8 +69,19 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.run_unix]
|
||||
command = "cargo"
|
||||
args = ["run", "--profile", "${PROFILE}", "./${FUZZER_NAME}", "--", "--libafl-in", "../../libpng/libfuzzer_libpng/corpus", "--libafl-out", "./out", "./${FUZZER_NAME}"]
|
||||
dependencies = [ "harness", "fuzzer" ]
|
||||
args = [
|
||||
"run",
|
||||
"--profile",
|
||||
"${PROFILE}",
|
||||
"./${FUZZER_NAME}",
|
||||
"--",
|
||||
"--libafl-in",
|
||||
"../../libpng/libfuzzer_libpng/corpus",
|
||||
"--libafl-out",
|
||||
"./out",
|
||||
"./${FUZZER_NAME}",
|
||||
]
|
||||
dependencies = ["harness", "fuzzer"]
|
||||
|
||||
# Run the fuzzer
|
||||
[tasks.test]
|
||||
@ -79,10 +92,10 @@ windows_alias = "unsupported"
|
||||
# Short test
|
||||
[tasks.test_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
echo "This test is skipped. QEMU-based fuzzer doesn't work on Github runners"
|
||||
'''
|
||||
dependencies = [ "harness", "fuzzer" ]
|
||||
dependencies = ["harness", "fuzzer"]
|
||||
|
||||
# Clean up
|
||||
[tasks.clean]
|
||||
@ -93,8 +106,8 @@ windows_alias = "unsupported"
|
||||
[tasks.clean_unix]
|
||||
# Disable default `clean` definition
|
||||
clear = true
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -f ./${FUZZER_NAME} libfuzzer_main.o
|
||||
make -C libpng-1.6.37 clean
|
||||
cargo clean
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "fuzzbench_text"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
@ -22,7 +25,11 @@ which = "6.0"
|
||||
[dependencies]
|
||||
libafl = { path = "../../../libafl/" }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/" }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = ["sancov_pcguard_hitcounts", "sancov_cmplog", "libfuzzer"] }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = [
|
||||
"sancov_pcguard_hitcounts",
|
||||
"sancov_cmplog",
|
||||
"libfuzzer",
|
||||
] }
|
||||
# TODO Include it only when building cc
|
||||
libafl_cc = { path = "../../../libafl_cc/" }
|
||||
clap = { version = "4.5", features = ["default"] }
|
||||
|
@ -1,13 +1,17 @@
|
||||
[env]
|
||||
PROJECT_DIR = { script = ["pwd"] }
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = ["CARGO_TARGET_DIR"] } }
|
||||
FUZZER_NAME="fuzzer"
|
||||
PROFILE = { value = "release", condition = {env_not_set = ["PROFILE"]} }
|
||||
PROFILE_DIR = {value = "release", condition = {env_not_set = ["PROFILE_DIR"] }}
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = [
|
||||
"CARGO_TARGET_DIR",
|
||||
] } }
|
||||
FUZZER_NAME = "fuzzer"
|
||||
PROFILE = { value = "release", condition = { env_not_set = ["PROFILE"] } }
|
||||
PROFILE_DIR = { value = "release", condition = { env_not_set = [
|
||||
"PROFILE_DIR",
|
||||
] } }
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Cargo-make not integrated yet on this"
|
||||
'''
|
||||
|
||||
@ -19,7 +23,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.cxx_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}"]
|
||||
args = ["build", "--profile", "${PROFILE}"]
|
||||
|
||||
[tasks.cc]
|
||||
linux_alias = "cc_unix"
|
||||
@ -28,7 +32,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.cc_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}"]
|
||||
args = ["build", "--profile", "${PROFILE}"]
|
||||
|
||||
# fuzz.o File
|
||||
[tasks.fuzz_o]
|
||||
@ -59,8 +63,8 @@ mac_alias = "run_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.run_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
mkdir in || true
|
||||
echo a > in/a
|
||||
@ -77,8 +81,8 @@ mac_alias = "test_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
mkdir in || true
|
||||
echo a > in/a
|
||||
@ -103,8 +107,8 @@ mac_alias = "clean_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.clean_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm ./${FUZZER_NAME} || true
|
||||
rm fuzz.o || true
|
||||
'''
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "libfuzzer_libpng"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
@ -24,7 +27,11 @@ which = "6.0"
|
||||
libafl = { path = "../../../libafl/", features = ["default"] }
|
||||
# libafl = { path = "../../../libafl/", features = ["default"] }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/" }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = ["sancov_pcguard_hitcounts", "libfuzzer", "sancov_cmplog"] }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = [
|
||||
"sancov_pcguard_hitcounts",
|
||||
"libfuzzer",
|
||||
"sancov_cmplog",
|
||||
] }
|
||||
# TODO Include it only when building cc
|
||||
libafl_cc = { path = "../../../libafl_cc/" }
|
||||
mimalloc = { version = "*", default-features = false }
|
||||
|
@ -1,17 +1,21 @@
|
||||
# Variables
|
||||
[env]
|
||||
FUZZER_NAME='fuzzer_libpng'
|
||||
FUZZER_NAME = 'fuzzer_libpng'
|
||||
PROJECT_DIR = { script = ["pwd"] }
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = ["CARGO_TARGET_DIR"] } }
|
||||
PROFILE = { value = "release", condition = {env_not_set = ["PROFILE"]} }
|
||||
PROFILE_DIR = {value = "release", condition = {env_not_set = ["PROFILE_DIR"] }}
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = [
|
||||
"CARGO_TARGET_DIR",
|
||||
] } }
|
||||
PROFILE = { value = "release", condition = { env_not_set = ["PROFILE"] } }
|
||||
PROFILE_DIR = { value = "release", condition = { env_not_set = [
|
||||
"PROFILE_DIR",
|
||||
] } }
|
||||
LIBAFL_CC = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc'
|
||||
LIBAFL_CXX = '${CARGO_TARGET_DIR}/${PROFILE}/libafl_cxx'
|
||||
FUZZER = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/${FUZZER_NAME}'
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Cargo-make not integrated yet on this"
|
||||
'''
|
||||
|
||||
@ -22,9 +26,9 @@ mac_alias = "libpng_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.libpng_unix]
|
||||
condition = { files_not_exist = ["./libpng-1.6.37"]}
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { files_not_exist = ["./libpng-1.6.37"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
wget https://github.com/glennrp/libpng/archive/refs/tags/v1.6.37.tar.gz
|
||||
tar -xvf v1.6.37.tar.gz
|
||||
'''
|
||||
@ -37,7 +41,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.cxx_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}"]
|
||||
args = ["build", "--profile", "${PROFILE}"]
|
||||
|
||||
[tasks.cc]
|
||||
linux_alias = "cc_unix"
|
||||
@ -46,7 +50,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.cc_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}"]
|
||||
args = ["build", "--profile", "${PROFILE}"]
|
||||
|
||||
[tasks.crash_cxx]
|
||||
linux_alias = "crash_cxx_unix"
|
||||
@ -55,7 +59,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.crash_cxx_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}", "--features=crash"]
|
||||
args = ["build", "--profile", "${PROFILE}", "--features=crash"]
|
||||
|
||||
[tasks.crash_cc]
|
||||
linux_alias = "crash_cc_unix"
|
||||
@ -64,7 +68,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.crash_cc_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}", "--features=crash"]
|
||||
args = ["build", "--profile", "${PROFILE}", "--features=crash"]
|
||||
|
||||
# Library
|
||||
[tasks.lib]
|
||||
@ -73,13 +77,13 @@ mac_alias = "lib_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.lib_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cd libpng-1.6.37 && ./configure --enable-shared=no --with-pic=yes --enable-hardware-optimizations=yes
|
||||
cd "${PROJECT_DIR}"
|
||||
make -C libpng-1.6.37 CC="${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc" CXX="${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx"
|
||||
'''
|
||||
dependencies = [ "libpng", "cxx", "cc" ]
|
||||
dependencies = ["libpng", "cxx", "cc"]
|
||||
|
||||
# Library
|
||||
[tasks.crash_lib]
|
||||
@ -88,13 +92,13 @@ mac_alias = "crash_lib_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.crash_lib_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cd libpng-1.6.37 && ./configure --enable-shared=no --with-pic=yes --enable-hardware-optimizations=yes
|
||||
cd "${PROJECT_DIR}"
|
||||
make -C libpng-1.6.37 CC="${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc" CXX="${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx"
|
||||
'''
|
||||
dependencies = [ "libpng", "crash_cxx", "crash_cc" ]
|
||||
dependencies = ["libpng", "crash_cxx", "crash_cc"]
|
||||
|
||||
# Harness
|
||||
[tasks.fuzzer]
|
||||
@ -104,8 +108,17 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.fuzzer_unix]
|
||||
command = "${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx"
|
||||
args = ["${PROJECT_DIR}/harness.cc", "${PROJECT_DIR}/libpng-1.6.37/.libs/libpng16.a", "-I", "${PROJECT_DIR}/libpng-1.6.37/", "-o", "${FUZZER_NAME}", "-lm", "-lz"]
|
||||
dependencies = [ "lib", "cxx", "cc" ]
|
||||
args = [
|
||||
"${PROJECT_DIR}/harness.cc",
|
||||
"${PROJECT_DIR}/libpng-1.6.37/.libs/libpng16.a",
|
||||
"-I",
|
||||
"${PROJECT_DIR}/libpng-1.6.37/",
|
||||
"-o",
|
||||
"${FUZZER_NAME}",
|
||||
"-lm",
|
||||
"-lz",
|
||||
]
|
||||
dependencies = ["lib", "cxx", "cc"]
|
||||
|
||||
# Crashing Harness
|
||||
[tasks.fuzzer_crash]
|
||||
@ -115,8 +128,17 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.fuzzer_crash_unix]
|
||||
command = "${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx"
|
||||
args = ["${PROJECT_DIR}/harness.cc", "${PROJECT_DIR}/libpng-1.6.37/.libs/libpng16.a", "-I", "${PROJECT_DIR}/libpng-1.6.37/", "-o", "${FUZZER_NAME}_crash", "-lm", "-lz"]
|
||||
dependencies = [ "crash_lib", "crash_cxx", "crash_cc" ]
|
||||
args = [
|
||||
"${PROJECT_DIR}/harness.cc",
|
||||
"${PROJECT_DIR}/libpng-1.6.37/.libs/libpng16.a",
|
||||
"-I",
|
||||
"${PROJECT_DIR}/libpng-1.6.37/",
|
||||
"-o",
|
||||
"${FUZZER_NAME}_crash",
|
||||
"-lm",
|
||||
"-lz",
|
||||
]
|
||||
dependencies = ["crash_lib", "crash_cxx", "crash_cc"]
|
||||
|
||||
# Run the fuzzer
|
||||
[tasks.run]
|
||||
@ -126,12 +148,12 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.run_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
./${FUZZER_NAME} &
|
||||
sleep 0.2
|
||||
./${FUZZER_NAME} 2>/dev/null
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
|
||||
# Run the fuzzer with a crash
|
||||
@ -142,13 +164,12 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.crash_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
./${FUZZER_NAME}_crash &
|
||||
sleep 0.2
|
||||
./${FUZZER_NAME}_crash 2>/dev/null
|
||||
'''
|
||||
dependencies = [ "fuzzer_crash" ]
|
||||
|
||||
dependencies = ["fuzzer_crash"]
|
||||
|
||||
|
||||
# Test
|
||||
@ -159,7 +180,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
(timeout 31s ./${FUZZER_NAME} | tee fuzz_stdout.log 2>/dev/null || true) &
|
||||
sleep 0.2
|
||||
@ -171,17 +192,17 @@ else
|
||||
exit 1
|
||||
fi
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
[tasks.test_mac]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
(timeout 31s ./${FUZZER_NAME} | tee fuzz_stdout.log 2>/dev/null || true) &
|
||||
sleep 0.2
|
||||
timeout 30s ./${FUZZER_NAME} >/dev/null 2>/dev/null || true
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
# Clean up
|
||||
[tasks.clean]
|
||||
@ -192,8 +213,8 @@ windows_alias = "unsupported"
|
||||
[tasks.clean_unix]
|
||||
# Disable default `clean` definition
|
||||
clear = true
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -f ./${FUZZER_NAME}
|
||||
make -C libpng-1.6.37 clean
|
||||
cargo clean
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "libfuzzer_libpng_accounting"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
@ -19,9 +22,21 @@ cc = { version = "1.0", features = ["parallel"] }
|
||||
which = "6.0"
|
||||
|
||||
[dependencies]
|
||||
libafl = { path = "../../../libafl/", features = ["std", "derive", "llmp_compression", "introspection"] }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/", features = ["std", "derive", "llmp_compression"] }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = ["sancov_pcguard_hitcounts", "libfuzzer"] }
|
||||
libafl = { path = "../../../libafl/", features = [
|
||||
"std",
|
||||
"derive",
|
||||
"llmp_compression",
|
||||
"introspection",
|
||||
] }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/", features = [
|
||||
"std",
|
||||
"derive",
|
||||
"llmp_compression",
|
||||
] }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = [
|
||||
"sancov_pcguard_hitcounts",
|
||||
"libfuzzer",
|
||||
] }
|
||||
# TODO Include it only when building cc
|
||||
libafl_cc = { path = "../../../libafl_cc/" }
|
||||
clap = { version = "4.5", features = ["derive"] }
|
||||
|
@ -1,17 +1,21 @@
|
||||
# Variables
|
||||
[env]
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = ["CARGO_TARGET_DIR"] } }
|
||||
PROFILE = { value = "release", condition = {env_not_set = ["PROFILE"]} }
|
||||
PROFILE_DIR = {value = "release", condition = {env_not_set = ["PROFILE_DIR"] }}
|
||||
FUZZER_NAME='fuzzer_libpng_accounting'
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = [
|
||||
"CARGO_TARGET_DIR",
|
||||
] } }
|
||||
PROFILE = { value = "release", condition = { env_not_set = ["PROFILE"] } }
|
||||
PROFILE_DIR = { value = "release", condition = { env_not_set = [
|
||||
"PROFILE_DIR",
|
||||
] } }
|
||||
FUZZER_NAME = 'fuzzer_libpng_accounting'
|
||||
LIBAFL_CC = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc'
|
||||
LIBAFL_CXX = '${CARGO_TARGET_DIR}/${PROFILE}/libafl_cxx'
|
||||
FUZZER = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/${FUZZER_NAME}'
|
||||
PROJECT_DIR = { script = ["pwd"] }
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Cargo-make not integrated yet on this platform"
|
||||
'''
|
||||
|
||||
@ -22,9 +26,9 @@ mac_alias = "libpng_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.libpng_unix]
|
||||
condition = { files_not_exist = ["./libpng-1.6.37"]}
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { files_not_exist = ["./libpng-1.6.37"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
wget https://github.com/glennrp/libpng/archive/refs/tags/v1.6.37.tar.gz
|
||||
tar -xvf v1.6.37.tar.gz
|
||||
'''
|
||||
@ -37,7 +41,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.cxx_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}"]
|
||||
args = ["build", "--profile", "${PROFILE}"]
|
||||
|
||||
[tasks.cc]
|
||||
linux_alias = "cc_unix"
|
||||
@ -46,7 +50,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.cc_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}"]
|
||||
args = ["build", "--profile", "${PROFILE}"]
|
||||
|
||||
# Library
|
||||
[tasks.lib]
|
||||
@ -55,13 +59,13 @@ mac_alias = "lib_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.lib_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cd libpng-1.6.37 && ./configure --enable-shared=no --with-pic=yes --enable-hardware-optimizations=yes
|
||||
cd "${PROJECT_DIR}"
|
||||
make -C libpng-1.6.37 CC="${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc" CXX="${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx"
|
||||
'''
|
||||
dependencies = [ "libpng", "cxx", "cc" ]
|
||||
dependencies = ["libpng", "cxx", "cc"]
|
||||
|
||||
|
||||
# Harness
|
||||
@ -72,8 +76,17 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.fuzzer_unix]
|
||||
command = "${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx"
|
||||
args = ["${PROJECT_DIR}/harness.cc", "${PROJECT_DIR}/libpng-1.6.37/.libs/libpng16.a", "-I", "${PROJECT_DIR}/libpng-1.6.37/", "-o", "${FUZZER_NAME}", "-lm", "-lz"]
|
||||
dependencies = [ "lib", "cxx", "cc" ]
|
||||
args = [
|
||||
"${PROJECT_DIR}/harness.cc",
|
||||
"${PROJECT_DIR}/libpng-1.6.37/.libs/libpng16.a",
|
||||
"-I",
|
||||
"${PROJECT_DIR}/libpng-1.6.37/",
|
||||
"-o",
|
||||
"${FUZZER_NAME}",
|
||||
"-lm",
|
||||
"-lz",
|
||||
]
|
||||
dependencies = ["lib", "cxx", "cc"]
|
||||
|
||||
# Run the fuzzer
|
||||
[tasks.run]
|
||||
@ -83,10 +96,10 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.run_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
./${FUZZER_NAME} --cores 0 --input ./corpus
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
# Test
|
||||
[tasks.test]
|
||||
@ -96,7 +109,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
timeout 31s ./${FUZZER_NAME} --cores 0 --input ./corpus | tee fuzz_stdout.log 2>/dev/null || true
|
||||
if grep -qa "corpus: 30" fuzz_stdout.log; then
|
||||
@ -106,15 +119,15 @@ else
|
||||
exit 1
|
||||
fi
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
[tasks.test_mac]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
timeout 31s ./${FUZZER_NAME} --cores 0 --input ./corpus | tee fuzz_stdout.log 2>/dev/null || true
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
# Clean up
|
||||
[tasks.clean]
|
||||
@ -125,8 +138,8 @@ windows_alias = "unsupported"
|
||||
[tasks.clean_unix]
|
||||
# Disable default `clean` definition
|
||||
clear = true
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -f ./${FUZZER_NAME}
|
||||
make -C libpng-1.6.37 clean
|
||||
cargo clean
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "libfuzzer_libpng_launcher_centralized"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
@ -19,9 +22,23 @@ cc = { version = "1.0", features = ["parallel"] }
|
||||
which = "6.0"
|
||||
|
||||
[dependencies]
|
||||
libafl = { path = "../../../libafl/", features = ["std", "derive", "rand_trait", "fork", "prelude", "gzip", "regex", "scalability_introspection"] }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/", features = ["errors_backtrace"] }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = ["sancov_pcguard_hitcounts", "libfuzzer"] }
|
||||
libafl = { path = "../../../libafl/", features = [
|
||||
"std",
|
||||
"derive",
|
||||
"rand_trait",
|
||||
"fork",
|
||||
"prelude",
|
||||
"gzip",
|
||||
"regex",
|
||||
"scalability_introspection",
|
||||
] }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/", features = [
|
||||
"errors_backtrace",
|
||||
] }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = [
|
||||
"sancov_pcguard_hitcounts",
|
||||
"libfuzzer",
|
||||
] }
|
||||
# TODO Include it only when building cc
|
||||
libafl_cc = { path = "../../../libafl_cc/" }
|
||||
clap = { version = "4.5", features = ["derive"] }
|
||||
|
@ -1,17 +1,21 @@
|
||||
# Variables
|
||||
[env]
|
||||
FUZZER_NAME='fuzzer_libpng_launcher'
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = ["CARGO_TARGET_DIR"] } }
|
||||
PROFILE = { value = "release", condition = {env_not_set = ["PROFILE"]} }
|
||||
PROFILE_DIR = {value = "release", condition = {env_not_set = ["PROFILE_DIR"] }}
|
||||
FUZZER_NAME = 'fuzzer_libpng_launcher'
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = [
|
||||
"CARGO_TARGET_DIR",
|
||||
] } }
|
||||
PROFILE = { value = "release", condition = { env_not_set = ["PROFILE"] } }
|
||||
PROFILE_DIR = { value = "release", condition = { env_not_set = [
|
||||
"PROFILE_DIR",
|
||||
] } }
|
||||
LIBAFL_CC = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc'
|
||||
LIBAFL_CXX = '${CARGO_TARGET_DIR}/${PROFILE}/libafl_cxx'
|
||||
FUZZER = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/${FUZZER_NAME}'
|
||||
PROJECT_DIR = { script = ["pwd"] }
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Cargo-make not integrated yet on this platform"
|
||||
'''
|
||||
|
||||
@ -22,9 +26,9 @@ mac_alias = "libpng_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.libpng_unix]
|
||||
condition = { files_not_exist = ["./libpng-1.6.37"]}
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { files_not_exist = ["./libpng-1.6.37"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
wget https://github.com/glennrp/libpng/archive/refs/tags/v1.6.37.tar.gz
|
||||
tar -xvf v1.6.37.tar.gz
|
||||
'''
|
||||
@ -37,7 +41,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.cxx_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}"]
|
||||
args = ["build", "--profile", "${PROFILE}"]
|
||||
|
||||
[tasks.cc]
|
||||
linux_alias = "cc_unix"
|
||||
@ -46,7 +50,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.cc_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}"]
|
||||
args = ["build", "--profile", "${PROFILE}"]
|
||||
|
||||
# Library
|
||||
[tasks.lib]
|
||||
@ -55,13 +59,13 @@ mac_alias = "lib_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.lib_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cd libpng-1.6.37 && ./configure --enable-shared=no --with-pic=yes --enable-hardware-optimizations=yes
|
||||
cd "${PROJECT_DIR}"
|
||||
make -C libpng-1.6.37 CC="${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc" CXX="${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx"
|
||||
'''
|
||||
dependencies = [ "libpng", "cxx", "cc" ]
|
||||
dependencies = ["libpng", "cxx", "cc"]
|
||||
|
||||
|
||||
# Harness
|
||||
@ -72,8 +76,17 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.fuzzer_unix]
|
||||
command = "${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx"
|
||||
args = ["${PROJECT_DIR}/harness.cc", "${PROJECT_DIR}/libpng-1.6.37/.libs/libpng16.a", "-I", "${PROJECT_DIR}/libpng-1.6.37/", "-o", "${FUZZER_NAME}", "-lm", "-lz"]
|
||||
dependencies = [ "lib", "cxx", "cc" ]
|
||||
args = [
|
||||
"${PROJECT_DIR}/harness.cc",
|
||||
"${PROJECT_DIR}/libpng-1.6.37/.libs/libpng16.a",
|
||||
"-I",
|
||||
"${PROJECT_DIR}/libpng-1.6.37/",
|
||||
"-o",
|
||||
"${FUZZER_NAME}",
|
||||
"-lm",
|
||||
"-lz",
|
||||
]
|
||||
dependencies = ["lib", "cxx", "cc"]
|
||||
|
||||
# Run the fuzzer
|
||||
[tasks.run]
|
||||
@ -83,10 +96,10 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.run_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
./${FUZZER_NAME} --cores 0-1 --input ./corpus
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
# Test
|
||||
[tasks.test]
|
||||
@ -96,7 +109,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
timeout 31s ./${FUZZER_NAME} --cores 0-1 --input ./corpus 2>/dev/null | tee fuzz_stdout.log || true
|
||||
if grep -qa "corpus: 30" fuzz_stdout.log; then
|
||||
@ -106,15 +119,15 @@ else
|
||||
exit 1
|
||||
fi
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
[tasks.test_mac]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
timeout 31s ./${FUZZER_NAME} --cores 0 --input ./corpus 2>/dev/null | tee fuzz_stdout.log || true
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
# Clean up
|
||||
[tasks.clean]
|
||||
@ -125,8 +138,8 @@ windows_alias = "unsupported"
|
||||
[tasks.clean_unix]
|
||||
# Disable default `clean` definition
|
||||
clear = true
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -f ./${FUZZER_NAME}
|
||||
make -C libpng-1.6.37 clean
|
||||
cargo clean
|
||||
|
@ -1,7 +1,11 @@
|
||||
[package]
|
||||
name = "libfuzzer_libpng_cmin"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>", "Addison Crump <research@addisoncrump.info>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
"Addison Crump <research@addisoncrump.info>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
@ -25,7 +29,11 @@ env_logger = "0.10"
|
||||
libafl = { path = "../../../libafl/", features = ["default", "cmin"] }
|
||||
# libafl = { path = "../../../libafl/", features = ["default"] }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/" }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = ["sancov_pcguard_hitcounts", "libfuzzer", "sancov_cmplog"] }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = [
|
||||
"sancov_pcguard_hitcounts",
|
||||
"libfuzzer",
|
||||
"sancov_cmplog",
|
||||
] }
|
||||
# TODO Include it only when building cc
|
||||
libafl_cc = { path = "../../../libafl_cc/" }
|
||||
mimalloc = { version = "*", default-features = false }
|
||||
|
@ -1,17 +1,21 @@
|
||||
# Variables
|
||||
[env]
|
||||
FUZZER_NAME='fuzzer_libpng'
|
||||
FUZZER_NAME = 'fuzzer_libpng'
|
||||
PROJECT_DIR = { script = ["pwd"] }
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = ["CARGO_TARGET_DIR"] } }
|
||||
PROFILE = { value = "release", condition = {env_not_set = ["PROFILE"]} }
|
||||
PROFILE_DIR = {value = "release", condition = {env_not_set = ["PROFILE_DIR"] }}
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = [
|
||||
"CARGO_TARGET_DIR",
|
||||
] } }
|
||||
PROFILE = { value = "release", condition = { env_not_set = ["PROFILE"] } }
|
||||
PROFILE_DIR = { value = "release", condition = { env_not_set = [
|
||||
"PROFILE_DIR",
|
||||
] } }
|
||||
LIBAFL_CC = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc'
|
||||
LIBAFL_CXX = '${CARGO_TARGET_DIR}/${PROFILE}/libafl_cxx'
|
||||
FUZZER = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/${FUZZER_NAME}'
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Cargo-make not integrated yet on this"
|
||||
'''
|
||||
|
||||
@ -22,9 +26,9 @@ mac_alias = "libpng_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.libpng_unix]
|
||||
condition = { files_not_exist = ["./libpng-1.6.37"]}
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { files_not_exist = ["./libpng-1.6.37"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
wget https://github.com/glennrp/libpng/archive/refs/tags/v1.6.37.tar.gz
|
||||
tar -xvf v1.6.37.tar.gz
|
||||
'''
|
||||
@ -37,7 +41,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.cxx_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}"]
|
||||
args = ["build", "--profile", "${PROFILE}"]
|
||||
|
||||
[tasks.cc]
|
||||
linux_alias = "cc_unix"
|
||||
@ -46,7 +50,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.cc_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}"]
|
||||
args = ["build", "--profile", "${PROFILE}"]
|
||||
|
||||
[tasks.crash_cxx]
|
||||
linux_alias = "crash_cxx_unix"
|
||||
@ -55,7 +59,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.crash_cxx_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}", "--features=crash"]
|
||||
args = ["build", "--profile", "${PROFILE}", "--features=crash"]
|
||||
|
||||
[tasks.crash_cc]
|
||||
linux_alias = "crash_cc_unix"
|
||||
@ -64,7 +68,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.crash_cc_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}", "--features=crash"]
|
||||
args = ["build", "--profile", "${PROFILE}", "--features=crash"]
|
||||
|
||||
# Library
|
||||
[tasks.lib]
|
||||
@ -73,13 +77,13 @@ mac_alias = "lib_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.lib_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cd libpng-1.6.37 && ./configure --enable-shared=no --with-pic=yes --enable-hardware-optimizations=yes
|
||||
cd "${PROJECT_DIR}"
|
||||
make -C libpng-1.6.37 CC="${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc" CXX="${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx"
|
||||
'''
|
||||
dependencies = [ "libpng", "cxx", "cc" ]
|
||||
dependencies = ["libpng", "cxx", "cc"]
|
||||
|
||||
# Library
|
||||
[tasks.crash_lib]
|
||||
@ -88,13 +92,13 @@ mac_alias = "crash_lib_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.crash_lib_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cd libpng-1.6.37 && ./configure --enable-shared=no --with-pic=yes --enable-hardware-optimizations=yes
|
||||
cd "${PROJECT_DIR}"
|
||||
make -C libpng-1.6.37 CC="${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc" CXX="${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx"
|
||||
'''
|
||||
dependencies = [ "libpng", "crash_cxx", "crash_cc" ]
|
||||
dependencies = ["libpng", "crash_cxx", "crash_cc"]
|
||||
|
||||
# Harness
|
||||
[tasks.fuzzer]
|
||||
@ -104,8 +108,18 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.fuzzer_unix]
|
||||
command = "${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx"
|
||||
args = ["${PROJECT_DIR}/harness.cc", "${PROJECT_DIR}/libpng-1.6.37/.libs/libpng16.a", "-I", "${PROJECT_DIR}/libpng-1.6.37/", "-o", "${FUZZER_NAME}", "-lm", "-lz", "-lz3"]
|
||||
dependencies = [ "lib", "cxx", "cc" ]
|
||||
args = [
|
||||
"${PROJECT_DIR}/harness.cc",
|
||||
"${PROJECT_DIR}/libpng-1.6.37/.libs/libpng16.a",
|
||||
"-I",
|
||||
"${PROJECT_DIR}/libpng-1.6.37/",
|
||||
"-o",
|
||||
"${FUZZER_NAME}",
|
||||
"-lm",
|
||||
"-lz",
|
||||
"-lz3",
|
||||
]
|
||||
dependencies = ["lib", "cxx", "cc"]
|
||||
|
||||
# Crashing Harness
|
||||
[tasks.fuzzer_crash]
|
||||
@ -115,8 +129,18 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.fuzzer_crash_unix]
|
||||
command = "${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx"
|
||||
args = ["${PROJECT_DIR}/harness.cc", "${PROJECT_DIR}/libpng-1.6.37/.libs/libpng16.a", "-I", "${PROJECT_DIR}/libpng-1.6.37/", "-o", "${FUZZER_NAME}_crash", "-lm", "-lz", "-lz3"]
|
||||
dependencies = [ "crash_lib", "crash_cxx", "crash_cc" ]
|
||||
args = [
|
||||
"${PROJECT_DIR}/harness.cc",
|
||||
"${PROJECT_DIR}/libpng-1.6.37/.libs/libpng16.a",
|
||||
"-I",
|
||||
"${PROJECT_DIR}/libpng-1.6.37/",
|
||||
"-o",
|
||||
"${FUZZER_NAME}_crash",
|
||||
"-lm",
|
||||
"-lz",
|
||||
"-lz3",
|
||||
]
|
||||
dependencies = ["crash_lib", "crash_cxx", "crash_cc"]
|
||||
|
||||
# Run the fuzzer
|
||||
[tasks.run]
|
||||
@ -126,12 +150,12 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.run_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
./${FUZZER_NAME} &
|
||||
sleep 0.2
|
||||
./${FUZZER_NAME} 2>/dev/null
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
|
||||
# Run the fuzzer with a crash
|
||||
@ -142,13 +166,12 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.crash_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
./${FUZZER_NAME}_crash &
|
||||
sleep 0.2
|
||||
./${FUZZER_NAME}_crash 2>/dev/null
|
||||
'''
|
||||
dependencies = [ "fuzzer_crash" ]
|
||||
|
||||
dependencies = ["fuzzer_crash"]
|
||||
|
||||
|
||||
# Test
|
||||
@ -159,7 +182,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
timeout 31s ./${FUZZER_NAME} | tee fuzz_stdout.log &
|
||||
sleep 0.2
|
||||
@ -171,17 +194,17 @@ else
|
||||
exit 1
|
||||
fi
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
[tasks.test_mac]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
timeout 31s ./${FUZZER_NAME} | tee fuzz_stdout.log &
|
||||
sleep 0.2
|
||||
timeout 30s ./${FUZZER_NAME} >/dev/null 2>/dev/null || true
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
# Clean up
|
||||
[tasks.clean]
|
||||
@ -192,8 +215,8 @@ windows_alias = "unsupported"
|
||||
[tasks.clean_unix]
|
||||
# Disable default `clean` definition
|
||||
clear = true
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -f ./${FUZZER_NAME}
|
||||
make -C libpng-1.6.37 clean
|
||||
cargo clean
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "libfuzzer_libpng_launcher"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
@ -19,9 +22,17 @@ cc = { version = "1.0", features = ["parallel"] }
|
||||
which = "6.0"
|
||||
|
||||
[dependencies]
|
||||
libafl = { path = "../../../libafl/", features = ["std", "derive", "llmp_compression", "introspection"] }
|
||||
libafl = { path = "../../../libafl/", features = [
|
||||
"std",
|
||||
"derive",
|
||||
"llmp_compression",
|
||||
"introspection",
|
||||
] }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/" }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = ["sancov_pcguard_hitcounts", "libfuzzer"] }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = [
|
||||
"sancov_pcguard_hitcounts",
|
||||
"libfuzzer",
|
||||
] }
|
||||
# TODO Include it only when building cc
|
||||
libafl_cc = { path = "../../../libafl_cc/" }
|
||||
clap = { version = "4.5", features = ["derive"] }
|
||||
|
@ -1,9 +1,13 @@
|
||||
# Variables
|
||||
[env]
|
||||
FUZZER_NAME='fuzzer_libpng_launcher'
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = ["CARGO_TARGET_DIR"] } }
|
||||
PROFILE = { value = "release", condition = {env_not_set = ["PROFILE"]} }
|
||||
PROFILE_DIR = {value = "release", condition = {env_not_set = ["PROFILE_DIR"] }}
|
||||
FUZZER_NAME = 'fuzzer_libpng_launcher'
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = [
|
||||
"CARGO_TARGET_DIR",
|
||||
] } }
|
||||
PROFILE = { value = "release", condition = { env_not_set = ["PROFILE"] } }
|
||||
PROFILE_DIR = { value = "release", condition = { env_not_set = [
|
||||
"PROFILE_DIR",
|
||||
] } }
|
||||
LIBAFL_CC = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc'
|
||||
LIBAFL_CXX = '${CARGO_TARGET_DIR}/${PROFILE}/libafl_cxx'
|
||||
LIBAFL_LIBTOOL = '${CARGO_TARGET_DIR}/${PROFILE}/libafl_libtool'
|
||||
@ -11,8 +15,8 @@ FUZZER = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/${FUZZER_NAME}'
|
||||
PROJECT_DIR = { script = ["pwd"] }
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Cargo-make not integrated yet on this platform"
|
||||
'''
|
||||
|
||||
@ -23,9 +27,9 @@ mac_alias = "libpng_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.libpng_unix]
|
||||
condition = { files_not_exist = ["./libpng-1.6.37"]}
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { files_not_exist = ["./libpng-1.6.37"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
wget https://github.com/glennrp/libpng/archive/refs/tags/v1.6.37.tar.gz
|
||||
tar -xvf v1.6.37.tar.gz
|
||||
'''
|
||||
@ -38,7 +42,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.cxx_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}"]
|
||||
args = ["build", "--profile", "${PROFILE}"]
|
||||
|
||||
[tasks.cc]
|
||||
linux_alias = "cc_unix"
|
||||
@ -47,7 +51,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.cc_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}"]
|
||||
args = ["build", "--profile", "${PROFILE}"]
|
||||
|
||||
# Library
|
||||
[tasks.lib]
|
||||
@ -56,13 +60,13 @@ mac_alias = "lib_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.lib_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cd libpng-1.6.37 && CC="${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc" CXX="${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx" ./configure --enable-shared=no --with-pic=yes --enable-hardware-optimizations=yes
|
||||
cd "${PROJECT_DIR}"
|
||||
make -C libpng-1.6.37 CC="${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc" CXX="${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx" LIBTOOL=${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_libtool
|
||||
'''
|
||||
dependencies = [ "libpng", "cxx", "cc" ]
|
||||
dependencies = ["libpng", "cxx", "cc"]
|
||||
|
||||
|
||||
# Harness
|
||||
@ -73,8 +77,17 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.fuzzer_unix]
|
||||
command = "${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx"
|
||||
args = ["${PROJECT_DIR}/harness.cc", "${PROJECT_DIR}/libpng-1.6.37/.libs/libpng16.a", "-I", "${PROJECT_DIR}/libpng-1.6.37/", "-o", "${FUZZER_NAME}", "-lm", "-lz"]
|
||||
dependencies = [ "lib", "cxx", "cc" ]
|
||||
args = [
|
||||
"${PROJECT_DIR}/harness.cc",
|
||||
"${PROJECT_DIR}/libpng-1.6.37/.libs/libpng16.a",
|
||||
"-I",
|
||||
"${PROJECT_DIR}/libpng-1.6.37/",
|
||||
"-o",
|
||||
"${FUZZER_NAME}",
|
||||
"-lm",
|
||||
"-lz",
|
||||
]
|
||||
dependencies = ["lib", "cxx", "cc"]
|
||||
|
||||
# Run the fuzzer
|
||||
[tasks.run]
|
||||
@ -84,10 +97,10 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.run_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
./${FUZZER_NAME}.coverage --broker-port 21337 --cores 0 --input ./corpus
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
# Test
|
||||
[tasks.test]
|
||||
@ -97,7 +110,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
timeout 31s ./${FUZZER_NAME}.coverage --broker-port 21337 --cores 0 --input ./corpus 2>/dev/null | tee fuzz_stdout.log || true
|
||||
if grep -qa "corpus: 30" fuzz_stdout.log; then
|
||||
@ -107,15 +120,15 @@ else
|
||||
exit 1
|
||||
fi
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
[tasks.test_mac]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
timeout 31s ./${FUZZER_NAME} --cores 0 --input ./corpus 2>/dev/null | tee fuzz_stdout.log || true
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
# Clean up
|
||||
[tasks.clean]
|
||||
@ -126,8 +139,8 @@ windows_alias = "unsupported"
|
||||
[tasks.clean_unix]
|
||||
# Disable default `clean` definition
|
||||
clear = true
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -f ./${FUZZER_NAME}
|
||||
make -C libpng-1.6.37 clean
|
||||
cargo clean
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "libfuzzer_libpng_launcher_norestart"
|
||||
version = "0.9.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
@ -21,8 +24,13 @@ which = "6.0"
|
||||
[dependencies]
|
||||
env_logger = "0.10"
|
||||
libafl = { path = "../../../libafl/" }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/", features = ["errors_backtrace"] }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = ["sancov_pcguard_hitcounts", "libfuzzer"] }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/", features = [
|
||||
"errors_backtrace",
|
||||
] }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = [
|
||||
"sancov_pcguard_hitcounts",
|
||||
"libfuzzer",
|
||||
] }
|
||||
# TODO Include it only when building cc
|
||||
libafl_cc = { path = "../../../libafl_cc/" }
|
||||
clap = { version = "4.5", features = ["derive"] }
|
||||
|
@ -1,17 +1,21 @@
|
||||
# Variables
|
||||
[env]
|
||||
FUZZER_NAME='fuzzer_libpng_launcher'
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = ["CARGO_TARGET_DIR"] } }
|
||||
PROFILE = { value = "release", condition = {env_not_set = ["PROFILE"]} }
|
||||
PROFILE_DIR = {value = "release", condition = {env_not_set = ["PROFILE_DIR"] }}
|
||||
FUZZER_NAME = 'fuzzer_libpng_launcher'
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = [
|
||||
"CARGO_TARGET_DIR",
|
||||
] } }
|
||||
PROFILE = { value = "release", condition = { env_not_set = ["PROFILE"] } }
|
||||
PROFILE_DIR = { value = "release", condition = { env_not_set = [
|
||||
"PROFILE_DIR",
|
||||
] } }
|
||||
LIBAFL_CC = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc'
|
||||
LIBAFL_CXX = '${CARGO_TARGET_DIR}/${PROFILE}/libafl_cxx'
|
||||
FUZZER = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/${FUZZER_NAME}'
|
||||
PROJECT_DIR = { script = ["pwd"] }
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Cargo-make not integrated yet on this platform"
|
||||
'''
|
||||
|
||||
@ -22,9 +26,9 @@ mac_alias = "libpng_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.libpng_unix]
|
||||
condition = { files_not_exist = ["./libpng-1.6.37"]}
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { files_not_exist = ["./libpng-1.6.37"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
wget https://github.com/glennrp/libpng/archive/refs/tags/v1.6.37.tar.gz
|
||||
tar -xvf v1.6.37.tar.gz
|
||||
'''
|
||||
@ -36,7 +40,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.cc_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}"]
|
||||
args = ["build", "--profile", "${PROFILE}"]
|
||||
|
||||
# Library
|
||||
[tasks.lib]
|
||||
@ -45,13 +49,13 @@ mac_alias = "lib_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.lib_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cd libpng-1.6.37 && ./configure --enable-shared=no --with-pic=yes --enable-hardware-optimizations=yes
|
||||
cd "${PROJECT_DIR}"
|
||||
make -C libpng-1.6.37 CC="${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc" CXX="${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx"
|
||||
'''
|
||||
dependencies = [ "libpng", "cc" ]
|
||||
dependencies = ["libpng", "cc"]
|
||||
|
||||
|
||||
# Harness
|
||||
@ -62,8 +66,17 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.fuzzer_unix]
|
||||
command = "${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx"
|
||||
args = ["${PROJECT_DIR}/harness.cc", "${PROJECT_DIR}/libpng-1.6.37/.libs/libpng16.a", "-I", "${PROJECT_DIR}/libpng-1.6.37/", "-o", "${FUZZER_NAME}", "-lm", "-lz"]
|
||||
dependencies = [ "lib", "cc" ]
|
||||
args = [
|
||||
"${PROJECT_DIR}/harness.cc",
|
||||
"${PROJECT_DIR}/libpng-1.6.37/.libs/libpng16.a",
|
||||
"-I",
|
||||
"${PROJECT_DIR}/libpng-1.6.37/",
|
||||
"-o",
|
||||
"${FUZZER_NAME}",
|
||||
"-lm",
|
||||
"-lz",
|
||||
]
|
||||
dependencies = ["lib", "cc"]
|
||||
|
||||
# Run the fuzzer
|
||||
[tasks.run]
|
||||
@ -73,13 +86,13 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.run_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
rm -rf corpus/ || true
|
||||
mkdir corpus/ || true
|
||||
cp seeds/* corpus/ || true
|
||||
./${FUZZER_NAME} --cores 0 --input ./corpus
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
# Test
|
||||
[tasks.test]
|
||||
@ -89,7 +102,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
rm -rf corpus/ || true
|
||||
mkdir corpus/ || true
|
||||
@ -102,7 +115,7 @@ else
|
||||
exit 1
|
||||
fi
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
# Clean up
|
||||
[tasks.clean]
|
||||
@ -113,8 +126,8 @@ windows_alias = "unsupported"
|
||||
[tasks.clean_unix]
|
||||
# Disable default `clean` definition
|
||||
clear = true
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -rf corpus/ || true
|
||||
rm -f ./${FUZZER_NAME}
|
||||
make -C libpng-1.6.37 clean
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "libfuzzer_libpng_tcp_manager"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
@ -24,7 +27,11 @@ which = "6.0"
|
||||
libafl = { path = "../../../libafl/", features = ["default", "tcp_manager"] }
|
||||
# libafl = { path = "../../../libafl/", features = ["default"] }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/" }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = ["sancov_pcguard_hitcounts", "libfuzzer", "sancov_cmplog"] }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = [
|
||||
"sancov_pcguard_hitcounts",
|
||||
"libfuzzer",
|
||||
"sancov_cmplog",
|
||||
] }
|
||||
# TODO Include it only when building cc
|
||||
libafl_cc = { path = "../../../libafl_cc/" }
|
||||
mimalloc = { version = "*", default-features = false }
|
||||
|
@ -1,17 +1,21 @@
|
||||
# Variables
|
||||
[env]
|
||||
FUZZER_NAME='fuzzer_libpng'
|
||||
FUZZER_NAME = 'fuzzer_libpng'
|
||||
PROJECT_DIR = { script = ["pwd"] }
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = ["CARGO_TARGET_DIR"] } }
|
||||
PROFILE = { value = "release", condition = {env_not_set = ["PROFILE"]} }
|
||||
PROFILE_DIR = {value = "release", condition = {env_not_set = ["PROFILE_DIR"] }}
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = [
|
||||
"CARGO_TARGET_DIR",
|
||||
] } }
|
||||
PROFILE = { value = "release", condition = { env_not_set = ["PROFILE"] } }
|
||||
PROFILE_DIR = { value = "release", condition = { env_not_set = [
|
||||
"PROFILE_DIR",
|
||||
] } }
|
||||
LIBAFL_CC = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc'
|
||||
LIBAFL_CXX = '${CARGO_TARGET_DIR}/${PROFILE}/libafl_cxx'
|
||||
FUZZER = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/${FUZZER_NAME}'
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Cargo-make not integrated yet on this"
|
||||
'''
|
||||
|
||||
@ -22,9 +26,9 @@ mac_alias = "libpng_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.libpng_unix]
|
||||
condition = { files_not_exist = ["./libpng-1.6.37"]}
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { files_not_exist = ["./libpng-1.6.37"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
wget https://github.com/glennrp/libpng/archive/refs/tags/v1.6.37.tar.gz
|
||||
tar -xvf v1.6.37.tar.gz
|
||||
'''
|
||||
@ -37,7 +41,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.cxx_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}"]
|
||||
args = ["build", "--profile", "${PROFILE}"]
|
||||
|
||||
[tasks.cc]
|
||||
linux_alias = "cc_unix"
|
||||
@ -46,7 +50,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.cc_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}"]
|
||||
args = ["build", "--profile", "${PROFILE}"]
|
||||
|
||||
[tasks.crash_cxx]
|
||||
linux_alias = "crash_cxx_unix"
|
||||
@ -55,7 +59,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.crash_cxx_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}", "--features=crash"]
|
||||
args = ["build", "--profile", "${PROFILE}", "--features=crash"]
|
||||
|
||||
[tasks.crash_cc]
|
||||
linux_alias = "crash_cc_unix"
|
||||
@ -64,7 +68,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.crash_cc_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}", "--features=crash"]
|
||||
args = ["build", "--profile", "${PROFILE}", "--features=crash"]
|
||||
|
||||
# Library
|
||||
[tasks.lib]
|
||||
@ -73,13 +77,13 @@ mac_alias = "lib_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.lib_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cd libpng-1.6.37 && ./configure --enable-shared=no --with-pic=yes --enable-hardware-optimizations=yes
|
||||
cd "${PROJECT_DIR}"
|
||||
make -C libpng-1.6.37 CC="${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc" CXX="${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx"
|
||||
'''
|
||||
dependencies = [ "libpng", "cxx", "cc" ]
|
||||
dependencies = ["libpng", "cxx", "cc"]
|
||||
|
||||
# Library
|
||||
[tasks.crash_lib]
|
||||
@ -88,13 +92,13 @@ mac_alias = "crash_lib_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.crash_lib_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cd libpng-1.6.37 && ./configure --enable-shared=no --with-pic=yes --enable-hardware-optimizations=yes
|
||||
cd "${PROJECT_DIR}"
|
||||
make -C libpng-1.6.37 CC="${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc" CXX="${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx"
|
||||
'''
|
||||
dependencies = [ "libpng", "crash_cxx", "crash_cc" ]
|
||||
dependencies = ["libpng", "crash_cxx", "crash_cc"]
|
||||
|
||||
# Harness
|
||||
[tasks.fuzzer]
|
||||
@ -104,8 +108,17 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.fuzzer_unix]
|
||||
command = "${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx"
|
||||
args = ["${PROJECT_DIR}/harness.cc", "${PROJECT_DIR}/libpng-1.6.37/.libs/libpng16.a", "-I", "${PROJECT_DIR}/libpng-1.6.37/", "-o", "${FUZZER_NAME}", "-lm", "-lz"]
|
||||
dependencies = [ "lib", "cxx", "cc" ]
|
||||
args = [
|
||||
"${PROJECT_DIR}/harness.cc",
|
||||
"${PROJECT_DIR}/libpng-1.6.37/.libs/libpng16.a",
|
||||
"-I",
|
||||
"${PROJECT_DIR}/libpng-1.6.37/",
|
||||
"-o",
|
||||
"${FUZZER_NAME}",
|
||||
"-lm",
|
||||
"-lz",
|
||||
]
|
||||
dependencies = ["lib", "cxx", "cc"]
|
||||
|
||||
# Crashing Harness
|
||||
[tasks.fuzzer_crash]
|
||||
@ -115,8 +128,17 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.fuzzer_crash_unix]
|
||||
command = "${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx"
|
||||
args = ["${PROJECT_DIR}/harness.cc", "${PROJECT_DIR}/libpng-1.6.37/.libs/libpng16.a", "-I", "${PROJECT_DIR}/libpng-1.6.37/", "-o", "${FUZZER_NAME}_crash", "-lm", "-lz"]
|
||||
dependencies = [ "crash_lib", "crash_cxx", "crash_cc" ]
|
||||
args = [
|
||||
"${PROJECT_DIR}/harness.cc",
|
||||
"${PROJECT_DIR}/libpng-1.6.37/.libs/libpng16.a",
|
||||
"-I",
|
||||
"${PROJECT_DIR}/libpng-1.6.37/",
|
||||
"-o",
|
||||
"${FUZZER_NAME}_crash",
|
||||
"-lm",
|
||||
"-lz",
|
||||
]
|
||||
dependencies = ["crash_lib", "crash_cxx", "crash_cc"]
|
||||
|
||||
# Run the fuzzer
|
||||
[tasks.run]
|
||||
@ -126,12 +148,12 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.run_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
./${FUZZER_NAME} &
|
||||
sleep 0.2
|
||||
./${FUZZER_NAME} 2>/dev/null
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
|
||||
# Run the fuzzer with a crash
|
||||
@ -142,13 +164,12 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.crash_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
./${FUZZER_NAME}_crash &
|
||||
sleep 0.2
|
||||
./${FUZZER_NAME}_crash 2>/dev/null
|
||||
'''
|
||||
dependencies = [ "fuzzer_crash" ]
|
||||
|
||||
dependencies = ["fuzzer_crash"]
|
||||
|
||||
|
||||
# Test
|
||||
@ -159,7 +180,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
(timeout 31s ./${FUZZER_NAME} | tee fuzz_stdout.log 2>/dev/null || true) &
|
||||
sleep 0.2
|
||||
@ -171,17 +192,17 @@ else
|
||||
exit 1
|
||||
fi
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
[tasks.test_mac]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
(timeout 31s ./${FUZZER_NAME} | tee fuzz_stdout.log 2>/dev/null || true) &
|
||||
sleep 0.2
|
||||
timeout 30s ./${FUZZER_NAME} >/dev/null 2>/dev/null || true
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
# Clean up
|
||||
[tasks.clean]
|
||||
@ -192,8 +213,8 @@ windows_alias = "unsupported"
|
||||
[tasks.clean_unix]
|
||||
# Disable default `clean` definition
|
||||
clear = true
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -f ./${FUZZER_NAME}
|
||||
make -C libpng-1.6.37 clean
|
||||
cargo clean
|
||||
|
@ -1,20 +1,20 @@
|
||||
|
||||
# Variables
|
||||
[env]
|
||||
FUZZER_NAME='nyx_libxml2_parallel'
|
||||
FUZZER_NAME = 'nyx_libxml2_parallel'
|
||||
PROJECT_DIR = { script = ["pwd"] }
|
||||
|
||||
[config]
|
||||
skip_core_tasks = true # skip `cargo test` to avoid error
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Cargo-make not integrated yet on this platform"
|
||||
'''
|
||||
|
||||
[tasks.build]
|
||||
dependencies = [ "libxml2" ]
|
||||
dependencies = ["libxml2"]
|
||||
|
||||
[tasks.libxml2]
|
||||
linux_alias = "libxml2_unix"
|
||||
@ -23,14 +23,14 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.libxml2_unix]
|
||||
# condition = { files_not_exist = ["./libxml2"]}
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
./setup_libxml2.sh
|
||||
'''
|
||||
|
||||
[tasks.enable_kvm_vmware_hypercall]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
if [ ! -e /sys/module/kvm/parameters/enable_vmware_backdoor ] ||
|
||||
! grep -qF Y /sys/module/kvm/parameters/enable_vmware_backdoor; then
|
||||
sudo modprobe -r kvm-intel # or kvm-amd for AMD
|
||||
@ -48,10 +48,10 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.run_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
cargo run
|
||||
'''
|
||||
dependencies = [ "libxml2", "enable_kvm_vmware_hypercall" ]
|
||||
dependencies = ["libxml2", "enable_kvm_vmware_hypercall"]
|
||||
|
||||
# Clean up
|
||||
[tasks.clean]
|
||||
@ -62,8 +62,8 @@ windows_alias = "unsupported"
|
||||
[tasks.clean_unix]
|
||||
# Disable default `clean` definition
|
||||
clear = true
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
make -C ./libxml2 clean
|
||||
cargo clean
|
||||
'''
|
||||
|
@ -1,20 +1,20 @@
|
||||
|
||||
# Variables
|
||||
[env]
|
||||
FUZZER_NAME='nyx_libxml2_standalone'
|
||||
FUZZER_NAME = 'nyx_libxml2_standalone'
|
||||
PROJECT_DIR = { script = ["pwd"] }
|
||||
|
||||
[config]
|
||||
skip_core_tasks = true # skip `cargo test` to avoid error
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Cargo-make not integrated yet on this platform"
|
||||
'''
|
||||
|
||||
[tasks.build]
|
||||
dependencies = [ "libxml2" ]
|
||||
dependencies = ["libxml2"]
|
||||
|
||||
[tasks.libxml2]
|
||||
linux_alias = "libxml2_unix"
|
||||
@ -23,14 +23,14 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.libxml2_unix]
|
||||
# condition = { files_not_exist = ["./libxml2"]}
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
./setup_libxml2.sh
|
||||
'''
|
||||
|
||||
[tasks.enable_kvm_vmware_hypercall]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
if [ ! -e /sys/module/kvm/parameters/enable_vmware_backdoor ] ||
|
||||
! grep -qF Y /sys/module/kvm/parameters/enable_vmware_backdoor; then
|
||||
sudo modprobe -r kvm-intel # or kvm-amd for AMD
|
||||
@ -48,10 +48,10 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.run_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
cargo run
|
||||
'''
|
||||
dependencies = [ "libxml2", "enable_kvm_vmware_hypercall" ]
|
||||
dependencies = ["libxml2", "enable_kvm_vmware_hypercall"]
|
||||
|
||||
# Clean up
|
||||
[tasks.clean]
|
||||
@ -62,8 +62,8 @@ windows_alias = "unsupported"
|
||||
[tasks.clean_unix]
|
||||
# Disable default `clean` definition
|
||||
clear = true
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
make -C ./libxml2 clean
|
||||
cargo clean
|
||||
'''
|
||||
|
@ -3,10 +3,19 @@ name = "cargo_fuzz_test"
|
||||
edition = "2021"
|
||||
version = "0.0.0"
|
||||
description = "test"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
repository = "https://github.com/AFLplusplus/LibAFL/"
|
||||
keywords = ["fuzzing", "testing", "compiler"]
|
||||
categories = ["development-tools::testing", "emulators", "embedded", "os", "no-std"]
|
||||
categories = [
|
||||
"development-tools::testing",
|
||||
"emulators",
|
||||
"embedded",
|
||||
"os",
|
||||
"no-std",
|
||||
]
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "dynamic_analysis"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
@ -29,7 +32,12 @@ env_logger = "0.11"
|
||||
once_cell = "1.19"
|
||||
libafl = { path = "../../../libafl/" }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/" }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = ["sancov_pcguard_hitcounts", "sancov_cmplog", "libfuzzer", "function-logging"] }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = [
|
||||
"sancov_pcguard_hitcounts",
|
||||
"sancov_cmplog",
|
||||
"libfuzzer",
|
||||
"function-logging",
|
||||
] }
|
||||
# TODO Include it only when building cc
|
||||
libafl_cc = { path = "../../../libafl_cc/" }
|
||||
clap = { version = "4.5", features = ["default"] }
|
||||
|
@ -1,13 +1,17 @@
|
||||
[env]
|
||||
PROJECT_DIR = { script = ["pwd"] }
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = ["CARGO_TARGET_DIR"] } }
|
||||
FUZZER_NAME="fuzzer"
|
||||
PROFILE = { value = "release", condition = {env_not_set = ["PROFILE"]} }
|
||||
PROFILE_DIR = {value = "release", condition = {env_not_set = ["PROFILE_DIR"] }}
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = [
|
||||
"CARGO_TARGET_DIR",
|
||||
] } }
|
||||
FUZZER_NAME = "fuzzer"
|
||||
PROFILE = { value = "release", condition = { env_not_set = ["PROFILE"] } }
|
||||
PROFILE_DIR = { value = "release", condition = { env_not_set = [
|
||||
"PROFILE_DIR",
|
||||
] } }
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Cargo-make not integrated yet on this"
|
||||
'''
|
||||
|
||||
@ -38,7 +42,16 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.fuzz_o_unix]
|
||||
command = "${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx"
|
||||
args = ["--libafl-no-link", "-O3","-I", "./Little-CMS/include", "-c", "cms_transform_fuzzer.cc", "-o", "cms_transform_fuzzer.o"]
|
||||
args = [
|
||||
"--libafl-no-link",
|
||||
"-O3",
|
||||
"-I",
|
||||
"./Little-CMS/include",
|
||||
"-c",
|
||||
"cms_transform_fuzzer.cc",
|
||||
"-o",
|
||||
"cms_transform_fuzzer.o",
|
||||
]
|
||||
dependencies = ["cc", "cxx"]
|
||||
|
||||
# Fuzzer
|
||||
@ -49,7 +62,15 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.fuzzer_unix]
|
||||
command = "${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx"
|
||||
args = ["--libafl", "cms_transform_fuzzer.o", "./Little-CMS/src/.libs/liblcms2.a", "-o", "${FUZZER_NAME}", "-lm", "-lz"]
|
||||
args = [
|
||||
"--libafl",
|
||||
"cms_transform_fuzzer.o",
|
||||
"./Little-CMS/src/.libs/liblcms2.a",
|
||||
"-o",
|
||||
"${FUZZER_NAME}",
|
||||
"-lm",
|
||||
"-lz",
|
||||
]
|
||||
dependencies = ["cc", "cxx", "fuzz_o"]
|
||||
|
||||
# Run
|
||||
@ -59,8 +80,8 @@ mac_alias = "run_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.run_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
mkdir in || true
|
||||
echo a > in/a
|
||||
@ -76,8 +97,8 @@ mac_alias = "test_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
mkdir in || true
|
||||
echo a > in/a
|
||||
@ -101,8 +122,8 @@ mac_alias = "clean_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.clean_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm ./${FUZZER_NAME} || true
|
||||
rm fuzz.o || true
|
||||
'''
|
||||
|
@ -6,11 +6,20 @@ edition = "2021"
|
||||
[dependencies]
|
||||
clap = { version = "4.5", features = ["derive", "env"] }
|
||||
env_logger = "0.11.3"
|
||||
libafl = { path = "../../../libafl", features = ["std", "derive", "track_hit_feedbacks", "clap", "errors_backtrace"]}
|
||||
libafl_bolts = { path = "../../../libafl_bolts", features = ["std", "errors_backtrace"]}
|
||||
libafl_targets = { path = "../../../libafl_targets"}
|
||||
libafl = { path = "../../../libafl", features = [
|
||||
"std",
|
||||
"derive",
|
||||
"track_hit_feedbacks",
|
||||
"clap",
|
||||
"errors_backtrace",
|
||||
] }
|
||||
libafl_bolts = { path = "../../../libafl_bolts", features = [
|
||||
"std",
|
||||
"errors_backtrace",
|
||||
] }
|
||||
libafl_targets = { path = "../../../libafl_targets" }
|
||||
memmap2 = "0.9.4"
|
||||
nix = {version = "0.29", features = ["fs"]}
|
||||
nix = { version = "0.29", features = ["fs"] }
|
||||
regex = "1.10.5"
|
||||
serde = { version = "1.0.117", features = ["derive"] }
|
||||
|
||||
|
@ -1,19 +1,25 @@
|
||||
[env]
|
||||
PROJECT_DIR = { script = ["pwd"] }
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = ["CARGO_TARGET_DIR"] } }
|
||||
PROFILE = { value = "release", condition = {env_not_set = ["PROFILE"]} }
|
||||
PROFILE_DIR = {value = "release", condition = {env_not_set = ["PROFILE_DIR"] }}
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = [
|
||||
"CARGO_TARGET_DIR",
|
||||
] } }
|
||||
PROFILE = { value = "release", condition = { env_not_set = ["PROFILE"] } }
|
||||
PROFILE_DIR = { value = "release", condition = { env_not_set = [
|
||||
"PROFILE_DIR",
|
||||
] } }
|
||||
FUZZER_NAME = 'libafl-fuzz'
|
||||
FUZZER = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/${FUZZER_NAME}'
|
||||
LLVM_CONFIG = {value = "llvm-config-18", condition = {env_not_set = ["LLVM_CONFIG"] }}
|
||||
LLVM_CONFIG = { value = "llvm-config-18", condition = { env_not_set = [
|
||||
"LLVM_CONFIG",
|
||||
] } }
|
||||
AFL_VERSION = "db23931e7c1727ddac8691a6241c97b2203ec6fc"
|
||||
AFL_DIR_NAME= {value = "./AFLplusplus-${AFL_VERSION}"}
|
||||
AFL_CC_PATH= {value = "${AFL_DIR_NAME}/afl-clang-fast"}
|
||||
|
||||
|
||||
[tasks.build_afl]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
if [ ! -d "$AFL_DIR_NAME" ]; then
|
||||
if [ -f "v${AFL_VERSION}.zip" ]; then
|
||||
rm v${AFL_VERSION}.zip
|
||||
@ -33,8 +39,8 @@ mac_alias = "test_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cargo build --profile ${PROFILE}
|
||||
AFL_PATH=${AFL_DIR_NAME} ${AFL_CC_PATH} ./test/test-instr.c -o ./test/out-instr
|
||||
LIBAFL_DEBUG_OUTPUT=1 AFL_CORES=1 AFL_STATS_INTERVAL=1 timeout 5 ${FUZZER} -i ./test/seeds -o ./test/output ./test/out-instr || true
|
||||
@ -74,8 +80,8 @@ mac_alias = "clean_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.clean_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -rf AFLplusplus-${AFL_VERSION}
|
||||
rm ${AFL_VERSION}.zip
|
||||
rm -rf ./test/out-instr
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "libafl_atheris"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
@ -21,7 +24,12 @@ which = "6.0"
|
||||
[dependencies]
|
||||
libafl = { path = "../../../libafl/" }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/" }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = ["pointer_maps", "sancov_cmplog", "libfuzzer", "sancov_8bit"] }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = [
|
||||
"pointer_maps",
|
||||
"sancov_cmplog",
|
||||
"libfuzzer",
|
||||
"sancov_8bit",
|
||||
] }
|
||||
clap = { version = "4.5", features = ["default"] }
|
||||
|
||||
[lib]
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "libfuzzer_libmozjpeg"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
@ -17,7 +20,11 @@ debug = true
|
||||
[dependencies]
|
||||
libafl = { path = "../../../libafl/" }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/" }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = ["sancov_pcguard_edges", "sancov_value_profile", "libfuzzer"] }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = [
|
||||
"sancov_pcguard_edges",
|
||||
"sancov_value_profile",
|
||||
"libfuzzer",
|
||||
] }
|
||||
# TODO Include it only when building cc
|
||||
libafl_cc = { path = "../../../libafl_cc/" }
|
||||
mimalloc = { version = "*", default-features = false }
|
||||
|
@ -1,17 +1,21 @@
|
||||
# Variables
|
||||
[env]
|
||||
FUZZER_NAME='fuzzer_mozjpeg'
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = ["CARGO_TARGET_DIR"] } }
|
||||
PROFILE = { value = "release", condition = {env_not_set = ["PROFILE"]} }
|
||||
PROFILE_DIR = {value = "release", condition = {env_not_set = ["PROFILE_DIR"] }}
|
||||
FUZZER_NAME = 'fuzzer_mozjpeg'
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = [
|
||||
"CARGO_TARGET_DIR",
|
||||
] } }
|
||||
PROFILE = { value = "release", condition = { env_not_set = ["PROFILE"] } }
|
||||
PROFILE_DIR = { value = "release", condition = { env_not_set = [
|
||||
"PROFILE_DIR",
|
||||
] } }
|
||||
LIBAFL_CC = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc'
|
||||
LIBAFL_CXX = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx'
|
||||
FUZZER = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/${FUZZER_NAME}'
|
||||
PROJECT_DIR = { script = ["pwd"] }
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Cargo-make not integrated yet on this platform"
|
||||
'''
|
||||
|
||||
@ -22,9 +26,9 @@ mac_alias = "mozjpeg_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.mozjpeg_unix]
|
||||
condition = { files_not_exist = ["./mozjpeg-4.0.3"]}
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { files_not_exist = ["./mozjpeg-4.0.3"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
wget https://github.com/mozilla/mozjpeg/archive/v4.0.3.tar.gz
|
||||
tar -xzvf v4.0.3.tar.gz
|
||||
'''
|
||||
@ -37,7 +41,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.cxx_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}"]
|
||||
args = ["build", "--profile", "${PROFILE}"]
|
||||
|
||||
[tasks.cc]
|
||||
linux_alias = "cc_unix"
|
||||
@ -46,7 +50,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.cc_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}"]
|
||||
args = ["build", "--profile", "${PROFILE}"]
|
||||
|
||||
# Library
|
||||
[tasks.lib]
|
||||
@ -55,12 +59,12 @@ mac_alias = "lib_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.lib_unix]
|
||||
script='''
|
||||
script = '''
|
||||
cd mozjpeg-4.0.3 && cmake . -DENABLE_SHARED=false -DPNG_SUPPORTED=false -DCMAKE_C_COMPILER="${LIBAFL_CC}" -DCMAKE_CXX_COMPILER="${LIBAFL_CXX}" -G "Unix Makefiles"
|
||||
cd "${PROJECT_DIR}"
|
||||
make -C mozjpeg-4.0.3
|
||||
'''
|
||||
dependencies = [ "mozjpeg", "cxx", "cc" ]
|
||||
dependencies = ["mozjpeg", "cxx", "cc"]
|
||||
|
||||
|
||||
# Harness
|
||||
@ -71,8 +75,18 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.fuzzer_unix]
|
||||
command = "${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx"
|
||||
args = ["${PROJECT_DIR}/harness.cc", "${PROJECT_DIR}/mozjpeg-4.0.3/libjpeg.a", "${PROJECT_DIR}/mozjpeg-4.0.3/libturbojpeg.a", "-I", "${PROJECT_DIR}/mozjpeg-4.0.3/", "-o", "${FUZZER_NAME}", "-lm", "-lz"]
|
||||
dependencies = [ "lib", "cxx", "cc" ]
|
||||
args = [
|
||||
"${PROJECT_DIR}/harness.cc",
|
||||
"${PROJECT_DIR}/mozjpeg-4.0.3/libjpeg.a",
|
||||
"${PROJECT_DIR}/mozjpeg-4.0.3/libturbojpeg.a",
|
||||
"-I",
|
||||
"${PROJECT_DIR}/mozjpeg-4.0.3/",
|
||||
"-o",
|
||||
"${FUZZER_NAME}",
|
||||
"-lm",
|
||||
"-lz",
|
||||
]
|
||||
dependencies = ["lib", "cxx", "cc"]
|
||||
|
||||
# Run the fuzzer
|
||||
[tasks.run]
|
||||
@ -82,12 +96,12 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.run_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
./${FUZZER_NAME} &
|
||||
sleep 0.2
|
||||
./${FUZZER_NAME}
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
# Test
|
||||
[tasks.test]
|
||||
@ -97,7 +111,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_linux]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
(timeout 31s ./${FUZZER_NAME} | tee fuzz_stdout.log 2>/dev/null || true) &
|
||||
sleep 0.2
|
||||
@ -109,10 +123,10 @@ else
|
||||
exit 1
|
||||
fi
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
[tasks.test_mac]
|
||||
script='''
|
||||
script = '''
|
||||
echo "Skipping build on MacOS as libpng in Github is ancient, see LibAFL GH issue #254"
|
||||
'''
|
||||
|
||||
@ -125,8 +139,8 @@ windows_alias = "unsupported"
|
||||
[tasks.clean_unix]
|
||||
# Disable default `clean` definition
|
||||
clear = true
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -f ./${FUZZER_NAME}
|
||||
make -C mozjpeg-4.0.3 clean
|
||||
cargo clean
|
||||
|
@ -16,7 +16,10 @@ debug = true
|
||||
[dependencies]
|
||||
libafl = { path = "../../../libafl/" }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/" }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = ["libfuzzer", "sancov_pcguard_edges"] }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = [
|
||||
"libfuzzer",
|
||||
"sancov_pcguard_edges",
|
||||
] }
|
||||
libafl_cc = { path = "../../../libafl_cc/" }
|
||||
|
||||
[build-dependencies]
|
||||
|
@ -1,13 +1,17 @@
|
||||
# Variables
|
||||
[env]
|
||||
FUZZER_NAME='libfuzzer_windows_asan'
|
||||
CARGO_TARGET_DIR = { value = "./target", condition = { env_not_set = ["CARGO_TARGET_DIR"] } }
|
||||
PROFILE = { value = "release", condition = {env_not_set = ["PROFILE"]} }
|
||||
PROFILE_DIR = {value = "release", condition = {env_not_set = ["PROFILE_DIR"] }}
|
||||
FUZZER_NAME = 'libfuzzer_windows_asan'
|
||||
CARGO_TARGET_DIR = { value = "./target", condition = { env_not_set = [
|
||||
"CARGO_TARGET_DIR",
|
||||
] } }
|
||||
PROFILE = { value = "release", condition = { env_not_set = ["PROFILE"] } }
|
||||
PROFILE_DIR = { value = "release", condition = { env_not_set = [
|
||||
"PROFILE_DIR",
|
||||
] } }
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Cargo-make not integrated yet on this"
|
||||
'''
|
||||
|
||||
@ -19,7 +23,7 @@ windows_alias = "cxx_unix"
|
||||
|
||||
[tasks.cxx_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}"]
|
||||
args = ["build", "--profile", "${PROFILE}"]
|
||||
|
||||
[tasks.cc]
|
||||
linux_alias = "cc_unix"
|
||||
@ -28,7 +32,7 @@ windows_alias = "cc_unix"
|
||||
|
||||
[tasks.cc_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}"]
|
||||
args = ["build", "--profile", "${PROFILE}"]
|
||||
|
||||
[tasks.crash_cxx]
|
||||
linux_alias = "unsupported"
|
||||
@ -47,7 +51,7 @@ mac_alias = "unsupported"
|
||||
windows_alias = "lib_unix"
|
||||
|
||||
[tasks.lib_unix]
|
||||
dependencies = [ "cxx", "cc" ]
|
||||
dependencies = ["cxx", "cc"]
|
||||
|
||||
# Harness
|
||||
[tasks.fuzzer]
|
||||
@ -58,7 +62,7 @@ windows_alias = "fuzzer_windows"
|
||||
[tasks.fuzzer_windows]
|
||||
command = "${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx"
|
||||
args = ["./harness.cpp", "-o", "${FUZZER_NAME}.exe"]
|
||||
dependencies = [ "lib", "cxx", "cc" ]
|
||||
dependencies = ["lib", "cxx", "cc"]
|
||||
|
||||
# Run the fuzzer
|
||||
[tasks.run]
|
||||
@ -68,9 +72,9 @@ windows_alias = "run_windows" # TODO
|
||||
|
||||
[tasks.run_windows]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
# Test
|
||||
[tasks.test]
|
||||
@ -80,14 +84,14 @@ windows_alias = "test_windows" # TODO
|
||||
|
||||
[tasks.test_windows]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
start "" "${FUZZER_NAME}.exe"
|
||||
start "" "${FUZZER_NAME}.exe"
|
||||
#ping is for timeout
|
||||
ping -n 10 127.0.0.1>NUL && taskkill /im ${FUZZER_NAME}.exe /F
|
||||
>nul 2>nul dir /a-d "crashes\*" && (echo Files exist) || (exit /b 1337)
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
# Clean up
|
||||
[tasks.clean]
|
||||
@ -98,8 +102,8 @@ windows_alias = "clean_windows"
|
||||
[tasks.clean_windows]
|
||||
# Disable default `clean` definition
|
||||
clear = true
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
del ./${FUZZER_NAME}
|
||||
cargo clean
|
||||
'''
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "nautilus_sync"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
@ -22,7 +25,10 @@ debug = true
|
||||
[dependencies]
|
||||
libafl = { path = "../../../libafl/", features = ["default", "nautilus"] }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/" }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = ["sancov_pcguard_hitcounts", "libfuzzer"] }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = [
|
||||
"sancov_pcguard_hitcounts",
|
||||
"libfuzzer",
|
||||
] }
|
||||
# TODO Include it only when building cc
|
||||
libafl_cc = { path = "../../../libafl_cc/" }
|
||||
clap = { version = "4.5", features = ["derive"] }
|
||||
|
@ -1,17 +1,21 @@
|
||||
# Variables
|
||||
[env]
|
||||
FUZZER_NAME='fuzzer_libpng_nautilus'
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = ["CARGO_TARGET_DIR"] } }
|
||||
PROFILE = { value = "release", condition = {env_not_set = ["PROFILE"]} }
|
||||
PROFILE_DIR = {value = "release", condition = {env_not_set = ["PROFILE_DIR"] }}
|
||||
FUZZER_NAME = 'fuzzer_libpng_nautilus'
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = [
|
||||
"CARGO_TARGET_DIR",
|
||||
] } }
|
||||
PROFILE = { value = "release", condition = { env_not_set = ["PROFILE"] } }
|
||||
PROFILE_DIR = { value = "release", condition = { env_not_set = [
|
||||
"PROFILE_DIR",
|
||||
] } }
|
||||
LIBAFL_CC = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc'
|
||||
LIBAFL_CXX = '${CARGO_TARGET_DIR}/${PROFILE}/libafl_cxx'
|
||||
FUZZER = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/${FUZZER_NAME}'
|
||||
PROJECT_DIR = { script = ["pwd"] }
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Cargo-make not integrated yet on this platform"
|
||||
'''
|
||||
|
||||
@ -22,9 +26,9 @@ mac_alias = "libpng_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.libpng_unix]
|
||||
condition = { files_not_exist = ["./libpng-1.6.37"]}
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { files_not_exist = ["./libpng-1.6.37"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
wget https://github.com/glennrp/libpng/archive/refs/tags/v1.6.37.tar.gz
|
||||
tar -xvf v1.6.37.tar.gz
|
||||
'''
|
||||
@ -37,7 +41,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.cxx_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}"]
|
||||
args = ["build", "--profile", "${PROFILE}"]
|
||||
|
||||
[tasks.cc]
|
||||
linux_alias = "cc_unix"
|
||||
@ -46,7 +50,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.cc_unix]
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}"]
|
||||
args = ["build", "--profile", "${PROFILE}"]
|
||||
|
||||
# Library
|
||||
[tasks.lib]
|
||||
@ -55,14 +59,14 @@ mac_alias = "lib_unix"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.lib_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cd libpng-1.6.37 && ./configure --enable-shared=no --with-pic=yes --enable-hardware-optimizations=yes
|
||||
cd "${PROJECT_DIR}"
|
||||
cp ../../baby/baby_fuzzer_nautilus/grammar.json .
|
||||
make -C libpng-1.6.37 CC="${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc" CXX="${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx"
|
||||
'''
|
||||
dependencies = [ "libpng", "cxx", "cc" ]
|
||||
dependencies = ["libpng", "cxx", "cc"]
|
||||
|
||||
|
||||
# Harness
|
||||
@ -73,8 +77,17 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.fuzzer_unix]
|
||||
command = "${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx"
|
||||
args = ["${PROJECT_DIR}/../../libpng/libfuzzer_libpng/harness.cc", "${PROJECT_DIR}/libpng-1.6.37/.libs/libpng16.a", "-I", "${PROJECT_DIR}/libpng-1.6.37/", "-o", "${FUZZER_NAME}", "-lm", "-lz"]
|
||||
dependencies = [ "lib", "cxx", "cc" ]
|
||||
args = [
|
||||
"${PROJECT_DIR}/../../libpng/libfuzzer_libpng/harness.cc",
|
||||
"${PROJECT_DIR}/libpng-1.6.37/.libs/libpng16.a",
|
||||
"-I",
|
||||
"${PROJECT_DIR}/libpng-1.6.37/",
|
||||
"-o",
|
||||
"${FUZZER_NAME}",
|
||||
"-lm",
|
||||
"-lz",
|
||||
]
|
||||
dependencies = ["lib", "cxx", "cc"]
|
||||
|
||||
# Run the fuzzer
|
||||
[tasks.run]
|
||||
@ -84,17 +97,17 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.run_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
./${FUZZER_NAME} --cores 0
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
[tasks.run_unix_sync]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
./${FUZZER_NAME} --cores 0 -b 1337
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
# Test
|
||||
[tasks.test]
|
||||
@ -104,7 +117,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
timeout 31s ./${FUZZER_NAME} --cores 0 | tee fuzz_stdout.log 2>/dev/null || true
|
||||
if grep -qa "corpus: 8" fuzz_stdout.log; then
|
||||
@ -114,15 +127,15 @@ else
|
||||
exit 1
|
||||
fi
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
[tasks.test_mac]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
timeout 31s ./${FUZZER_NAME} --cores 0 | tee fuzz_stdout.log 2>/dev/null || true
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
# Clean up
|
||||
[tasks.clean]
|
||||
@ -133,8 +146,8 @@ windows_alias = "unsupported"
|
||||
[tasks.clean_unix]
|
||||
# Disable default `clean` definition
|
||||
clear = true
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -f ./${FUZZER_NAME}
|
||||
make -C libpng-1.6.37 clean
|
||||
cargo clean
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "push_harness"
|
||||
version = "0.10.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "push_stage_harness"
|
||||
version = "0.10.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
|
@ -1,7 +1,11 @@
|
||||
[package]
|
||||
name = "libfuzzer_libpng_launcher_centralized_multi_machine"
|
||||
version = "0.12.0"
|
||||
authors = ["Romain Malmain <romain.malmain@pm.me>", "Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Romain Malmain <romain.malmain@pm.me>",
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
@ -20,9 +24,34 @@ which = "6.0"
|
||||
|
||||
[dependencies]
|
||||
# no llmp compression for now, better perfs.
|
||||
libafl = { path = "../../../libafl", default-features = false, features = ["std", "derive", "llmp_small_maps", "llmp_broker_timeouts", "rand_trait", "fork", "prelude", "gzip", "regex", "serdeany_autoreg", "tui_monitor", "std", "derive", "rand_trait", "fork", "prelude", "gzip", "regex", "scalability_introspection", "multi_machine", "errors_backtrace"] }
|
||||
libafl = { path = "../../../libafl", default-features = false, features = [
|
||||
"std",
|
||||
"derive",
|
||||
"llmp_small_maps",
|
||||
"llmp_broker_timeouts",
|
||||
"rand_trait",
|
||||
"fork",
|
||||
"prelude",
|
||||
"gzip",
|
||||
"regex",
|
||||
"serdeany_autoreg",
|
||||
"tui_monitor",
|
||||
"std",
|
||||
"derive",
|
||||
"rand_trait",
|
||||
"fork",
|
||||
"prelude",
|
||||
"gzip",
|
||||
"regex",
|
||||
"scalability_introspection",
|
||||
"multi_machine",
|
||||
"errors_backtrace",
|
||||
] }
|
||||
libafl_bolts = { path = "../../../libafl_bolts", features = ["xxh3"] }
|
||||
libafl_targets = { path = "../../../libafl_targets", features = ["sancov_pcguard_hitcounts", "libfuzzer"] }
|
||||
libafl_targets = { path = "../../../libafl_targets", features = [
|
||||
"sancov_pcguard_hitcounts",
|
||||
"libfuzzer",
|
||||
] }
|
||||
# TODO Include it only when building cc
|
||||
libafl_cc = { path = "../../../libafl_cc" }
|
||||
clap = { version = "4.5", features = ["derive"] }
|
||||
|
@ -1,11 +1,15 @@
|
||||
[env]
|
||||
PROFILE = { value = "release", condition = {env_not_set = ["PROFILE"]} }
|
||||
PROFILE_DIR = { value = "release", condition = {env_not_set = ["PROFILE_DIR"] }}
|
||||
CARGO_TARGET_DIR = { value = "target", condition = { env_not_set = ["CARGO_TARGET_DIR"] } }
|
||||
PROFILE = { value = "release", condition = { env_not_set = ["PROFILE"] } }
|
||||
PROFILE_DIR = { value = "release", condition = { env_not_set = [
|
||||
"PROFILE_DIR",
|
||||
] } }
|
||||
CARGO_TARGET_DIR = { value = "target", condition = { env_not_set = [
|
||||
"CARGO_TARGET_DIR",
|
||||
] } }
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Cargo-make not integrated yet on this"
|
||||
'''
|
||||
|
||||
@ -16,12 +20,12 @@ mac_alias = "unsupported"
|
||||
windows_alias = "harness_windows"
|
||||
|
||||
[tasks.harness_linux]
|
||||
script='''
|
||||
script = '''
|
||||
clang test/test.cpp -o test.exe
|
||||
'''
|
||||
|
||||
[tasks.harness_windows]
|
||||
script='''
|
||||
script = '''
|
||||
cl test\test.cpp -o test.exe
|
||||
'''
|
||||
|
||||
@ -65,8 +69,8 @@ mac_alias = "unsupported"
|
||||
windows_alias = "test_windows"
|
||||
|
||||
[tasks.test_linux]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cp ${CARGO_TARGET_DIR}/${PROFILE_DIR}/tinyinst_simple .
|
||||
echo running tests
|
||||
timeout 5s ./tinyinst_simple || true
|
||||
@ -81,7 +85,7 @@ dependencies = ["harness", "fuzzer"]
|
||||
|
||||
[tasks.test_windows]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
copy .\target\${PROFILE_DIR}\tinyinst_simple.exe .
|
||||
start "" "tinyinst_simple.exe"
|
||||
#ping is for timeout
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "tutorial"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
@ -21,9 +24,17 @@ which = "6.0"
|
||||
[dependencies]
|
||||
libafl = { path = "../../../libafl/", features = ["default", "rand_trait"] }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/" }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = ["sancov_pcguard_hitcounts", "libfuzzer", "sancov_cmplog"] }
|
||||
serde = { version = "1.0", default-features = false, features = ["alloc"] } # serialization lib
|
||||
lain = { version = "0.5", features = ["serde_support"], git = "https://github.com/AFLplusplus/lain.git", rev = "208e927bcf411f62f8a1f51ac2d9f9423a1ec5d3" } # We're using a lain fork compatible with libafl's rand version
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = [
|
||||
"sancov_pcguard_hitcounts",
|
||||
"libfuzzer",
|
||||
"sancov_cmplog",
|
||||
] }
|
||||
serde = { version = "1.0", default-features = false, features = [
|
||||
"alloc",
|
||||
] } # serialization lib
|
||||
lain = { version = "0.5", features = [
|
||||
"serde_support",
|
||||
], git = "https://github.com/AFLplusplus/lain.git", rev = "208e927bcf411f62f8a1f51ac2d9f9423a1ec5d3" } # We're using a lain fork compatible with libafl's rand version
|
||||
# TODO Include it only when building cc
|
||||
libafl_cc = { path = "../../../libafl_cc/" }
|
||||
|
||||
|
@ -1,7 +1,11 @@
|
||||
[package]
|
||||
name = "qemu_cmin"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>", "WorksButNotTested"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
"WorksButNotTested",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[profile.release]
|
||||
@ -22,12 +26,19 @@ mips = ["libafl_qemu/mips"]
|
||||
ppc = ["libafl_qemu/ppc", "be"]
|
||||
|
||||
[build-dependencies]
|
||||
vergen = { version = "8.2.1", features = ["build", "cargo", "git", "gitcl", "rustc", "si"] }
|
||||
vergen = { version = "8.2.1", features = [
|
||||
"build",
|
||||
"cargo",
|
||||
"git",
|
||||
"gitcl",
|
||||
"rustc",
|
||||
"si",
|
||||
] }
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.5", features = ["derive", "string"]}
|
||||
clap = { version = "4.5", features = ["derive", "string"] }
|
||||
libafl = { path = "../../../libafl/" }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/" }
|
||||
libafl_qemu = { path = "../../../libafl_qemu/", features = ["usermode"] }
|
||||
log = {version = "0.4.20" }
|
||||
log = { version = "0.4.20" }
|
||||
rangemap = { version = "1.3" }
|
||||
|
@ -1,6 +1,8 @@
|
||||
[env]
|
||||
PROFILE = { value = "release", condition = {env_not_set = ["PROFILE"]} }
|
||||
PROFILE_DIR = {value = "release", condition = {env_not_set = ["PROFILE_DIR"] }}
|
||||
PROFILE = { value = "release", condition = { env_not_set = ["PROFILE"] } }
|
||||
PROFILE_DIR = { value = "release", condition = { env_not_set = [
|
||||
"PROFILE_DIR",
|
||||
] } }
|
||||
CROSS_CC = "x86_64-linux-gnu-gcc"
|
||||
CROSS_CXX = "x86_64-linux-gnu-g++"
|
||||
CROSS_CFLAGS = ""
|
||||
@ -73,32 +75,32 @@ FEATURE = "ppc"
|
||||
LIBAFL_QEMU_CLONE_DIR = "${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/qemu-libafl-bridge"
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Qemu fuzzer not supported on windows/mac"
|
||||
'''
|
||||
|
||||
|
||||
[tasks.target_dir]
|
||||
condition = { files_not_exist = [ "${CARGO_MAKE_CRATE_TARGET_DIRECTORY}" ] }
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { files_not_exist = ["${CARGO_MAKE_CRATE_TARGET_DIRECTORY}"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
mkdir ${CARGO_MAKE_CRATE_TARGET_DIRECTORY}
|
||||
'''
|
||||
|
||||
[tasks.deps_dir]
|
||||
dependencies = ["target_dir"]
|
||||
condition = { files_not_exist = [ "${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/deps/" ] }
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { files_not_exist = ["${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/deps/"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
mkdir ${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/deps/
|
||||
'''
|
||||
|
||||
[tasks.arch_target_dir]
|
||||
dependencies = ["target_dir"]
|
||||
condition = { files_not_exist = [ "${TARGET_DIR}" ] }
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { files_not_exist = ["${TARGET_DIR}"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
mkdir ${TARGET_DIR}
|
||||
'''
|
||||
|
||||
@ -109,11 +111,13 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.zlib_unix_wget]
|
||||
dependencies = ["deps_dir"]
|
||||
condition = { files_not_exist = [ "${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/deps/zlib-1.2.13" ] }
|
||||
script_runner="@shell"
|
||||
condition = { files_not_exist = [
|
||||
"${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/deps/zlib-1.2.13",
|
||||
] }
|
||||
script_runner = "@shell"
|
||||
# NOTE: There's no specific reason we're using an old version of zlib,
|
||||
# but newer versions get moved to fossils/ after a while.
|
||||
script='''
|
||||
script = '''
|
||||
wget \
|
||||
-O "${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/deps/zlib-1.2.13.tar.gz" \
|
||||
https://zlib.net/fossils/zlib-1.2.13.tar.gz
|
||||
@ -124,10 +128,10 @@ tar \
|
||||
'''
|
||||
|
||||
[tasks.zlib_unix]
|
||||
dependencies = ["arch_target_dir", "zlib_unix_wget" ]
|
||||
condition = { files_not_exist = [ "${TARGET_DIR}/build-zlib/libz.a" ] }
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
dependencies = ["arch_target_dir", "zlib_unix_wget"]
|
||||
condition = { files_not_exist = ["${TARGET_DIR}/build-zlib/libz.a"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -rf ${TARGET_DIR}/build-zlib/
|
||||
|
||||
mkdir ${TARGET_DIR}/build-zlib/
|
||||
@ -148,9 +152,11 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.libpng_unix_wget]
|
||||
dependencies = ["deps_dir"]
|
||||
condition = { files_not_exist = [ "${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/deps/libpng-1.6.37" ] }
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { files_not_exist = [
|
||||
"${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/deps/libpng-1.6.37",
|
||||
] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
wget \
|
||||
-O "${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/deps/v1.6.37.tar.gz" \
|
||||
https://github.com/glennrp/libpng/archive/refs/tags/v1.6.37.tar.gz
|
||||
@ -161,10 +167,10 @@ tar \
|
||||
'''
|
||||
|
||||
[tasks.libpng_unix]
|
||||
dependencies = [ "arch_target_dir", "zlib", "libpng_unix_wget" ]
|
||||
condition = { files_not_exist = [ "${TARGET_DIR}/build-png/.libs/libpng16.a" ] }
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
dependencies = ["arch_target_dir", "zlib", "libpng_unix_wget"]
|
||||
condition = { files_not_exist = ["${TARGET_DIR}/build-png/.libs/libpng16.a"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -rf ${TARGET_DIR}/build-png/
|
||||
|
||||
mkdir ${TARGET_DIR}/build-png/
|
||||
@ -190,17 +196,19 @@ windows_alias = "unsupported"
|
||||
[tasks.build_unix]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"build",
|
||||
"--profile",
|
||||
"${PROFILE}",
|
||||
"--features", "${FEATURE}",
|
||||
"--target-dir", "${TARGET_DIR}"
|
||||
"build",
|
||||
"--profile",
|
||||
"${PROFILE}",
|
||||
"--features",
|
||||
"${FEATURE}",
|
||||
"--target-dir",
|
||||
"${TARGET_DIR}",
|
||||
]
|
||||
|
||||
[tasks.fuzzer]
|
||||
dependencies = ["build"]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -f ${TARGET_DIR}/${PROFILE_DIR}/qemu_cmin-${CARGO_MAKE_PROFILE}
|
||||
mv ${TARGET_DIR}/${PROFILE_DIR}/qemu_cmin ${TARGET_DIR}/${PROFILE_DIR}/qemu_cmin-${CARGO_MAKE_PROFILE}
|
||||
'''
|
||||
@ -211,8 +219,8 @@ mac_alias = "unsupported"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.harness_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
${CROSS_CXX} \
|
||||
./harness.cc \
|
||||
$CROSS_CFLAGS \
|
||||
@ -225,7 +233,7 @@ ${CROSS_CXX} \
|
||||
-lm \
|
||||
-static
|
||||
'''
|
||||
dependencies = [ "libpng" ]
|
||||
dependencies = ["libpng"]
|
||||
|
||||
[tasks.run]
|
||||
linux_alias = "run_unix"
|
||||
@ -235,13 +243,15 @@ windows_alias = "unsupported"
|
||||
[tasks.run_unix]
|
||||
command = "${TARGET_DIR}/${PROFILE_DIR}/qemu_cmin-${CARGO_MAKE_PROFILE}"
|
||||
args = [
|
||||
"--output", "./output",
|
||||
"--input", "./corpus",
|
||||
"--verbose",
|
||||
"--",
|
||||
"${TARGET_DIR}/libpng-harness-${CARGO_MAKE_PROFILE}",
|
||||
"--output",
|
||||
"./output",
|
||||
"--input",
|
||||
"./corpus",
|
||||
"--verbose",
|
||||
"--",
|
||||
"${TARGET_DIR}/libpng-harness-${CARGO_MAKE_PROFILE}",
|
||||
]
|
||||
dependencies = [ "harness", "fuzzer" ]
|
||||
dependencies = ["harness", "fuzzer"]
|
||||
|
||||
[tasks.test]
|
||||
linux_alias = "test_unix"
|
||||
@ -249,13 +259,10 @@ mac_alias = "unsupported"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix]
|
||||
dependencies = [ "lightweight" ]
|
||||
dependencies = ["lightweight"]
|
||||
# Tidy up after we've run our tests so we don't hog all the disk space
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"clean",
|
||||
]
|
||||
args = ["make", "clean"]
|
||||
|
||||
[tasks.test_full]
|
||||
linux_alias = "test_unix_full"
|
||||
@ -263,13 +270,10 @@ mac_alias = "unsupported"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix_full]
|
||||
dependencies = [ "all" ]
|
||||
dependencies = ["all"]
|
||||
# Tidy up after we've run our tests so we don't hog all the disk space
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"clean",
|
||||
]
|
||||
args = ["make", "clean"]
|
||||
|
||||
[tasks.clean]
|
||||
linux_alias = "clean_unix"
|
||||
@ -279,72 +283,38 @@ windows_alias = "unsupported"
|
||||
[tasks.clean_unix]
|
||||
# Disable default `clean` definition
|
||||
clear = true
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -rf ${CARGO_MAKE_CRATE_TARGET_DIRECTORY}
|
||||
cargo clean
|
||||
'''
|
||||
|
||||
[tasks.arm]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"-p", "arm",
|
||||
"run",
|
||||
]
|
||||
args = ["make", "-p", "arm", "run"]
|
||||
|
||||
[tasks.aarch64]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"-p", "aarch64",
|
||||
"run",
|
||||
]
|
||||
args = ["make", "-p", "aarch64", "run"]
|
||||
|
||||
[tasks.x86_64]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"-p", "x86_64",
|
||||
"run",
|
||||
]
|
||||
args = ["make", "-p", "x86_64", "run"]
|
||||
|
||||
[tasks.i386]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"-p", "i386",
|
||||
"run",
|
||||
]
|
||||
args = ["make", "-p", "i386", "run"]
|
||||
|
||||
[tasks.mips]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"-p", "mips",
|
||||
"run",
|
||||
]
|
||||
args = ["make", "-p", "mips", "run"]
|
||||
|
||||
[tasks.ppc]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"-p", "ppc",
|
||||
"run",
|
||||
]
|
||||
args = ["make", "-p", "ppc", "run"]
|
||||
|
||||
[tasks.all]
|
||||
dependencies = [
|
||||
"arm",
|
||||
"aarch64",
|
||||
"x86_64",
|
||||
"i386",
|
||||
"mips",
|
||||
"ppc"
|
||||
]
|
||||
dependencies = ["arm", "aarch64", "x86_64", "i386", "mips", "ppc"]
|
||||
|
||||
[tasks.lightweight]
|
||||
dependencies = [
|
||||
"arm",
|
||||
"x86_64",
|
||||
]
|
||||
dependencies = ["arm", "x86_64"]
|
||||
|
@ -1,7 +1,11 @@
|
||||
[package]
|
||||
name = "qemu_coverage"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>", "WorksButNotTested"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
"WorksButNotTested",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[profile.release]
|
||||
@ -22,12 +26,19 @@ mips = ["libafl_qemu/mips"]
|
||||
ppc = ["libafl_qemu/ppc", "be"]
|
||||
|
||||
[build-dependencies]
|
||||
vergen = { version = "8.2.1", features = ["build", "cargo", "git", "gitcl", "rustc", "si"] }
|
||||
vergen = { version = "8.2.1", features = [
|
||||
"build",
|
||||
"cargo",
|
||||
"git",
|
||||
"gitcl",
|
||||
"rustc",
|
||||
"si",
|
||||
] }
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.5", features = ["derive", "string"]}
|
||||
clap = { version = "4.5", features = ["derive", "string"] }
|
||||
libafl = { path = "../../../libafl/" }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/" }
|
||||
libafl_qemu = { path = "../../../libafl_qemu/", features = ["usermode"] }
|
||||
log = {version = "0.4.20" }
|
||||
log = { version = "0.4.20" }
|
||||
rangemap = { version = "1.3" }
|
||||
|
@ -1,6 +1,8 @@
|
||||
[env]
|
||||
PROFILE = { value = "release", condition = {env_not_set = ["PROFILE"]} }
|
||||
PROFILE_DIR = {value = "release", condition = {env_not_set = ["PROFILE_DIR"] }}
|
||||
PROFILE = { value = "release", condition = { env_not_set = ["PROFILE"] } }
|
||||
PROFILE_DIR = { value = "release", condition = { env_not_set = [
|
||||
"PROFILE_DIR",
|
||||
] } }
|
||||
CROSS_CC = "x86_64-linux-gnu-gcc"
|
||||
CROSS_CXX = "x86_64-linux-gnu-g++"
|
||||
CROSS_CFLAGS = ""
|
||||
@ -73,32 +75,32 @@ FEATURE = "ppc"
|
||||
LIBAFL_QEMU_CLONE_DIR = "${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/qemu-libafl-bridge"
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Qemu fuzzer not supported on windows/mac"
|
||||
'''
|
||||
|
||||
|
||||
[tasks.target_dir]
|
||||
condition = { files_not_exist = [ "${CARGO_MAKE_CRATE_TARGET_DIRECTORY}" ] }
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { files_not_exist = ["${CARGO_MAKE_CRATE_TARGET_DIRECTORY}"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
mkdir ${CARGO_MAKE_CRATE_TARGET_DIRECTORY}
|
||||
'''
|
||||
|
||||
[tasks.deps_dir]
|
||||
dependencies = ["target_dir"]
|
||||
condition = { files_not_exist = [ "${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/deps/" ] }
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { files_not_exist = ["${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/deps/"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
mkdir ${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/deps/
|
||||
'''
|
||||
|
||||
[tasks.arch_target_dir]
|
||||
dependencies = ["target_dir"]
|
||||
condition = { files_not_exist = [ "${TARGET_DIR}" ] }
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { files_not_exist = ["${TARGET_DIR}"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
mkdir ${TARGET_DIR}
|
||||
'''
|
||||
|
||||
@ -109,11 +111,13 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.zlib_unix_wget]
|
||||
dependencies = ["deps_dir"]
|
||||
condition = { files_not_exist = [ "${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/deps/zlib-1.2.13" ] }
|
||||
script_runner="@shell"
|
||||
condition = { files_not_exist = [
|
||||
"${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/deps/zlib-1.2.13",
|
||||
] }
|
||||
script_runner = "@shell"
|
||||
# NOTE: There's no specific reason we're using an old version of zlib,
|
||||
# but newer versions get moved to fossils/ after a while.
|
||||
script='''
|
||||
script = '''
|
||||
wget \
|
||||
-O "${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/deps/zlib-1.2.13.tar.gz" \
|
||||
https://zlib.net/fossils/zlib-1.2.13.tar.gz
|
||||
@ -124,10 +128,10 @@ tar \
|
||||
'''
|
||||
|
||||
[tasks.zlib_unix]
|
||||
dependencies = ["arch_target_dir", "zlib_unix_wget" ]
|
||||
condition = { files_not_exist = [ "${TARGET_DIR}/build-zlib/libz.a" ] }
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
dependencies = ["arch_target_dir", "zlib_unix_wget"]
|
||||
condition = { files_not_exist = ["${TARGET_DIR}/build-zlib/libz.a"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -rf ${TARGET_DIR}/build-zlib/
|
||||
|
||||
mkdir ${TARGET_DIR}/build-zlib/
|
||||
@ -148,9 +152,11 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.libpng_unix_wget]
|
||||
dependencies = ["deps_dir"]
|
||||
condition = { files_not_exist = [ "${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/deps/libpng-1.6.37" ] }
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { files_not_exist = [
|
||||
"${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/deps/libpng-1.6.37",
|
||||
] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
wget \
|
||||
-O "${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/deps/v1.6.37.tar.gz" \
|
||||
https://github.com/glennrp/libpng/archive/refs/tags/v1.6.37.tar.gz
|
||||
@ -161,10 +167,10 @@ tar \
|
||||
'''
|
||||
|
||||
[tasks.libpng_unix]
|
||||
dependencies = [ "arch_target_dir", "zlib", "libpng_unix_wget" ]
|
||||
condition = { files_not_exist = [ "${TARGET_DIR}/build-png/.libs/libpng16.a" ] }
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
dependencies = ["arch_target_dir", "zlib", "libpng_unix_wget"]
|
||||
condition = { files_not_exist = ["${TARGET_DIR}/build-png/.libs/libpng16.a"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -rf ${TARGET_DIR}/build-png/
|
||||
|
||||
mkdir ${TARGET_DIR}/build-png/
|
||||
@ -190,17 +196,19 @@ windows_alias = "unsupported"
|
||||
[tasks.build_unix]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"build",
|
||||
"--profile",
|
||||
"${PROFILE}",
|
||||
"--features", "${FEATURE}",
|
||||
"--target-dir", "${TARGET_DIR}"
|
||||
"build",
|
||||
"--profile",
|
||||
"${PROFILE}",
|
||||
"--features",
|
||||
"${FEATURE}",
|
||||
"--target-dir",
|
||||
"${TARGET_DIR}",
|
||||
]
|
||||
|
||||
[tasks.fuzzer]
|
||||
dependencies = ["build"]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -f ${TARGET_DIR}/${PROFILE_DIR}/qemu_coverage-${CARGO_MAKE_PROFILE}
|
||||
mv ${TARGET_DIR}/${PROFILE_DIR}/qemu_coverage ${TARGET_DIR}/${PROFILE_DIR}/qemu_coverage-${CARGO_MAKE_PROFILE}
|
||||
'''
|
||||
@ -211,8 +219,8 @@ mac_alias = "unsupported"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.harness_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
${CROSS_CXX} \
|
||||
./harness.cc \
|
||||
$CROSS_CFLAGS \
|
||||
@ -225,7 +233,7 @@ ${CROSS_CXX} \
|
||||
-lm \
|
||||
-static
|
||||
'''
|
||||
dependencies = [ "libpng" ]
|
||||
dependencies = ["libpng"]
|
||||
|
||||
[tasks.run]
|
||||
linux_alias = "run_unix"
|
||||
@ -235,12 +243,14 @@ windows_alias = "unsupported"
|
||||
[tasks.run_unix]
|
||||
command = "${TARGET_DIR}/${PROFILE_DIR}/qemu_coverage-${CARGO_MAKE_PROFILE}"
|
||||
args = [
|
||||
"--coverage-path", "${TARGET_DIR}/drcov.log",
|
||||
"--input-dir", "./corpus",
|
||||
"--",
|
||||
"${TARGET_DIR}/libpng-harness-${CARGO_MAKE_PROFILE}",
|
||||
"--coverage-path",
|
||||
"${TARGET_DIR}/drcov.log",
|
||||
"--input-dir",
|
||||
"./corpus",
|
||||
"--",
|
||||
"${TARGET_DIR}/libpng-harness-${CARGO_MAKE_PROFILE}",
|
||||
]
|
||||
dependencies = [ "harness", "fuzzer" ]
|
||||
dependencies = ["harness", "fuzzer"]
|
||||
|
||||
[tasks.test]
|
||||
linux_alias = "test_unix"
|
||||
@ -248,13 +258,10 @@ mac_alias = "unsupported"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix]
|
||||
dependencies = [ "lightweight" ]
|
||||
dependencies = ["lightweight"]
|
||||
# Tidy up after we've run our tests so we don't hog all the disk space
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"clean",
|
||||
]
|
||||
args = ["make", "clean"]
|
||||
|
||||
[tasks.test_full]
|
||||
linux_alias = "test_unix_full"
|
||||
@ -262,13 +269,10 @@ mac_alias = "unsupported"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix_full]
|
||||
dependencies = [ "all" ]
|
||||
dependencies = ["all"]
|
||||
# Tidy up after we've run our tests so we don't hog all the disk space
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"clean",
|
||||
]
|
||||
args = ["make", "clean"]
|
||||
|
||||
[tasks.clean]
|
||||
linux_alias = "clean_unix"
|
||||
@ -278,72 +282,38 @@ windows_alias = "unsupported"
|
||||
[tasks.clean_unix]
|
||||
# Disable default `clean` definition
|
||||
clear = true
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -rf ${CARGO_MAKE_CRATE_TARGET_DIRECTORY}
|
||||
cargo clean
|
||||
'''
|
||||
|
||||
[tasks.arm]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"-p", "arm",
|
||||
"run",
|
||||
]
|
||||
args = ["make", "-p", "arm", "run"]
|
||||
|
||||
[tasks.aarch64]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"-p", "aarch64",
|
||||
"run",
|
||||
]
|
||||
args = ["make", "-p", "aarch64", "run"]
|
||||
|
||||
[tasks.x86_64]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"-p", "x86_64",
|
||||
"run",
|
||||
]
|
||||
args = ["make", "-p", "x86_64", "run"]
|
||||
|
||||
[tasks.i386]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"-p", "i386",
|
||||
"run",
|
||||
]
|
||||
args = ["make", "-p", "i386", "run"]
|
||||
|
||||
[tasks.mips]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"-p", "mips",
|
||||
"run",
|
||||
]
|
||||
args = ["make", "-p", "mips", "run"]
|
||||
|
||||
[tasks.ppc]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"-p", "ppc",
|
||||
"run",
|
||||
]
|
||||
args = ["make", "-p", "ppc", "run"]
|
||||
|
||||
[tasks.all]
|
||||
dependencies = [
|
||||
"arm",
|
||||
"aarch64",
|
||||
"x86_64",
|
||||
"i386",
|
||||
"mips",
|
||||
"ppc"
|
||||
]
|
||||
dependencies = ["arm", "aarch64", "x86_64", "i386", "mips", "ppc"]
|
||||
|
||||
[tasks.lightweight]
|
||||
dependencies = [
|
||||
"arm",
|
||||
"x86_64",
|
||||
]
|
||||
dependencies = ["arm", "x86_64"]
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "qemu_launcher"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
@ -33,14 +36,23 @@ opt-level = 3
|
||||
debug = true
|
||||
|
||||
[build-dependencies]
|
||||
vergen = { version = "8.2", features = ["build", "cargo", "git", "gitcl", "rustc", "si"] }
|
||||
vergen = { version = "8.2", features = [
|
||||
"build",
|
||||
"cargo",
|
||||
"git",
|
||||
"gitcl",
|
||||
"rustc",
|
||||
"si",
|
||||
] }
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.3", features = ["derive", "string"]}
|
||||
clap = { version = "4.3", features = ["derive", "string"] }
|
||||
libafl = { path = "../../../libafl/" }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/", features = ["errors_backtrace"] }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/", features = [
|
||||
"errors_backtrace",
|
||||
] }
|
||||
libafl_qemu = { path = "../../../libafl_qemu/", features = ["usermode"] }
|
||||
log = {version = "0.4.20" }
|
||||
log = { version = "0.4.20" }
|
||||
nix = { version = "0.29", features = ["fs"] }
|
||||
rangemap = { version = "1.3" }
|
||||
readonly = { version = "0.2.10" }
|
||||
|
@ -1,6 +1,8 @@
|
||||
[env]
|
||||
PROFILE = { value = "release", condition = {env_not_set = ["PROFILE"]} }
|
||||
PROFILE_DIR = {value = "release", condition = {env_not_set = ["PROFILE_DIR"] }}
|
||||
PROFILE = { value = "release", condition = { env_not_set = ["PROFILE"] } }
|
||||
PROFILE_DIR = { value = "release", condition = { env_not_set = [
|
||||
"PROFILE_DIR",
|
||||
] } }
|
||||
CROSS_CC = "x86_64-linux-gnu-gcc"
|
||||
CROSS_CXX = "x86_64-linux-gnu-g++"
|
||||
CROSS_CFLAGS = ""
|
||||
@ -66,31 +68,31 @@ LIBPNG_OPTIMIZATIONS = "no"
|
||||
FEATURE = "ppc"
|
||||
|
||||
[tasks.unsupported]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Qemu fuzzer not supported on windows/mac"
|
||||
'''
|
||||
|
||||
[tasks.target_dir]
|
||||
condition = { files_not_exist = [ "${CARGO_MAKE_CRATE_TARGET_DIRECTORY}" ] }
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { files_not_exist = ["${CARGO_MAKE_CRATE_TARGET_DIRECTORY}"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
mkdir ${CARGO_MAKE_CRATE_TARGET_DIRECTORY}
|
||||
'''
|
||||
|
||||
[tasks.deps_dir]
|
||||
dependencies = ["target_dir"]
|
||||
condition = { files_not_exist = [ "${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/deps/" ] }
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { files_not_exist = ["${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/deps/"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
mkdir ${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/deps/
|
||||
'''
|
||||
|
||||
[tasks.arch_target_dir]
|
||||
dependencies = ["target_dir"]
|
||||
condition = { files_not_exist = [ "${TARGET_DIR}" ] }
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { files_not_exist = ["${TARGET_DIR}"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
mkdir ${TARGET_DIR}
|
||||
'''
|
||||
|
||||
@ -101,11 +103,13 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.zlib_unix_wget]
|
||||
dependencies = ["deps_dir"]
|
||||
condition = { files_not_exist = [ "${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/deps/zlib-1.2.13" ] }
|
||||
script_runner="@shell"
|
||||
condition = { files_not_exist = [
|
||||
"${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/deps/zlib-1.2.13",
|
||||
] }
|
||||
script_runner = "@shell"
|
||||
# NOTE: There's no specific reason we're using an old version of zlib,
|
||||
# but newer versions get moved to fossils/ after a while.
|
||||
script='''
|
||||
script = '''
|
||||
wget \
|
||||
-O "${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/deps/zlib-1.2.13.tar.gz" \
|
||||
https://zlib.net/fossils/zlib-1.2.13.tar.gz
|
||||
@ -116,10 +120,10 @@ tar \
|
||||
'''
|
||||
|
||||
[tasks.zlib_unix]
|
||||
dependencies = ["arch_target_dir", "zlib_unix_wget" ]
|
||||
condition = { files_not_exist = [ "${TARGET_DIR}/build-zlib/libz.a" ] }
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
dependencies = ["arch_target_dir", "zlib_unix_wget"]
|
||||
condition = { files_not_exist = ["${TARGET_DIR}/build-zlib/libz.a"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -rf ${TARGET_DIR}/build-zlib/
|
||||
|
||||
mkdir ${TARGET_DIR}/build-zlib/
|
||||
@ -140,9 +144,11 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.libpng_unix_wget]
|
||||
dependencies = ["deps_dir"]
|
||||
condition = { files_not_exist = [ "${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/deps/libpng-1.6.37" ] }
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { files_not_exist = [
|
||||
"${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/deps/libpng-1.6.37",
|
||||
] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
wget \
|
||||
-O "${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/deps/v1.6.37.tar.gz" \
|
||||
https://github.com/glennrp/libpng/archive/refs/tags/v1.6.37.tar.gz
|
||||
@ -153,10 +159,10 @@ tar \
|
||||
'''
|
||||
|
||||
[tasks.libpng_unix]
|
||||
dependencies = [ "arch_target_dir", "zlib", "libpng_unix_wget" ]
|
||||
condition = { files_not_exist = [ "${TARGET_DIR}/build-png/.libs/libpng16.a" ] }
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
dependencies = ["arch_target_dir", "zlib", "libpng_unix_wget"]
|
||||
condition = { files_not_exist = ["${TARGET_DIR}/build-png/.libs/libpng16.a"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -rf ${TARGET_DIR}/build-png/
|
||||
|
||||
mkdir ${TARGET_DIR}/build-png/
|
||||
@ -183,17 +189,19 @@ windows_alias = "unsupported"
|
||||
[tasks.build_unix]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"build",
|
||||
"--profile",
|
||||
"${PROFILE}",
|
||||
"--features", "${FEATURE}",
|
||||
"--target-dir", "${TARGET_DIR}"
|
||||
"build",
|
||||
"--profile",
|
||||
"${PROFILE}",
|
||||
"--features",
|
||||
"${FEATURE}",
|
||||
"--target-dir",
|
||||
"${TARGET_DIR}",
|
||||
]
|
||||
|
||||
[tasks.fuzzer]
|
||||
dependencies = ["build"]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -f ${TARGET_DIR}/${PROFILE_DIR}/qemu_launcher-${CARGO_MAKE_PROFILE}
|
||||
mv ${TARGET_DIR}/${PROFILE_DIR}/qemu_launcher ${TARGET_DIR}/${PROFILE_DIR}/qemu_launcher-${CARGO_MAKE_PROFILE}
|
||||
'''
|
||||
@ -204,8 +212,8 @@ mac_alias = "unsupported"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.harness_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
${CROSS_CXX} \
|
||||
./harness.cc \
|
||||
$CROSS_CFLAGS \
|
||||
@ -218,7 +226,7 @@ ${CROSS_CXX} \
|
||||
-o"${TARGET_DIR}/libpng-harness-${CARGO_MAKE_PROFILE}" \
|
||||
-lm
|
||||
'''
|
||||
dependencies = [ "libpng" ]
|
||||
dependencies = ["libpng"]
|
||||
|
||||
[tasks.debug]
|
||||
linux_alias = "debug_unix"
|
||||
@ -228,18 +236,25 @@ windows_alias = "unsupported"
|
||||
[tasks.debug_unix]
|
||||
command = "${TARGET_DIR}/${PROFILE_DIR}/qemu_launcher-${CARGO_MAKE_PROFILE}"
|
||||
args = [
|
||||
"--input", "./corpus",
|
||||
"--output", "${TARGET_DIR}/output/",
|
||||
"--log", "${TARGET_DIR}/output/log.txt",
|
||||
"--cores", "0-7",
|
||||
"--asan-cores", "0-3",
|
||||
"--cmplog-cores", "2-5",
|
||||
"--iterations", "100000",
|
||||
"--verbose",
|
||||
"--",
|
||||
"${TARGET_DIR}/libpng-harness-${CARGO_MAKE_PROFILE}",
|
||||
"--input",
|
||||
"./corpus",
|
||||
"--output",
|
||||
"${TARGET_DIR}/output/",
|
||||
"--log",
|
||||
"${TARGET_DIR}/output/log.txt",
|
||||
"--cores",
|
||||
"0-7",
|
||||
"--asan-cores",
|
||||
"0-3",
|
||||
"--cmplog-cores",
|
||||
"2-5",
|
||||
"--iterations",
|
||||
"100000",
|
||||
"--verbose",
|
||||
"--",
|
||||
"${TARGET_DIR}/libpng-harness-${CARGO_MAKE_PROFILE}",
|
||||
]
|
||||
dependencies = [ "harness", "fuzzer" ]
|
||||
dependencies = ["harness", "fuzzer"]
|
||||
|
||||
[tasks.run]
|
||||
linux_alias = "run_unix"
|
||||
@ -249,18 +264,25 @@ windows_alias = "unsupported"
|
||||
[tasks.run_unix]
|
||||
command = "${TARGET_DIR}/${PROFILE_DIR}/qemu_launcher-${CARGO_MAKE_PROFILE}"
|
||||
args = [
|
||||
"--input", "./corpus",
|
||||
"--output", "${TARGET_DIR}/output/",
|
||||
"--log", "${TARGET_DIR}/output/log.txt",
|
||||
"--cores", "0-7",
|
||||
"--asan-cores", "0-3",
|
||||
"--cmplog-cores", "2-5",
|
||||
"--iterations", "1000000",
|
||||
"--tui",
|
||||
"--",
|
||||
"${TARGET_DIR}/libpng-harness-${CARGO_MAKE_PROFILE}",
|
||||
"--input",
|
||||
"./corpus",
|
||||
"--output",
|
||||
"${TARGET_DIR}/output/",
|
||||
"--log",
|
||||
"${TARGET_DIR}/output/log.txt",
|
||||
"--cores",
|
||||
"0-7",
|
||||
"--asan-cores",
|
||||
"0-3",
|
||||
"--cmplog-cores",
|
||||
"2-5",
|
||||
"--iterations",
|
||||
"1000000",
|
||||
"--tui",
|
||||
"--",
|
||||
"${TARGET_DIR}/libpng-harness-${CARGO_MAKE_PROFILE}",
|
||||
]
|
||||
dependencies = [ "harness", "fuzzer" ]
|
||||
dependencies = ["harness", "fuzzer"]
|
||||
|
||||
[tasks.single]
|
||||
linux_alias = "single_unix"
|
||||
@ -270,14 +292,18 @@ windows_alias = "unsupported"
|
||||
[tasks.single_unix]
|
||||
command = "${TARGET_DIR}/${PROFILE_DIR}/qemu_launcher-${CARGO_MAKE_PROFILE}"
|
||||
args = [
|
||||
"--input", "./corpus",
|
||||
"--output", "${TARGET_DIR}/output/",
|
||||
"--log", "${TARGET_DIR}/output/log.txt",
|
||||
"--cores", "0",
|
||||
"--",
|
||||
"${TARGET_DIR}/libpng-harness-${CARGO_MAKE_PROFILE}",
|
||||
"--input",
|
||||
"./corpus",
|
||||
"--output",
|
||||
"${TARGET_DIR}/output/",
|
||||
"--log",
|
||||
"${TARGET_DIR}/output/log.txt",
|
||||
"--cores",
|
||||
"0",
|
||||
"--",
|
||||
"${TARGET_DIR}/libpng-harness-${CARGO_MAKE_PROFILE}",
|
||||
]
|
||||
dependencies = [ "harness", "fuzzer" ]
|
||||
dependencies = ["harness", "fuzzer"]
|
||||
|
||||
[tasks.asan]
|
||||
linux_alias = "asan_unix"
|
||||
@ -287,15 +313,20 @@ windows_alias = "unsupported"
|
||||
[tasks.asan_unix]
|
||||
command = "${TARGET_DIR}/${PROFILE_DIR}/qemu_launcher-${CARGO_MAKE_PROFILE}"
|
||||
args = [
|
||||
"--input", "./corpus",
|
||||
"--output", "${TARGET_DIR}/output/",
|
||||
"--log", "${TARGET_DIR}/output/log.txt",
|
||||
"--cores", "0",
|
||||
"--asan-cores", "0",
|
||||
"--",
|
||||
"${TARGET_DIR}/libpng-harness-${CARGO_MAKE_PROFILE}",
|
||||
"--input",
|
||||
"./corpus",
|
||||
"--output",
|
||||
"${TARGET_DIR}/output/",
|
||||
"--log",
|
||||
"${TARGET_DIR}/output/log.txt",
|
||||
"--cores",
|
||||
"0",
|
||||
"--asan-cores",
|
||||
"0",
|
||||
"--",
|
||||
"${TARGET_DIR}/libpng-harness-${CARGO_MAKE_PROFILE}",
|
||||
]
|
||||
dependencies = [ "harness", "fuzzer" ]
|
||||
dependencies = ["harness", "fuzzer"]
|
||||
|
||||
[tasks.asan_guest]
|
||||
linux_alias = "asan_guest_unix"
|
||||
@ -305,15 +336,20 @@ windows_alias = "unsupported"
|
||||
[tasks.asan_guest_unix]
|
||||
command = "${TARGET_DIR}/${PROFILE_DIR}/qemu_launcher-${CARGO_MAKE_PROFILE}"
|
||||
args = [
|
||||
"--input", "./corpus",
|
||||
"--output", "${TARGET_DIR}/output/",
|
||||
"--log", "${TARGET_DIR}/output/log.txt",
|
||||
"--cores", "0",
|
||||
"--asan-guest-cores", "0",
|
||||
"--",
|
||||
"${TARGET_DIR}/libpng-harness-${CARGO_MAKE_PROFILE}",
|
||||
"--input",
|
||||
"./corpus",
|
||||
"--output",
|
||||
"${TARGET_DIR}/output/",
|
||||
"--log",
|
||||
"${TARGET_DIR}/output/log.txt",
|
||||
"--cores",
|
||||
"0",
|
||||
"--asan-guest-cores",
|
||||
"0",
|
||||
"--",
|
||||
"${TARGET_DIR}/libpng-harness-${CARGO_MAKE_PROFILE}",
|
||||
]
|
||||
dependencies = [ "harness", "fuzzer" ]
|
||||
dependencies = ["harness", "fuzzer"]
|
||||
|
||||
[tasks.test]
|
||||
linux_alias = "test_unix"
|
||||
@ -321,8 +357,8 @@ mac_alias = "unsupported"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
echo "Profile: ${PROFILE}"
|
||||
cd injection_test || exit 1
|
||||
make
|
||||
@ -350,66 +386,35 @@ windows_alias = "unsupported"
|
||||
[tasks.clean_unix]
|
||||
# Disable default `clean` definition
|
||||
clear = true
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -rf ${CARGO_MAKE_CRATE_TARGET_DIRECTORY}
|
||||
cargo clean
|
||||
'''
|
||||
|
||||
[tasks.arm]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"-p", "arm",
|
||||
"run",
|
||||
]
|
||||
args = ["make", "-p", "arm", "run"]
|
||||
|
||||
[tasks.aarch64]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"-p", "aarch64",
|
||||
"run",
|
||||
]
|
||||
args = ["make", "-p", "aarch64", "run"]
|
||||
|
||||
[tasks.x86_64]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"-p", "x86_64",
|
||||
"run",
|
||||
]
|
||||
args = ["make", "-p", "x86_64", "run"]
|
||||
|
||||
[tasks.i386]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"-p", "i386",
|
||||
"run",
|
||||
]
|
||||
args = ["make", "-p", "i386", "run"]
|
||||
|
||||
[tasks.mips]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"-p", "mips",
|
||||
"run",
|
||||
]
|
||||
args = ["make", "-p", "mips", "run"]
|
||||
|
||||
[tasks.ppc]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"-p", "ppc",
|
||||
"run",
|
||||
]
|
||||
args = ["make", "-p", "ppc", "run"]
|
||||
|
||||
[tasks.all]
|
||||
dependencies = [
|
||||
"arm",
|
||||
"aarch64",
|
||||
"x86_64",
|
||||
"i386",
|
||||
"mips",
|
||||
"ppc"
|
||||
]
|
||||
dependencies = ["arm", "aarch64", "x86_64", "i386", "mips", "ppc"]
|
||||
|
@ -18,32 +18,27 @@
|
||||
# # 0 = first, 1 = second, ... 0-5 are supported (depending on architecture)
|
||||
|
||||
[sql]
|
||||
tokens = [ "'\"\"'\"\n", "\"1\" OR '1'=\"1\"" ]
|
||||
matches = [ "'\"\"'\"", "1\" OR '1'=\"1" ]
|
||||
tokens = ["'\"\"'\"\n", "\"1\" OR '1'=\"1\""]
|
||||
matches = ["'\"\"'\"", "1\" OR '1'=\"1"]
|
||||
|
||||
[sql.functions]
|
||||
sqlite3_exec = {param = 1}
|
||||
PQexec = {param = 1}
|
||||
PQexecParams = {param = 1}
|
||||
mysql_query = {param = 1}
|
||||
mysql_send_query = {param = 1}
|
||||
sqlite3_exec = { param = 1 }
|
||||
PQexec = { param = 1 }
|
||||
PQexecParams = { param = 1 }
|
||||
mysql_query = { param = 1 }
|
||||
mysql_send_query = { param = 1 }
|
||||
|
||||
|
||||
# Command injection. Note that for most you will need a libc with debug symbols
|
||||
# We do not need this as we watch the SYS_execve syscall, this is just an
|
||||
# example.
|
||||
[cmd]
|
||||
tokens = [
|
||||
"'\"FUZZ\"'",
|
||||
"\";FUZZ;\"",
|
||||
"';FUZZ;'",
|
||||
"$(FUZZ)",
|
||||
]
|
||||
tokens = ["'\"FUZZ\"'", "\";FUZZ;\"", "';FUZZ;'", "$(FUZZ)"]
|
||||
matches = ["'\"FUZZ\"'"]
|
||||
|
||||
[cmd.functions]
|
||||
popen = {param = 0}
|
||||
system = {param = 0}
|
||||
popen = { param = 0 }
|
||||
system = { param = 0 }
|
||||
|
||||
# LDAP injection tests
|
||||
[ldap]
|
||||
@ -51,8 +46,8 @@ tokens = ["*)(FUZZ=*))(|"]
|
||||
matches = ["*)(FUZZ=*))(|"]
|
||||
|
||||
[ldap.functions]
|
||||
ldap_search_ext = {param = 3}
|
||||
ldap_search_ext_s = {param = 3}
|
||||
ldap_search_ext = { param = 3 }
|
||||
ldap_search_ext_s = { param = 3 }
|
||||
|
||||
# XSS injection tests
|
||||
# This is a minimal example that only checks for libxml2
|
||||
@ -60,4 +55,4 @@ ldap_search_ext_s = {param = 3}
|
||||
tokens = ["'\"><FUZZ"]
|
||||
matches = ["'\"><FUZZ"]
|
||||
[xss.functions]
|
||||
htmlReadMemory = {param = 0}
|
||||
htmlReadMemory = { param = 0 }
|
||||
|
@ -1,14 +1,18 @@
|
||||
[package]
|
||||
name = "qemu_systemmode"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
default = ["std", "classic"]
|
||||
std = []
|
||||
|
||||
classic = [] # The classic way to interact with LibAFL QEMU, with direct calls to QEMU's functions
|
||||
classic = [
|
||||
] # The classic way to interact with LibAFL QEMU, with direct calls to QEMU's functions
|
||||
breakpoint = [] # Uses the command system, with breakpoints
|
||||
sync_exit = [] # Uses the command system, with sync exit.
|
||||
|
||||
@ -23,8 +27,14 @@ codegen-units = 1
|
||||
[dependencies]
|
||||
libafl = { path = "../../../libafl/" }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/" }
|
||||
libafl_qemu = { path = "../../../libafl_qemu/", features = ["arm", "systemmode"] }
|
||||
libafl_qemu_sys = { path = "../../../libafl_qemu/libafl_qemu_sys", features = ["arm", "systemmode"] }
|
||||
libafl_qemu = { path = "../../../libafl_qemu/", features = [
|
||||
"arm",
|
||||
"systemmode",
|
||||
] }
|
||||
libafl_qemu_sys = { path = "../../../libafl_qemu/libafl_qemu_sys", features = [
|
||||
"arm",
|
||||
"systemmode",
|
||||
] }
|
||||
env_logger = "*"
|
||||
|
||||
[build-dependencies]
|
||||
|
@ -1,5 +1,4 @@
|
||||
env_scripts = [
|
||||
'''
|
||||
env_scripts = ['''
|
||||
#!@duckscript
|
||||
profile = get_env PROFILE
|
||||
|
||||
@ -8,8 +7,7 @@ if eq ${profile} "dev"
|
||||
else
|
||||
set_env PROFILE_DIR ${profile}
|
||||
end
|
||||
''',
|
||||
'''
|
||||
''', '''
|
||||
#!@duckscript
|
||||
runs_on_ci = get_env RUN_ON_CI
|
||||
|
||||
@ -18,8 +16,7 @@ if ${runs_on_ci}
|
||||
set_env TARGET_DIR ${cargo_target_dir}
|
||||
set_env KERNEL ${cargo_target_dir}/example.elf
|
||||
end
|
||||
'''
|
||||
]
|
||||
''']
|
||||
|
||||
[env]
|
||||
PROFILE = { value = "release", condition = { env_not_set = ["PROFILE"] } }
|
||||
@ -28,70 +25,82 @@ LIBAFL_QEMU_CLONE_DIR = "${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/qemu-libafl-bridge
|
||||
KERNEL = "${TARGET_DIR}/example.elf"
|
||||
|
||||
[tasks.target_dir]
|
||||
condition = { files_not_exist = [ "${TARGET_DIR}" ] }
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { files_not_exist = ["${TARGET_DIR}"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
mkdir -p ${TARGET_DIR}
|
||||
'''
|
||||
|
||||
[tasks.image]
|
||||
dependencies = ["target_dir"]
|
||||
condition = { files_not_exist = [ "${TARGET_DIR}/dummy.qcow2" ] }
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { files_not_exist = ["${TARGET_DIR}/dummy.qcow2"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
qemu-img create -f qcow2 ${TARGET_DIR}/dummy.qcow2 32M
|
||||
'''
|
||||
|
||||
[tasks.target]
|
||||
dependencies = ["target_dir"]
|
||||
condition = { env_set = [ "TARGET_DEFINE" ] }
|
||||
condition = { env_set = ["TARGET_DEFINE"] }
|
||||
command = "arm-none-eabi-gcc"
|
||||
args = [
|
||||
"-ggdb",
|
||||
"-ffreestanding",
|
||||
"-nostartfiles",
|
||||
"-lgcc",
|
||||
"-T", "${CARGO_MAKE_WORKING_DIRECTORY}/example/mps2_m3.ld",
|
||||
"-mcpu=cortex-m3",
|
||||
"${CARGO_MAKE_WORKING_DIRECTORY}/example/main.c",
|
||||
"${CARGO_MAKE_WORKING_DIRECTORY}/example/startup.c",
|
||||
"-D", "${TARGET_DEFINE}",
|
||||
"-I", "${TARGET_DIR}/${PROFILE_DIR}/include",
|
||||
"-o", "${TARGET_DIR}/example.elf",
|
||||
"-ggdb",
|
||||
"-ffreestanding",
|
||||
"-nostartfiles",
|
||||
"-lgcc",
|
||||
"-T",
|
||||
"${CARGO_MAKE_WORKING_DIRECTORY}/example/mps2_m3.ld",
|
||||
"-mcpu=cortex-m3",
|
||||
"${CARGO_MAKE_WORKING_DIRECTORY}/example/main.c",
|
||||
"${CARGO_MAKE_WORKING_DIRECTORY}/example/startup.c",
|
||||
"-D",
|
||||
"${TARGET_DEFINE}",
|
||||
"-I",
|
||||
"${TARGET_DIR}/${PROFILE_DIR}/include",
|
||||
"-o",
|
||||
"${TARGET_DIR}/example.elf",
|
||||
]
|
||||
|
||||
[tasks.build_fuzzer]
|
||||
condition = { env_set = [ "FEATURE" ] }
|
||||
condition = { env_set = ["FEATURE"] }
|
||||
command = "cargo"
|
||||
args = [
|
||||
"build",
|
||||
"--profile",
|
||||
"${PROFILE}",
|
||||
"--no-default-features",
|
||||
"--features", "std,${FEATURE}",
|
||||
"--target-dir", "${TARGET_DIR}",
|
||||
"build",
|
||||
"--profile",
|
||||
"${PROFILE}",
|
||||
"--no-default-features",
|
||||
"--features",
|
||||
"std,${FEATURE}",
|
||||
"--target-dir",
|
||||
"${TARGET_DIR}",
|
||||
]
|
||||
dependencies = ["image"]
|
||||
|
||||
[tasks.run_fuzzer]
|
||||
command = "${TARGET_DIR}/${PROFILE_DIR}/qemu_systemmode"
|
||||
args = [
|
||||
"-icount", "shift=auto,align=off,sleep=off",
|
||||
"-machine", "mps2-an385",
|
||||
"-monitor", "null",
|
||||
"-kernel", "${TARGET_DIR}/example.elf",
|
||||
"-serial", "null",
|
||||
"-nographic",
|
||||
"-snapshot",
|
||||
"-drive", "if=none,format=qcow2,file=${TARGET_DIR}/dummy.qcow2",
|
||||
"-S",
|
||||
"-icount",
|
||||
"shift=auto,align=off,sleep=off",
|
||||
"-machine",
|
||||
"mps2-an385",
|
||||
"-monitor",
|
||||
"null",
|
||||
"-kernel",
|
||||
"${TARGET_DIR}/example.elf",
|
||||
"-serial",
|
||||
"null",
|
||||
"-nographic",
|
||||
"-snapshot",
|
||||
"-drive",
|
||||
"if=none,format=qcow2,file=${TARGET_DIR}/dummy.qcow2",
|
||||
"-S",
|
||||
]
|
||||
dependencies = ["target"]
|
||||
|
||||
[tasks.test_fuzzer]
|
||||
condition = { env_set = [ "FEATURE" ] }
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
condition = { env_set = ["FEATURE"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
TMP_DIR=$(mktemp -d)
|
||||
|
||||
cargo make build_$FEATURE
|
||||
@ -108,79 +117,79 @@ fi
|
||||
[tasks.build_classic]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"-e", "FEATURE=classic",
|
||||
"-e", "TARGET_DEFINE=TARGET_CLASSIC",
|
||||
"build_fuzzer",
|
||||
"make",
|
||||
"-e",
|
||||
"FEATURE=classic",
|
||||
"-e",
|
||||
"TARGET_DEFINE=TARGET_CLASSIC",
|
||||
"build_fuzzer",
|
||||
]
|
||||
|
||||
[tasks.test_classic]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"-e", "FEATURE=classic",
|
||||
"test_fuzzer",
|
||||
]
|
||||
args = ["make", "-e", "FEATURE=classic", "test_fuzzer"]
|
||||
|
||||
[tasks.build_breakpoint]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"-e", "FEATURE=breakpoint",
|
||||
"-e", "TARGET_DEFINE=TARGET_BREAKPOINT",
|
||||
"build_fuzzer",
|
||||
"make",
|
||||
"-e",
|
||||
"FEATURE=breakpoint",
|
||||
"-e",
|
||||
"TARGET_DEFINE=TARGET_BREAKPOINT",
|
||||
"build_fuzzer",
|
||||
]
|
||||
|
||||
[tasks.test_breakpoint]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"-e", "FEATURE=breakpoint",
|
||||
"test_fuzzer",
|
||||
]
|
||||
args = ["make", "-e", "FEATURE=breakpoint", "test_fuzzer"]
|
||||
|
||||
[tasks.build_sync_exit]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"-e", "FEATURE=sync_exit",
|
||||
"-e", "TARGET_DEFINE=TARGET_SYNC_EXIT",
|
||||
"build_fuzzer",
|
||||
"make",
|
||||
"-e",
|
||||
"FEATURE=sync_exit",
|
||||
"-e",
|
||||
"TARGET_DEFINE=TARGET_SYNC_EXIT",
|
||||
"build_fuzzer",
|
||||
]
|
||||
|
||||
[tasks.test_sync_exit]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"-e", "FEATURE=sync_exit",
|
||||
"test_fuzzer",
|
||||
]
|
||||
args = ["make", "-e", "FEATURE=sync_exit", "test_fuzzer"]
|
||||
|
||||
[tasks.classic]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"-e", "FEATURE=classic",
|
||||
"-e", "TARGET_DEFINE=TARGET_CLASSIC",
|
||||
"run_fuzzer",
|
||||
"make",
|
||||
"-e",
|
||||
"FEATURE=classic",
|
||||
"-e",
|
||||
"TARGET_DEFINE=TARGET_CLASSIC",
|
||||
"run_fuzzer",
|
||||
]
|
||||
|
||||
[tasks.breakpoint]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"-e", "FEATURE=breakpoint",
|
||||
"-e", "TARGET_DEFINE=TARGET_BREAKPOINT",
|
||||
"run_fuzzer",
|
||||
"make",
|
||||
"-e",
|
||||
"FEATURE=breakpoint",
|
||||
"-e",
|
||||
"TARGET_DEFINE=TARGET_BREAKPOINT",
|
||||
"run_fuzzer",
|
||||
]
|
||||
|
||||
[tasks.sync_exit]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"make",
|
||||
"-e", "FEATURE=sync_exit",
|
||||
"-e", "TARGET_DEFINE=TARGET_SYNC_EXIT",
|
||||
"run_fuzzer",
|
||||
"make",
|
||||
"-e",
|
||||
"FEATURE=sync_exit",
|
||||
"-e",
|
||||
"TARGET_DEFINE=TARGET_SYNC_EXIT",
|
||||
"run_fuzzer",
|
||||
]
|
||||
|
||||
[tasks.test]
|
||||
@ -192,12 +201,12 @@ clear = true
|
||||
run_task = { name = ["build_classic", "build_breakpoint", "build_sync_exit"] }
|
||||
|
||||
[tasks.run]
|
||||
alias="classic"
|
||||
alias = "classic"
|
||||
|
||||
[tasks.clean]
|
||||
clear = true
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -rf ${CARGO_MAKE_CRATE_TARGET_DIRECTORY}
|
||||
cargo clean
|
||||
'''
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "libfuzzer_stb_image"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
build = "build.rs"
|
||||
|
||||
@ -18,7 +21,12 @@ debug = true
|
||||
[dependencies]
|
||||
libafl = { path = "../../../libafl/" }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/" }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = ["sancov_pcguard_edges", "sancov_cmplog", "libfuzzer", "libfuzzer_no_link_main"] }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = [
|
||||
"sancov_pcguard_edges",
|
||||
"sancov_cmplog",
|
||||
"libfuzzer",
|
||||
"libfuzzer_no_link_main",
|
||||
] }
|
||||
mimalloc = { version = "*", default-features = false }
|
||||
|
||||
[build-dependencies]
|
||||
|
@ -1,30 +1,32 @@
|
||||
# Variables
|
||||
[env]
|
||||
FUZZER_NAME='libfuzzer_stb_image'
|
||||
FUZZER_NAME = 'libfuzzer_stb_image'
|
||||
PROJECT_DIR = { script = ["pwd"] }
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = ["CARGO_TARGET_DIR"] } }
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = [
|
||||
"CARGO_TARGET_DIR",
|
||||
] } }
|
||||
PROFILE = { value = "release" }
|
||||
PROFILE_DIR = {value = "release" }
|
||||
LIBAFL_CC = { source = "${CARGO_MAKE_RUST_TARGET_OS}", default_value = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc', mapping = {"windows" = '.\\target\\${PROFILE_DIR}\\libafl_cc.exe'} }
|
||||
LIBAFL_CXX = { source = "${CARGO_MAKE_RUST_TARGET_OS}", default_value = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx', mapping = {"windows" = '.\\target\\${PROFILE_DIR}\\libafl_cxx.exe'} }
|
||||
FUZZER = { source = "${CARGO_MAKE_RUST_TARGET_OS}", default_value = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/libfuzzer_stb_image', mapping = {"windows" = '.\\target\\${PROFILE_DIR}\\libfuzzer_stb_image.exe'} }
|
||||
PROFILE_DIR = { value = "release" }
|
||||
LIBAFL_CC = { source = "${CARGO_MAKE_RUST_TARGET_OS}", default_value = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc', mapping = { "windows" = '.\\target\\${PROFILE_DIR}\\libafl_cc.exe' } }
|
||||
LIBAFL_CXX = { source = "${CARGO_MAKE_RUST_TARGET_OS}", default_value = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx', mapping = { "windows" = '.\\target\\${PROFILE_DIR}\\libafl_cxx.exe' } }
|
||||
FUZZER = { source = "${CARGO_MAKE_RUST_TARGET_OS}", default_value = '${CARGO_TARGET_DIR}/${PROFILE_DIR}/libfuzzer_stb_image', mapping = { "windows" = '.\\target\\${PROFILE_DIR}\\libfuzzer_stb_image.exe' } }
|
||||
|
||||
# Compilers
|
||||
[tasks.cxx]
|
||||
condition = { files_not_exist = ["${LIBAFL_CXX}"] }
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}"]
|
||||
args = ["build", "--profile", "${PROFILE}"]
|
||||
|
||||
[tasks.cc]
|
||||
condition = { files_not_exist = ["${LIBAFL_CC}"] }
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}"]
|
||||
args = ["build", "--profile", "${PROFILE}"]
|
||||
|
||||
|
||||
# Build the fuzzer
|
||||
[tasks.fuzzer]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cargo build --profile ${PROFILE}
|
||||
cp ${FUZZER} .
|
||||
'''
|
||||
@ -37,20 +39,20 @@ windows_alias = "run_windows"
|
||||
|
||||
[tasks.run_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
./${FUZZER_NAME} &
|
||||
sleep 0.2
|
||||
./${FUZZER_NAME}
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
[tasks.run_windows]
|
||||
# Do nothing
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
echo "Not integrated into cargo-make yet."
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
|
||||
[tasks.test]
|
||||
@ -60,7 +62,7 @@ windows_alias = "test_windows"
|
||||
|
||||
[tasks.test_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
(timeout 31s ./${FUZZER_NAME} | tee fuzz_stdout.log 2>/dev/null || true) &
|
||||
sleep 0.2
|
||||
@ -72,33 +74,33 @@ else
|
||||
exit 1
|
||||
fi
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
[tasks.test_mac]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
(timeout 31s ./${FUZZER_NAME} | tee fuzz_stdout.log 2>/dev/null || true) &
|
||||
sleep 0.2
|
||||
timeout 30s ./${FUZZER_NAME} >/dev/null 2>/dev/null || true
|
||||
'''
|
||||
dependencies = [ "fuzzer"]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
[tasks.test_windows]
|
||||
# Do nothing
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
echo "Not integrated into cargo-make yet."
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
|
||||
# Clean up
|
||||
[tasks.clean]
|
||||
# Disable default `clean` definition
|
||||
clear = true
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -f ./${FUZZER_NAME}
|
||||
cargo clean
|
||||
'''
|
||||
|
@ -1,10 +1,12 @@
|
||||
# Variables
|
||||
[env]
|
||||
PROJECT_DIR = { script = ["pwd"] }
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = ["CARGO_TARGET_DIR"] } }
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = [
|
||||
"CARGO_TARGET_DIR",
|
||||
] } }
|
||||
PROFILE = { value = "release" }
|
||||
PROFILE_DIR = {value = "release" }
|
||||
FUZZER_NAME='libfuzzer_stb_image_concolic'
|
||||
PROFILE_DIR = { value = "release" }
|
||||
FUZZER_NAME = 'libfuzzer_stb_image_concolic'
|
||||
|
||||
# Compilers
|
||||
[tasks.runtime]
|
||||
@ -40,7 +42,7 @@ alias = "fuzzer"
|
||||
[tasks.unsupported]
|
||||
# Do nothing
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
echo "Not supported on this platform."
|
||||
'''
|
||||
|
||||
@ -48,7 +50,7 @@ echo "Not supported on this platform."
|
||||
[tasks.clean]
|
||||
# Disable default `clean` definition
|
||||
clear = true
|
||||
script='''
|
||||
script = '''
|
||||
cd fuzzer
|
||||
cargo clean
|
||||
cd ..
|
||||
|
@ -1,7 +1,11 @@
|
||||
[package]
|
||||
name = "libfuzzer_stb_image_concolic"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>", "Julius Hohnerlein"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
"Julius Hohnerlein",
|
||||
]
|
||||
edition = "2021"
|
||||
build = "build.rs"
|
||||
|
||||
@ -18,12 +22,16 @@ debug = true
|
||||
[dependencies]
|
||||
libafl = { path = "../../../../libafl/", features = ["concolic_mutation"] }
|
||||
libafl_bolts = { path = "../../../../libafl_bolts/" }
|
||||
libafl_targets = { path = "../../../../libafl_targets/", features = ["sancov_pcguard_edges", "sancov_cmplog", "libfuzzer"] }
|
||||
clap = { version = "4.0", features = ["derive"]}
|
||||
libafl_targets = { path = "../../../../libafl_targets/", features = [
|
||||
"sancov_pcguard_edges",
|
||||
"sancov_cmplog",
|
||||
"libfuzzer",
|
||||
] }
|
||||
clap = { version = "4.0", features = ["derive"] }
|
||||
mimalloc = { version = "*", default-features = false }
|
||||
|
||||
[build-dependencies]
|
||||
cc = { version = "1.0", features = ["parallel"] }
|
||||
cmake = "0.1"
|
||||
which = "4.4"
|
||||
symcc_libafl = {path = "../../../../libafl_concolic/symcc_libafl"}
|
||||
symcc_libafl = { path = "../../../../libafl_concolic/symcc_libafl" }
|
||||
|
@ -6,7 +6,7 @@ authors = ["Julius Hohnerlein <julihoh@users.noreply.github.com>"]
|
||||
|
||||
[lib]
|
||||
# the runtime needs to be a shared object -> cdylib
|
||||
crate-type = ["cdylib"]
|
||||
crate-type = ["cdylib"]
|
||||
# this is necessary for SymCC to find the runtime.
|
||||
name = "SymRuntime"
|
||||
|
||||
|
@ -1,10 +1,19 @@
|
||||
[package]
|
||||
name = "libfuzzer_stb_image_sugar"
|
||||
version = "0.13.0"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
build = "build.rs"
|
||||
categories = ["development-tools::testing", "emulators", "embedded", "os", "no-std"]
|
||||
categories = [
|
||||
"development-tools::testing",
|
||||
"emulators",
|
||||
"embedded",
|
||||
"os",
|
||||
"no-std",
|
||||
]
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
@ -19,7 +28,11 @@ debug = true
|
||||
[dependencies]
|
||||
libafl = { path = "../../../libafl/" }
|
||||
libafl_bolts = { path = "../../../libafl_bolts/" }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = ["sancov_pcguard_edges", "sancov_cmplog", "libfuzzer"] }
|
||||
libafl_targets = { path = "../../../libafl_targets/", features = [
|
||||
"sancov_pcguard_edges",
|
||||
"sancov_cmplog",
|
||||
"libfuzzer",
|
||||
] }
|
||||
libafl_sugar = { path = "../../../libafl_sugar/" }
|
||||
mimalloc = { version = "*", default-features = false }
|
||||
|
||||
|
@ -1,30 +1,32 @@
|
||||
# Variables
|
||||
[env]
|
||||
FUZZER_NAME='libfuzzer_stb_image_sugar'
|
||||
FUZZER_NAME = 'libfuzzer_stb_image_sugar'
|
||||
PROJECT_DIR = { script = ["pwd"] }
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = ["CARGO_TARGET_DIR"] } }
|
||||
CARGO_TARGET_DIR = { value = "${PROJECT_DIR}/target", condition = { env_not_set = [
|
||||
"CARGO_TARGET_DIR",
|
||||
] } }
|
||||
PROFILE = { value = "release" }
|
||||
PROFILE_DIR = {value = "release" }
|
||||
LIBAFL_CC = { source = "${CARGO_MAKE_RUST_TARGET_OS}", default_value = "${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc", mapping = {"windows" = '.\\target\\${PROFILE_DIR}\\libafl_cc.exe'} }
|
||||
LIBAFL_CXX = { source = "${CARGO_MAKE_RUST_TARGET_OS}", default_value = "${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx", mapping = {"windows" = '.\\target\\${PROFILE_DIR}\\libafl_cxx.exe'} }
|
||||
FUZZER = { source = "${CARGO_MAKE_RUST_TARGET_OS}", default_value = "${CARGO_TARGET_DIR}/${PROFILE_DIR}/libfuzzer_stb_image_sugar", mapping = {"windows" = '.\\target\\${PROFILE_DIR}\\libfuzzer_stb_image_sugar.exe'} }
|
||||
PROFILE_DIR = { value = "release" }
|
||||
LIBAFL_CC = { source = "${CARGO_MAKE_RUST_TARGET_OS}", default_value = "${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc", mapping = { "windows" = '.\\target\\${PROFILE_DIR}\\libafl_cc.exe' } }
|
||||
LIBAFL_CXX = { source = "${CARGO_MAKE_RUST_TARGET_OS}", default_value = "${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx", mapping = { "windows" = '.\\target\\${PROFILE_DIR}\\libafl_cxx.exe' } }
|
||||
FUZZER = { source = "${CARGO_MAKE_RUST_TARGET_OS}", default_value = "${CARGO_TARGET_DIR}/${PROFILE_DIR}/libfuzzer_stb_image_sugar", mapping = { "windows" = '.\\target\\${PROFILE_DIR}\\libfuzzer_stb_image_sugar.exe' } }
|
||||
|
||||
# Compilers
|
||||
[tasks.cxx]
|
||||
condition = { files_not_exist = ["${LIBAFL_CXX}"] }
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}"]
|
||||
args = ["build", "--profile", "${PROFILE}"]
|
||||
|
||||
[tasks.cc]
|
||||
condition = { files_not_exist = ["${LIBAFL_CC}"] }
|
||||
command = "cargo"
|
||||
args = ["build" , "--profile", "${PROFILE}"]
|
||||
args = ["build", "--profile", "${PROFILE}"]
|
||||
|
||||
|
||||
# Build the fuzzer
|
||||
[tasks.fuzzer]
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cargo build --profile ${PROFILE}
|
||||
cp ${FUZZER} .
|
||||
'''
|
||||
@ -37,18 +39,18 @@ windows_alias = "run_windows"
|
||||
|
||||
[tasks.run_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
./${FUZZER_NAME} &
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
[tasks.run_windows]
|
||||
# Do nothing
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
echo "Not integrated into cargo-make yet."
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
|
||||
[tasks.test]
|
||||
@ -58,28 +60,28 @@ windows_alias = "test_windows"
|
||||
|
||||
[tasks.test_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
timeout 31s ./${FUZZER_NAME} 2>/dev/null | tee fuzz_stdout.log || true
|
||||
echo "The test is skipped. See https://github.com/AFLplusplus/LibAFL/issues/1176"
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
[tasks.test_windows]
|
||||
# Do nothing
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
script = '''
|
||||
echo "Not integrated into cargo-make yet."
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
dependencies = ["fuzzer"]
|
||||
|
||||
|
||||
# Clean up
|
||||
[tasks.clean]
|
||||
# Disable default `clean` definition
|
||||
clear = true
|
||||
script_runner="@shell"
|
||||
script='''
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
rm -f ./${FUZZER_NAME}
|
||||
cargo clean
|
||||
'''
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "libafl"
|
||||
version = "0.13.2"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
description = "Slot your own fuzzers together and extend their features using Rust"
|
||||
documentation = "https://docs.rs/libafl"
|
||||
repository = "https://github.com/AFLplusplus/LibAFL/"
|
||||
@ -9,7 +12,13 @@ readme = "../README.md"
|
||||
license = "MIT OR Apache-2.0"
|
||||
keywords = ["fuzzing", "testing", "security"]
|
||||
edition = "2021"
|
||||
categories = ["development-tools::testing", "emulators", "embedded", "os", "no-std"]
|
||||
categories = [
|
||||
"development-tools::testing",
|
||||
"emulators",
|
||||
"embedded",
|
||||
"os",
|
||||
"no-std",
|
||||
]
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
features = ["document-features"]
|
||||
@ -17,14 +26,40 @@ all-features = true
|
||||
rustc-args = ["--cfg", "docsrs"]
|
||||
|
||||
[features]
|
||||
default = ["std", "derive", "llmp_compression", "llmp_small_maps", "llmp_broker_timeouts", "rand_trait", "fork", "prelude", "gzip", "regex", "serdeany_autoreg", "tui_monitor", "libafl_bolts/xxh3"]
|
||||
default = [
|
||||
"std",
|
||||
"derive",
|
||||
"llmp_compression",
|
||||
"llmp_small_maps",
|
||||
"llmp_broker_timeouts",
|
||||
"rand_trait",
|
||||
"fork",
|
||||
"prelude",
|
||||
"gzip",
|
||||
"regex",
|
||||
"serdeany_autoreg",
|
||||
"tui_monitor",
|
||||
"libafl_bolts/xxh3",
|
||||
]
|
||||
document-features = ["dep:document-features"]
|
||||
|
||||
#! # Feature Flags
|
||||
#! ### General Features
|
||||
|
||||
## Enables features that need rust's `std` lib to work, like print, env, ... support
|
||||
std = ["serde_json", "serde_json/std", "nix", "serde/std", "bincode", "wait-timeout", "uuid", "backtrace", "serial_test", "libafl_bolts/std", "typed-builder"]
|
||||
std = [
|
||||
"serde_json",
|
||||
"serde_json/std",
|
||||
"nix",
|
||||
"serde/std",
|
||||
"bincode",
|
||||
"wait-timeout",
|
||||
"uuid",
|
||||
"backtrace",
|
||||
"serial_test",
|
||||
"libafl_bolts/std",
|
||||
"typed-builder",
|
||||
]
|
||||
|
||||
## Tracks the Feedbacks and the Objectives that were interesting for a Testcase
|
||||
track_hit_feedbacks = ["std"]
|
||||
@ -77,7 +112,13 @@ casr = ["libcasr", "std", "regex"]
|
||||
cmin = ["z3"]
|
||||
|
||||
## Enables the `PrometheusMonitor` which will monitor stats via UDP, for `Grafana` and others.
|
||||
prometheus_monitor = ["std", "async-std", "prometheus-client", "tide", "futures"]
|
||||
prometheus_monitor = [
|
||||
"std",
|
||||
"async-std",
|
||||
"prometheus-client",
|
||||
"tide",
|
||||
"futures",
|
||||
]
|
||||
|
||||
## Include a simple concolic mutator based on z3
|
||||
concolic_mutation = ["z3"]
|
||||
@ -94,7 +135,10 @@ multipart_inputs = ["arrayvec", "rand_trait"]
|
||||
#! ## LibAFL-Bolts Features
|
||||
|
||||
## Provide the `#[derive(SerdeAny)]` macro.
|
||||
derive = ["libafl_derive", "libafl_bolts/derive"] # provide `derive(SerdeAny) macro.
|
||||
derive = [
|
||||
"libafl_derive",
|
||||
"libafl_bolts/derive",
|
||||
] # provide `derive(SerdeAny) macro.
|
||||
|
||||
## Expose `libafl_bolts::cli` for easy commandline parsing of common fuzzer settings
|
||||
cli = ["libafl_bolts/cli"]
|
||||
@ -128,10 +172,19 @@ llmp_compression = ["libafl_bolts/llmp_compression"]
|
||||
llmp_debug = ["std", "libafl_bolts/llmp_debug"]
|
||||
|
||||
## Reduces the initial map size for llmp
|
||||
llmp_small_maps = ["libafl_bolts/llmp_small_maps"] # reduces initial map size for llmp
|
||||
llmp_small_maps = [
|
||||
"libafl_bolts/llmp_small_maps",
|
||||
] # reduces initial map size for llmp
|
||||
|
||||
## Grammar mutator. Requires nightly.
|
||||
nautilus = ["std", "serde_json/std", "pyo3", "rand_trait", "regex-syntax", "regex"]
|
||||
nautilus = [
|
||||
"std",
|
||||
"serde_json/std",
|
||||
"pyo3",
|
||||
"rand_trait",
|
||||
"regex-syntax",
|
||||
"regex",
|
||||
]
|
||||
|
||||
[build-dependencies]
|
||||
rustversion = "1.0"
|
||||
@ -142,15 +195,25 @@ serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
|
||||
bytecount = "0.6.3"
|
||||
|
||||
[dependencies]
|
||||
libafl_bolts = { version = "0.13.2", path = "../libafl_bolts", default-features = false, features = ["alloc"] }
|
||||
libafl_bolts = { version = "0.13.2", path = "../libafl_bolts", default-features = false, features = [
|
||||
"alloc",
|
||||
] }
|
||||
libafl_derive = { version = "0.13.2", path = "../libafl_derive", optional = true }
|
||||
|
||||
rustversion = "1.0"
|
||||
tuple_list = { version = "0.1.3" }
|
||||
hashbrown = { version = "0.14", features = ["serde", "ahash"], default-features = false } # A faster hashmap, nostd compatible
|
||||
hashbrown = { version = "0.14", features = [
|
||||
"serde",
|
||||
"ahash",
|
||||
], default-features = false } # A faster hashmap, nostd compatible
|
||||
num-traits = { version = "0.2", default-features = false }
|
||||
serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] } # serialization lib
|
||||
postcard = { version = "1.0", features = ["alloc"], default-features = false } # no_std compatible serde serialization format
|
||||
serde = { version = "1.0", default-features = false, features = [
|
||||
"alloc",
|
||||
"derive",
|
||||
] } # serialization lib
|
||||
postcard = { version = "1.0", features = [
|
||||
"alloc",
|
||||
], default-features = false } # no_std compatible serde serialization format
|
||||
bincode = { version = "1.3", optional = true }
|
||||
c2rust-bitfields = { version = "0.18", features = ["no_std"] }
|
||||
ahash = { version = "0.8", default-features = false } # The hash function already used in hashbrown
|
||||
@ -158,12 +221,16 @@ meminterval = { version = "0.4", features = ["serde"] }
|
||||
backtrace = { version = "0.3", optional = true } # Used to get the stacktrace in StacktraceObserver
|
||||
typed-builder = { version = "0.18", optional = true } # Implement the builder pattern at compiletime
|
||||
|
||||
serde_json = { version = "1.0", optional = true, default-features = false, features = ["alloc"] }
|
||||
serde_json = { version = "1.0", optional = true, default-features = false, features = [
|
||||
"alloc",
|
||||
] }
|
||||
nix = { version = "0.29", optional = true }
|
||||
regex = { version = "1", optional = true }
|
||||
uuid = { version = "1.8", optional = true, features = ["serde", "v4"] }
|
||||
libm = "0.2"
|
||||
ratatui = { version = "0.26", default-features = false, features = ['crossterm'], optional = true } # Commandline rendering, for TUI Monitor
|
||||
ratatui = { version = "0.26", default-features = false, features = [
|
||||
'crossterm',
|
||||
], optional = true } # Commandline rendering, for TUI Monitor
|
||||
crossterm = { version = "0.27", optional = true }
|
||||
|
||||
prometheus-client = { version = "0.22", optional = true } # For the prometheus monitor
|
||||
@ -171,7 +238,15 @@ tide = { version = "0.16", optional = true }
|
||||
async-std = { version = "1.12", features = ["attributes"], optional = true }
|
||||
futures = { version = "0.3", optional = true }
|
||||
log = { version = "0.4" }
|
||||
tokio = { version = "1.38", optional = true, features = ["sync", "net", "rt", "io-util", "macros", "rt-multi-thread", "time"] } # used for TCP Event Manager and multi-machine
|
||||
tokio = { version = "1.38", optional = true, features = [
|
||||
"sync",
|
||||
"net",
|
||||
"rt",
|
||||
"io-util",
|
||||
"macros",
|
||||
"rt-multi-thread",
|
||||
"time",
|
||||
] } # used for TCP Event Manager and multi-machine
|
||||
enumflags2 = { version = "0.7", optional = true }
|
||||
|
||||
wait-timeout = { version = "0.2", optional = true } # used by CommandExecutor to wait for child process
|
||||
@ -180,30 +255,42 @@ concat-idents = { version = "1.1.3", optional = true }
|
||||
|
||||
libcasr = { version = "2.7", optional = true }
|
||||
|
||||
bitvec = { version = "1.0", optional = true, features = ["serde"] } # used for string range storage
|
||||
bitvec = { version = "1.0", optional = true, features = [
|
||||
"serde",
|
||||
] } # used for string range storage
|
||||
|
||||
arrayvec = { version = "0.7.4", optional = true, default-features = false } # used for fixed-len collects
|
||||
|
||||
const_format = "0.2.32" # used for providing helpful compiler output
|
||||
const_panic = "0.2.8" # similarly, for formatting const panic output
|
||||
const_panic = "0.2.8" # similarly, for formatting const panic output
|
||||
|
||||
pyo3 = { version = "0.18.3", optional = true } # For nautilus
|
||||
pyo3 = { version = "0.18.3", optional = true } # For nautilus
|
||||
regex-syntax = { version = "0.8.3", optional = true } # For nautilus
|
||||
|
||||
# optional-dev deps (change when target.'cfg(accessible(::std))'.test-dependencies will be stable)
|
||||
serial_test = { version = "3", optional = true, default-features = false, features = ["logging"] }
|
||||
serial_test = { version = "3", optional = true, default-features = false, features = [
|
||||
"logging",
|
||||
] }
|
||||
|
||||
# Document all features of this crate (for `cargo doc`)
|
||||
document-features = { version = "0.2", optional = true }
|
||||
# Optional
|
||||
clap = {version = "4.5", optional = true}
|
||||
clap = { version = "4.5", optional = true }
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
libc = "0.2" # For (*nix) libc
|
||||
libc = "0.2" # For (*nix) libc
|
||||
z3 = { version = "0.12.0", optional = true } # for concolic mutation
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
windows = { version = "0.51.1", features = ["Win32_Foundation", "Win32_System_Threading", "Win32_System_Diagnostics_Debug", "Win32_System_Kernel", "Win32_System_Memory", "Win32_Security", "Win32_System_SystemInformation"] }
|
||||
windows = { version = "0.51.1", features = [
|
||||
"Win32_Foundation",
|
||||
"Win32_System_Threading",
|
||||
"Win32_System_Diagnostics_Debug",
|
||||
"Win32_System_Kernel",
|
||||
"Win32_System_Memory",
|
||||
"Win32_Security",
|
||||
"Win32_System_SystemInformation",
|
||||
] }
|
||||
|
||||
[target.'cfg(windows)'.build-dependencies]
|
||||
windows = "0.51.1"
|
||||
|
@ -1,7 +1,10 @@
|
||||
[package]
|
||||
name = "libafl_bolts"
|
||||
version = "0.13.2"
|
||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
description = "Low-level bolts to create fuzzers and so much more"
|
||||
documentation = "https://docs.rs/libafl"
|
||||
repository = "https://github.com/AFLplusplus/LibAFL/"
|
||||
@ -9,7 +12,13 @@ readme = "./README.md"
|
||||
license = "MIT OR Apache-2.0"
|
||||
keywords = ["fuzzing", "testing", "security"]
|
||||
edition = "2021"
|
||||
categories = ["development-tools::testing", "emulators", "embedded", "os", "no-std"]
|
||||
categories = [
|
||||
"development-tools::testing",
|
||||
"emulators",
|
||||
"embedded",
|
||||
"os",
|
||||
"no-std",
|
||||
]
|
||||
rust-version = "1.70.0"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
@ -17,14 +26,36 @@ features = ["document-features"]
|
||||
all-features = true
|
||||
|
||||
[features]
|
||||
default = ["std", "derive", "llmp_compression", "llmp_small_maps", "rand_trait", "prelude", "gzip", "serdeany_autoreg", "alloc", "xxh3"]
|
||||
default = [
|
||||
"std",
|
||||
"derive",
|
||||
"llmp_compression",
|
||||
"llmp_small_maps",
|
||||
"rand_trait",
|
||||
"prelude",
|
||||
"gzip",
|
||||
"serdeany_autoreg",
|
||||
"alloc",
|
||||
"xxh3",
|
||||
]
|
||||
document-features = ["dep:document-features"]
|
||||
|
||||
#! # Feature Flags
|
||||
#! ### General Features
|
||||
|
||||
## Enables features that need rust's `std` lib to work, like print, env, ... support
|
||||
std = ["serde_json", "serde_json/std", "hostname", "nix", "serde/std", "uuid", "backtrace", "uds", "serial_test", "alloc"]
|
||||
std = [
|
||||
"serde_json",
|
||||
"serde_json/std",
|
||||
"hostname",
|
||||
"nix",
|
||||
"serde/std",
|
||||
"uuid",
|
||||
"backtrace",
|
||||
"uds",
|
||||
"serial_test",
|
||||
"alloc",
|
||||
]
|
||||
|
||||
## Enables all features that allocate in `no_std`
|
||||
alloc = ["serde/alloc", "hashbrown", "postcard", "erased-serde/alloc", "ahash"]
|
||||
@ -96,39 +127,68 @@ libafl_derive = { version = "0.13.2", optional = true, path = "../libafl_derive"
|
||||
static_assertions = "1.1.0"
|
||||
|
||||
tuple_list = { version = "0.1.3" }
|
||||
hashbrown = { version = "0.14", features = ["serde", "ahash"], default-features = false, optional = true } # A faster hashmap, nostd compatible
|
||||
xxhash-rust = { version = "0.8.5", features = ["xxh3"], optional = true } # xxh3 hashing for rust
|
||||
serde = { version = "1.0", default-features = false, features = ["derive"] } # serialization lib
|
||||
hashbrown = { version = "0.14", features = [
|
||||
"serde",
|
||||
"ahash",
|
||||
], default-features = false, optional = true } # A faster hashmap, nostd compatible
|
||||
xxhash-rust = { version = "0.8.5", features = [
|
||||
"xxh3",
|
||||
], optional = true } # xxh3 hashing for rust
|
||||
serde = { version = "1.0", default-features = false, features = [
|
||||
"derive",
|
||||
] } # serialization lib
|
||||
erased-serde = { version = "0.4.5", default-features = false, optional = true } # erased serde
|
||||
postcard = { version = "1.0", features = ["alloc"], default-features = false, optional = true } # no_std compatible serde serialization format
|
||||
postcard = { version = "1.0", features = [
|
||||
"alloc",
|
||||
], default-features = false, optional = true } # no_std compatible serde serialization format
|
||||
num_enum = { version = "0.7", default-features = false }
|
||||
ahash = { version = "0.8", default-features = false, optional = true } # The hash function already used in hashbrown
|
||||
backtrace = { version = "0.3", optional = true } # Used to get the stacktrace in StacktraceObserver
|
||||
|
||||
ctor = { optional = true, version = "0.2" }
|
||||
serde_json = { version = "1.0", optional = true, default-features = false, features = ["alloc"] }
|
||||
serde_json = { version = "1.0", optional = true, default-features = false, features = [
|
||||
"alloc",
|
||||
] }
|
||||
miniz_oxide = { version = "0.7.1", optional = true }
|
||||
hostname = { version = "^0.4", optional = true } # Is there really no gethostname in the stdlib?
|
||||
rand_core = { version = "0.6", optional = true }
|
||||
nix = { version = "0.29", default-features = false, optional = true, features = ["signal", "socket", "poll"] }
|
||||
nix = { version = "0.29", default-features = false, optional = true, features = [
|
||||
"signal",
|
||||
"socket",
|
||||
"poll",
|
||||
] }
|
||||
uuid = { version = "1.4", optional = true, features = ["serde", "v4"] }
|
||||
clap = { version = "4.5", features = ["derive", "wrap_help"], optional = true } # CLI parsing, for libafl_bolts::cli / the `cli` feature
|
||||
clap = { version = "4.5", features = [
|
||||
"derive",
|
||||
"wrap_help",
|
||||
], optional = true } # CLI parsing, for libafl_bolts::cli / the `cli` feature
|
||||
log = { version = "0.4" }
|
||||
|
||||
pyo3 = { version = "0.18", optional = true, features = ["serde", "macros"] }
|
||||
|
||||
# optional-dev deps (change when target.'cfg(accessible(::std))'.test-dependencies will be stable)
|
||||
serial_test = { version = "3", optional = true, default-features = false, features = ["logging"] }
|
||||
serial_test = { version = "3", optional = true, default-features = false, features = [
|
||||
"logging",
|
||||
] }
|
||||
|
||||
# Document all features of this crate (for `cargo doc`)
|
||||
document-features = { version = "0.2", optional = true }
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
libc = "0.2" # For (*nix) libc
|
||||
libc = "0.2" # For (*nix) libc
|
||||
uds = { version = "0.4", optional = true, default-features = false }
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
windows = { version = "0.51.1", features = ["Win32_Foundation", "Win32_System_Threading", "Win32_System_Diagnostics_Debug", "Win32_System_Kernel", "Win32_System_Memory", "Win32_Security", "Win32_System_SystemInformation", "Win32_System_Console"] }
|
||||
windows = { version = "0.51.1", features = [
|
||||
"Win32_Foundation",
|
||||
"Win32_System_Threading",
|
||||
"Win32_System_Diagnostics_Debug",
|
||||
"Win32_System_Kernel",
|
||||
"Win32_System_Memory",
|
||||
"Win32_Security",
|
||||
"Win32_System_SystemInformation",
|
||||
"Win32_System_Console",
|
||||
] }
|
||||
|
||||
[target.'cfg(windows)'.build-dependencies]
|
||||
windows = "0.51.1"
|
||||
|
@ -9,12 +9,28 @@ readme = "README.md"
|
||||
license = "MIT OR Apache-2.0"
|
||||
keywords = ["fuzzing", "testing", "compiler"]
|
||||
edition = "2021"
|
||||
categories = ["development-tools::testing", "emulators", "embedded", "os", "no-std"]
|
||||
categories = [
|
||||
"development-tools::testing",
|
||||
"emulators",
|
||||
"embedded",
|
||||
"os",
|
||||
"no-std",
|
||||
]
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[features]
|
||||
default = ["ddg-instr", "function-logging", "cmplog-routines", "autotokens", "coverage-accounting", "cmplog-instructions", "ctx", "dump-cfg", "profiling"]
|
||||
default = [
|
||||
"ddg-instr",
|
||||
"function-logging",
|
||||
"cmplog-routines",
|
||||
"autotokens",
|
||||
"coverage-accounting",
|
||||
"cmplog-instructions",
|
||||
"ctx",
|
||||
"dump-cfg",
|
||||
"profiling",
|
||||
]
|
||||
|
||||
# llvm passes
|
||||
ddg-instr = []
|
||||
@ -35,4 +51,7 @@ which = "6.0"
|
||||
glob = "0.3"
|
||||
|
||||
[dependencies]
|
||||
serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] } # serialization lib
|
||||
serde = { version = "1.0", default-features = false, features = [
|
||||
"alloc",
|
||||
"derive",
|
||||
] } # serialization lib
|
||||
|
@ -2,14 +2,24 @@
|
||||
name = "symcc_libafl"
|
||||
version = "0.13.2"
|
||||
edition = "2021"
|
||||
authors = ["Julius Hohnerlein <julihoh@users.noreply.github.com>", "Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Julius Hohnerlein <julihoh@users.noreply.github.com>",
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
description = "Meta package for symcc_runtime"
|
||||
documentation = "https://docs.rs/symcc_libafl"
|
||||
repository = "https://github.com/AFLplusplus/LibAFL/"
|
||||
readme = "README.md"
|
||||
license = "MIT OR Apache-2.0"
|
||||
keywords = ["fuzzing", "testing", "security"]
|
||||
categories = ["development-tools::testing", "emulators", "embedded", "os", "no-std"]
|
||||
categories = [
|
||||
"development-tools::testing",
|
||||
"emulators",
|
||||
"embedded",
|
||||
"os",
|
||||
"no-std",
|
||||
]
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
@ -2,7 +2,11 @@
|
||||
name = "symcc_runtime"
|
||||
version = "0.13.2"
|
||||
edition = "2021"
|
||||
authors = ["Julius Hohnerlein <julihoh@users.noreply.github.com>", "Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||
authors = [
|
||||
"Julius Hohnerlein <julihoh@users.noreply.github.com>",
|
||||
"Andrea Fioraldi <andreafioraldi@gmail.com>",
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
description = "Build Concolic Tracing tools based on SymCC in Rust"
|
||||
documentation = "https://docs.rs/symcc_runtime"
|
||||
repository = "https://github.com/AFLplusplus/LibAFL/"
|
||||
@ -10,7 +14,13 @@ readme = "README.md"
|
||||
license = "MIT OR Apache-2.0"
|
||||
keywords = ["fuzzing", "testing", "security"]
|
||||
build = "build.rs"
|
||||
categories = ["development-tools::testing", "emulators", "embedded", "os", "no-std"]
|
||||
categories = [
|
||||
"development-tools::testing",
|
||||
"emulators",
|
||||
"embedded",
|
||||
"os",
|
||||
"no-std",
|
||||
]
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
@ -25,8 +35,14 @@ no-cpp-runtime = []
|
||||
unchecked_unwrap = "4"
|
||||
ctor = "0.2"
|
||||
libc = "0.2"
|
||||
libafl = { path = "../../libafl", version = "0.13.2", default-features=false, features=["std", "serdeany_autoreg"] }
|
||||
libafl_bolts = { path = "../../libafl_bolts", version = "0.13.2", default-features=false, features=["std", "serdeany_autoreg"] }
|
||||
libafl = { path = "../../libafl", version = "0.13.2", default-features = false, features = [
|
||||
"std",
|
||||
"serdeany_autoreg",
|
||||
] }
|
||||
libafl_bolts = { path = "../../libafl_bolts", version = "0.13.2", default-features = false, features = [
|
||||
"std",
|
||||
"serdeany_autoreg",
|
||||
] }
|
||||
|
||||
[build-dependencies]
|
||||
cmake = "0.1"
|
||||
|
@ -9,11 +9,17 @@ repository = "https://github.com/AFLplusplus/LibAFL/"
|
||||
readme = "../README.md"
|
||||
license = "MIT OR Apache-2.0"
|
||||
keywords = ["fuzzing", "libafl", "ldpreload"]
|
||||
categories = ["development-tools::testing", "emulators", "embedded", "os", "no-std"]
|
||||
categories = [
|
||||
"development-tools::testing",
|
||||
"emulators",
|
||||
"embedded",
|
||||
"os",
|
||||
"no-std",
|
||||
]
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
libafl = {path = "../../../libafl"}
|
||||
libafl_bolts = {path = "../../../libafl_bolts"}
|
||||
libafl = { path = "../../../libafl" }
|
||||
libafl_bolts = { path = "../../../libafl_bolts" }
|
||||
clap = { version = "4.5", features = ["derive"] }
|
||||
|
@ -9,10 +9,16 @@ repository = "https://github.com/AFLplusplus/LibAFL/"
|
||||
readme = "../README.md"
|
||||
license = "MIT OR Apache-2.0"
|
||||
keywords = ["fuzzing", "libafl", "symbolic", "symcc", "symqemu", "fuzzer"]
|
||||
categories = ["development-tools::testing", "emulators", "embedded", "os", "no-std"]
|
||||
categories = [
|
||||
"development-tools::testing",
|
||||
"emulators",
|
||||
"embedded",
|
||||
"os",
|
||||
"no-std",
|
||||
]
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib"]
|
||||
crate-type = ["cdylib"]
|
||||
name = "SymRuntime"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
@ -9,7 +9,13 @@ readme = "../README.md"
|
||||
license = "MIT OR Apache-2.0"
|
||||
keywords = ["fuzzing", "testing"]
|
||||
edition = "2021"
|
||||
categories = ["development-tools::testing", "emulators", "embedded", "os", "no-std"]
|
||||
categories = [
|
||||
"development-tools::testing",
|
||||
"emulators",
|
||||
"embedded",
|
||||
"os",
|
||||
"no-std",
|
||||
]
|
||||
|
||||
[lib]
|
||||
proc-macro = true
|
||||
|
@ -10,17 +10,22 @@ license = "MIT OR Apache-2.0"
|
||||
keywords = ["fuzzing", "frida", "instrumentation"]
|
||||
edition = "2021"
|
||||
categories = [
|
||||
"development-tools::testing",
|
||||
"emulators",
|
||||
"embedded",
|
||||
"os",
|
||||
"no-std"
|
||||
"development-tools::testing",
|
||||
"emulators",
|
||||
"embedded",
|
||||
"os",
|
||||
"no-std",
|
||||
]
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
no-default-features = true # We can't use auto-download inside docs.rs (no internet)
|
||||
all-features = false
|
||||
features = ["cmplog", "serdeany_autoreg", "track_hit_feedbacks", "document-features"]
|
||||
features = [
|
||||
"cmplog",
|
||||
"serdeany_autoreg",
|
||||
"track_hit_feedbacks",
|
||||
"document-features",
|
||||
]
|
||||
|
||||
[features]
|
||||
default = ["serdeany_autoreg", "auto-download"]
|
||||
@ -50,18 +55,18 @@ iced-x86 = { version = "1.20.0", features = ["code_asm"], optional = true }
|
||||
|
||||
[dependencies]
|
||||
libafl = { path = "../libafl", default-features = false, version = "0.13.2", features = [
|
||||
"std",
|
||||
"derive",
|
||||
"frida_cli",
|
||||
"std",
|
||||
"derive",
|
||||
"frida_cli",
|
||||
] }
|
||||
libafl_bolts = { path = "../libafl_bolts", version = "0.13.2", default-features = false, features = [
|
||||
"std",
|
||||
"derive",
|
||||
"frida_cli"
|
||||
"std",
|
||||
"derive",
|
||||
"frida_cli",
|
||||
] }
|
||||
libafl_targets = { path = "../libafl_targets", version = "0.13.2", features = [
|
||||
"std",
|
||||
"sancov_cmplog",
|
||||
"std",
|
||||
"sancov_cmplog",
|
||||
] }
|
||||
|
||||
nix = { version = "0.29", features = ["mman"] }
|
||||
@ -69,13 +74,13 @@ libc = "0.2"
|
||||
hashbrown = "0.14"
|
||||
rangemap = "1.3"
|
||||
frida-gum-sys = { version = "0.13.6", features = [
|
||||
"event-sink",
|
||||
"invocation-listener",
|
||||
"event-sink",
|
||||
"invocation-listener",
|
||||
] }
|
||||
frida-gum = { version = "0.13.6", features = [
|
||||
"event-sink",
|
||||
"invocation-listener",
|
||||
"module-names",
|
||||
"event-sink",
|
||||
"invocation-listener",
|
||||
"module-names",
|
||||
] }
|
||||
dynasmrt = "2"
|
||||
|
||||
@ -83,8 +88,8 @@ color-backtrace = { version = "0.6", features = ["resolve-modules"] }
|
||||
termcolor = "1.1.3"
|
||||
serde = "1.0"
|
||||
backtrace = { version = "0.3", default-features = false, features = [
|
||||
"std",
|
||||
"serde",
|
||||
"std",
|
||||
"serde",
|
||||
] }
|
||||
num-traits = "0.2"
|
||||
ahash = "^0.8" # fetch the latest
|
||||
@ -97,12 +102,14 @@ yaxpeax-arch = "0.2.7"
|
||||
document-features = { version = "0.2", optional = true } # Document all features of this crate (for `cargo doc`)
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
winsafe = {version = "0.0.21", features = ["kernel"]}
|
||||
winsafe = { version = "0.0.21", features = ["kernel"] }
|
||||
|
||||
|
||||
[dev-dependencies]
|
||||
serial_test = { version = "3", default-features = false, features = ["logging"] }
|
||||
clap = {version = "4.5", features = ["derive"]}
|
||||
serial_test = { version = "3", default-features = false, features = [
|
||||
"logging",
|
||||
] }
|
||||
clap = { version = "4.5", features = ["derive"] }
|
||||
libloading = "0.8"
|
||||
mimalloc = { version = "0.1", default-features = false }
|
||||
dlmalloc ={version = "0.2.6", features = ["global"]}
|
||||
dlmalloc = { version = "0.2.6", features = ["global"] }
|
||||
|
@ -9,12 +9,7 @@ keywords = ["fuzzing", "testing", "security"]
|
||||
edition = "2021"
|
||||
categories = ["development-tools::testing"]
|
||||
|
||||
include = [
|
||||
"/src",
|
||||
"/Cargo.toml",
|
||||
"/build.rs",
|
||||
"/runtime",
|
||||
]
|
||||
include = ["/src", "/Cargo.toml", "/build.rs", "/runtime"]
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
@ -10,7 +10,10 @@ publish = false
|
||||
default = ["fork"]
|
||||
## Enables forking mode for the LibAFL launcher (instead of starting new processes)
|
||||
fork = ["libafl/fork"]
|
||||
track_hit_feedbacks = ["libafl/track_hit_feedbacks", "libafl_targets/track_hit_feedbacks"]
|
||||
track_hit_feedbacks = [
|
||||
"libafl/track_hit_feedbacks",
|
||||
"libafl_targets/track_hit_feedbacks",
|
||||
]
|
||||
|
||||
[profile.release]
|
||||
lto = true
|
||||
@ -25,13 +28,42 @@ debug = false
|
||||
strip = true
|
||||
|
||||
[lib]
|
||||
name = "afl_libfuzzer_runtime" # historically, cargo-fuzz strips double-prefixes; maintain compat
|
||||
name = "afl_libfuzzer_runtime" # historically, cargo-fuzz strips double-prefixes; maintain compat
|
||||
crate-type = ["staticlib", "rlib"]
|
||||
|
||||
[dependencies]
|
||||
libafl = { path = "../libafl", default-features = false, features = ["std", "derive", "llmp_compression", "rand_trait", "regex", "errors_backtrace", "serdeany_autoreg", "tui_monitor", "unicode"] }
|
||||
libafl_bolts = { path = "../libafl_bolts", default-features = false, features = ["std", "derive", "llmp_compression", "rand_trait", "serdeany_autoreg", "errors_backtrace"] }
|
||||
libafl_targets = { path = "../libafl_targets", features = ["sancov_8bit", "sancov_cmplog", "sancov_value_profile", "sancov_pcguard", "libfuzzer", "libfuzzer_oom", "libfuzzer_define_run_driver", "libfuzzer_interceptors", "sanitizers_flags", "whole_archive", "sanitizer_interfaces"] }
|
||||
libafl = { path = "../libafl", default-features = false, features = [
|
||||
"std",
|
||||
"derive",
|
||||
"llmp_compression",
|
||||
"rand_trait",
|
||||
"regex",
|
||||
"errors_backtrace",
|
||||
"serdeany_autoreg",
|
||||
"tui_monitor",
|
||||
"unicode",
|
||||
] }
|
||||
libafl_bolts = { path = "../libafl_bolts", default-features = false, features = [
|
||||
"std",
|
||||
"derive",
|
||||
"llmp_compression",
|
||||
"rand_trait",
|
||||
"serdeany_autoreg",
|
||||
"errors_backtrace",
|
||||
] }
|
||||
libafl_targets = { path = "../libafl_targets", features = [
|
||||
"sancov_8bit",
|
||||
"sancov_cmplog",
|
||||
"sancov_value_profile",
|
||||
"sancov_pcguard",
|
||||
"libfuzzer",
|
||||
"libfuzzer_oom",
|
||||
"libfuzzer_define_run_driver",
|
||||
"libfuzzer_interceptors",
|
||||
"sanitizers_flags",
|
||||
"whole_archive",
|
||||
"sanitizer_interfaces",
|
||||
] }
|
||||
|
||||
ahash = { version = "0.8.3", default-features = false }
|
||||
libc = "0.2.1"
|
||||
@ -39,7 +71,7 @@ log = "0.4.20"
|
||||
mimalloc = { version = "0.1.34", default-features = false }
|
||||
num-traits = "0.2.15"
|
||||
rand = "0.8.5"
|
||||
serde = { version = "1.0", features = ["derive"] } # serialization lib
|
||||
serde = { version = "1.0", features = ["derive"] } # serialization lib
|
||||
hashbrown = "0.14"
|
||||
|
||||
# for identifying if we can grimoire-ify
|
||||
|
@ -9,15 +9,32 @@ repository = "https://github.com/AFLplusplus/LibAFL/"
|
||||
readme = "../README.md"
|
||||
license = "MIT OR Apache-2.0"
|
||||
keywords = ["fuzzing", "testing", "security"]
|
||||
categories = ["development-tools::testing", "emulators", "embedded", "os", "no-std"]
|
||||
categories = [
|
||||
"development-tools::testing",
|
||||
"emulators",
|
||||
"embedded",
|
||||
"os",
|
||||
"no-std",
|
||||
]
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[target.'cfg(target_os = "linux")'.dependencies]
|
||||
libnyx = { git = "https://github.com/nyx-fuzz/libnyx.git", rev = "6833d236dfe785a8a23d8c8d79e74c99fa635004" }
|
||||
libafl = { path = "../libafl", version = "0.13.2", features = ["std", "libafl_derive", "frida_cli" ]}
|
||||
libafl_bolts = { path = "../libafl_bolts", version = "0.13.2", features = ["std", "libafl_derive", "frida_cli" ]}
|
||||
libafl_targets = { path = "../libafl_targets", version = "0.13.2", features = ["std", "sancov_cmplog"] }
|
||||
libafl = { path = "../libafl", version = "0.13.2", features = [
|
||||
"std",
|
||||
"libafl_derive",
|
||||
"frida_cli",
|
||||
] }
|
||||
libafl_bolts = { path = "../libafl_bolts", version = "0.13.2", features = [
|
||||
"std",
|
||||
"libafl_derive",
|
||||
"frida_cli",
|
||||
] }
|
||||
libafl_targets = { path = "../libafl_targets", version = "0.13.2", features = [
|
||||
"std",
|
||||
"sancov_cmplog",
|
||||
] }
|
||||
|
||||
nix = { version = "0.29", features = ["fs"] }
|
||||
typed-builder = "0.18"
|
||||
|
@ -9,16 +9,30 @@ readme = "../README.md"
|
||||
license = "MIT OR Apache-2.0"
|
||||
keywords = ["fuzzing", "qemu", "instrumentation"]
|
||||
edition = "2021"
|
||||
categories = ["development-tools::testing", "emulators", "embedded", "os", "no-std"]
|
||||
categories = [
|
||||
"development-tools::testing",
|
||||
"emulators",
|
||||
"embedded",
|
||||
"os",
|
||||
"no-std",
|
||||
]
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
features = ["document-features", "default", "python", "x86_64", "usermode"]
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
|
||||
[features]
|
||||
default = ["fork", "build_libgasan", "build_libqasan", "serdeany_autoreg", "injections"]
|
||||
default = [
|
||||
"fork",
|
||||
"build_libgasan",
|
||||
"build_libqasan",
|
||||
"serdeany_autoreg",
|
||||
"injections",
|
||||
]
|
||||
document-features = ["dep:document-features"]
|
||||
paranoid_debug = ["libafl_qemu_sys/paranoid_debug"] # Will perform as many checks as possible. The target will be greatly slowed down.
|
||||
paranoid_debug = [
|
||||
"libafl_qemu_sys/paranoid_debug",
|
||||
] # Will perform as many checks as possible. The target will be greatly slowed down.
|
||||
|
||||
#! # Feature Flags
|
||||
#! ### General Features
|
||||
@ -39,7 +53,9 @@ x86_64 = ["libafl_qemu_sys/x86_64"]
|
||||
i386 = ["libafl_qemu_sys/i386"] # build qemu for i386
|
||||
arm = ["libafl_qemu_sys/arm"] # build qemu for arm
|
||||
aarch64 = ["libafl_qemu_sys/aarch64"] # build qemu for aarch64
|
||||
mips = ["libafl_qemu_sys/mips"] # build qemu for mips (el, use with the 'be' feature of mips be)
|
||||
mips = [
|
||||
"libafl_qemu_sys/mips",
|
||||
] # build qemu for mips (el, use with the 'be' feature of mips be)
|
||||
ppc = ["libafl_qemu_sys/ppc"] # build qemu for powerpc
|
||||
hexagon = ["libafl_qemu_sys/hexagon"] # build qemu for hexagon
|
||||
|
||||
@ -56,23 +72,37 @@ systemmode = ["libafl_qemu_sys/systemmode"]
|
||||
## Automatically register all `#[derive(SerdeAny)]` types at startup.
|
||||
serdeany_autoreg = ["libafl_bolts/serdeany_autoreg"]
|
||||
|
||||
slirp = [ "systemmode", "libafl_qemu_sys/slirp" ] # build qemu with host libslirp (for user networking)
|
||||
slirp = [
|
||||
"systemmode",
|
||||
"libafl_qemu_sys/slirp",
|
||||
] # build qemu with host libslirp (for user networking)
|
||||
|
||||
# Requires the binary's build.rs to call `build_libafl_qemu`
|
||||
shared = [ "libafl_qemu_sys/shared" ]
|
||||
shared = ["libafl_qemu_sys/shared"]
|
||||
|
||||
#! ## Internal features, don't use in normal projects
|
||||
## clippy workaround
|
||||
clippy = ["libafl_qemu_sys/clippy"]
|
||||
|
||||
[dependencies]
|
||||
libafl = { path = "../libafl", version = "0.13.2", default-features = false, features = ["std", "derive", "regex"] }
|
||||
libafl_bolts = { path = "../libafl_bolts", version = "0.13.2", default-features = false, features = ["std", "derive"] }
|
||||
libafl = { path = "../libafl", version = "0.13.2", default-features = false, features = [
|
||||
"std",
|
||||
"derive",
|
||||
"regex",
|
||||
] }
|
||||
libafl_bolts = { path = "../libafl_bolts", version = "0.13.2", default-features = false, features = [
|
||||
"std",
|
||||
"derive",
|
||||
] }
|
||||
libafl_targets = { path = "../libafl_targets", version = "0.13.2" }
|
||||
libafl_qemu_sys = { path = "./libafl_qemu_sys", version = "0.13.2" }
|
||||
|
||||
serde = { version = "1.0", default-features = false, features = ["alloc"] } # serialization lib
|
||||
hashbrown = { version = "0.14", features = ["serde"] } # A faster hashmap, nostd compatible
|
||||
serde = { version = "1.0", default-features = false, features = [
|
||||
"alloc",
|
||||
] } # serialization lib
|
||||
hashbrown = { version = "0.14", features = [
|
||||
"serde",
|
||||
] } # A faster hashmap, nostd compatible
|
||||
num-traits = "0.2"
|
||||
num-derive = "0.4"
|
||||
num_enum = "0.7"
|
||||
@ -93,7 +123,7 @@ paste = "1"
|
||||
enum-map = "2.7"
|
||||
serde_yaml = { version = "0.9", optional = true } # For parsing the injections yaml file
|
||||
toml = { version = "0.8.13", optional = true } # For parsing the injections toml file
|
||||
pyo3 = { version = "0.18", optional = true , features = ["multiple-pymethods"]}
|
||||
pyo3 = { version = "0.18", optional = true, features = ["multiple-pymethods"] }
|
||||
bytes-utils = "0.1"
|
||||
typed-builder = "0.18"
|
||||
memmap2 = "0.9"
|
||||
|
@ -7,14 +7,14 @@ documentation = "https://docs.rs/libafl_qemu_build"
|
||||
repository = "https://github.com/AFLplusplus/LibAFL/"
|
||||
readme = "./README.md"
|
||||
license = "MIT OR Apache-2.0"
|
||||
keywords =["fuzzing", "qemu", "instrumentation"]
|
||||
keywords = ["fuzzing", "qemu", "instrumentation"]
|
||||
edition = "2021"
|
||||
categories = [
|
||||
"development-tools::testing",
|
||||
"emulators",
|
||||
"embedded",
|
||||
"os",
|
||||
"no-std",
|
||||
"development-tools::testing",
|
||||
"emulators",
|
||||
"embedded",
|
||||
"os",
|
||||
"no-std",
|
||||
]
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
@ -22,11 +22,12 @@ all-features = true
|
||||
|
||||
[features]
|
||||
shared = []
|
||||
slirp = [] # build qemu with host libslirp (for user networking)
|
||||
slirp = [] # build qemu with host libslirp (for user networking)
|
||||
|
||||
clippy = [] # special feature for clippy, don't use in normal projects§
|
||||
|
||||
paranoid_debug = [] # Will perform as many checks as possible. The target will be greatly slowed down.
|
||||
paranoid_debug = [
|
||||
] # Will perform as many checks as possible. The target will be greatly slowed down.
|
||||
|
||||
[dependencies]
|
||||
bindgen = "0.69.4"
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user