CentOS VM

Import VM

  • Execute the following commands on the host machine:
$ vboxmanage import CentOS7.ova
$ vboxmanage startvm CentOS --type headless

Check VM's IP

  • Execute the following commands on the host machine:

It takes about one to two minutes since boot until the VM gets an IP with DHCP:

$ vboxmanage guestproperty enumerate CentOS | grep V4/IP

SSH Password-less Login to Other Hosts

  • Execute the following commands on the virtual machine:

You will need ssh passwordless login from the CentOS DNS server to all other host machines. This will save a lot time in the following setup. Also, you will need pssh to execute ssh command on multiple machines at once. It will be a lot easier to use pssh with ssh passwordless login.

# ssh-keygen
# ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
# ssh [email protected]

Metasploitable2 VM

Import VM

  • Execute the following commands on a host machine:
$ vboxmanage import Metasploitable2.ova
$ vboxmanage startvm Metasploitable2 --type headless

To get the IP of Metasploitable2, you could ssh -X to the host machine and run virtualbox. Or nmap the network and find new HTTP servers. It would be better to setup static IP after login.

Test Website

  • Execute the following commands on any machine:
$ curl http://192.168.10.88

And you will get:

<html><head><title>Metasploitable2 - Linux</title></head><body>
<pre>

                _                  _       _ _        _     _      ____
 _ __ ___   ___| |_ __ _ ___ _ __ | | ___ (_) |_ __ _| |__ | | ___|___ \
| '_ ` _ \ / _ \ __/ _` / __| '_ \| |/ _ \| | __/ _` | '_ \| |/ _ \ __) |
| | | | | |  __/ || (_| \__ \ |_) | | (_) | | || (_| | |_) | |  __// __/
|_| |_| |_|\___|\__\__,_|___/ .__/|_|\___/|_|\__\__,_|_.__/|_|\___|_____|
                            |_|


Warning: Never expose this VM to an untrusted network!

Contact: msfdev[at]metasploit.com

Login with msfadmin/msfadmin to get started


</pre>
<ul>
<li><a href="/twiki/">TWiki</a></li>
<li><a href="/phpMyAdmin/">phpMyAdmin</a></li>
<li><a href="/mutillidae/">Mutillidae</a></li>
<li><a href="/dvwa/">DVWA</a></li>
<li><a href="/dav/">WebDAV</a></li>
</ul>
</body>
</html>

results matching ""

    No results matching ""