-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathVagrantfile
66 lines (55 loc) · 2.08 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.synced_folder '.', '/vagrant', disabled: true
config.vm.define "ub1404" do |ub1404|
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.128.28.3"
ub1404.vm.provider "virtualbox" do |v|
v.name = "Metasploitable3-ub1404"
v.memory = 512
end
end
config.vm.define "win2k8" do |win2k8|
# Base configuration for the VM and provisioner
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", ip: "172.128.28.4"
win2k8.vm.provider "virtualbox" do |w|
w.name = "Metasploitable3-win2k8"
w.memory = 1024
end
# Configure Firewall to open up vulnerable services
case ENV['MS3_DIFFICULTY']
when 'easy'
win2k8.vm.provision :shell, inline: "C:\\startup\\disable_firewall.bat"
else
win2k8.vm.provision :shell, inline: "C:\\startup\\enable_firewall.bat"
win2k8.vm.provision :shell, inline: "C:\\startup\\configure_firewall.bat"
end
# Insecure share from the Linux machine
win2k8.vm.provision :shell, inline: "C:\\startup\\install_share_autorun.bat"
win2k8.vm.provision :shell, inline: "C:\\startup\\setup_linux_share.bat"
win2k8.vm.provision :shell, inline: "rm C:\\startup\\*" # Cleanup startup scripts
end
# Comment the kali Linux Setup if you are running this from a Kali Linux machine
config.vm.define "kali20201" do |kali|
kali.vm.box = "kalilinux/rolling"
kali.vm.hostname = "kali"
kali.vm.network "private_network", ip: "172.128.28.5"
kali.vm.provider "virtualbox" do |k|
k.name = "Kali20201"
k.memory = 2048
# k.gui = false
end
kali.vm.provision "shell", inline: <<-SHELL
apt-get update
SHELL
end
end