You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SaGe is a browser fuzzer that can effectively explore browsers' semantics.
6
+
Welcome to SaGe Browser Fuzzer, a cutting-edge tool designed for the intricate exploration of web browser semantics 🚀.
7
+
8
+
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.
9
+
10
+
## System Requirements 📋
11
+
12
+
-**Operating System**: Linux (Ubuntu 20.04 LTS and 22.04 LTS highly recommended; other distributions may function but are less tested), MacOS (experimental support), Windows (limited testing).
13
+
-**Python**: Version 3.8 or newer.
14
+
-**Selenium**: Install via `pip3 install selenium==3.141.0` and `pip3 install urllib3==1.26.5`. Newer versions may also be compatible.
15
+
-**Xvfb**: Required for headless operation on Linux, install with `apt install xvfb`.
6
16
7
-
## Requirement
17
+
## Installation 🛠
8
18
9
-
- OS: Linux (recommended, well tested in Ubuntu 20.04 LTS and 22.04 LTS); MacOS (supposed to work but not well tested); Windows (not well tested)
10
-
- Python 3.8+
11
-
- Selenium (``pip3 install selenium==3.141.0`` and ``pip3 install urllib3==1.26.5``. The versions are well tested, but the latest versions should also work.)
12
-
- Xvfb (apt install xvfb)
19
+
Ensure all dependencies are met.
13
20
14
-
## Usage
21
+
Linux users benefit from an automatic dependency check and installation feature upon initiating SaGe Launcher.
15
22
16
-
Before running the tool, first set some environment variables to enable PCSG-guided fuzzing:
23
+
## Configuration and Usage 🖥
24
+
25
+
Set environment variables crucial for PCSG-guided fuzzing:
Utilize the `sage_launcher.sh` script for streamlined execution.
38
+
39
+
This script encompasses dependency checks, environmental setup, and execution controls in one command.
40
+
41
+
42
+
### Monitoring live with `sage_watcher.sh`
43
+
44
+
To monitor fuzzing in real-time, run `./sage_watcher.sh` after starting `sage_launcher.sh` in a second terminal tab/window.
45
+
46
+

47
+
48
+
#### Command-Line Options 🔍
49
+
50
+
-**Browser Selection**: Choose among `--firefox`, `--webkitgtk`, and `--chromium` for targeted fuzzing.
51
+
-**Fuzzer Choice**: Select a fuzzer through `--fuzzer` with options including `domato`, `minerva`, `freedom`, `sage`, `favocado`.
52
+
-**Clean Start**: Utilize `--kill-old` to terminate existing instances for a fresh testing environment.
53
+
-**Resource Management**: Activate the `--watchdog` for intelligent resource monitoring and management.
54
+
-**Session Timing**: Control the fuzzing duration with `--timerpurge`, specifying a numeric value for the session limit.
55
+
56
+
### Examples for Each Browser 🌍
48
57
49
-
For each kind of browser, we need to set environment variables to specify the path of the target browser and the path of the corresponding webdriver. What follows are the commands for fuzzing WebKit, Chrome, and Firefox:
58
+
#### Fuzzing WebKit
50
59
51
-
### Fuzzing WebKit
60
+
For users interested in WebKit, an example WebKit builder is located in the `browserbuilders` folder. Configure environment variables accordingly:
The included WebKitGTK Builder Setup script automates the setup process for building WebKitGTK for use with SaGe, and other dependencies.
92
+
93
+
It simplifies the process with dialog boxes for user input and displays progress in a clean and interactive manner.
94
+
95
+
96
+

97
+
98
+
### Features:
99
+
100
+
-**Interactive Dialogs**: Utilizes dialog boxes for inputs and displays like welcome message, WebKitGTK version input, and build options.
101
+
-**Dynamic Build Options**: Allows selecting various build options through a checklist dialog.
102
+
-**Package Installation**: Installs required packages automatically based on the build environment needs.
103
+
-**Dependency Management**: Clones and sets up necessary dependencies like libjxl and libbacktrace.
104
+
-**Swapfile Management**: Includes functionality to create and remove a swapfile to facilitate builds on systems with limited RAM.
105
+
-**Custom Build Commands**: Converts selected build options into commands for cmake and Ninja, facilitating a tailored build process.
106
+
107
+
### Usage:
108
+
109
+
1.**Start the Script**: Run the script with `./browser_builders/sage_getwebkit.sh.sh`.
110
+
2.**Follow Dialog Prompts**: Input the desired WebKitGTK version, select build options, and proceed through the setup as guided by the dialogs.
111
+
3.**Monitor Progress**: The script displays progress in dialog boxes for each step, including package installations and builds.
112
+
4.**Completion**: Upon successful completion, the environment will be set up with the selected configurations.
113
+
114
+
## Academic Contributions 🎓
115
+
116
+
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.
117
+
78
118
### Fuzzing other browsers
79
119
80
120
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``.
81
121
82
122
## Implementation/Configuration Details
83
-
- If you don’t want to use Xvfb, set ``export NO_XVFB=true`` before running ``main.py``.
123
+
- If you don’t want to use Xvfb, set ``export NO_XVFB=true`` before running ``go.sh``.
84
124
- During fuzzing, suppose we set p=2, this means that we create two (almost) separated browser instances, and each of them creates a new tab for handling one fuzzing input. If a browser crashes, the fuzzer will close it and create a new browser instance for testing.
85
125
- Browsers may crash because of long-term running. For stability, the fuzzer will close an instance with 1% probability. Users can use ``CLOSE_BROWSER_PROB`` to change this setting. For example, ``export CLOSE_BROWSER_PROB=0.05`` will set the probability to 5%.
86
126
@@ -103,6 +143,6 @@ The paper which describes the design detail of this browser fuzzer is accepted b
103
143
104
144
The artifact of this paper is available at [zenodo](https://doi.org/10.5281/zenodo.8328742), 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.
105
145
106
-
## Acknowledgement
146
+
## Acknowledgements 👏
107
147
108
-
We build the fuzzer on the top of [Domato](https://github.com/googleprojectzero/domato)for input generation.
148
+
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.
0 commit comments