Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about code structure #58

Open
AshrafIbrahim03 opened this issue Jan 2, 2025 · 1 comment
Open

Question about code structure #58

AshrafIbrahim03 opened this issue Jan 2, 2025 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@AshrafIbrahim03
Copy link

I'm trying to build a dummy HTTP fuzzer for practice using libafl. I'm particularly stuck where I want to create a feedback that takes in some status codes and its is_interesting function is simply seeing if any HTTP status codes run into are in the set the HTTPFeedback has. I've been looking through this repo's code trying to find the point at which there is communication between the harness and the observer. I found the EndpointCoverageClient in src/coverage_clients and found the IndexMap between the status code, path, method and the coverage type. I'm still confused about where the particular coverage type of the EndpointCoverageClient gets mutated.

Specifically, how does the information that isn't the ExitKind get passed from inside the harness to something outside the harness? I understand fundamentally how the different parts work, it's just very confusing how that data actually leaves the harness.

@ThomasTNO ThomasTNO added the question Further information is requested label Jan 6, 2025
@grebnetiew
Copy link
Contributor

In our case, we do use the ExitKind to indicate success or failure of the target (normally interpreting 5xx status codes as crashes, as well as deviations of responses from the spec).

The observers in our case are coverage observers (MultiMapObserver in fuzzer.rs), and their coverage maps are (unsafely) shared with the coverage clients. The coverage clients are instructed by the harness when an input test begins and ends, and can thus make sure the coverage map reflects the coverage of an input when the harness finishes running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants