Funbox 2: Rookie
Easy, boot2root, Real life like
Last updated
Was this helpful?
Easy, boot2root, Real life like
Last updated
Was this helpful?
There are 3 steps to get the root shell.
Enumeration: nmap scan reveals service info
Exploitation: password cracking and ssh
Privilege Escalation: MySQL history file
Now let's talk about the details of process.
1) First, I need the IP, so I am trying net discover.
I have got the IP: 10.0.2.34
2) Now trying nmap to scan all the open ports:
and the result is:
3) For better enumeration, now I'm trying to scan only those 3 port:
Now I have the version and OS details
4) Web page shows the default Apache page
5) Nikto scan reveals nothing but robots.txt
6) Nothing interesting in robots.txt
7) As there is nothing interesting in web, let's try ftp. And I have found that anonymous ftp login is allowed. then tried to see all the files
8) Can not wait to download these interesting files.
9) .@users reveal some info:
and it says:
Hi Users, be careful with your keys. Find them in %yourname%.zip. The passwords are the old ones. Regards root
10) Those .zip files are password protected. I have tried to unzip and failed.
11) let's try fcrackzip to get zip password and read.
I have failed and it shows nothing.
12) Now trying johnTheRipper to get password. But I need to create hash of files.
After creating hash, I am able to run brute force attack.
13) I have used rockyou.txt as wordlist.
I have succeeded to get the password.
14) Let's unzip a file now. Trying to unzip (unzip tom.zip) and got id_rsa, which contains ssh key.
15) Now change the permission of id_rsa
16) Login using this private key
and I have failed to log in. Because, private key permission should be only for root.
17) Now changing the private key permission (chmod 600 id_rsa) and then trying to ssh again. This time I have succeeded.
19) Importing python bash shell solves the problem.
20) I have got .mysql_history and trying to read it
21) The history file reveals some info but in a formatted way like this
show\040databases;
quit
create\040database\040'support';
create\040database\040support;
so I have removed the space and make it understandable
It reveals password!
22) The root password is: xx11yy22!
Now I can login as root
after changing directory (cd /root) I can now read the root flag.
18) After login, I have tried some commands and found that rbash is running. In this you will find some useful way to bypass bash restriction.