evilsocket / legba

A multiprotocol credentials bruteforcer / password sprayer and enumerator. 🥷
Other
1.43k stars 83 forks source link

Enhancement request: multiple target mode #3

Closed kernelzeroday closed 11 months ago

kernelzeroday commented 11 months ago

As far as I can tell, only single target --target mode is supported, meaning I have to spawn new processes for new targets, which seems at odds with the async nature of the authentication checker. Multi protocol mode would be nice too, being able to for instance specify protocol:ip:port would be ideal.

Thank you!

evilsocket commented 11 months ago

hi! could you elaborate a bit more about the I have to spawn new processes for new targets, which seems at odds with the async nature of the authentication checker part? Personally I like the one target -> one process approach, especially because most likely different targets might require different arguments (different rate limits, jitters and whatnots).

evilsocket commented 11 months ago

@kernelzeroday ping

evilsocket commented 11 months ago

closed for inactivity

RegularDude10 commented 11 months ago

Would be great to bruteforce a service (SSH for instance) on a list of IPs. Hydra supports that with -M option.

evilsocket commented 11 months ago

@RegularDude10 I've always been a bit against that approach honestly ... what would be the difference between that and just running N instances of Legba against the target IPs?

RegularDude10 commented 11 months ago

I thought this could be done in a more optimized way then just running a loop of the tool, I am not a developer, maybe you are correct. Simple bash script that iterates IPs for legba wouldn't influence the performance significantly?

kernelzeroday commented 11 months ago

hi! could you elaborate a bit more about the I have to spawn new processes for new targets, which seems at odds with the async nature of the authentication checker part? Personally I like the one target -> one process approach, especially because most likely different targets might require different arguments (different rate limits, jitters and whatnots).

Opening a new process per target requires new file descriptors and user scripting, accepting a file input list of targets is standard practice for security tools, my use case is a pentest when i have dozens, hundreds, or thousands of IP and Protocol combinations i want to audit I need a way for the tool to leverage it's handling of async requests with my list of targets, and by asking the user to script this it creates a synchronous wrapper for an async tool, or asks the user to understand how to write an async handling of their input data.

I find your project fascinating and I hope you can understand I am looking at the Project Discovery team as a reference for how to handle this sort of thing. httpx, nuclei, katana, naabu all have this type of philosophy that the security tool should preform the work of interpreting any amount of input to it in order to utilize it's efficiency.

If this is out of scope totally get it, just a thought I had. Sorry it took me a few days to respond, not sure if closing this for inactivity in under a week is appropriate, but it is your project, and i am making the request, so I fully understand and respect your time and choices and appreciate what you have released with this tool.

Thank you kindly. Kelsey

evilsocket commented 11 months ago

I see your point, will try to find a compromise between simple design and the functionality you are suggesting, which makes sense.

Apologies for closing the issue so early, it is a practice I've started doing in the last few years since 99% of the times people open issues and just disappear when feedback is asked. So I early-close by default and reopen at need :)

kernelzeroday commented 11 months ago

Thank you very kindly! The effort that goes into security tools is the greatest service we can do in my opinion, and while this is a complicated ask it has a lot of potential positive gain.

Very much appreciated and when I have free time I will look for places to pitch in.

Cheers!

evilsocket commented 11 months ago

Done with 2fa538e1e1972257b7d16c5d53fd19458750e46a (mostly), 57060618c43be55a8143b1e3cae79210ce94d84e and f024462b35339423cc9b32b67104add08e668582

evilsocket commented 11 months ago

released as part of 0.4.0 https://github.com/evilsocket/legba/wiki/Usage-and-Main-Options#selecting-one-or-more-targets