diff --git a/Vagrantfile b/Vagrantfile index df974fe..687c1b2 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -84,6 +84,10 @@ Vagrant.configure("2") do |config| config.vm.provision :shell, path: "scripts/installs/install_rails_service.bat" config.vm.provision :shell, inline: "rm C:\\tmp\\vagrant-shell.bat" # Hack for this bug: https://github.com/mitchellh/vagrant/issues/7614 + # Vulnerability - MySQL + config.vm.provision :shell, path: "scripts/installs/setup_mysql.bat" + config.vm.provision :shell, inline: "rm C:\\tmp\\vagrant-shell.bat" # Hack for this bug: https://github.com/mitchellh/vagrant/issues/7614 + # Configure Firewall to open up vulnerable services config.vm.provision :shell, path: "scripts/configs/configure_firewall.bat" config.vm.provision :shell, inline: "rm C:\\tmp\\vagrant-shell.bat" # Hack for this bug: https://github.com/mitchellh/vagrant/issues/7614 diff --git a/scripts/configs/configure_firewall.bat b/scripts/configs/configure_firewall.bat index 46b7e02..8a11596 100644 --- a/scripts/configs/configure_firewall.bat +++ b/scripts/configs/configure_firewall.bat @@ -8,3 +8,4 @@ netsh advfirewall firewall add rule name="Open Port 3389 for Remote Desktop" dir netsh advfirewall firewall add rule name="Open Port 8585 for Wordpress and phpMyAdmin" dir=in action=allow protocol=TCP localport=8585 netsh advfirewall firewall add rule name="Java 1.6 java.exe" dir=in action=allow program="C:\openjdk6\openjdk-1.6.0-unofficial-b27-windows-amd64\jre\bin\java.exe" enable=yes netsh advfirewall firewall add rule name="Open Port 3000 for Rails Server" dir=in action=allow protocol=TCP localport=3000 +netsh advfirewall firewall add rule name="Open Port 3306 for MySQL" dir=in action=allow protocol=TCP localport=3306 diff --git a/scripts/installs/setup_mysql.bat b/scripts/installs/setup_mysql.bat new file mode 100644 index 0000000..895c755 --- /dev/null +++ b/scripts/installs/setup_mysql.bat @@ -0,0 +1,4 @@ +copy C:\Vagrant\resources\mysql\my.ini C:\wamp\bin\mysql\mysql5.5.20 +cmd /c ""C:\wamp\bin\mysql\mysql5.5.20\bin\mysql.exe" -u root --password="" wordpress < "C:\Vagrant\resources\mysql\update_mysql_permissions.sql"" +net stop wampmysqld +net start wampmysqld