GithubHelp home page GithubHelp logo

Coverage Stats about libafl HOT 12 CLOSED

aflplusplus avatar aflplusplus commented on August 30, 2024
Coverage Stats

from libafl.

Comments (12)

domenukk avatar domenukk commented on August 30, 2024

What exactly do you want to track? How many bits are currently set in the coverage map?
For this, one easy way could be to wrap the MapFeedback with your own feedback that also keeps track of the current progress. Could this roughly be what you are looking for? In case it's unclear please don't hesitate to ask further questions. :)

from libafl.

bitterbit avatar bitterbit commented on August 30, 2024

one easy way could be to wrap the MapFeedback

I'll look into it sounds cool :)

I was actually thinking more about how to display the stats with all other stats in SimpleStats. I can wrap MapFeedback and make it emit a new event FeedbackEvent which the event manager will receive and update the Stats field. I guess displaying custom stats could be common case for fuzzers, maybe we could do a custom stats event that passes a KV to be printed?

Or I could just hack a loop with a sleep to ask MapFeedback how many edges it collected. What would you suggest be better?

from libafl.

domenukk avatar domenukk commented on August 30, 2024

Ah sorry, I get the question a bit better, now. :)
The plan is to allow custom events, however we had to comment them out at some point during refactoring. I think it should be asy to bring them back, see


With this, emitting your own events shoud be easy.

Thinking about it, it may also make sense to make the normal stats event take additional data, @andreafioraldi what do you think?

from libafl.

andreafioraldi avatar andreafioraldi commented on August 30, 2024

Yes is a thing that we planned, but not in our priority list ATM. If you want to implement it, don't use a CustomEvent, add a field to the Event enum as it is a common thing that users want to log.

from libafl.

andreafioraldi avatar andreafioraldi commented on August 30, 2024

Anyway, I plan a refactor of the Stats system as now we print cumulative stats of all the clients while it is interesting to have stats from each client (the coverage stats would fall in this case) and global stats

from libafl.

bitterbit avatar bitterbit commented on August 30, 2024

Cool i'll look into it and update if I come up with something useful
Thanks guys

from libafl.

bitterbit avatar bitterbit commented on August 30, 2024

Just made a PR #107, let me know what you think

from libafl.

andreafioraldi avatar andreafioraldi commented on August 30, 2024

Just made a PR #107, let me know what you think

Ty, probably I will use it as a base but I will not merge it, I want to change a bit Stats to allow arbitrary stats like this to be added easily.

from libafl.

bitterbit avatar bitterbit commented on August 30, 2024

Cool ✌️

from libafl.

andreafioraldi avatar andreafioraldi commented on August 30, 2024

Hey @bitterbit can you give a look to #114 and see it if cover your usecase?

Now there are custom stats events and can be sent in this way https://github.com/AFLplusplus/LibAFL/blob/new_stats/libafl/src/feedbacks/map.rs#L302

from libafl.

andreafioraldi avatar andreafioraldi commented on August 30, 2024

The interface is now this and prints each MapFeedback using the name

Screenshot at 2021-05-20 16-36-41

from libafl.

bitterbit avatar bitterbit commented on August 30, 2024

@andreafioraldi looks perfect! 💪

from libafl.

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.