Zipper

Nmap Scan

$ nmap -sC -sV -p- --min-rate 10000 -Pn -oN nmap 192.168.235.229                                                                                                    
Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-06-19 04:19 EDT
Nmap scan report for 192.168.235.229
Host is up (0.0064s latency).
Not shown: 65533 closed tcp ports (conn-refused)
PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 8.2p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   3072 c1:99:4b:95:22:25:ed:0f:85:20:d3:63:b4:48:bb:cf (RSA)
|   256 0f:44:8b:ad:ad:95:b8:22:6a:f0:36:ac:19:d0:0e:f3 (ECDSA)
|_  256 32:e1:2a:6c:cc:7c:e6:3e:23:f4:80:8d:33:ce:9b:3a (ED25519)
80/tcp open  http    Apache httpd 2.4.41 ((Ubuntu))
|_http-title: Zipper
|_http-server-header: Apache/2.4.41 (Ubuntu)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 12.71 seconds

Initial Access

Port 80

We can see there is a website that is running on port 80.

However, there is nothing interesting for uploading the files.

But, the url changes to this when we decide to click on Home.

PHP Wrapper - Local File Inclusion

The URL just now looks to be vulnerable to PHP Wrapper. So we will try that first. This is the URL that we will access.

We should see this.

Since it is in base64, we will decode it.

It will return us this:

Basically, it will take the argument from the URL and append it with .php, else it will just return home.php .

After searching online, there is a way to unzip the content of the zip and execute the php file.

However, there are some modification to this as we do not need to compress it to a zip file. We just need the path to the zip file that was created when we upload the php file.

The payload that we will be using is this:

Next, we will upload the php file using the web application.

Lastly, we just need to visit this link to trigger the reverse shell

Privilege Escalation

Upgrading shell

Upgrading Shells

Linpeas Result

After running linpeas.sh, we can see there is a backup.sh that is run by root.

When we take a look at what it does, it shows this.

7zip Wildcard File Read

We will go to that working folder and see what files there are in that folder.

We can see that the they have already set it up for us so we just need to read the log to get the content of /root/secret

All we need to do now, is to su to root.

Last updated