Add MySQL remote access for Metasploitable3

This commit is contained in:
wchen-r7 2016-10-13 14:15:04 -05:00
parent c6adaaeefc
commit 9eef3f9b6b
3 changed files with 9 additions and 0 deletions

4
Vagrantfile vendored
View File

@ -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

View File

@ -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

View File

@ -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