Fuzz introspector is a tool to help fuzzer developers to get an understanding of their fuzzer’s performance and identify any potential blockers.

Overview

Fuzz introspector

Fuzz introspector is a tool to help fuzzer developers to get an understanding of their fuzzer’s performance and identify any potential blockers. Fuzz introspector aggregates the fuzzers’ functional data like coverage, hit frequency, entry points, etc to give the developer a birds eye view of their fuzzer. This helps with identifying fuzz bottlenecks and blockers and eventually helps in developing better fuzzers.

High-level goals:

  • Show fuzzing-relevant data about each function in a given project
  • Show reachability of fuzzer(s)
  • Integrate seamlessly with OSS-Fuzz
  • Show visualisations to enable fuzzer debugging
  • Give suggestions for how to improve fuzzing

Testing with OSS-Fuzz

The recommended way of testing this project is by way of OSS-Fuzz. Please see OSS-Fuzz instructions on how to do this.

Testing without OSS-Fuzz integration

You can also build and run the introspector outside the OSS-Fuzz environment.

We use this mainly to develop the LLVM LTO pass as compilation of clang goes faster (recompilation in particular). However, for the full experience we recommend working in the OSS-Fuzz environment as described above.

A complication with testing locally is that the full end-to-end process of both (1) building fuzzers; (2) running them; (3) building with coverage; and (4) building with introspector analysis, is better supported in the OSS-Fuzz environment.

Build locally

Start a python venv

  1. Create a venv: python3 -m venv /path/to/new/virtual/environment
  2. Activate the venv
  3. Install dependencies with pip install -r requirements.txt

Build custom clang

(expect this part to take at least 1 hour)

git clone https://github.com/AdaLogics/fuzz-introspector
cd fuzz-introspector
./build_all.sh

Run local examples

After having built the custom clang above, you can try an example:

cd examples
./build_simple_examples.sh
cd simple-example-4/web
python3 -m http.server 5002

You can also use the build_all_projects.sh and build_all_web_only.sh scripts to control which examples you want to build as well as whether you want to only build the web data.

Output

The output of the introspector is a HTML report that gives data about your fuzzer. This includes:

  • An overview of reachability by all fuzzers in the repository
  • A table with detailed information about each fuzzer in the repository, e.g. number of functions reached, complexity covered and more.
  • A table with overview of all functions in the project. With information such as
    • Number of fuzzers that reaches this function
    • Cyclomatic complexity of this function and all functions reachable by this function
    • Number of functions reached by this function
    • The amount of undiscovered complexity in this function. Undiscovered complexity is the complexity not covered by any fuzzers.
  • A call reachability tree for each fuzzer in the project. The reachability tree shows the potential control-flow of a given fuzzer
  • An overlay of the reachability tree with coverage collected from a fuzzer run.
  • A table giving summary information about which targets are optimal targets to analyse for a fuzzer of the functions that are not being reached by any fuzzer.
  • A list of suggestions for new fuzzers (this is super naive at the moment).

Example output

Here we show a few images from the output report:

Project overview:

project overview

Table with data of all functions in a project. The table is sortable to make enhance the process of understanding the fuzzer-infrastructure of a given project:

Functions table

Reachability tree with coverage overlay

Overlay 1

Reachability tree with coverage overlay, showing where a fuzz-blocker is occurring Overlay 2

Contribute

Code of Conduct

Before contributing, please follow our Code of Conduct.

Connect with the Fuzzing Community

If you want to get involved in the Fuzzing community or have ideas to chat about, we discuss this project in the OSSF Security Tooling Working Group meetings.

More specifically, you can attend Fuzzing Collaboration meeting (monthly on the first Tuesday 10:30am - 11:30am PST Calendar, Zoom Link).

Comments
  • /usr/bin/ld.gold: fatal error: LLVM gold plugin: <unknown>:0: Undefined temporary symbol .Ltmp265928

    /usr/bin/ld.gold: fatal error: LLVM gold plugin: :0: Undefined temporary symbol .Ltmp265928

    Was running ../run_both.sh bitcoin-core 3, but it failed.

    ...
    [Log level 2] : 13:06:58 : Wrapping function sancov.module_ctor_8bit_counters.86728
    [Log level 2] : 13:06:58 : Wrapping function event_listener_getbase
    [Log level 2] : 13:06:58 : Wrapping function event_listener_getfd
    [Log level 2] : 13:06:58 : Wrapping function event_listener_destroy
    [Log level 2] : 13:06:58 : Wrapping function event_listener_disable
    [Log level 2] : 13:06:58 : Wrapping function event_listener_enable
    [Log level 2] : 13:06:58 : Wrapping function evconnlistener_set_error_cb
    [Log level 2] : 13:06:58 : Wrapping function evconnlistener_set_cb
    [Log level 2] : 13:06:58 : Wrapping function evconnlistener_get_base
    [Log level 2] : 13:06:58 : Wrapping function evconnlistener_get_fd
    [Log level 2] : 13:06:58 : Wrapping function evconnlistener_disable
    [Log level 2] : 13:06:58 : Wrapping function evconnlistener_free
    [Log level 2] : 13:06:58 : Wrapping function evconnlistener_new_bind
    [Log level 2] : 13:06:58 : Wrapping function evconnlistener_new
    [Log level 2] : 13:06:58 : Wrapping function listener_read_cb
    [Log level 2] : 13:06:58 : Wrapping function evconnlistener_enable
    [Log level 2] : 13:06:58 : Wrapping function sancov.module_ctor_8bit_counters.86775
    [Log level 2] : 13:06:58 : Wrapping function evthread_posix_get_id
    [Log level 2] : 13:06:58 : Wrapping function evthread_posix_cond_wait
    [Log level 2] : 13:06:58 : Wrapping function pthread_cond_timedwait
    [Log level 2] : 13:06:58 : Wrapping function pthread_cond_wait
    [Log level 2] : 13:06:58 : Wrapping function evthread_posix_cond_signal
    [Log level 2] : 13:06:58 : Wrapping function pthread_cond_broadcast
    [Log level 2] : 13:06:58 : Wrapping function pthread_cond_signal
    [Log level 2] : 13:06:58 : Wrapping function evthread_posix_cond_free
    [Log level 2] : 13:06:58 : Wrapping function pthread_cond_destroy
    [Log level 2] : 13:06:58 : Wrapping function evthread_posix_cond_alloc
    [Log level 2] : 13:06:58 : Wrapping function pthread_cond_init
    [Log level 2] : 13:06:58 : Wrapping function evthread_posix_unlock
    [Log level 2] : 13:06:58 : Wrapping function evthread_posix_lock
    [Log level 2] : 13:06:58 : Wrapping function pthread_mutex_trylock
    [Log level 2] : 13:06:58 : Wrapping function evthread_posix_lock_free
    [Log level 2] : 13:06:58 : Wrapping function evthread_posix_lock_alloc
    [Log level 2] : 13:06:58 : Wrapping function evthread_use_pthreads
    [Log level 2] : 13:06:58 : Wrapping function pthread_mutexattr_init
    [Log level 2] : 13:06:58 : Wrapping function pthread_mutexattr_settype
    [Log level 2] : 13:06:58 : Ended wrapping all functions
    [Log level 1] : 13:06:59 : Finished introspector module
    /usr/bin/ld.gold: fatal error: LLVM gold plugin: <unknown>:0: Undefined temporary symbol .Ltmp265928
    
    clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: *** [Makefile:6708: test/fuzz/fuzz] Error 1
    make[2]: Leaving directory '/src/bitcoin-core/src'
    make[1]: *** [Makefile:17510: all-recursive] Error 1
    make[1]: Leaving directory '/src/bitcoin-core/src'
    make: *** [Makefile:812: all-recursive] Error 1
    ERROR:root:Building fuzzers failed.
    
    bug 
    opened by MarcoFalke 24
  • Possible incorrect coverage interpretation?

    Possible incorrect coverage interpretation?

    Looking into bind9 fuzz report for dns_rdata_fromwire_text_fuzzer, I encounter multiple inconsistent/confusing entries in the calltree:

    for example in calltree idx: 00539, the callsite link shows 352k hits, while the node in call tree is red. It is the same for calltree idx: 00088 with callsite link

    Can it be because the coverage is reporting hits from other fuzz targets? If yes, then #62 can be the solution.

    bug 
    opened by Navidem 15
  • bump oss-fuzz

    bump oss-fuzz

    We should bump OSS-Fuzz as a reasonbly high number of changes has happened since last bump. There was a slight change in the way post-processing unit is called, so a few minor things need change in OSS-Fuzz besides bumping the LLVM number.

    @Navidem @AdamKorcz do you have anything that you would like to complete before bumping on OSS-Fuzz side?

    opened by DavidKorczynski 13
  • Map fuzzer names to output binary names in OSS-Fuzz

    Map fuzzer names to output binary names in OSS-Fuzz

    Current fuzz introspector reports seem to key fuzzers by the filename where the fuzzer is defined (e.g. https://oss-fuzz-introspector.storage.googleapis.com/zstd/inspector-report/20220220/fuzz_report.html#Fuzzer:-sequence_compression_api.c)

    For closer integration with OSS-Fuzz and ClusterFuzz though, we'd like to be able to better map the binary names we see on OSS-Fuzz to these reports. @DavidKorczynski @AdamKorcz WDYT? Would it be possible to include the actual binary names in these reports and key on that instead?

    @Navidem FYI

    enhancement core feature 
    opened by oliverchang 11
  • migrate runner.py features into oss-fuzz/infra/helper.py

    migrate runner.py features into oss-fuzz/infra/helper.py

    Making an issue of https://github.com/ossf/fuzz-introspector/pull/525#issuecomment-1302464937

    oss_fuzz_integration/runner.py has a few features that are convenient for building and running fuzzers by way of oss-fuzz, including:

    • automatically downloading public corpus, which can be used to construct full coverage reports
    • run commands such as: python3 ../runner.py {coverage | introspector} proj_name exec_sec which will build fuzzers of proj_name with the default sanitizer, run the fuzzers for exec_sec seconds and then generate a coverage or introspector report.

    The features are useful when improving fuzzers for a given project as it makes the workflow fast.

    Some of these features would make sense to add to OSS-Fuzz, in particular coverage generation using public corpus, generation of fuzz introspector reports for a given project and also generation just coverage for a given project.

    opened by DavidKorczynski 10
  • Should we always bail if there is a main() in module?

    Should we always bail if there is a main() in module?

    Currently if there is a main() function in the module, introspector pass is skipped.

    Should this be the case all the time? There are at least 4 projects on OSS-Fuzz that fuzz introspector does not generate fuzz_report.html because of this check. Projects include: tmux, tarantool, libssh, libspectre

    @DavidKorczynski WDYT?

    needs discussion 
    opened by Navidem 10
  • Feature: Add function-of-interest reachability lookup

    Feature: Add function-of-interest reachability lookup

    It will be useful to employ the reachability data in a way that the user can lookup a function-of-interest to find out which recommended fuzz target may reach to the FOI.

    enhancement 
    opened by Navidem 10
  • numeric metric for calltree bitmap?

    numeric metric for calltree bitmap?

    It may be useful for devs to compare the improvements they made wrt calltree bitmap. Right now the only way to do this is to eyeball the colouring on the report.

    Would it make sense to add a percentage value here?

    opened by oliverchang 9
  • [OSS-Fuzz] Introspector build failures since using new PM

    [OSS-Fuzz] Introspector build failures since using new PM

    Since merge of https://github.com/google/oss-fuzz/pull/7788, around 59 projects fail to build.

    As I checked some including json, valijson, wabt, wolfssl, and znc, the error message is:

    /usr/bin/ld.gold: fatal error: LLVM gold plugin: <unknown>:0: Undefined temporary symbol .LtmpXXXXX
    
    opened by Navidem 9
  • Exclude std:: functions from fuzz introspector reports

    Exclude std:: functions from fuzz introspector reports

    C++ std::.. calls can be very noisy and likely aren't very useful to fuzzer developers. e.g. for leveldb: https://storage.googleapis.com/oss-fuzz-introspector/leveldb/inspector-report/20220316/calltree_view_0.html

    @Navidem and I discussed this and thought that we should just exclude all of these from the calltree.

    @DavidKorczynski @AdamKorcz WDYT?

    opened by oliverchang 8
  • jvm issues

    jvm issues

    Umbrella issue for minor jvm issues

    • runtime coverage functions is above reachable functions
    • urls is missing some parts (apache-commons-cli is an example), including .java
    opened by DavidKorczynski 7
  • Parse control-flow collected in a way other than LTO

    Parse control-flow collected in a way other than LTO

    To make introspector more versatile it makes sense to accept control-flow collected by other ways and just load it in post-processing. One alternative to LTO is using sancov: https://clang.llvm.org/docs/SanitizerCoverage.html#tracing-control-flow

    opened by Navidem 0
  • Documentation: improve readthedocs

    Documentation: improve readthedocs

    The goal is to drastically improve https://fuzz-introspector.readthedocs.io/en/latest/ to make it a standard page for getting information on fuzz-introspector

    In particular:

    • provide improved installation guides (e.g. for recently added languages)
    • provide a number of tutorials on how to use fuzz introspector
    • provide guides that show why the data in fuzz-introspector is useful
    • provide instructions on how to use Fuzz Introspector from an OSS-Fuzz perspective
    • more developer-friendly docs
    opened by DavidKorczynski 0
  • Add support for diffing two fuzz-introspector runs

    Add support for diffing two fuzz-introspector runs

    The goal of fuzz introspector is by and large to make it easier to improve a fuzzing set up for a given software package. At the moment fuzz introspector only focuses on a single analysis, whereas, in order to determine if an improvement was successful one has to compare two fuzz introspector runs. As such, we should have some features that make it possible to compare fuzz introspector analyses and specifically make it easy to highlight improvements/regressions.

    opened by DavidKorczynski 1
  • tinygltf has calls to asan functions in its report

    tinygltf has calls to asan functions in its report

    I noticed the TinyGltf project has a set of calls to ASAN routines. https://storage.googleapis.com/oss-fuzz-introspector/tinygltf/inspector-report/20221210/fuzz_report.html

    This should not happen as we aim to exclude them from the frontends.

    opened by DavidKorczynski 0
  • JVM implementation frontends code is slow and used up loads of memory and result in stack / memory overflow

    JVM implementation frontends code is slow and used up loads of memory and result in stack / memory overflow

    After the recent update of the JVM frontends code, the execution time and memory usage is increased significantly, which sometimes result in out of memory and stack overflow. Double check of the logic and settings are needed to ensure the code run in acceptable time and resources.

    opened by arthurscchan 1
Releases(v1.0.0)
Owner
Open Source Security Foundation (OpenSSF)
Open Source Security Foundation (OpenSSF)
CVE-2021-26855 SSRF Exchange Server

CVE-2021-26855 Brute Force EMail Exchange Server Timeline: Monday, March 8, 2021: Update Dumping content...(I'm not done, can u guy help me done this

lulz 117 Nov 28, 2022
LaxrFar Python Obfuscator

LaxrFar Python Obfuscator Usage First do the things from "Upload to Webserver" o

LaxrFar 5 Jul 19, 2022
Details,PoC and patches for CVE-2021-45383 & CVE-2021-45384

CVE-2021-45383 & CVE-2021-45384 There are several network-layer vulnerabilities in the official server of Minecraft: Bedrock Edition (aka Bedrock Serv

20 Apr 07, 2022
Installation of hacking tools

Tools-Spartan This is a program that makes it easy for you to download and install tools used in Kali Linux, there are tons of tools available.

1 Nov 10, 2021
Proof of concept GnuCash Webinterface

Proof of Concept GnuCash Webinterface This may one day be a something truly great. Milestones [ ] Browse accounts and view transactions [ ] Record sim

Josh 14 Dec 28, 2022
Crypto Meta Extractor

Crypto Meta Extractor This repository contains the code which extracts some metadata of all the cryptocurrencies listed (9K) on CoinMarketCap. Coding

Samyak Jain 3 Jul 03, 2022
C++ fully undetected shellcode launcher

charlotte c++ fully undetected shellcode launcher ;) releasing this to celebrate the birth of my newborn description 13/05/2021: c++ shellcode launche

894 Dec 25, 2022
Salesforce Recon and Exploitation Toolkit

Salesforce Recon and Exploitation Toolkit Salesforce Recon and Exploitation Toolkit Usage python3 main.py URL References Announcement Blog - https:/

81 Dec 23, 2022
A great and handy python obfuscator for protecting code.

Python Code Obfuscator A handy and necessary tool that can protect your code anytime! Mostly Command Line tool that will obfuscate your code. Features

Karim 5 Nov 18, 2022
EyeJo是一款自动化资产风险评估平台,可以协助甲方安全人员或乙方安全人员对授权的资产中进行排查,快速发现存在的薄弱点和攻击面。

EyeJo EyeJo是一款自动化资产风险评估平台,可以协助甲方安全人员或乙方安全人员对授权的资产中进行排查,快速发现存在的薄弱点和攻击面。 免责声明 本平台集成了大量的互联网公开工具,主要是方便安全人员整理、排查资产、安全测试等,切勿用于非法用途。使用者存在危害网络安全等任何非法行为,后果自负,作

429 Dec 31, 2022
💣 Bomb Crypto Bot 💣

💣 Bomb Crypto Bot 💣 ⚠️ Warning I am not responsible for any penalties incurred by those who use the bot, use it at your own risk. 📄 Documentation -

Matheus Benites 4 Apr 27, 2022
🏃 Python Solutions of All Problems in FHC 2021 (In Progress)

FacebookHackerCup-2021 Python solutions of Facebook Hacker Cup 2021. Solution begins with * means it will get TLE in the largest data set (total compu

kamyu 14 Oct 15, 2022
Python DNS Lookup: The Domain Name System (DNS) is basically the phonebook of the Internet

-Python-DNS-Lookup- ✨ 🌟 Python DNS Lookup ✨ 🌟 The Domain Name System (DNS) is

Ronnie Atuhaire 2 Feb 14, 2022
Whois-Python - Get Whois Domain with Python GUI

Whois-Python-GUI Get Whois Domain with Python - GUI :) WARNING Dont Copy ! - W

MR.D3F417 3 Feb 21, 2022
This is a partial and quick and dirty proof of concept implementation of the following specifications to configure a tor client to use trusted exit relays only.

This is a partial and quick and dirty proof of concept implementation of the following specifications to configure a tor client to use trusted exit re

22 Nov 09, 2022
A blind SQL injection script that uses binary search aka bisection method to dump datas from database.

Blind SQL Injection I wrote this script to solve PortSwigger Web Security Academy's particular Blind SQL injection with conditional responses lab. Bec

Şefik Efe 2 Oct 29, 2022
对安卓APP注入MSF PAYLOAD,并且对手机管家进行BYPASS。

520_APK_HOOK 介绍 将msf生成的payload,注入到一个正常的apk文件中,重新打包后进行加固,bypass手机安全管家的检测。 项目地址: https://github.com/cleverbao/520apkhook 作者: BaoGuo 优点 相比于原始的msf远控,此版本ap

BaoGuo 368 Jan 02, 2023
nuclei scanner for proxyshell ( CVE-2021-34473 )

Proxyshell-Scanner nuclei scanner for Proxyshell RCE (CVE-2021-34423,CVE-2021-34473,CVE-2021-31207) discovered by orange tsai in Pwn2Own, which affect

PikaChu 29 Dec 16, 2022
Brainly-Scrambler - Brainly Scrambler With Python

Brainly-Scrambler Untuk admin brainly jangan lupa pasang captcha mu Note: Kamu

8 Feb 24, 2022
Simple Dos-Attacker.

dos-attacker ❕ Atenção Não ataque sites privados. isto é illegal. 🖥️ Pré-requisitos Ultima versão do Python3. para verificar isto, é bem simples. Bas

Dio brando 10 Apr 15, 2022