KIRA: CTF Write-Up

Sarthak joshi
3 min readNov 19, 2020

--

Hey there ! Today I have another boot2root ctf challenge KIRA:CTF on vulnhub and this ctf virtual machine is created by Bassam Assiri. Here is the link below where you can download this machine:-https://www.vulnhub.com/entry/kira-ctf,594/

1.)Target Discovery

# netdiscover -i wlan0

So, we got the target ip which is 192.168.1.7

2.) Port Scanning and Service Detection

For this job I used NMAP.

# nmap -sT -p- -vv 192.168.1.7”

Here we have only open port 80 which is HTTP service.

3.) HTTP Enumeration

On the web, their are two buttons where one is to upload the picture on the server and another one is to choose the language for the server.

By clicking the language button I saw the possibility of Local File Inclusion (LFI) Vulnerability.

And yeh we have a LFI vulnerability on the server as you can see in the above image. We are able to view “/etc/passwd” file

Now its time for testing the file upload vulnerability.

I created a payload in php.php file as you can see in the image below. This payload will get a command from the “cmd” parameter.

Then in the burpsuite I changed the extension from “php.php” to “php.php.jpg” and the content-type header to image/jpeg.

And we successfully uploaded the payload. Now its time to check it. To trigger this payload I used LFI vulnerability.

And the payload is working, Now its time to get reverse shell from this payload.

4.) Capturing The Reverse Shell

After getting the reverse shell I saw a “supersecret-for-aziz” directory

In That directory credentials for user “bassam” is stored ,so I switched the user to “bassam” with the provided credentials.

And we got the user flag.

5.) Privilege Escalation

“$ sudo -l”

We can run “find” command as user root without any password.

And after exploit the sudo rights we got the root access.

Here is the root flag “flag.txt”.

Challenge Completed !! :D

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Sarthak joshi
Sarthak joshi

Written by Sarthak joshi

Penetration Tester, CTF player, Full time Learner and Part Time Blogger. Twitter :- https://twitter.com/Exploiter_21, Linked :- https://www.linkedin.com/in/sart

No responses yet

Write a response