pWnOS 1.0 Boot2Root VM Walkthrough
Vulnerabilities:
- Arbitrary File Disclosure
- Privilege Escalation
- Weak Credentials
Penetrating Methodologies:
- Network Scanning (Nmap)
- Exploiting web application (Metasploit)
- Extracting arbitrary file
- 1st Method
- SSH Brute-force
- Spawning TTY shell (Via SSH RSA key)
- Kernel Privilege Escalation
- 2nd Method
- Cracking password hashes (John the ripper)
- Spawning TTY shell (via SSH login)
- Kernel Privilege Escalation
Start with the netdiscover command to identify target IP in the local network, in my network 192.168.1.105 is my target IP, you will get yours.
Further, let’s enumerate open and protocols information in the target’s network with help of nmap following command:
So I check related its exploit inside Metasploit and luckily found it can be exploited by nasty people to disclose potentially sensitive information. So with help of the following command, we execute this exploit to extract /etc/passwd file from inside the victim’s VM.
1st Method to Exploit
To do so we downloaded a tar file with help of the following command.Move into extract folder and execute following for Grabbing a valid combination of a key.
Let’s login into SSH using above enumerated credential
So we found C-program file for exploit 5092 inside kali, let’s transfer it into Victim’s machine.
Inside victim’s shell, we run following to download kernel exploit in his VM and compile it then Got root access on executing
2nd Method
As you have seen that with the help of Metasploit exploit we successfully fetched information of /etc/shadow file. So with the help of John, we can crack the hash password of shadow file.Author: Aarti Singh