Giter Site home page Giter Site logo

Comments (4)

nulldatamap avatar nulldatamap commented on May 11, 2024 1

Turns out that the original problem I was trying to solve was caused by calling instrumented code outside Fuzzer.Run.

Sorry for wasting your time.

from sharpfuzz.

Metalnem avatar Metalnem commented on May 11, 2024

You should actually have two projects: one that you will instrument with sharpfuzz (class library where you would put the Repro function from your example), and the other one that will reference the instrumented assembly (console application that will run Fuzzer.Run function). The console app will be the target when running afl-fuzz.

from sharpfuzz.

nulldatamap avatar nulldatamap commented on May 11, 2024

Yes, for my project that's how I did it and ran into this crash.
While reducing this case I found that I get the same crash even when it's just one project.
So splitting it up (while more correct) still causes this crash for me.

from sharpfuzz.

Metalnem avatar Metalnem commented on May 11, 2024

Single project will always crash. Two projects is the only way that fuzzing will work. In your case, two projects probably crashed because of some other reason. One possible reason is that your initial case was starting with byte 97: if your initial test cases are crashing the program, fuzzer will stop (test cases must always run without exceptions).

I've created two separate projects to try to reproduce your bug. They are in the attached archive, and you can run them by extracting the archive and executing the following script:

cd Runner
dotnet build
sharpfuzz bin/Debug/netcoreapp2.2/Target.dll
afl-fuzz -i testcases/ -o findings dotnet bin/Debug/netcoreapp2.2/Runner.dll

And everything should work as expected.

One additional thing to keep in mind is that you should always consume the whole input stream (I know that this was just a toy example, but I just want to make sure that you are aware of that).

from sharpfuzz.

Related Issues (20)

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.