From the course: Kali Linux for Advanced Pen Testing and Ethical Hacking

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Exploiting network files

Exploiting network files

- [Instructor] Let's take a look at port 2049 on our Metasploitable host. Nmap -PS -sV -p2049 10.0.2.8 Okay, we have the NFS service running. Let's take a look at what exported mounts we have available on Metasploitable. Showmount -e 10.0.2.8. Okay, we have a root share we can use. If we haven't already done so let's create a key pair that we can use to connect to it, ssh-keygen. Okay, we have a new key pair stored in the SSH folder. Let's also create a folder that we can use to mount the Metasploitable share to. We'll mkdir/tmp/myroot, and let's remotely mount that through NFS, sudo mount -t nfs 10.0.2.8:/ and we'll mount that in tmp/myroot. Okay, that's mounted. We now want to append our public key to the list of authorized keys for access through SSH, and we have to do that as root. We'll make sure we've set a root password on our Kali system by sudo passwd and putting in a new password, and now we'll…

Contents