cyber-security-resources/build_your_own_lab/websploit/Vagrantfile

72 lines
2.4 KiB
Ruby
Raw Normal View History

2019-09-26 22:03:56 -04:00
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
#Box settings
2021-09-10 16:06:36 -04:00
config.vm.box = "kalilinux/rolling"
2019-09-26 22:03:56 -04:00
# Example for VirtualBox:
#
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = true
# Customize the amount of memory on the VM:
vb.memory = "4096"
vb.cpus = "4"
2019-09-26 22:26:04 -04:00
# config.vm.network "private_network", ip: "10.1.1.1"
2019-09-26 22:03:56 -04:00
end
# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL
2019-09-26 22:35:51 -04:00
sudo apt-get update
2019-09-26 22:03:56 -04:00
#installing Docker
2019-09-26 22:35:51 -04:00
sudo apt-get install -y docker.io
2019-09-26 22:03:56 -04:00
2019-09-26 22:16:42 -04:00
# setup containers
2019-09-26 22:35:51 -04:00
sudo docker run --name webgoat -d --restart unless-stopped -p 6661:8080 -t santosomar/webgoat
sudo docker run --name juice-shop --restart unless-stopped -d -p 6662:3000 santosomar/juice-shop
sudo docker run --name dvwa --restart unless-stopped -itd -p 6663:80 santosomar/dvwa
sudo docker run --name mutillidae_2 --restart unless-stopped -d -p 6664:80 santosomar/mutillidae_2
sudo docker run --name bwapp2 --restart unless-stopped -d -p 6665:80 santosomar/bwapp
sudo docker run --name dvna --restart unless-stopped -d -p 6666:9090 santosomar/dvna
sudo docker run --name hackazon -d --restart unless-stopped -p 6667:80 santosomar/hackazon
sudo docker run --name hackme-rtov -d --restart unless-stopped -p 9000:80 santosomar/hackme-rtov
2019-09-26 22:16:42 -04:00
# for bwapp - go to /install.php then user/pass is bee/bug
# not ready for prod:
# docker run --name vapp2 --restart unless-stopped -d -p 9090:80 santosomar/vuln_app
2019-09-26 22:03:56 -04:00
2019-09-26 22:16:42 -04:00
#setting up look and feel
2019-09-26 22:03:56 -04:00
cd /root/Pictures
wget https://h4cker.org/img/h4cker_wallpaper.png
gsettings set org.gnome.desktop.background picture-uri "file:///root/Pictures/h4cker_wallpaper.png"
#cloning H4cker github
2019-09-26 22:35:51 -04:00
sudo cd /root
sudo git clone https://github.com/The-Art-of-Hacking/h4cker.git
2019-09-26 22:03:56 -04:00
#getting test ssl script
2019-09-26 22:35:51 -04:00
sudo curl -L https://testssl.sh --output testssl.sh
sudo chmod +x testssl.sh
2019-09-26 22:03:56 -04:00
2019-09-26 22:16:42 -04:00
#Installing Jupyter Notebooks
2019-09-26 22:35:51 -04:00
sudo apt install -y jupyter-notebook
2019-09-26 22:16:42 -04:00
#Installing radamnsa
2019-09-26 22:35:51 -04:00
sudo cd /root
sudo git clone https://gitlab.com/akihe/radamsa.git && cd radamsa && make && sudo make install
2019-09-26 22:16:42 -04:00
clear
echo "All set! Have fun! - Ωr"
2019-09-26 22:03:56 -04:00
SHELL
end