Home

Awesome

SaGe Browser Fuzzer πŸŒπŸ’»

DOI

Welcome to SaGe, a browser fuzzer designed for the intricate exploration of web browser semantics πŸš€.

Developed with a focus on identifying and cataloging internal browser JS vulnerabilities, SaGe offers an automated, comprehensive suite of features for thorough browser testing via PCSG-guided fuzzing.

System Requirements πŸ“‹

Installation πŸ› 

Ensure all dependencies are met.

Linux users benefit from an automatic dependency check and installation feature upon initiating SaGe Launcher.

Configuration and Usage πŸ–₯

Set environment variables crucial for PCSG-guided fuzzing:

export COLLECT_TREE_INFO=true
export USE_INVALID_TREE=true
export PRINT_TIME=true
export INVALID_TREE_PATH="$SAGE_PATH/invalid_tree/invalid_tree.pickle"
export RULE_INFO_PATH="$SAGE_PATH/invalid_tree/global_info.pickle"

Executing SaGe with sage_launcher.sh

Utilize the sage_launcher.sh script for streamlined execution.

This script encompasses dependency checks, environmental setup, and execution controls in one command.

Monitoring live with sage_watcher.sh

To monitor fuzzing in real-time, run ./sage_watcher.sh after starting sage_launcher.sh in a second terminal tab/window.

sage_watcher.sh Demo Image

Command-Line Options πŸ”

Examples for Each Browser 🌍

Fuzzing WebKit

For users interested in WebKit, an example WebKit builder is located in the browserbuilders folder. Configure environment variables accordingly:

export WEBKIT_BINARY_PATH="$WEBKIT_PATH/MiniBrowser"
export WEBKIT_WEBDRIVER_PATH="$WEBKIT_PATH/WebKitWebDriver"
./sage_launcher.sh --webkitgtk 5

Fuzzing Chrome

Set up Chrome for fuzzing with the following environment variables and execute the script:

export CHROMIUM_PATH="$C_PATH/chrome"
export CHROMEDRIVER_PATH="$C_PATH/chromedriver"
./sage_launcher.sh --chromium 5

Fuzzing Firefox

Prepare Firefox for fuzzing by setting up its environment variables and start the process:

export FIREFOXDRIVER_PATH="$F_PATH/geckodriver"
export FIREFOX_PATH="$F_PATH/firefox"
./sage_launcher.sh --firefox 5

DEMO: WebKit Builder Setup πŸ› οΈ

The included WebKitGTK Builder Setup script automates the setup process for building WebKitGTK for use with SaGe, and other dependencies.

It simplifies the process with dialog boxes for user input and displays progress in a clean and interactive manner.

WebKitBuilder Demo Image

Features:

Usage:

  1. Start the Script: Run the script with ./browser_builders/sage_getwebkit.sh.sh.
  2. Follow Dialog Prompts: Input the desired WebKitGTK version, select build options, and proceed through the setup as guided by the dialogs.
  3. Monitor Progress: The script displays progress in dialog boxes for each step, including package installations and builds.
  4. Completion: Upon successful completion, the environment will be set up with the selected configurations.

Academic Contributions πŸŽ“

Our approach and the detailed workings of SaGe are described in a publication accepted by OOPSLA 2023. For enthusiasts and researchers, a Docker environment is available for replicating our experiments, ensuring a seamless experience in understanding the tool's capabilities.

Fuzzing other browsers

This tool can adapt to any other browsers that are based on the three browsers. Generally speaking, almost all browsers are built on the top of the above three browsers. If users want to test a browser other than the three, they need to implement a subclass of FuzzedBrowser in the browser_adapters directory, and register itself in the get_browser() function of browser_selenium.py.

Implementation/Configuration Details

Publication

The paper which describes the design detail of this browser fuzzer is accepted by OOPSLA 2023 (doi). BibTeX Citation is

@article{zhou2023towards,
  title={Towards Better Semantics Exploration for Browser Fuzzing},
  author={Zhou, Chijin and Zhang, Quan and Guo, Lihua and Wang, Mingzhe and Jiang, Yu and Liao, Qing and Wu, Zhiyong and Li, Shanshan and Gu, Bin},
  journal={Proceedings of the ACM on Programming Languages},
  volume={7},
  number={OOPSLA2},
  pages={604--631},
  year={2023},
  publisher={ACM New York, NY, USA}
}

The artifact of this paper is available at zenodo, which includes a docker environment for reproducing the experitmental results in the paper. The artifact passed the OOPSLA'23 Artifact Evaluation and earned all badges.

Acknowledgements πŸ‘

We extend our heartfelt gratitude to the Domato project, and Google for their foundational input generation techniques, which have significantly contributed to enhancing SaGe's fuzzing methodologies.