Git Product home page Git Product logo

polyglot's Introduction

PolyGlot, a fuzzing framework for language processors

A version that supports Aflplusplus and antlr grammar can be found here.

Build

We tested PolyGlot on Ubuntu 18.04.

  1. Get the source code: git clone https://github.com/s3team/Polyglot && cd Polyglot
  2. Install prerequisite: sudo apt install -y make python g++ bison flex clang-format clang
  3. Modify the Makefile to choose the language you want to test
  4. Build everything: make
  5. The fuzzer is in AFL_replate_mutate/afl-fuzz
  6. Use the afl-gcc/afl-g++/afl-clang/afl-clang++ in AFL_replace_mutate to compile the program you want to fuzz.

Config the semantic.json

Before we run the fuzzer, we need to set some values in semantic.json. Here are some important values that you should set:

  1. InitFileDir: This should be an absolute path of your init seed file dir. It can be the same as/different from your path of input.
  2. BuiltinObjFile: If you want to use the build-in functions/variables/class for semantic validation, set this path (not a single file). Refer to grammar/solidity_grammar/semantic.json for an example.

Run

To run the fuzzer, we just run it like normal afl-fuzz:

afl-fuzz -i path/to/inputs -o path/to/outputs -- prog [args @@]

You should collect your own seed inputs for the fuzzer.

Apply on a new language

To do

Video tutorial

asciicast

Publication

One Engine to Fuzz โ€˜em All: Generic Language Processor Testing with Semantic Validation

Yongheng Chen, Rui Zhong(co-first author), Hong Hu, Hangfan Zhang, Yupeng Yang, Dinghao Wu and Wenke Lee.
In Proceedings of the 41st IEEE Symposium on Security and Privacy (Oakland 2021).

Contact

Yongheng Chen: [email protected]

Rui Zhong: [email protected]

Hong Hu: [email protected]

Hangfan Zhang: [email protected]

Yupeng Yang: [email protected]

Dinghao Wu: [email protected]

Wenke Lee: [email protected]

polyglot's People

Contributors

changochen avatar s3team avatar yeaseen avatar zr950624 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.