added kali and fixed path for securityonion

This commit is contained in:
2021-08-06 17:06:40 +02:00
parent 70f1922e80
commit ea58df86cc
2 changed files with 385 additions and 6 deletions

55
Vagrant/Vagrantfile vendored
View File

@@ -82,7 +82,6 @@ EOF
systemctl start default-gateway.service
SHELL
cfg.vm.provider "virtualbox" do |vb, override|
vb.gui = false
vb.name = "logger"
@@ -99,11 +98,11 @@ EOF
config.vm.define "dc" do |cfg|
cfg.vm.box = "detectionlab/win2016"
cfg.vm.hostname = "dc"
cfg.vm.boot_timeout = 600
cfg.vm.boot_timeout = 1200
cfg.winrm.transport = :plaintext
cfg.vm.communicator = "winrm"
cfg.winrm.basic_auth_only = true
cfg.winrm.timeout = 300
cfg.winrm.timeout = 1200
cfg.winrm.retry_limit = 20
cfg.vm.network :private_network, ip: "192.168.38.102", gateway: "192.168.38.1", dns: "8.8.8.8"
@@ -149,10 +148,10 @@ EOF
config.vm.define "wef" do |cfg|
cfg.vm.box = "detectionlab/win2016"
cfg.vm.hostname = "wef"
cfg.vm.boot_timeout = 600
cfg.vm.boot_timeout = 1200
cfg.vm.communicator = "winrm"
cfg.winrm.basic_auth_only = true
cfg.winrm.timeout = 300
cfg.winrm.timeout = 1200
cfg.winrm.retry_limit = 20
cfg.vm.network :private_network, ip: "192.168.38.103", gateway: "192.168.38.1", dns: "192.168.38.102"
@@ -236,6 +235,50 @@ EOF
end
end
config.vm.define "kali", autostart: false do |cfg|
cfg.vm.box = "kalilinux/rolling"
cfg.vm.hostname = "kali"
cfg.vm.network :private_network, ip: "192.168.38.20", gateway: "192.168.38.1", dns: "8.8.8.8"
cfg.vm.network :private_network, ip: "192.168.39.20", gateway: "192.168.39.1", dns: "8.8.8.8"
cfg.vm.provision "shell", run: "always", inline: <<-SHELL
route del default gw 10.0.2.2
route add default gw 192.168.38.2
SHELL
cfg.vm.provision "shell", inline: <<-SHELL
export DEBIAN_FRONTEND=noninteractive
cat <<-'EOF' >/opt/default-gateway.sh
#!/bin/bash
route del default gw 10.0.2.2
route add default gw 192.168.38.2
EOF
cat <<-'EOF' >/etc/systemd/system/default-gateway.service
[Unit]
After=network.service
Description=default-gateway
[Service]
Type=simple
ExecStart=/opt/default-gateway.sh
[Install]
WantedBy=multi-user.target
EOF
chmod 744 /opt/default-gateway.sh
chmod 664 /etc/systemd/system/default-gateway.service
systemctl daemon-reload
systemctl enable default-gateway.service
systemctl start default-gateway.service
SHELL
cfg.vm.provider "virtualbox" do |vb|
vb.name = "kali"
vb.gui = false
vb.cpus = 2
vb.memory = "4096"
end
end
config.vm.define "securityonion", autostart: false do |cfg|
cfg.vm.box = "ubuntu/trusty64"
cfg.vm.hostname = "securityonion"
@@ -260,7 +303,7 @@ EOF
apt-get -y install securityonion-all syslog-ng-core
apt-get -y autoremove
apt-get clean
sosetup -y -f /vagrant/sosetup.conf
sosetup -y -f /vagrant/resources/securityonion/sosetup.conf
ufw allow 443/tcp
SHELL
end