Closed pdelteil closed 2 years ago
@0xtavian, what do you think about adjusting number of instances to input?
I mean introducing needed_instances
so the scan still works though not using fleet full capacity - works for me.
I'm using this solution and will create a PR if this is a desired functionality.
Hey @easyrider, yea that’s not a bad idea. The way I originally thought I’d fix this issue is by creating a preflight check, which could be disabled by running —no-preflight
or something. The idea was to ssh into each instance and use interlace to echo the hostname into a random path on the remote instance and then download the hostname from all instances and use that as selected.conf. This idea would auto fix itself if you had some down instances or instances not responding etc. basically try to dynamically create a new selected.conf prior to the scan to ensure every instance is live. Somewhere during the preflight check I had planned to reduce total number of instances if it was greater than the total number of targets. Either way, your fix would provide a little more granular control over the size of the fleet. Go ahead and push a PR and we’ll see if we need to make some tweaks. Thanks!
maybe we can name the option —instances
or —fleet-size
or something.
@0xtavian, looks like my fix is much simpler and just fixes error when fleet is bigger than inputs - I hope the code is self explanatory.
Most naïve was to choose instances from the top to run jobs - I though about choosing random instances from the selected.conf
list but this was it's easier to reason about what's being used at the moment.
My other 2 other biggest concerns about Axiom on Azure are:
selected.conf
being not updated properly - showing deleted instances, adding my master VM beside just worker instances@easyrider just to circle back to this:
axiom-select
. You should be able to exclude any instance you wish. It doesn’t automatically update when you delete instances.
Ping us on discord to troubleshoot further https://github.com/pry0cc/axiom/wikithanks for the PR!
@0xtavian, no, problem - thanks for the great tool!
interlace
is the culprit here, have you considered other tools?@easyrider
—cache
option. This works for the core scripts scp,exec,scan etc. Interlace is pretty awesome, as well as heavily relied upon in our code. I don’t think we’ll be considering alternatives anytime soon (although I’m a fan of GNU parallel and Rush).
There's a border case when the amount of items in the input file are lower than the number of instances in a given fleet.
For example, we want to run a scan using all nuclei templates on 20 urls having a fleet with 40 machines. This situation will output the following error
cat: input: No such file or directory
because 20 instances are receiving empty input files.Desired behavior
Warning about the number of item on the input file being lower than the amount of instances on a fleet. It would be useful for the user to know that (in this case) 20 instances are still available due to the small input.