1
1
---
2
2
layout : post
3
- title : Kermit Box Walkthrough
3
+ title : /assets/img/ Kermit Box Walkthrough
4
4
image : https://api.accredible.com/v1/frontend/credential_website_embed_image/certificate/82700692
5
5
comments : True
6
6
categories : [Pentesting, CTF]
7
7
tags : [pentesting, Red teaming, cybersecurity, offsec]
8
8
9
9
---
10
10
11
- # Kermit
11
+ # /assets/img/ Kermit
12
12
13
13
# Pentathon 2024
14
14
@@ -23,7 +23,7 @@ An Nmap scan was was conducted against the machine in question. Through this, it
23
23
24
24
→ On visiting the webpage, this page was found.
25
25
26
- ![ Untitled] ( Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled.png )
26
+ ![ Untitled] ( /assets/img//assets/img/ Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled.png)
27
27
28
28
Submitting anything on this page, we get redirected to a ` complaints.php page ` .
29
29
@@ -36,27 +36,27 @@ On visiting the first path, we are given a binary file named ‘app’. On rever
36
36
37
37
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.
38
38
39
- ![ Untitled] ( Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%201.png )
39
+ ![ Untitled] ( /assets/img/ Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%201.png)
40
40
41
41
` The uploaded files were also accessible at /uploads/filename `
42
42
43
43
So, we created a PHP web shell using pentest-monkey and uploaded the following to the server.
44
44
45
- ![ Untitled] ( Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%202.png )
45
+ ![ Untitled] ( /assets/img/ Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%202.png)
46
46
47
47
Through this we were able to get the shell.
48
48
49
- ![ Untitled] ( Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%203.png )
49
+ ![ Untitled] ( /assets/img/ Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%203.png)
50
50
51
51
We then locate the ‘app’ binary on the server.
52
52
53
53
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.
54
54
55
- ![ Untitled] ( Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%204.png )
55
+ ![ Untitled] ( /assets/img/ Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%204.png)
56
56
57
57
` Chmod 600 ` on the file and then run the command.
58
58
59
- ![ Untitled] ( Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%205.png )
59
+ ![ Untitled] ( /assets/img/ Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%205.png)
60
60
61
61
We are then able to access the user flag.
62
62
@@ -65,26 +65,26 @@ We are then able to access the user flag.
65
65
** Now we have to escalate to root, I found that another webpage has been hosted on
66
66
localhost:8000,**
67
67
68
- ![ Untitled] ( /Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%206.png )
68
+ ![ Untitled] ( //assets/img/ Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%206.png )
69
69
70
70
but since it is hosted on localhost, we have to perform port forwarding to our machine.
71
71
72
- ![ Untitled] ( Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%207.png )
72
+ ![ Untitled] ( /assets/img/ Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%207.png)
73
73
74
74
This means that any ` request made on our local kali on port 8000 ` of localhost will be forwarded to our target machine
75
75
76
76
- Now I identified ` cacti server ` on the webpage and set it up via the web browser.
77
77
78
- ![ Untitled] ( Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%208.png )
78
+ ![ Untitled] ( /assets/img/ Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%208.png)
79
79
80
80
A simple search revealed that it is vulnerable to several rce based on sqli, I used metasploit to exploit it further
81
81
82
- ![ Untitled] ( Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%209.png )
82
+ ![ Untitled] ( /assets/img/ Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%209.png)
83
83
84
84
I have set the rhosts and rport as 127.0.0.1:8000 because it will get forwarded because of our ssh port forward
85
85
86
86
We also change the targeturi to / because that is where cacti is hosted.
87
87
88
88
Alll that was left is to run the exploit and ` boom we got root shell. `
89
89
90
- ![ Untitled] ( Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%2010.png )
90
+ ![ Untitled] ( /assets/img/ Kermit%20dcd423d39b634bbaa8368d7f4126fd32/Untitled%2010.png)
0 commit comments