Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (32 sloc) 1.99 KB
$install = <<SCRIPT
# This should install the tools that are found in a normal Kali Linux installation with default configuration and still keep the manual changes made in the box. Non-interactive command help from: http://www.microhowto.info/howto/perform_an_unattended_installation_of_a_debian_package.html by Graham Shaw 2010-2016
export DEBIAN_FRONTEND=noninteractive # This sets the frontend to non-interactive mode
apt-get update -q # This updates the repository list
apt-get install -q -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" kali-linux-full # This installs the kali-linux-full metapackage and keeps manually modified configuration but non-modified configuration is updated, if needed
SCRIPT
Vagrant.configure("2") do |config|
config.vm.define "kali" do |kali_conf|
kali_conf.vm.box = "tonijaaskelainen/kali" # This is a Kali Linux Light 2017.2 64-bit base box with PostgreSQL and Metasploit Framework
kali_conf.vm.provider "virtualbox" do |vb|
vb.name = "Kali-Linux-Light-2017.2-amd64"
#vb.gui = true
#vb.customize ["modifyvm", :id, "--FLAG", "VALUE"]
end
kali_conf.vm.base_mac = "080027D7153E"
#kali_conf.vm.network "private_network", ip: "192.168.56.102" # This did not work
kali_conf.ssh.username = "root"
kali_conf.ssh.password = "toor"
kali_conf.vm.provision "shell", inline: $install # You can comment this out if you do not want to install normal Kali Linux tools
end
config.vm.define "ms2" do |ms2_conf|
ms2_conf.vm.box = "tonijaaskelainen/ms2" # This is Metasploitable 2 with VirtualBox 5.1.30 Guest Additions and passwordless sudo and root
ms2_conf.vm.provider "virtualbox" do |vb|
vb.name = "Metasploitable-2"
#vb.customize ["modifyvm", :id, "--FLAG", "VALUE"]
end
ms2_conf.vm.base_mac = "080027362690"
ms2_conf.vm.network "private_network", ip: "192.168.56.101" # This is a Host-only network
ms2_conf.ssh.username = "msfadmin"
ms2_conf.ssh.password = "msfadmin"
end
end