-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix progress with patterns and backup discovery #548
base: dev
Are you sure you want to change the base?
Conversation
This is done by re-arranging the code from exiting on channel close to using the contexts and the results counters to signal the end of work processing. A little more work is needed to prevent infinite loops caused by devious services/misconfiguration and to expose to the cli the ability to have patterns run on successful finds. Fixes OJ#298
Nice thanks already! One thing I noticed is that we should close all channels when we are done sending on them |
Hmm, is that necessary here? By the time we would |
ok, so as long as no one is waiting for a close, it should be ok then |
Yes, all the producers and consumers are terminated by contexts now and verified with wait groups and request counts. I think this also fixes a few minor issues that have already been closed, like #541 |
Awesome, so just put the PR from draft to normal once you are ready so I can have a test. Thanks so far! |
From the Go spec: > If one or more of the communications can proceed, a single one that > can proceed is chosen via a uniform pseudo-random selection. Previously, this meant that some indeterminate amount of work could have been completed after the context's cancel function had been called.
Successful guesses from the wordlist or a pattern will have discovery patterns generated based on them and successful discovery guesses will not. Further processing should require human curation to avoid automatically generating an unbounded amount of traffic. Also fixes reading the wordlist from standard in by making it more like reading from a file now that we have dynamic progress updates.
dec1725
to
1b87b3a
Compare
This should be good to test. I think the changes in here will help with adding machine readable results and a pause/state file, though I'll leave those to the future. I think we could also make our string manipulation more efficient, but that's also another PR. |
Hi all, this resolves the issues where patterns were not counted towards possible attempts, file extension searching was not applied to patterns in
GobusterDir
, and backups were being brute-forced for the entire wordlist. These all had pretty tangled fixes so I lumped them into this PR.Note the 33 total attempts for:
Since it's in this wheelhouse, I'm open to also changing the pattern generation and wordlist behavior to either have a flag for the exclusion of the bare words from the wordlist that's either on or off by default or even make patterns always supersede the wordlist and make users add a plain{GOBUSTER}
pattern if they want the original word in addition to the patterns. I'm not sure which would be the most useful, though.Looking through the old issues, it seems that (1) filtering the whole wordlist through the patterns and (2) applying the discovery patterns exactly once would be the most consistent behavior.
Fixes #298, #405, #480, #533, #319, #364
There are still a couple of things to do before this is ready, but I wanted to get this open for some eyes: