From a0ade0718f5b6b17beec57d5db567f7f369cbf1e Mon Sep 17 00:00:00 2001 From: Kevin Johnson Date: Sat, 28 Sep 2019 07:52:18 -0400 Subject: [PATCH] Fixed AmokSecurity set up Added the informaiton for amoksecurity.wtf to the build. --- Vagrantfile | 49 +------------------ install/targets.yml | 1 + .../amoksecurity/amoksecurity-tasks.yml | 28 +++++++++++ .../targets/mutillidae/mutillidae-tasks.yml | 2 +- 4 files changed, 31 insertions(+), 49 deletions(-) create mode 100644 install/targets/amoksecurity/amoksecurity-tasks.yml diff --git a/Vagrantfile b/Vagrantfile index e456028..231a14a 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -16,7 +16,7 @@ Vagrant.configure("2") do |config| samuraiwtf.vm.provider "virtualbox" do |vb| # Display the VirtualBox GUI when booting the machine vb.gui = true - vb.name = "SamuraiWTF-4.2.0" + vb.name = "SamuraiWTF-4.2-next" # Customize the amount of memory on the VM: vb.memory = "4096" vb.customize ["modifyvm", :id, "--vram", "128"] @@ -39,51 +39,4 @@ Vagrant.configure("2") do |config| end end - -#Additional build options. Sepearate virtual machines -#attack machine -# config.vm.define "userenv", autostart: false do |userenv| -# userenv.vm.host_name = "samuraiwtf" - -# userenv.vm.provider "virtualbox" do |vb| -# # Display the VirtualBox GUI when booting the machine -# vb.gui = true -# vb.name = "SamuraiWTF User Environment" -# # Customize the amount of memory on the VM: -# vb.memory = "2048" -# vb.customize ["modifyvm", :id, "--vram", "16"] -# end - -# userenv.vm.provision :shell, path: "install/shared_before.sh" -# userenv.vm.provision :shell, path: "install/userenv_bootstrap.sh" -# end - -# #target server -# config.vm.define "target", autostart: false do |target| -# target.vm.host_name = "samuraitargets" -# #for debugging mainly -# target.vm.network "private_network", ip: "192.168.42.42" -# target.vm.hostname = "samurai-wtf" -# #config.hostsupdater.aliases = ["juice-shop.wtf","dojo-basic.wtf"] - -# target.vm.provider "virtualbox" do |vb| -# vb.name = "Samurai Target Server" -# vb.memory = "2048" -# end - -# target.vm.provision :shell, path: "install/shared_before.sh" -# target.vm.provision :shell, path: "install/target_bootstrap.sh" -# end - - # forwarded port mapping - # currently none - - # Private network - # currently none - - - - # Provider-specific configuration - - end diff --git a/install/targets.yml b/install/targets.yml index af65563..626f52e 100644 --- a/install/targets.yml +++ b/install/targets.yml @@ -79,6 +79,7 @@ - import_tasks: targets/mutillidae/mutillidae-tasks.yml - import_tasks: targets/samurai-dojo/samurai-dojo-tasks.yml - import_tasks: targets/musashi/musashi-task.yml + - import_tasks: targets/amoksecurity/amoksecurity-tasks.yml handlers: diff --git a/install/targets/amoksecurity/amoksecurity-tasks.yml b/install/targets/amoksecurity/amoksecurity-tasks.yml new file mode 100644 index 0000000..61afc77 --- /dev/null +++ b/install/targets/amoksecurity/amoksecurity-tasks.yml @@ -0,0 +1,28 @@ + +- name: Setup hosts file entries + lineinfile: + dest: /etc/hosts + line: '127.0.0.1 amoksecurity.wtf' + +- name: Create webroot for amoksecurity.wtf + file: + path: /var/www/amoksecurity + state: directory + owner: samurai + group: samurai + become: yes + +- name: Setup nginx reverse-proxy config for amoksecurity + copy: + dest: /etc/nginx/conf.d/amoksecurity.conf + content: | + server { + listen 80; + server_name amoksecurity.wtf; + location / { + root /var/www/amoksecurity; + } + } + mode: 0744 + notify: + - restart nginx \ No newline at end of file diff --git a/install/targets/mutillidae/mutillidae-tasks.yml b/install/targets/mutillidae/mutillidae-tasks.yml index 3634565..6992877 100644 --- a/install/targets/mutillidae/mutillidae-tasks.yml +++ b/install/targets/mutillidae/mutillidae-tasks.yml @@ -4,7 +4,7 @@ state: started enabled: yes -- name: Install Mutilldae docker container +- name: Install Mutillidae docker container docker_container: name: mutillidae image: bit0pus/docker-mutillidae