Skip to content

Conversation

Selora
Copy link
Contributor

@Selora Selora commented Apr 9, 2018

#133 Rebased and cleaned.

PR Breakdown:

  • Bash scripts wrappers around autosploit. Could be use to test against a whitelist of your organisation's IP addresses.
  • Vagrantfile skeleton and provisioning file (used with lightsail provider). Environment dependant, use as a starting point.
  • Removed fuzzers from default modules JSON file. The fuzzer modules would block the script's execution forever. They are moved into a new json file. They can be run using the interactive terminal or specifying the JSON explicitly with --exploit-file-to-use
  • Bugfixes for PR Autosploit automation #132 . Fail/Success counters fix.
  • Improvements: Meterperter now starts in background, which allows an operator to run msfconsole into the corresponding workspace and interact with the new session while Autosploit is still finishing the remaining exploits in background.

Bash script usage:

./dryrun_autosploit.sh whitelist.txt "search_query"
Will search censys/shodan/etc and do a dry-run against discovered hosts that are in the whitelist.
This will generate a report containing the dry-run results for every hosts in the whitelist.
This does NOT exploit anything.

./run_autosploit.sh
Will run autosploit in exploit mode against previously discovered hosts in the whitelist.
This will generate a report with MSF results for every hosts in the whitelist.

Important:

  • You should do a dry-run before running "run_autosploit.sh".
  • Make sure that the whitelist is sound with a given scope, and validate against the dry-run report.
  • In other words, VALIDATE THE DRYRUN REPORT BEFORE LAUNCHING THE EXPLOIT RUN.

The code to compare each hosts against a whitelist hasn't been thoroughly tested. If you don't validate a dryrun report and run the "run_autosploit.sh" script, and you hit hosts that are outside your given scope, you have been warned. Run at your own risks.

selora added 4 commits April 9, 2018 17:35
./dryrun_autosploit.sh will search censys/shodan/etc and do a dry-run against discovered hosts that are in the whitelist.
VALIDATE THE DRYRUN REPORT BEFORE LAUNCHING THE ACTUAL EXPLOIT RUN
./run_autosploit.sh will run autosploit in exploit mode against previously discovered hosts in the whitelist.
Added a fuzzers-only json file.
In the same idea, Trans2open exploits are taking about 2h+ per host to run.
Maybe implement a "long run" feature in the next release?
COMES WITHOUT WARRANTY. Use as a starting point.
Tweaks to make it usable for dev:
	- Setup a synced folder with your autosploit dev in the Vagrantfile
		Refer to vagrant doc.
	- Use vagrant rsync-auto

Since vagrant file cannot really be shared as-is, some tweakings might be necessary.
Try:
-Modifying the Vagrantfile according to your ssh keys path
-Installing the aws-cli pacakge
-Configuring ~/.aws directory
Successful exploits will start meterpreter in background.
Fixed counter for successful exploits/failed exploits bug, counting success/failure occurence, not line outputs.
Success/failures now grepping escaped MSF output for success/failures.
Grepping for keywords such as "Meterpreter", "Session" for success.
@Selora Selora changed the title Dev beta (clean) PR #133 cleaned - Autosploit Automation Apr 9, 2018
Copy link
Owner

@NullArray NullArray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good to me, if @Ekultek agrees as well we can go ahead and merge as far as i am concerned.

@NullArray NullArray requested a review from Ekultek April 9, 2018 22:26
@Ekultek
Copy link
Contributor

Ekultek commented Apr 9, 2018

Love it

@Ekultek
Copy link
Contributor

Ekultek commented Apr 10, 2018

Merging

@Ekultek Ekultek merged commit 4506271 into NullArray:dev-beta Apr 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants