Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added a vagrant config to easily deploy autosploit to aws-lightsail.
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
  • Loading branch information
selora committed Apr 9, 2018
commit 99c208f3f2ae8cd72e96965b1aa4171d6586b105
28 changes: 28 additions & 0 deletions Vagrant/Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Use as a strating point to spin up a box in lightsail.
Copy link
Contributor

Choose a reason for hiding this comment

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

Need a Vagrant run in the README, set that up real quick

Copy link
Contributor Author

@Selora Selora Apr 9, 2018

Choose a reason for hiding this comment

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

Can I leave this to you? I'm just putting this as-is, I do not intend to make it useful nor to explain my setup.
That's what I used as a dev environment, I'm just putting this in case somebody would be interested.

Copy link
Contributor

Choose a reason for hiding this comment

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

I have no idea how vagrant works, so we'll just add an issue about it I guess

# the vagrant-lightsail plugin is required
# You probably also need to:
# - Configure the ssh keys path
# - Install and configure the aws-cli package

Vagrant.configure('2') do |config|
config.vm.synced_folder ".", "/vagrant", type: "rsync",
rsync__exclude: ".git/",
rsync__auto: true

config.ssh.private_key_path = '/path/to/id_rsa'
config.ssh.username = 'ubuntu'
config.vm.box = 'lightsail'
config.vm.box_url = 'https://github.com/thejandroman/vagrant-lightsail/raw/master/box/lightsail.box'
config.vm.hostname = 'autosploit-launcher'

config.vm.provider :lightsail do |provider, override|
provider.port_info = [{ from_port: 0, to_port: 65535, protocol:
'all' }]
provider.keypair_name = 'id_rsa'
provider.bundle_id = 'small_1_0'
end

config.vm.provision "bootstrap", type: "shell", run: "once" do |s|
s.path = "./bootstrap/bootstrap.sh"
end
end
20 changes: 20 additions & 0 deletions Vagrant/bootstrap/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash


echo "Yolosploit configurator 2.42"
sudo apt-get --yes update
sudo apt-get --yes upgrade

echo "Installing metasploit. BE PATIENT (5 min max?)"
wget --quiet https://downloads.metasploit.com/data/releases/metasploit-latest-linux-x64-installer.run
chmod +x metasploit-latest-linux-x64-installer.run
sudo ./metasploit-latest-linux-x64-installer.run --unattendedmodeui none --prefix /opt/msf --mode unattended

echo "Installing pyhton2"
sudo apt-get --yes install python python-pip python-virtualenv git

sudo apt-get --yes install fish
sudo chsh -s /usr/bin/fish ubuntu

cd ~
git clone https://github.com/NullArray/AutoSploit