Cat
Recon
HTTP (80)
The website is about some contest about Cats. Register for website from /join.php

For some reason the credentials are passed via GET params and not POST data.

Fuzzing
I tried tempering with upload form but nothing, run a recon in background.
Git Dump
Git exists so dump it
There's SQL injection in accept_cat.php, if we are user axel

There seems to be second injection if we can manipulate username in such a way to create injection, but it's only accessible to axel again.

contest.php:
File Upload Bypass (fail)
We are able to bypass the upload restrictions and slip in PHP, but no idea where it is.

Following location is too random because of uniqid
From the future: The bypass fooled the php functions, but it's still uploaded as JPG. Also to access the file you need to URL Encode the percentage.

With actual null byte it didn't work.

XSS
Exfiltrate cookies via username:
There was no callback from box so after many tries and box restart I got callback... classic HTB
I think any session id works, using last 1 we are able to login as admin

SQLi
Going back to the first discovered vulnerability
Note: Make sure to use correct PHPSESSID and remove proxy if you don't want to debug
Dump database

Creds:
rosa:soyunaprincesarosa
SSH (rosa)
There's SMTP server running and 3000 seems to be serving Gitea
Privilege Escalation (axel)
As adm group we are allowed to read /var/log files, and since auth happens with GET params check access.log for requests.
Creds:
axel:aNdZwgC4tI9gnVXv_e3Q
User.txt
Privilege Escalation (axel)
Port forward Gitea
axel user is able to login

axel doesn't have anything, we can't auth as rosa and we don't know credentials for administrator.
Run linpeas in background:
I don't think it's CVE, but there was SMTP server.
Hmm... Send mail, trigger XSS, get cookies?
We have CSRF with user jobert:
Note: For some reason in email
127.0.0.1didn't work, but localhost did....
EXFILTRATE_PAGE = 'http://localhost:3000/administrator/Employee-management/ returns

To catch all the requests and log them use ncat with -k
Note:
teemay not work correctly.... Terminal better..... (It's quick and dirty!)
EXFILTRATE_PAGE = 'http://localhost:3000/administrator/Employee-management/raw/branch/main/index.php
Root.txt
Last updated