WhiteRabbit

Recon

nmap_scan.log

HTTP (80)

The application has no internal pages, just index.html

Writeup.png

Fuzzing

Dirbusting also shows no directories

Domain enumeration shows there's a subdomain called status

Uptime Kuma

Subdomain is protected with authentication

Writeup-1.png

uptime-kumaarrow-up-right: A fancy self-hosted monitoring tool

Vue.JS

Since the application is using Vue.js we can find more about application from it's source. Searching for /dashboard we find other paths used by router.

Most of the routes didn't work as intended because all of them want authenticated session.

/setup route worked, kinda. With burp suite it's possible to halt the redirection, make request, let go of halt and slip the registration request. This however didn't work as it has already been Initialized.

Writeup-2.png

Use feroxbuster for other routes too

Going back to the main domain they talk about using Kuma, which should mean that other announcements should be true.

Writeup-3.png

The frontend version is leaked from source:

Writeup-4.png

Frontend Authentication Bypass

It's also possible to bypass the frontend authentication if the ok value in Sockets.io is changed to True; However this is only frontend and not backend, so no real permissions are applied.

Writeup-5.png

CVE-2024-56331

Application versions: https://github.com/louislam/uptime-kuma/tagsarrow-up-right

Only 1.23.16arrow-up-right version after 1.23.13 has a CVE vulnerability fix: - GHSA-2qgm-m29m-cj2harrow-up-right [CVE-2024-56331arrow-up-right] Local File Inclusion (LFI) via Improper URL Handling in Real-Browser monitor.

CVE requires authenticated user, so it's no of use right now.

More fuzzing

Uploads returns 404, so we will need exact filename, LFI doesn't seem to work. /status returns /temp which could be useful.

Writeup-6.png

Wiki.JS

http://a668910b5514e.whiterabbit.htb/arrow-up-right

Writeup-7.png

GoPhish Webhook

There's talk about GoPhish Webhooks:

Writeup-8.png
Writeup-9.png

http://a668910b5514e.whiterabbit.htb/gophish/gophish_to_phishing_score_database.jsonarrow-up-right

Secret: 3CWVGMndgMvdVAzOjqBiTicmv7gxc6IS

SQLi

Since database is involved in the recipe we could try SQLi, ideally SQLMap.

I shouldn't have left SQLMap running blindly... The header was always wrong so there was no point in running it.

Since we were given the test request let's first try to generate the original hash.

Only compact hashed json is accepted.

The tamper function payload for the email, not the data we pass to it. Encode, send and wait.

Tables:

Table contents:

restic

Hmm.... It's password protected

SSH (2222)

Privilege Escalation (bob)

We can run restic as root, but looks like permissions are strongly contained within scope. We can backup a directory, but can't read it as bob when restoring the files.

restic has many other commands to use, but cat won't work since it only reads internal files (not backed up files). mount will be same as restore

But dump command is able to read files directly to stdout:

SSH (22) (morpheus)

User.txt

Privilege Escalation (neo)

We can't sudo without user's password.

There's something interesting in /opt

neo is another user on the machine, probably password is generated for him.

The output is always random 🤔

From database we know that this command was used to generate password for neo

https://dogbolt.org/?id=9a9dbdd8-f066-4cb3-96ee-2f2ee60efae3#BinaryNinja=140&Ghidra=182arrow-up-right

The password is generated based on time

Since we know the exact time the password was generated we can bruteforce our way in. The only factor to consider is microseconds, we know exact datetime but not microseconds. It's important because generated password includes them in seed value.

It's important to consider the timezone. Victim has UTC, but for example me I have EDT. If I generate passwords on my local timezone it will not work, hence timegm will use UTC to create proper timestamps.

Note: After some tweaking -t 1 was a must, 0.7 was too quick and script missed password few times.

Privilege Escalation (root)

Root.txt

Last updated