• Stars
    star
    100
  • Rank 340,703 (Top 7 %)
  • Language
    Rust
  • License
    GNU Affero Genera...
  • Created about 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

To make fuzzing Rust easy

test-fuzz

At a high-level, test-fuzz is a convenient front end for afl.rs. In more concrete terms, test-fuzz is a collection of Rust macros and a Cargo subcommand that automate certain fuzzing-related tasks, most notably:

  • generating a fuzzing corpus
  • implementing a fuzzing harness

test-fuzz accomplishes these (in part) using Rust's testing facilities. For example, to generate a fuzzing corpus, test-fuzz records a target's arguments each time it is called during an invocation of cargo test. Similarly, test-fuzz implements a fuzzing harness as an additional test in a cargo-test-generated binary. This tight integration with Rust's testing facilities is what motivates the name test-fuzz.

Contents

  1. Installation
  2. Usage
  3. Components
  4. test-fuzz package features
  5. Auto-generated corpus files
  6. Environment variables
  7. Limitations
  8. Tips and tricks
  9. License

Installation

Install cargo-test-fuzz and afl.rs with the following command:

cargo install cargo-test-fuzz afl

Usage

Fuzzing with test-fuzz is essentially three steps:*

  1. Identify a fuzz target:

    • Add the following dependencies to the target crate's Cargo.toml file:
      serde = "1.0"
      test-fuzz = "4.0"
    • Precede the target function with the test_fuzz macro:
      #[test_fuzz::test_fuzz]
      fn foo(...) {
          ...
      }
  2. Generate a corpus by running cargo test:

    $ cargo test
    
  3. Fuzz your target by running cargo test-fuzz:

    $ cargo test-fuzz foo
    

* Some additional steps may be necessary following a reboot. AFL requires the following commands to be run as root:

  • Linux

    echo core >/proc/sys/kernel/core_pattern
    cd /sys/devices/system/cpu
    echo performance | tee cpu*/cpufreq/scaling_governor
  • OSX

    SL=/System/Library; PL=com.apple.ReportCrash
    launchctl unload -w ${SL}/LaunchAgents/${PL}.plist
    sudo launchctl unload -w ${SL}/LaunchDaemons/${PL}.Root.plist

Components

test_fuzz macro

Preceding a function with the test_fuzz macro indicates that the function is a fuzz target.

The primary effects of the test_fuzz macro are:

  • Add instrumentation to the target to serialize its arguments and write them to a corpus file each time the target is called. The instrumentation is guarded by #[cfg(test)] so that corpus files are generated only when running tests (however, see enable_in_production below).
  • Add a test to read and deserialize arguments from standard input and apply the target to them. The test checks an environment variable, set by cargo test-fuzz, so that the test does not block trying to read from standard input during a normal invocation of cargo test. The test is enclosed in a module to reduce the likelihood of a name collision. Currently, the name of the module is target_fuzz, where target is the name of the target (however, see rename below).

Arguments

  • bounds = "where_predicates" - Impose where_predicates (e.g., trait bounds) on the struct used to serialize/deserialize arguments. This may be necessary, e.g., if a target's argument type is an associated type. For an example, see associated_type.rs in this repository.

  • concretize = "parameters" - Use parameters as the target's type parameters when fuzzing. Example:

    #[test_fuzz(concretize = "String")]
    fn foo<T: Clone + Debug + Serialize>(x: &T) {
        ...
    }

    Note: The target's arguments must be serializable for every instantiation of its type parameters. But the target's arguments are required to be deserializable only when the target is instantiated with parameters.

  • concretize_impl = "parameters" - Use parameters as the target's Self type parameters when fuzzing. Example:

    #[test_fuzz_impl]
    impl<T: Clone + Debug + Serialize> for Foo {
        #[test_fuzz(concretize_impl = "String")]
        fn bar(&self, x: &T) {
            ...
        }
    }

    Note: The target's arguments must be serializable for every instantiation of its Self type parameters. But the target's arguments are required to be deserializable only when the target's Self is instantiated with parameters.

  • convert = "X, Y" - When serializing the target's arguments, convert values of type X to type Y using Y's implementation of From<X>, or of type &X to type Y using Y's implementation of the non-standard trait test_fuzz::FromRef<X>. When deserializing, convert those values back to type X using Y's implementation of the non-standard trait test_fuzz::Into<X>.

    That is, use of convert = "X, Y" must be accompanied by certain implementations. If X implements Clone, then Y may implement the following:

    impl From<X> for Y {
        fn from(x: X) -> Self {
            ...
        }
    }

    If X does not implement Clone, then Y must implement the following:

    impl test_fuzz::FromRef<X> for Y {
        fn from_ref(x: &X) -> Self {
            ...
        }
    }

    Additionally, Y must implement the following (regardless of whether X implements Clone):

    impl test_fuzz::Into<X> for Y {
        fn into(self) -> X {
            ...
        }
    }

    The definition of test_fuzz::Into is identical to that of std::convert::Into. The reason for using a non-standard trait is to avoid conflicts that could arise from blanket implementations of standard traits.

  • enable_in_production - Generate corpus files when not running tests, provided the environment variable TEST_FUZZ_WRITE is set. The default is to generate corpus files only when running tests, regardless of whether TEST_FUZZ_WRITE is set. When running a target from outside its package directory, set TEST_FUZZ_MANIFEST_PATH to the path of the package's Cargo.toml file.

    WARNING: Setting enable_in_production could introduce a denial-of-service vector. For example, setting this option for a function that is called many times with different arguments could fill up the disk. The check of TEST_FUZZ_WRITE is meant to provide some defense against this possibility. Nonetheless, consider this option carefully before using it.

  • execute_with = "function" - Rather than call the target directly:

    • construct a closure of type FnOnce() -> R, where R is the target's return type, so that calling the closure calls the target;
    • call function with the closure.

    Calling the target in this way allows function to set up the call's environment. This can be useful, e.g., for fuzzing Substrate externalities.

  • no_auto_generate - Do not try to auto-generate corpus files for the target.

  • only_concretizations - Record the target's concretizations when running tests, but do not generate corpus files and do not implement a fuzzing harness. This can be useful when the target is a generic function, but it is unclear what type parameters should be used for fuzzing.

    The intended workflow is: enable only_concretizations, then run cargo test followed by cargo test-fuzz --display-concretizations. One of the resulting concretizations might be usable as concretize's parameters. Similarly, a concretization resulting from cargo test-fuzz --display-imply-concretizations might be usable as concretize_impl's parameters.

    Note, however, that just because a target was concretized with certain parameters during tests, it does not imply the target's arguments are serializable/deserializable when so concretized. The results of --display-concretizations/--display-impl-concretizations are merely suggestive.

  • rename = "name" - Treat the target as though its name is name when adding a module to the enclosing scope. Expansion of the test_fuzz macro adds a module definition to the enclosing scope. Currently, the module is named target_fuzz, where target is the name of the target. Use of this option causes the module to instead be be named name_fuzz. Example:

    #[test_fuzz(rename = "bar")]
    fn foo() {}
    
    // Without the use of `rename`, a name collision and compile error would result.
    mod foo_fuzz {}

test_fuzz_impl macro

Whenever the test_fuzz macro is used in an impl block, the impl must be preceded with the test_fuzz_impl macro. Example:

#[test_fuzz_impl]
impl Foo {
    #[test_fuzz]
    fn bar(&self, x: &str) {
        ...
    }
}

The reason for this requirement is as follows. Expansion of the test_fuzz macro adds a module definition to the enclosing scope. However, a module definition cannot appear inside an impl block. Preceding the impl with the test_fuzz_impl macro causes the module to be added outside the impl block.

If you see an error like the following, it likely means a use of the test_fuzz_impl macro is missing:

error: module is not supported in `trait`s or `impl`s

test_fuzz_impl currently has no options.

cargo test-fuzz command

The cargo test-fuzz command is used to interact with fuzz targets, and to manipulate their corpora, crashes, hangs, and work queues. Example invocations include:

  1. List fuzz targets

    cargo test-fuzz --list
    
  2. Display target foo's corpus

    cargo test-fuzz foo --display corpus
    
  3. Fuzz target foo

    cargo test-fuzz foo
    
  4. Replay crashes found for target foo

    cargo test-fuzz foo --replay crashes
    

Usage

 cargo test-fuzz [OPTIONS] [TARGETNAME] [-- <ARGS>...]

Arguments

  [TARGETNAME]  String that fuzz target's name must contain
  [ARGS]...     Arguments for the fuzzer

Options

      --backtrace             Display backtraces
      --consolidate           Move one target's crashes, hangs, and work queue to its corpus; to
                              consolidate all targets, use --consolidate-all
      --display <OBJECT>      Display concretizations, corpus, crashes, `impl` concretizations,
                              hangs, or work queue. By default, corpus uses an uninstrumented fuzz
                              target; the others use an instrumented fuzz target. To display the
                              corpus with instrumentation, use --display corpus-instrumented.
                              [possible values: concretizations, corpus, corpus-instrumented,
                              crashes, hangs, impl-concretizations, queue]
      --exact                 Target name is an exact name rather than a substring
      --exit-code             Exit with 0 if the time limit was reached, 1 for other programmatic
                              aborts, and 2 if an error occurred; implies --no-ui, does not imply
                              --run-until-crash or -- -V <SECONDS>
      --features <FEATURES>   Space or comma separated list of features to activate
      --list                  List fuzz targets
      --manifest-path <PATH>  Path to Cargo.toml
      --no-default-features   Do not activate the `default` feature
      --no-instrumentation    Compile without instrumentation (for testing build process)
      --no-run                Compile, but don't fuzz
      --no-ui                 Disable user interface
  -p, --package <PACKAGE>     Package containing fuzz target
      --persistent            Enable persistent mode fuzzing
      --pretty-print          Pretty-print debug output when displaying/replaying
      --replay <OBJECT>       Replay corpus, crashes, hangs, or work queue. By default, corpus uses
                              an uninstrumented fuzz target; the others use an instrumented fuzz
                              target. To replay the corpus with instrumentation, use --replay
                              corpus-instrumented. [possible values: concretizations, corpus,
                              corpus-instrumented, crashes, hangs, impl-concretizations, queue]
      --reset                 Clear fuzzing data for one target, but leave corpus intact; to reset
                              all targets, use --reset-all
      --resume                Resume target's last fuzzing session
      --run-until-crash       Stop fuzzing once a crash is found
      --test <NAME>           Integration test containing fuzz target
      --timeout <TIMEOUT>     Number of seconds to consider a hang when fuzzing or replaying
                              (equivalent to -- -t <TIMEOUT * 1000> when fuzzing)
      --verbose               Show build output when displaying/replaying
  -h, --help                  Print help
  -V, --version               Print version

To fuzz at most <SECONDS> of time, use:

    cargo test-fuzz ... -- -V <SECONDS>

Try `cargo afl fuzz --help` to see additional fuzzer options.

Convenience functions and macros

Warning: These utilties are excluded from semantic versioning and may be removed in future versions of test-fuzz.

  • dont_care!

    The dont_care! macro can be used to implement serde::Serialize/serde::Deserialize for types that are easy to construct and whose values you do not care to record. Intuitively, dont_care!($ty, $expr) says:

    • Skip values of type $ty when serializing.
    • Initialize values of type $ty with $expr when deserializing.

    More specifically, dont_care!($ty, $expr) expands to the following:

    impl serde::Serialize for $ty {
        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
        where
            S: serde::Serializer,
        {
            ().serialize(serializer)
        }
    }
    
    impl<'de> serde::Deserialize<'de> for $ty {
        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
        where
            D: serde::Deserializer<'de>,
        {
            <()>::deserialize(deserializer).map(|_| $expr)
        }
    }

    If $ty is a unit struct, then $expr can be be omitted. That is, dont_care!($ty) is equivalent to dont_care!($ty, $ty).

  • leak!

    The leak! macro can help to serialize target arguments that are references and whose types implement the ToOwned trait. It is meant to be used with the convert option.

    Specifically, an invocation of the following form declares a type LeakedX, and implements the From and test_fuzz::Into traits for it:

    leak!(X, LeakedX);

    One can then use LeakedX with the convert option as follows:

    #[test_fuzz::test_fuzz(convert = "&X, LeakedX")

    An example where X is Path appears in conversion.rs in this repository.

    More generally, an invocation of the form leak!($ty, $ident) expands to the following:

    #[derive(Clone, std::fmt::Debug, serde::Deserialize, serde::Serialize)]
    struct $ident(<$ty as ToOwned>::Owned);
    
    impl From<&$ty> for $ident {
        fn from(ty: &$ty) -> Self {
            Self(ty.to_owned())
        }
    }
    
    impl test_fuzz::Into<&$ty> for $ident {
        fn into(self) -> &'static $ty {
            Box::leak(Box::new(self.0))
        }
    }
  • serialize_ref / deserialize_ref

    serialize_ref and deserialize_ref function similar to leak!, but they are meant to be used wth Serde's serialize_with and deserialize_with field attributes (respectively).

    fn serialize_ref<S, T>(x: &&T, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
        T: serde::Serialize,
    {
        <T as serde::Serialize>::serialize(*x, serializer)
    }
    
    fn deserialize_ref<'de, D, T>(deserializer: D) -> Result<&'static T, D::Error>
    where
        D: serde::Deserializer<'de>,
        T: serde::de::DeserializeOwned + std::fmt::Debug,
    {
        let x = <T as serde::de::Deserialize>::deserialize(deserializer)?;
        Ok(Box::leak(Box::new(x)))
    }

test-fuzz package features

The features in this section apply to the test-fuzz package as a whole. Enable them in test-fuzz's dependency specification as described in the The Cargo Book. For example, to enable the auto_concretize feature, use:

test-fuzz = { version = "4.0", features = ["auto_concretize"] }

The test-fuzz package currently supports the following features:

  • auto_concretize - When this feature is enabled, test-fuzz tries to infer impl and non-impl concretizations. Success requires that a target be called with exactly one impl concretization and exactly one non-impl concretization during tests. Success is not guaranteed by these conditions, however.

    The implementation of auto_concretize uses the unstable language feature proc_macro_span. So enabling auto_concretize requires that targets be built with a nightly compiler.

  • Serde formats - test-fuzz can serialize target arguments in multiple Serde formats. The following are the features used to select a format.

Auto-generated corpus files

cargo-test-fuzz can auto-generate values for types that implement certain traits. If all of a target's argument types implement such traits, cargo-test-fuzz can auto-generate corpus files for the target.

The traits that cargo-test-fuzz currently supports and the values generated for them are as follows:

Trait(s) Value(s)
Bounded T::min_value(), T::max_value()
Bounded + Add + One T::min_value() + T::one()
Bounded + Add + Div + Two T::min_value() / T::two() + T::max_value() / T::two()
Bounded + Add + Div + Two + One T::min_value() / T::two() + T::max_value() / T::two() + T::one()
Bounded + Sub + One T::max_value() - T::one()
Default T::default()

Key

Environment variables

  • TEST_FUZZ_LOG - During macro expansion:

    • If TEST_FUZZ_LOG is set to 1, write all instrumented fuzz targets and module definitions to standard output.
    • If TEST_FUZZ_LOG is set to a crate name, write that crate's instrumented fuzz targets and module definitions to standard output.

    This can be useful for debugging.

  • TEST_FUZZ_MANIFEST_PATH - When running a target from outside its package directory, find the package's Cargo.toml file at this location. One may need to set this environment variable when enable_in_production is used.

  • TEST_FUZZ_WRITE - Generate corpus files when not running tests for those targets for which enable_in_production is set.

Limitations

  • Clonable arguments - A target's arguments must implement the Clone trait. The reason for this requirement is that the arguments are needed in two places: in a test-fuzz-internal function that writes corpus files, and in the body of the target function. To resolve this conflict, the arguments are cloned before being passed to the former.

  • Serializable / deserializable arguments - In general, a target's arguments must implement the serde::Serialize and serde::Deserialize traits, e.g., by deriving them. We say "in general" because test-fuzz knows how to handle certain special cases that wouldn't normally be serializable/deserializable. For example, an argument of type &str is converted to String when serializing, and back to a &str when deserializing. See also concretize and concretize_impl above.

  • Global variables - The fuzzing harnesses that test-fuzz implements do not initialize global variables. While execute_with provides some remedy, it is not a complete solution. In general, fuzzing a function that relies on global variables requires ad-hoc methods.

  • convert and concretize / concretize_impl - These options are incompatible in the following sense. If a fuzz target's argument type is a type parameter, convert will try to match the type parameter, not the type to which it is concretized. Supporting the latter would seem to require simulating type substitution as the compiler would perform it. However, this is not currently implemented.

Tips and tricks

  • #[cfg(test)] is not enabled for integration tests. If your target is tested only by integration tests, then consider using enable_in_production and TEST_FUZZ_WRITE to generate a corpus. (Note the warning accompanying enable_in_production, however.)

  • If you know the package in which your target resides, passing -p <package> to cargo test/cargo test-fuzz can significantly reduce build times. Similarly, if you know your target is called from only one integration test, passing --test <name> can reduce build times.

  • Rust won't allow you to implement serde::Serialize for other repositories' types. But you may be able to patch other repositories to make their types serializeble. Also, cargo-clone can be useful for grabbing dependencies' repositories.

  • Serde attributes can be helpful in implementing serde::Serialize/serde::Deserialize for difficult types.

License

test-fuzz is licensed and distributed under the AGPLv3 license with the Macros and Inline Functions Exception. In plain language, using the test_fuzz macro, the test_fuzz_impl macro, or test-fuzz's convenience functions and macros in your software does not require it to be covered by the AGPLv3 license.

More Repositories

1

algo

Set up a personal VPN in the cloud
Jinja
27,779
star
2

manticore

Symbolic execution tool
Python
3,536
star
3

graphtage

A semantic diff utility and library for tree-like files such as JSON, JSON5, XML, HTML, YAML, and CSV.
Python
2,354
star
4

ctf

CTF Field Guide
C
1,273
star
5

publications

Publications from Trail of Bits
Python
1,232
star
6

deepstate

A unit test-like interface for fuzzing and symbolic execution
Python
818
star
7

pe-parse

Principled, lightweight C/C++ PE parser
C++
691
star
8

eth-security-toolbox

A Docker container preconfigured with all of the Trail of Bits Ethereum security tools.
Dockerfile
670
star
9

maat

Open-source symbolic execution framework: https://maat.re
C++
612
star
10

twa

A tiny web auditor with strong opinions.
Shell
579
star
11

winchecksec

Checksec, but for Windows: static detection of security mitigations in executables
C++
523
star
12

polytracker

An LLVM-based instrumentation tool for universal taint tracking, dataflow analysis, and tracing.
C++
514
star
13

cb-multios

DARPA Challenges Sets for Linux, Windows, and macOS
C
498
star
14

multiplier

Code auditing productivity multiplier.
C++
434
star
15

onesixtyone

Fast SNMP Scanner
C
411
star
16

fickling

A Python pickling decompiler and static analyzer
Python
407
star
17

vast

VAST is an experimental compiler pipeline designed for program analysis of C and C++. It provides a tower of IRs as MLIR dialects to choose the best fit representations for a program analysis or further program abstraction.
C++
381
star
18

tubertc

Peer-to-Peer Video Chat for Corporate LANs
JavaScript
361
star
19

krf

A kernelspace syscall interceptor and randomized faulter
C
348
star
20

polyfile

A pure Python cleanroom implementation of libmagic, with instrumented parsing from Kaitai struct and an interactive hex viewer
Python
338
star
21

it-depends

A tool to automatically build a dependency graph and Software Bill of Materials (SBOM) for packages and arbitrary source code repositories.
Python
328
star
22

sinter

A user-mode application authorization system for MacOS written in Swift
Swift
301
star
23

SecureEnclaveCrypto

Demonstration library for using the Secure Enclave on iOS
Swift
276
star
24

protofuzz

Google Protocol Buffers message generator
Python
267
star
25

osquery-extensions

osquery extensions by Trail of Bits
C
262
star
26

dylint

A tool for running Rust lints from dynamic libraries
Rust
259
star
27

RpcInvestigator

Exploring RPC interfaces on Windows
C#
245
star
28

constexpr-everything

Rewrite C++ code to automatically apply `constexpr` where possible
C++
245
star
29

binjascripts

Scripts for Binary Ninja
Python
241
star
30

audit-kubernetes

k8s audit repo
Go
226
star
31

mishegos

A differential fuzzer for x86 decoders
C++
226
star
32

semgrep-rules

Semgrep queries developed by Trail of Bits.
Go
197
star
33

circomspect

A static analyzer and linter for the Circom zero-knowledge DSL
Rust
186
star
34

PrivacyRaven

Privacy Testing for Deep Learning
Python
183
star
35

llvm-sanitizer-tutorial

An LLVM sanitizer tutorial
C++
177
star
36

siderophile

Find the ideal fuzz targets in a Rust codebase
Rust
171
star
37

flying-sandbox-monster

Sandboxed, Rust-based, Windows Defender Client
Rust
170
star
38

not-going-anywhere

A set of vulnerable Golang programs
Go
163
star
39

AppJailLauncher

CTF Challenge Framework for Windows 8 and above
C++
141
star
40

BTIGhidra

Binary Type Inference Ghidra Plugin
Java
138
star
41

uthenticode

A cross-platform library for verifying Authenticode signatures
C++
136
star
42

zkdocs

Interactive documentation on zero-knowledge proof systems and related primitives.
HTML
133
star
43

sienna-locomotive

A user-friendly fuzzing and crash triage tool for Windows
C++
132
star
44

Honeybee

An experimental high performance, fuzzing oriented Intel Processor Trace capture and analysis suite
C
127
star
45

ObjCGraphView

A graph view plugin for Binary Ninja to visualize Objective-C
Python
127
star
46

pasta

Peter's Amazing Syntax Tree Analyzer
C++
124
star
47

sqlite_wrapper

An easy-to-use, extensible and lightweight C++17 wrapper for SQLite
C++
117
star
48

ebpfpub

ebpfpub is a generic function tracing library for Linux that supports tracepoints, kprobes and uprobes.
C++
113
star
49

ctf-challenges

CTF Challenges
Python
112
star
50

binrec-tob

BinRec: Dynamic Binary Lifting and Recompilation
C++
110
star
51

appjaillauncher-rs

AppJailLauncher in Rust
Rust
103
star
52

vscode-weaudit

Create code bookmarks and code highlights with a click.
TypeScript
103
star
53

on-edge

A library for detecting certain improper uses of the "Defer, Panic, and Recover" pattern in Go programs
Go
97
star
54

ios-integrity-validator

Integrity validator for iOS devices
Shell
97
star
55

abi3audit

Scans Python packages for abi3 violations and inconsistencies
Python
97
star
56

ebpfault

A BPF-based syscall fault injector
C++
94
star
57

clang-cfi-showcase

Sample programs that illustrate how to use control flow integrity with the clang compiler
C++
92
star
58

awesome-ml-security

85
star
59

blight

A framework for instrumenting build tools
Python
83
star
60

ruzzy

A coverage-guided fuzzer for pure Ruby code and Ruby C extensions
Ruby
74
star
61

ManticoreUI

The Manticore User Interface with plugins for Binary Ninja and Ghidra
Python
73
star
62

bisc

Borrowed Instructions Synthetic Computation
Ruby
70
star
63

manticore-examples

Example Manticore scripts
Python
69
star
64

algo-ng

Experimental version of Algo built on Terraform
HCL
68
star
65

differ

Detecting Inconsistencies in Feature or Function Evaluations of Requirements
Python
67
star
66

deceptiveidn

Use computer vision to determine if an IDN can be interpreted as something it's not
Python
63
star
67

LeftoverLocalsRelease

The public release of LeftoverLocals code
C++
60
star
68

necessist

A tool for finding bugs in tests
Rust
59
star
69

reverie

An efficient and generalized implementation of the IKOS-style KKW proof system (https://eprint.iacr.org/2018/475) for arbitrary rings.
Rust
59
star
70

Codex-Decompiler

Python
57
star
71

testing-handbook

Trail of Bits Testing Handbook
C++
57
star
72

magnifier

C++
56
star
73

sixtyfour

How fast can we brute force a 64-bit comparison?
C
52
star
74

DomTreSat

Dominator Tree LLVM Pass to Test Satisfiability
C++
47
star
75

HVCI-loldrivers-check

PowerShell
45
star
76

nyc-infosec

Mapping the NYC Infosec Community
CSS
43
star
77

cfg-showcase

Sample programs that illustrate how to use Control Flow Guard, VS2015's control flow integrity implementation
C++
40
star
78

tsc_freq_khz

Linux kernel driver to export the TSC frequency via sysfs
C
40
star
79

rubysec

RubySec Field Guide
Ruby
40
star
80

macroni

C and C++ compiler frontend using PASTA to parse code, and VAST to represent the code as MLIR.
C
39
star
81

indurative

Easily create authenticated data structures
Haskell
37
star
82

http-security

Parse HTTP Security Headers
Ruby
36
star
83

trailofphish

Phishing e-mail repository
Ruby
36
star
84

KRFAnalysis

Collection of LLVM passes and triage tools for use with the KRF fuzzer
LLVM
35
star
85

ebpf-verifier

Harness for the Linux kernel eBPF verifier
C
32
star
86

ml-file-formats

List of ML file formats
31
star
87

umberto

poststructural fuzzing
Haskell
30
star
88

spf-query

Ruby SPF Parser
Ruby
29
star
89

ebpf-common

Various utilities useful for developers writing BPF tools
C++
29
star
90

clang-tidy-audit

Rewrite C/C++/Obj-C to Annotate Points of Interest
C++
27
star
91

eatmynetwork

A small script for running programs with (minimal) network sandboxing
Shell
26
star
92

btfparse

A C++ library that parses debug information encoded in BTF format
C++
25
star
93

anselm

Detect patterns of bad behavior in function calls
C++
25
star
94

dmarc

Ruby DMARC Parser
Ruby
25
star
95

linuxevents

A sample PoC for container-aware exec events for osquery
C++
23
star
96

mpc-learning

Perform multi-party computation on machine learning applications
Python
21
star
97

WinDbg-JS

JavaScript
21
star
98

go-mutexasserts

A small library that allows to check if Go mutexes are locked
Go
21
star
99

screen

Measure branching along code paths
C
20
star
100

itergator

CodeQL library and queries for iterator invalidation
CodeQL
19
star