-
-
Notifications
You must be signed in to change notification settings - Fork 699
Adding scope_distance config for hunt module #2457
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
Conversation
The bug in this situation is that WEB_PARAMETER events are being raised for out of scope assets. This shouldn't be happening. |
This is not a bug, this has always been by design. They are all coming from in-scope assets, but where there are links for out of scope ones. I believe hunt is the only module ingesting them that is not in-scope-only - another intentional decision. But I can see the merit it making that behavior optional (and off by default) |
@Giardi77 I have also noticed this can be noisy, and think the default behavior should be changed. can you make the following changes, and then I will pull this in? Lets actually make the default setting 1 You have to have an options description if you add an option, reference another module to see how this is done. It won't pass the tests otherwise. |
I think the default should be 0. Results from hunt are already low confidence, being based only on the name of the parameter. It seems excessive to run it on out of scope stuff by default. |
No, you're right - I forgot how that setting worked. @Giardi77 0 is what we want. |
@Giardi77 in this case the scope distance modifier can be removed altogether. That will default it to 0, but allow it to scale with the user's |
sorry for the pytest_debug.log thing |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #2457 +/- ##
=====================================
- Coverage 93% 93% -0%
=====================================
Files 398 398
Lines 33078 33077 -1
=====================================
- Hits 30587 30567 -20
- Misses 2491 2510 +19 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No worries, thanks for your work on this! |
i think the idea was that you might want to adjust this separately: that was the original intent of the way it was before. You're basically getting them for "free" so why not, even if they aren't in scope (no additional requests are required - it won't actually make an out-of-scope request) But at this point, its probably not worth the extra complexity. |
Problem: The
hunt
module generates findings for out-of-scope targets (e.g., distance > 0) , even when the scan is intended for distance 0 targets due to the default scope_distance_modifier, causing it to generate a lot of noise like:Solution: Make
hunt
module'sscope_distance_modifier
configurable. This allows restrictinghunt
to operate only on distance 0 targets by settingscope_distance
in its configuration.ps: I don't know if this is the right way to approach the problem but this tool is amazing and i wanted to try and contribute with something little.