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)
Find exposed API keys based on RegEx and get exploitation methods for some of keys that are found

dora Features Blazing fast as we are using ripgrep in backend Exploit/PoC steps for many of the API key, allowing to write a good report for bug bount

Siddharth Dushantha 243 Dec 27, 2022
Local File Inclusion Scanner and Exploiter

LFI-Paradise Local File Inclusion Scanner and Exploiter Features 1- Scanner 2- E

11 Sep 04, 2022
STATS305C: Applied Statistics III (Spring, 2022)

STATS305C: Applied Statistics III Instructor: Scott Linderman TA: Matt MacKay, James Yang Term: Spring 2022 Stanford University Course Description: Pr

Scott Linderman 14 Aug 11, 2022
Patching - Interactive Binary Patching for IDA Pro

Patching - Interactive Binary Patching for IDA Pro Overview Patching assembly code to change the behavior of an existing program is not uncommon in ma

589 Dec 30, 2022
Repository for a project of the course EP2520 Building Networked Systems Security

EP2520_ACME_Project Repository for a project of the course EP2520 Building Networked Systems Security in Royal Institute of Technology (KTH), Stockhol

1 Dec 11, 2021
Python Library For Ethical Hacker

Python Library For Ethical Hacker

11 Nov 03, 2022
A python script to decrypt media files encrypted using the Android application 'Decrypting 'LOCKED Secret Calculator Vault''. Will identify PIN / pattern.

A python script to decrypt media files encrypted using the Android application 'Decrypting 'LOCKED Secret Calculator Vault''. Will identify PIN / pattern.

3 Sep 26, 2022
automatically crawl every URL and find cross site scripting (XSS)

scancss Fastest tool to find XSS. scancss is a fastest tool to detect Cross Site scripting (XSS) automatically and it's also an intelligent payload ge

Md. Nur habib 30 Sep 24, 2022
A fully automated, accurate, and extensive scanner for finding vulnerable log4j hosts

log4j-scan A fully automated, accurate, and extensive scanner for finding vulnerable log4j hosts Features Support for lists of URLs. Fuzzing for more

Duc Linh Nguyen 4 Aug 08, 2022
ProxyLogon Full Exploit Chain PoC (CVE-2021–26855, CVE-2021–26857, CVE-2021–26858, CVE-2021–27065)

ExProlog ProxyLogon Full Exploit Chain PoC (CVE-2021–26855, CVE-2021–26857, CVE-2021–26858, CVE-2021–27065) Usage: exprolog.py [OPTIONS] ExProlog -

Herwono W. Wijaya 130 Dec 15, 2022
自动化爆破子域名,并遍历所有端口寻找http服务,并使用crawlergo、dirsearch、xray等工具扫描并集成报告;支持动态添加扫描到的域名至任务;

AutoScanner AutoScanner是什么 AutoScanner是一款自动化扫描器,其功能主要是遍历所有子域名、及遍历主机所有端口寻找出所有http服务,并使用集成的工具进行扫描,最后集成扫描报告; 工具目前有:oneforall、masscan、nmap、crawlergo、dirse

633 Dec 30, 2022
A decompilation of the Nintendo Switch version of Captain Toad: Treasure Tracker

cttt-decomp A decompilation of the Nintendo Switch version of Captain Toad: Trea

shibbs 14 Aug 17, 2022
Blinder is a tool that will help you simplify the exploitation of blind SQL injection

Blinder Have you found a blind SQL injection? Great! Now you need to export it, but are you too lazy to sort through the values? Most likely,

10 Dec 06, 2022
A honey token manager and alert system for AWS.

SpaceSiren SpaceSiren is a honey token manager and alert system for AWS. With this fully serverless application, you can create and manage honey token

287 Nov 09, 2022
PyPasser is a Python library for bypassing reCaptchaV3 only by sending 2 requests.

PyPasser is a Python library for bypassing reCaptchaV3 only by sending 2 requests. In 1st request, gets token of captcha and in 2nd request,

253 Jan 05, 2023
Make your own huge Wordlist with advanced options

#It's my first tool i hope to be useful for everyone, Make your own huge Wordlist with advanced options, You need python3 to run this tool, If you hav

0.1Arafa 6 Dec 08, 2022
ProxyLogon(CVE-2021-26855+CVE-2021-27065) Exchange Server RCE(SSRF->GetWebShell)

ProxyLogon For Python3 ProxyLogon(CVE-2021-26855+CVE-2021-27065) Exchange Server RCE(SSRF-GetWebShell) usage: python ProxyLogon.py --host=exchang

112 Dec 01, 2022
Brute force attack tool for Azure AD Autologon/Seamless SSO

Brute force attack tool for Azure AD Autologon

nyxgeek 89 Jan 02, 2023
Laravel RCE (CVE-2021-3129)

CVE-2021-3129 - Laravel RCE About The script has been made for exploiting the Laravel RCE (CVE-2021-3129) vulnerability. This script allows you to wri

Joshua van der Poll 21 Dec 27, 2022
IDA Frida Plugin for tracing something interesting.

IDAFrida A simple IDA plugin to generate FRIDA script. Edit template for functions or you can use the default template. Select functions you want to t

PandaOS 133 Dec 24, 2022