epi052 / feroxbuster

A fast, simple, recursive content discovery tool written in Rust.
https://epi052.github.io/feroxbuster/
MIT License
5.85k stars 496 forks source link

[BUG] Scan exits before all jobs are finished. #1030

Closed devx00 closed 7 months ago

devx00 commented 10 months ago

Describe the bug Feroxbuster will exit early despite some jobs still being in process. It appears to happen when the remaining jobs were all added manually through the in-scan management menu.

To Reproduce Steps to reproduce the behavior:

  1. Start a scan
  2. When the remaining jobs are around 50% complete pause the scan and enter the scan management menu.
  3. Add a few (3 in my reproductions case) paths/urls to scan via the scan management menu in quick succession.
  4. When the manually added jobs are the only remaining jobs, the scan exits without completing them.

Expected behavior The scan should have finished all jobs.

Environment (please complete the following information):

Update

Additional Info:

epi052 commented 10 months ago

i ran a few tests and can't repro the issue. Are you able to consistently trigger this bug?

devx00 commented 10 months ago

i ran a few tests and can't repro the issue. Are you able to consistently trigger this bug?

Ya I can consistently reproduce it with very specific steps. My original repro steps weren't enough to reproduce it though. I think the issue may only arise under some specific circumstances.

I'll edit my repro steps to include the specific steps I took but I am not even sure the steps alone are enough to reproduce it. For all I know the response of the specific target may be involved as well since so far I have only reproduced it with the exact scan parameters and actions as when I initially experienced the bug.

epi052 commented 10 months ago

Nice! If the responses matter, and you're able to, capture them and strip out any sensitive info. We can mock up a server with them

epi052 commented 10 months ago

i may have stumbled across this today and fixed it. I'll link the PR for testing once it's up.

epi052 commented 10 months ago

give this branch a try with your configs and see if we caught it

https://github.com/epi052/feroxbuster/pull/1035

the fix is in event_handlers/outputs.rs

epi052 commented 10 months ago

if this doesn't fix what you're seeing, we should probably audit event handlers for cases where a ? is causing the handler's thread to exit prematurely.

epi052 commented 10 months ago

@devx00 just checking back to see if you had a chance to try this

devx00 commented 10 months ago

@devx00 just checking back to see if you had a chance to try this

Oh man somehow I missed all those other comments. I have not had a chance to test it. I might have some time in a little bit to pull the branch and test it against the same target it was using before. Hopefully I described it well enough for me to repro it following my own instructions.

epi052 commented 10 months ago

@devx00 it's no problem at all. that branch was merged, you can just give it a shot from main. thank you (also, no hurry)!

epi052 commented 7 months ago

closing this one as fixed. if that's not the case, feel free to reopen

epi052 commented 7 months ago

@all-contributors add @devx00 for bugs

allcontributors[bot] commented 7 months ago

@epi052

@devx00 already contributed before to bug

epi052 commented 7 months ago

thought so, good bot