evocatio
Science Score: 65.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 6 DOI reference(s) in README -
○Academic publication links
-
○Academic email domains
-
✓Institutional organization owner
Organization hexhive has institutional domain (hexhive.epfl.ch) -
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.1%) to scientific vocabulary
Keywords
Repository
Basic Info
Statistics
- Stars: 57
- Watchers: 11
- Forks: 7
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
Evocatio
Overview
Evocatio is a bug analyzer built on top of AFL++ and AddressSanitizer. It automatically discovers a bug’s capabilities: analyzing a crashing test case (i.e., an input exposing a bug) to understand the full extent of how an attacker can exploit a bug. Evocatio leverages a capability-guided fuzzer to efficiently uncover new bug capabilities (rather than only generating a single crashing test case for a given bug, as a traditional greybox fuzzer does).
In this repo, we present 5 function module of Evocatio:
- POC Minimization: to get a poc with smaller size like afl-tmin.
- Critical Bytes Inference: to infer which bytes of poc are critical, so as to mutate them first.
- CapFuzz: to explore new capabilities of a bug. In this module, each new poc found by CapFuzz represents a new capability.
- Bug Capability Scaning: to summurize all capabilities found by CapFuzz.
- Severity Score: to calculate severity score of the bug from bug capabilities.
You can use these modules either sequentially or seperately.
We also present CapSan based on AddressSanitizer to detect bug capabilities.
More details about the project can be found at the paper. Our presentation about Evocatio can be found at the slide.
Components
This repository is structured as follows:
- bug-severity-AFLplusplus (POC Minimization, Critical Bytes Inference, CapFuzz, CapSan)
- scripts (Bug Capability Scaning, SeverityScore)
We developed bug-severity-AFLplusplus based on AFLplusplus. What's more, our CapSan was developed by leveraging the convenience of __asan_* public interface provided by AddressSanitizer.
Dependencies
For scripts
Need Python 3.x. (Just Python's standard library is enough.)
For bug-severity-AFLplusplus
Generally, requirement of bug-severity-AFLplusplus is just same as AFLplusplus.
However, you should pay more attention to the availability of asan_interface.h. AddressSanitizer is implemented by your compiler suite (such as gcc and clang), which works by instrumenting during the compilation phase and linking its run-time library into the final binary. `_asan` public interface* is provided by its run-time library and declared in asan_interface.h. So make sure that your compiler suite provides this header.
Building
The two python scripts in ./scripts is out-of-the-box. Just build bug-severity-AFLplusplus like what is needed for afl++:
bash
cd ./bug-severity-AFLplusplus
make source-only NO_SPLICING=1
:warning: Warning:
Ensure that
NO_SPLICING=1is always used there.Never use
ASAN_BUILD=1. Otherwise our bug-severity run-time dependency may confuse your compiler and linker, as well as AddressSanitizer.Since afl++ 3.0 there is only one compiler afl-cc works for instrumenting your target, all previous compilers now symlink to it. We have hacked it so that our bug-severity run-time dependency can be linked into the target binary. If afl-cc couldn't be built and work properly, then all is over.
Usage Example
For a quick start with Evocatio, you can follow these steps to start from scratch:
Download Evocatio into your system. Install dependencies and build Evocatio.
Get your target program and POC.
Compile and instrument your target program with AddressSanitizer enabled just as same as when using afl++.
:warning: Ensure that AddressSanitizer is applied for your target. It is strongly recommended that set the environment variable AFL_USE_ASAN=1 to tell afl-cc do everything for you. Manually using compiler flag -fsanitize=address as the doc says is also an alternative.
Evocatio Function Module :one: : POC Minimization
bash ./bug-severity-AFLplusplus/afl-tmin-lazy -m none -i /path/to/original/poc -o /path/to/minimized/poc -- /path/to/target/program @@"@@" is a placeholder like in AFL++. If there are any commands surrounding "@@", keep them.
Evocatio Function Module :two: : Critical Bytes Inference
bash mkdir <your_path>/seeds ./bug-severity-AFLplusplus/cd-bytes-identifier -m none -i /path/to/poc -o /tmp/foo -g -c /tmp/constraints.res -k <your_path>/seeds -- /path/to/target/program @@The output will be in
<your_path>/seeds/. If you'd like to use another fuzzer later, you may use seeds in<your_path>/seeds/as your fuzzer's original seeds.Evocatio Function Module :three: : CapFuzz
Start CapFuzz:
bash ./bug-severity-AFLplusplus/afl-fuzz -m none -C -i /path/to/input/seeds/ -o /path/to/output/ -k /path/to/original/poc -- /path/to/target/program @@Evocatio Function Module :four: : Bug Capability Scaning
Scan capabilities of poc:
bash python3 ./scripts/gen_raw_data_for_cve.py -i /path/to/new/crashes -o /path/to/bug/capability/json -b /path/to/target/program -a /path/to/commmands/file-i argument receives path to new pocs found by CapFuzz;
-o argument determines the output path of bug capability json file;
-b argument receives path to the target program(binary);
-a argument receives path to commands file(which means you should write commands surrounding "@@" to a file first).Evocatio Function Module :five: : Severity Score
bash python3 ./scripts/calculate_severity_score.py -i /path/to/bug/capability/jsonThis will calulate bug severity score from bug capability json file. The severity score consists of reading score and writing score.
For detailed example, please refer to README in each subdirectory.
Development
Evocatio provides users with a flexible framework that allows developers to flexibly adjust CapSan, CapFuzz and scoring system according to their own needs. For everyone who wants to contribute (and send pull requests), please read our contributing guidelines before you submit.
Contact
Questions? Concerns? Feel free to ping me via E-mail for general questions and academic discussion.
For recent update and new features implementation: - CapSan related issue/usage/feature: ping Sonic via E-mail - Next generation of Evocatio: ping Zhao via E-mail - Installation, environment or other Evocatio questions: ping Mao via E-mail.
Cite
If you use Evocatio in scientific work, consider citing our paper presented at ACM CCS.
BibTeX
```bibtex @inproceedings{10.1145/3548606.3560575, author = {Jiang, Zhiyuan and Gan, Shuitao and Herrera, Adrian and Toffalini, Flavio and Romerio, Lucio and Tang, Chaojing and Egele, Manuel and Zhang, Chao and Payer, Mathias}, title = {Evocatio: Conjuring Bug Capabilities from a Single PoC}, year = {2022}, isbn = {9781450394505}, publisher = {Association for Computing Machinery}, address = {New York, NY, USA}, url = {https://doi.org/10.1145/3548606.3560575}, doi = {10.1145/3548606.3560575}, booktitle = {Proceedings of the 2022 ACM SIGSAC Conference on Computer and Communications Security}, pages = {1599–1613}, numpages = {15}, keywords = {bug triaging, fuzzing, bug capability}, location = {Los Angeles, CA, USA}, series = {CCS '22} } ```Owner
- Name: HexHive
- Login: HexHive
- Kind: organization
- Location: Switzerland
- Website: https://hexhive.epfl.ch
- Twitter: gannimo
- Repositories: 74
- Profile: https://github.com/HexHive
Enforcing memory safety guarantees and type safety guarantees at the compiler and runtime level
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - given-names: "ZhiYuan" family-names: "Jiang" - given-names: "Shuitao" family-names: "Gan" - given-names: "Lucio" family-names: "Romerio" title: "Evocatio" version: 1.0.0 type: software date-released: 2022-11-18 url: "https://github.com/HexHive/Evocatio" keywords: - security - exploit - fuzzing - program-analysis - sanitizer - severity - patch-testing - bug-capability license: Apache-2.0
GitHub Events
Total
- Watch event: 3
Last Year
- Watch event: 3
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 1
- Total pull requests: 4
- Average time to close issues: about 4 hours
- Average time to close pull requests: 14 days
- Total issue authors: 1
- Total pull request authors: 3
- Average comments per issue: 1.0
- Average comments per pull request: 2.25
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- SonicStark (1)
Pull Request Authors
- SonicStark (2)
- HotSpurzzZ (1)
- Adam-W-Zhao (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- ubuntu 20.04 build
- fridadotre/manylinux-x86_64 latest build
- tsc 2.0.3 development
- @types/node ^14.14.2 development
- tslint ^6.1.3 development
- typescript ^4.0.3 development
- typescript-tslint-plugin ^0.5.5 development
- @types/frida-gum ^16.2.0