metasploitable3/Vagrantfile

45 lines
1.6 KiB
Plaintext
Raw Normal View History

2016-08-30 17:53:02 +02:00
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
2018-08-02 19:44:30 +02:00
config.vm.synced_folder '.', '/vagrant', disabled: true
config.vm.define "ub1404" do |ub1404|
2018-08-03 18:41:28 +02:00
ub1404.vm.box = "rapid7/metasploitable3-ub1404"
ub1404.vm.hostname = "metasploitable3-ub1404"
config.ssh.username = 'vagrant'
config.ssh.password = 'vagrant'
ub1404.vm.network "private_network", ip: '172.28.128.3'
ub1404.vm.provider "virtualbox" do |v|
2018-02-15 03:22:46 +01:00
v.name = "Metasploitable3-ub1404"
v.memory = 2048
end
end
config.vm.define "win2k8" do |win2k8|
# Base configuration for the VM and provisioner
2018-08-03 18:41:28 +02:00
win2k8.vm.box = "rapid7/metasploitable3-win2k8"
win2k8.vm.hostname = "metasploitable3-win2k8"
win2k8.vm.communicator = "winrm"
win2k8.winrm.retry_limit = 60
win2k8.winrm.retry_delay = 10
win2k8.vm.network "private_network", type: "dhcp"
# Configure Firewall to open up vulnerable services
case ENV['MS3_DIFFICULTY']
when 'easy'
2018-08-03 18:41:28 +02:00
win2k8.vm.provision :shell, inline: "C:\\vagrant\\startup\\disable_firewall.bat"
else
2018-08-03 18:41:28 +02:00
win2k8.vm.provision :shell, inline: "C:\\vagrant\\startup\\enable_firewall.bat"
win2k8.vm.provision :shell, inline: "C:\\vagrant\\startup\\configure_firewall.bat"
end
2017-04-07 21:33:30 +02:00
# Insecure share from the Linux machine
2018-08-03 18:41:28 +02:00
win2k8.vm.provision :shell, inline: "C:\\vagrant\\startup\\install_share_autorun.bat"
win2k8.vm.provision :shell, inline: "C:\\vagrant\\startup\\setup_linux_share.bat"
win2k8.vm.provision :shell, inline: "rm -rf C:\\vagrant\\startup" # Cleanup startup scripts
2016-10-28 23:04:22 +02:00
end
end