Sea

Recon

nmap_scan.log|h-50%_styled

HTTP (80)

The website had an html form, but nothing worked. No callback was made to the server and XSS didn't have any effect in any fields.

Writeup.png

Directory enumeration was also unsuccessful.

Wonder CMS

http://sea.htb/themes/bike/README.mdarrow-up-right

Looks like the bike theme is a CMS!

And it's open source https://github.com/WonderCMS/wondercmsarrow-up-right

XSS -> RCE

This version of CMS is vulnerable to CVE-2023-41425arrow-up-right.

Note: After some sweat and blood I discovered that the exploit doesn't work and I blame box configuration, sometimes it made single request within ~10h 🥴. The exploit was already sitting in the themes directory ready to be triggered... (EVEN WHEN NEW BOX WAS SPAWNED)

Another note:

Writeup-4.png

Make sure that change URLs as box doesn't have access to the internet.

Writeup-1.png

Crack password

Not sure why there are \ in the hash, but hashcat and john didn't like that. Remove them and start cracking the hash.

There are only 2 users:

SSH (22)

Creds: amay:mychemicalromance

User.txt

Privilege Escalation

There seems to be internal applications:

By adding Authorizationarrow-up-right header and base64 version of auth (of amay), we are able to preview the page.

Port forward the port

HTTP (8080)

Writeup-2.png

Analyze log files allows us to read files, and path look hardcoded.

I didn't have Burp open and was lazy to turn it back on, so I just edited HTML to read desired file like /etc/shadow

Writeup-3.png

It looks like the app is literally searching for "suspicious", /etc/shadow has some suspicious characters so it doesn't show full file, but if we inject something into filename whole file becomes suspicious and shown fully:

I was not able to read /root/.ssh/id_rsa :/

Root.txt

Last updated