Code Monkey home page Code Monkey logo

brainflow-fuzz's Introduction

brainflow-fuzz

an attempt to fuzz stream write/read

Test cpp harness locally

  1. git clone https://github.com/brainflow-dev/brainflow.git

  2. mkdir build

  3. cd build

  4. cmake -DCMAKE_CXX_COMPILER=afl-clang-fast++ ..

  5. create Makefile & save

  6. Prepare harness.cpp

test_harness: harness.cpp
	afl-clang-fast++ -v harness.cpp $(INC) ./CMakeFiles/BoardController.dir/third_party/ant_neuro/eemagine/sdk/wrapper.cc.o -o harness  $(INCC) $(INCCC) -I../third_party/json/
  1. run afl-fuzz with default settings: AFL_AUTORESEUME=1 afl-fuzz -D -L0 -i samples/ -t 80 -o sync_dir -M fuzzer00 -- ./harness @@

Compile the test binary if compiled successfully

  1. make test_brain
  2. ./test test
##########################
###############TEST-CASE##

INCC = \
       $(shell find ../cpp_package/ -type d -name "inc" | sed s/^/-I/)
INCCC = \
       $(shell find ../src/ -type d -name "inc" | sed s/^/-I/)
INC = \
       $(shell find . -type f -name "*.cpp.o" | sed 's/^/ /')

test_brain: test.cpp
	afl-clang-fast++ -v test.cpp $(INC) ./CMakeFiles/BoardController.dir/third_party/ant_neuro/eemagine/sdk/wrapper.cc.o -o test  $(INCC) $(INCCC) -I../third_party/json/
#########################

Test files against python

  1. python -m pip install brainflow
  2. run brainflow.py <CRASHER_NAME> script with a sample
  3. some files are working on python library, some of them are crashing on cpp

Reproducing id:000016,sig:07,src:000010,time:28990834,execs:64400173,op:MOpt_havoc,rep:8 (576) file

  1. This file also crashes cpp one but in python it is acting little bit weird, i couldnt manage to find the right time to analyze it to find out the root cause yet. You have to test this file with full path of brainflow.py for ex: /home/user/brainflow.py id:000016,sig:07,src:000010,time:28990834,execs:64400173,op:MOpt_havoc,rep:8

screen-sc

brainflow-fuzz's People

Contributors

echel0nn avatar

Watchers

 avatar

brainflow-fuzz's Issues

an unwelcome request

May I ask for specific instructions on how to generate both the static and dynamic libraries for BrainFlow?

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.