Coder Social home page Coder Social logo

samsung / fluff Goto Github PK

View Code? Open in Web Editor NEW
53.0 4.0 13.0 90 KB

A tool designed to synthesise semantically correct JavaScript snippets given arbitrary data. Useful for fuzzing.

License: MIT License

Python 14.20% C++ 81.85% C 0.64% Makefile 0.53% Dockerfile 1.54% Shell 1.24%

fluff's Introduction

Fluff

A tool designed to synthesise semantically correct JavaScript snippets given arbitrary data.

Useful for fuzzing.

JS Runtimes supported out-of-the-box

Requirements

  • docker
  • make

Building

  • (optional) Check if you have access to docker (run docker info)
  • (optional) Specify desired version of JS runtime in Makefile.conf
  • Run make (jerryscript | njs | duktape | v8)
  • If everything builds correctly the process will result in:
    • build/fluff_* - binary to fuzz
    • build/fluff_*_dry - binary that will convert Fluff bytecode to JS testcase (stdout)
    • build/grammars
      • js_grammar.yaml - es5.1 grammar file
      • js_grammar_es6.yaml - es6 grammar file

Usage

Typical fuzzing setup:

  • Create input folder and sample testcase, i.e. mkdir in && echo "420" >> in/testcase
  • Start fuzzing using afl-fuzz, for example: afl-fuzz -m none -i in -o out ./fluff_njs @@ js_grammar.yaml
  • (optional) you can use build container to run fuzzing, requires some manual work
docker run -it -d -v path/to/fluff/repository/build:/home/build/fluff identifier /bin/bash
docker exec -it container_number bash
# afl-fuzz is preinstalled in /home/build/afl
  • Enjoy your cup of tea/coffee and wait for crashes

Description

Detailed information about the design of Fluff can be read in the whitepaper.

Contributing

Patches, additions and other contributions are welcome! If you see a feature which you could implement or a bug which you could fix please send us a message or a pull request. If you have found some interesting bug with this tool, please leave us a message/github issue for the future Hall Of Fame.

Contact

If you want to drop us a message, feel free to send a mail to [email protected] or [email protected].

fluff's People

Contributors

dominiakm avatar somang-park avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fluff's Issues

Maximal index that can be accessed is 256.

Since every integer that is treated as a number is an unsigned char, some of the functionality can't be accessed. This includes

  • too many builtin functions/variables (which for instance is a case at Spidermonkey).
  • inability to access array indices greater than 255.

Proposed solution: include special opcode with one argument (say n), which means that the argument for the next read value will be 256*n + m instead of regular m. For better illustration, look at EXTENDED_ARG opcode from Python 3.6 and above.

Setup CI

We should setup CI for this project, there are multiple available.

I think that a lot of OSS projects use travis-ci as they offer free service.

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.