diff --git a/README.md b/README.md index 4c910a46..0b3e4d1f 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Requirements: 1. Clone this repo and navigate to the main directory. 2. Build the base VM image by running `packer build --only= ./packer/templates/windows_2008_r2.json` where `` is your preferred virtualization platform. Currently `virtualbox-iso`, `qemu`, and `vmware-iso` providers are supported. This will take a while the first time you run it since it has to download the OS installation ISO. -3. After the base Vagrant box is created you need to add it to your Vagrant environment. This can be done with the command `vagrant box add packer/builds/windows_2008_r2_*_0.1.0.box --name=metasploitable3-win2k8`. +3. After the base Vagrant box is created you need to add it to your Vagrant environment. This can be done with the command `vagrant box add packer/builds/windows_2008_r2_*_0.1.0.box --name=rapid7/metasploitable3-win2k8`. 4. Use `vagrant plugin install vagrant-reload` to install the reload vagrant provisioner if you haven't already. 5. To start the VM, run the command `vagrant up win2k8`. This will start up the VM and run all of the installation and configuration scripts necessary to set everything up. This takes about 10 minutes. 6. Once this process completes, you can open up the VM within VirtualBox and login. The default credentials are: diff --git a/build.ps1 b/build.ps1 index f1808b08..8ac7c138 100755 --- a/build.ps1 +++ b/build.ps1 @@ -1,7 +1,7 @@ $ErrorActionPreference = "Stop" -$virtualBoxMinVersion = "5.1.10" -$packerMinVersion = "0.10.0" +$virtualBoxMinVersion = "6.1.0" +$packerMinVersion = "1.6.0" $vagrantMinVersion = "1.9.0" $vagrantreloadMinVersion = "0.0.1" $packer = "packer.exe" diff --git a/build.sh b/build.sh index f0e8a7b6..03f8974e 100755 --- a/build.sh +++ b/build.sh @@ -1,8 +1,8 @@ #!/bin/bash -min_vbox_ver="5.1.10" +min_vbox_ver="6.1.0" min_vagrant_ver="1.9.0" -min_packer_ver="0.10.0" +min_packer_ver="1.6.0" min_vagrantreload_ver="0.0.1" min_vagrantvmware_ver="0.0.1" min_vagrantparallels_ver="0.0.1" diff --git a/chef/cookbooks/metasploitable/recipes/phpmyadmin.rb b/chef/cookbooks/metasploitable/recipes/phpmyadmin.rb index f68c67de..35735b67 100644 --- a/chef/cookbooks/metasploitable/recipes/phpmyadmin.rb +++ b/chef/cookbooks/metasploitable/recipes/phpmyadmin.rb @@ -10,7 +10,8 @@ bash "download and extract phpmyadmin" do code <<-EOH - wget -c -t 3 -O /tmp/phpMyAdmin-3.5.8-all-languages.tar.gz https://files.phpmyadmin.net/phpMyAdmin/3.5.8/phpMyAdmin-3.5.8-all-languages.tar.gz + wget -c -t 3 --no-check-certificate -O /tmp/phpMyAdmin-3.5.8-all-languages.tar.gz https://files.phpmyadmin.net/phpMyAdmin/3.5.8/phpMyAdmin-3.5.8-all-languages.tar.gz + echo "a129d4f03901c047799f634b122734ab687b48975563c87adbf5dea679676e11 /tmp/phpMyAdmin-3.5.8-all-languages.tar.gz" | shasum -a 256 --check --status tar xvfz /tmp/phpMyAdmin-3.5.8-all-languages.tar.gz -C /var/www/html mv /var/www/html/phpMyAdmin-3.5.8-all-languages /var/www/html/phpmyadmin EOH diff --git a/packer/templates/aws/ubuntu_1404_ctf_2017.json b/packer/templates/aws/ubuntu_1404_ctf_2017.json index 8ea3adf5..0c464e68 100644 --- a/packer/templates/aws/ubuntu_1404_ctf_2017.json +++ b/packer/templates/aws/ubuntu_1404_ctf_2017.json @@ -50,7 +50,6 @@ ], "variables": { "iso_url": "http://old-releases.ubuntu.com/releases/14.04.1/ubuntu-14.04.1-server-amd64.iso", - "iso_checksum_type": "md5", "iso_checksum": "ca2531b8cd79ea5b778ede3a524779b9", "box_version": "0.1.18" } diff --git a/packer/templates/pro/ubuntu_1404_pro.json b/packer/templates/pro/ubuntu_1404_pro.json index e87ab2fd..ec238a3a 100644 --- a/packer/templates/pro/ubuntu_1404_pro.json +++ b/packer/templates/pro/ubuntu_1404_pro.json @@ -3,7 +3,6 @@ { "type": "vmware-iso", "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", "iso_checksum": "{{user `iso_checksum`}}", "headless": false, "http_directory" : "{{template_dir}}/../../http", @@ -25,7 +24,7 @@ "communicator": "ssh", "ssh_username": "vagrant", "ssh_password": "vagrant", - "ssh_wait_timeout": "2h", + "ssh_timeout": "2h", "shutdown_command": "echo 'packer' | sudo -S shutdown -P now", "guest_os_type": "Ubuntu_64", "tools_upload_flavor": "linux", @@ -41,7 +40,6 @@ { "type": "virtualbox-iso", "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", "iso_checksum": "{{user `iso_checksum`}}", "headless": false, "http_directory" : "{{template_dir}}/../../http", @@ -63,7 +61,7 @@ "communicator": "ssh", "ssh_username": "vagrant", "ssh_password": "vagrant", - "ssh_wait_timeout": "2h", + "ssh_timeout": "2h", "shutdown_command": "echo 'packer' | sudo -S shutdown -P now", "guest_os_type": "Ubuntu_64", "disk_size": 40000, @@ -104,7 +102,6 @@ ], "variables": { "iso_url": "http://old-releases.ubuntu.com/releases/14.04.1/ubuntu-14.04.1-server-amd64.iso", - "iso_checksum_type": "md5", "iso_checksum": "ca2531b8cd79ea5b778ede3a524779b9", "box_version": "0.1.0" } diff --git a/packer/templates/pro/windows_2008_r2_pro.json b/packer/templates/pro/windows_2008_r2_pro.json index e2402141..a4404102 100644 --- a/packer/templates/pro/windows_2008_r2_pro.json +++ b/packer/templates/pro/windows_2008_r2_pro.json @@ -3,14 +3,13 @@ { "type": "vmware-iso", "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", "iso_checksum": "{{user `iso_checksum`}}", "headless": false, "boot_wait": "10m", "communicator": "ssh", "ssh_username": "vagrant", "ssh_password": "vagrant", - "ssh_wait_timeout": "2h", + "ssh_timeout": "2h", "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", "guest_os_type": "winServer2008Standard-64", "tools_upload_flavor": "windows", @@ -47,14 +46,13 @@ { "type": "virtualbox-iso", "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", "iso_checksum": "{{user `iso_checksum`}}", "headless": false, "boot_wait": "10m", "communicator": "ssh", "ssh_username": "vagrant", "ssh_password": "vagrant", - "ssh_wait_timeout": "2h", + "ssh_timeout": "2h", "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", "guest_os_type": "Windows2008_64", "disk_size": 61440, @@ -138,7 +136,6 @@ ], "variables": { "iso_url": "http://download.microsoft.com/download/7/5/E/75EC4E54-5B02-42D6-8879-D8D3A25FBEF7/7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso", - "iso_checksum_type": "md5", "iso_checksum": "4263be2cf3c59177c45085c0a7bc6ca5", "autounattend": "{{template_dir}}/../../answer_files/2008_r2/Autounattend.xml", "scripts_dir": "{{template_dir}}/../../../scripts", diff --git a/packer/templates/ubuntu_1404.json b/packer/templates/ubuntu_1404.json index 3234be14..b6c995be 100644 --- a/packer/templates/ubuntu_1404.json +++ b/packer/templates/ubuntu_1404.json @@ -3,7 +3,6 @@ { "type": "parallels-iso", "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", "iso_checksum": "{{user `iso_checksum`}}", "http_directory" : "{{template_dir}}/../http", "http_port_min" : 9001, @@ -24,7 +23,7 @@ "communicator": "ssh", "ssh_username": "vagrant", "ssh_password": "vagrant", - "ssh_wait_timeout": "2h", + "ssh_timeout": "2h", "shutdown_command": "echo 'packer' | sudo -S shutdown -P now", "guest_os_type": "ubuntu", "disk_size": 40000, @@ -36,7 +35,6 @@ { "type": "vmware-iso", "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", "iso_checksum": "{{user `iso_checksum`}}", "headless": false, "http_directory" : "{{template_dir}}/../http", @@ -58,7 +56,7 @@ "communicator": "ssh", "ssh_username": "vagrant", "ssh_password": "vagrant", - "ssh_wait_timeout": "2h", + "ssh_timeout": "2h", "shutdown_command": "echo 'packer' | sudo -S shutdown -P now", "guest_os_type": "ubuntu-64", "tools_upload_flavor": "linux", @@ -74,7 +72,6 @@ { "type": "virtualbox-iso", "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", "iso_checksum": "{{user `iso_checksum`}}", "headless": false, "http_directory" : "{{template_dir}}/../http", @@ -96,7 +93,7 @@ "communicator": "ssh", "ssh_username": "vagrant", "ssh_password": "vagrant", - "ssh_wait_timeout": "2h", + "ssh_timeout": "2h", "shutdown_command": "echo 'packer' | sudo -S shutdown -P now", "guest_os_type": "Ubuntu_64", "disk_size": 40000, @@ -119,7 +116,6 @@ { "type": "qemu", "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", "iso_checksum": "{{user `iso_checksum`}}", "headless": false, "http_directory" : "{{template_dir}}/../http", @@ -142,7 +138,7 @@ "accelerator": "kvm", "ssh_username": "vagrant", "ssh_password": "vagrant", - "ssh_wait_timeout": "2h", + "ssh_timeout": "2h", "shutdown_command": "echo 'packer' | sudo -S shutdown -P now", "disk_size": 40000, "vm_name": "metasploitable3-ub1404", @@ -194,7 +190,6 @@ ], "variables": { "iso_url": "http://old-releases.ubuntu.com/releases/14.04.0/ubuntu-14.04-server-amd64.iso", - "iso_checksum_type": "sha256", "iso_checksum": "ababb88a492e08759fddcf4f05e5ccc58ec9d47fa37550d63931d0a5fa4f7388", "box_version": "0.1.12" } diff --git a/packer/templates/windows_2008_r2.json b/packer/templates/windows_2008_r2.json index 7a49cd43..f6d6bc2b 100644 --- a/packer/templates/windows_2008_r2.json +++ b/packer/templates/windows_2008_r2.json @@ -3,13 +3,12 @@ { "type": "parallels-iso", "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", "iso_checksum": "{{user `iso_checksum`}}", "boot_wait": "10m", "communicator": "ssh", "ssh_username": "vagrant", "ssh_password": "vagrant", - "ssh_wait_timeout": "2h", + "ssh_timeout": "2h", "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", "guest_os_type": "win-2008", "parallels_tools_flavor": "win", @@ -42,14 +41,13 @@ { "type": "vmware-iso", "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", "iso_checksum": "{{user `iso_checksum`}}", "headless": false, "boot_wait": "10m", "communicator": "ssh", "ssh_username": "vagrant", "ssh_password": "vagrant", - "ssh_wait_timeout": "2h", + "ssh_timeout": "2h", "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", "guest_os_type": "windows7srv-64", "disk_size": 61440, @@ -85,14 +83,13 @@ { "type": "virtualbox-iso", "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", "iso_checksum": "{{user `iso_checksum`}}", "headless": false, "boot_wait": "10m", "communicator": "ssh", "ssh_username": "vagrant", "ssh_password": "vagrant", - "ssh_wait_timeout": "2h", + "ssh_timeout": "2h", "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", "guest_os_type": "Windows2008_64", "disk_size": 61440, @@ -136,7 +133,6 @@ { "type": "qemu", "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", "iso_checksum": "{{user `iso_checksum`}}", "headless": false, "boot_wait": "10m", @@ -144,7 +140,7 @@ "accelerator": "kvm", "ssh_username": "vagrant", "ssh_password": "vagrant", - "ssh_wait_timeout": "2h", + "ssh_timeout": "2h", "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", "disk_size": 61440, "format": "qcow2", @@ -347,7 +343,6 @@ ], "variables": { "iso_url": "http://download.microsoft.com/download/7/5/E/75EC4E54-5B02-42D6-8879-D8D3A25FBEF7/7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso", - "iso_checksum_type": "md5", "iso_checksum": "4263be2cf3c59177c45085c0a7bc6ca5", "autounattend": "{{template_dir}}/../answer_files/2008_r2/Autounattend.xml", "scripts_dir": "{{template_dir}}/../../scripts", diff --git a/scripts/installs/install_manageengine.bat b/scripts/installs/install_manageengine.bat index b75fd817..2220e626 100644 --- a/scripts/installs/install_manageengine.bat +++ b/scripts/installs/install_manageengine.bat @@ -1,4 +1,4 @@ -powershell -Command "[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} ; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://archives.manageengine.com/desktop-central/91084/ManageEngine_DesktopCentral.exe', 'C:\Windows\Temp\ManageEngine_DesktopCentral.exe')"