Skip to content

Commit 6c52ea2

Browse files
committed
.
1 parent 3b60c9b commit 6c52ea2

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

_posts/2024-03-29-Pentathon-Kermit.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
layout: post
3-
title: Kermit Box Walkthrough
3+
title: /assets/img/Kermit Box Walkthrough
44
image: https://api.accredible.com/v1/frontend/credential_website_embed_image/certificate/82700692
55
comments: True
66
categories: [Pentesting, CTF]
77
tags: [pentesting, Red teaming, cybersecurity, offsec]
88

99
---
1010

11-
# Kermit
11+
# /assets/img/Kermit
1212

1313
# Pentathon 2024
1414

@@ -23,7 +23,7 @@ An Nmap scan was was conducted against the machine in question. Through this, it
2323

2424
→ On visiting the webpage, this page was found.
2525

26-
![Untitled](Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled.png)
26+
![Untitled](/assets/img//assets/img/Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled.png)
2727

2828
Submitting anything on this page, we get redirected to a `complaints.php page`.
2929

@@ -36,27 +36,27 @@ On visiting the first path, we are given a binary file named ‘app’. On rever
3636

3737
The original intent of the actual page was to give show Exif data for images but it was found that the `file uploading is not filtered` and any file can be uploaded to the server.
3838

39-
![Untitled](Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%201.png)
39+
![Untitled](/assets/img/Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%201.png)
4040

4141
`The uploaded files were also accessible at /uploads/filename`
4242

4343
So, we created a PHP web shell using pentest-monkey and uploaded the following to the server.
4444

45-
![Untitled](Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%202.png)
45+
![Untitled](/assets/img/Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%202.png)
4646

4747
Through this we were able to get the shell.
4848

49-
![Untitled](Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%203.png)
49+
![Untitled](/assets/img/Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%203.png)
5050

5151
We then locate the ‘app’ binary on the server.
5252

5353
Through our previous findings, we exploit the binary using a simple bufferoverflow and read the contents of the id_rsa through which we can ssh into the server.
5454

55-
![Untitled](Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%204.png)
55+
![Untitled](/assets/img/Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%204.png)
5656

5757
`Chmod 600` on the file and then run the command.
5858

59-
![Untitled](Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%205.png)
59+
![Untitled](/assets/img/Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%205.png)
6060

6161
We are then able to access the user flag.
6262

@@ -65,26 +65,26 @@ We are then able to access the user flag.
6565
**Now we have to escalate to root, I found that another webpage has been hosted on
6666
localhost:8000,**
6767

68-
![Untitled](/Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%206.png)
68+
![Untitled](//assets/img/Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%206.png)
6969

7070
but since it is hosted on localhost, we have to perform port forwarding to our machine.
7171

72-
![Untitled](Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%207.png)
72+
![Untitled](/assets/img/Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%207.png)
7373

7474
This means that any `request made on our local kali on port 8000` of localhost will be forwarded to our target machine
7575

7676
- Now I identified `cacti server` on the webpage and set it up via the web browser.
7777

78-
![Untitled](Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%208.png)
78+
![Untitled](/assets/img/Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%208.png)
7979

8080
A simple search revealed that it is vulnerable to several rce based on sqli, I used metasploit to exploit it further
8181

82-
![Untitled](Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%209.png)
82+
![Untitled](/assets/img/Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%209.png)
8383

8484
I have set the rhosts and rport as 127.0.0.1:8000 because it will get forwarded because of our ssh port forward
8585

8686
We also change the targeturi to / because that is where cacti is hosted.
8787

8888
Alll that was left is to run the exploit and `boom we got root shell.`
8989

90-
![Untitled](Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%2010.png)
90+
![Untitled](/assets/img/Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%2010.png)

0 commit comments

Comments
 (0)