Educated

Nmap Scan

$ nmap -sC -sV -p- --min-rate 10000 -Pn -oN nmap 192.168.155.13
Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-06-07 10:58 +08
Nmap scan report for 192.168.155.13
Host is up (0.0088s latency).
Not shown: 65533 closed tcp ports (conn-refused)
PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 8.2p1 Ubuntu 4ubuntu0.5 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   3072 98:4e:5d:e1:e6:97:29:6f:d9:e0:d4:82:a8:f6:4f:3f (RSA)
|   256 57:23:57:1f:fd:77:06:be:25:66:61:14:6d:ae:5e:98 (ECDSA)
|_  256 c7:9b:aa:d5:a6:33:35:91:34:1e:ef:cf:61:a8:30:1c (ED25519)
80/tcp open  http    Apache httpd 2.4.41 ((Ubuntu))
|_http-title: Wisdom Elementary School
|_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.14 seconds

Initial Access

Port 80

There is a website running on port 80.

Directory Enumeration

After some enumeration, we will notice that there is an installation guide on the website.

When we visit this installation guide, we can see that there are credentials and instruction on how to use the software.

However, none of these credential works. From the enumeration, there is also a database.sql file. Maybe those will contain the credentials that we need.

After looking inside the folder, we can se there are 2 admins

The passwords for these account look like hash. So we will checking using this

We can see the hash is a SHA-1 hash.

We will then try to crack the hash for those 2 users. However, the result only returned for admin@admin.com which is 1234

Free School Management Software Exploit

After some searching online, there is an exploit that might work with this

After playing around with the request, this is the request is able to send the paylaod over.

Next we will just visit the website to trigger the payload and get the reverse shell.

Lateral Movement

Password in SQL config

After some enumeration, there is a file that contains the database connection credentials

After which we will login as school to the database.

The user in the system might be a teacher. So we will enumerate that table first.

We can see that this user have a password which is most probably SHA-1 also. We can use john to crack the hash.

We can also see that there are 2 users in the home folder.

We can then login using SSH to get the shell and flag.

Privilege Escalation

APK on emiller's home folder

There is an apk on emiller's home folder.

First we will download to our own kali machine so that we can do analysis on it.

Next, we will use MobSF to conduct analysis on the APK to see if there is any information that is hidden inside

We will run the docker for it.

After running MobSF, it maybe contains the password.

We can try to use the password to see if we can login as emiller.

Sudo -l

When we use sudo, we can see that the user can run anything.

So we just need to sudo su - to change ourselves into root.

Last updated