Intentions
Recon
HTTP (80)

Backend seems to be PHP, probably Laravel.

News is empty, Gallery/Your Feed shows just images and profile let's us update Favorite Genres

SQLi
SQLMap came empty handed 🤔
The genres doesn't allow any spaces, and we could probably deduct that there's a function being used here. Reason for failure might be syntax related.
FIND_IN_SET(str, strlist) seems like the target, because it accepts search array as concatenated string with commas.
Select has 5 columns
Get databases
Get tables from current database
Get columns from users
We have 2 potential users: steve and greg. Passwords dont seem to be crackable :/
API
In the gallary the Vue has few routes hardcoded as part of it's compiled source. Feroxbuster didn't find any Javascript about admin, but that could be bad request.

/js/admin.js exists

Sources shows JS formatter nicely, we can copy, save and grep for common pattern.
When we do normal user login we are making call to v1 API, changing it to v2 says we need to provide hash

If we try steve we get success login.

Admin Panel
steve is admin so we can access /admin

We can edit the files with different kind of effects.

For some reason SSRF works (???)

ImageMagick
ImageMagick: The hidden vulnerability behind your online images > CVE-2022-44268: Arbitrary Remote LeakCVE-2022-44268 PoC
The CVE didn't work, but it led me to the correct version of ImageMagick used on the server.
Going back to the odd URL quirk -> PHP ImageMagick get image from http -> https://usage.imagemagick.org/files/#read
The image generator supports different modes and one of them is http[s]

Surveillance had (somewhat) the same vulnerability of Exploiting Arbitrary Object Instantiations in PHP without Custom Classes
“https://” goes to PHP, but “https:/” goes to curl
Abusing RCE #2: VID Scheme we can get webshell on the server. The path is disclosed from web application when editing the images and we can use that in msl payload. I used the PoC straight from blog without too much edit.

Note: Above
<?xmlthere's a space in the blob payload so mind that, burp will highlight good payload.
Reverse Shell (www-data)
Get environment file for application
Get users
SSH
User.txt
Privilege Escalation
The application finds hashes inside the given files and we can read root's ssh key by bruteforcing it
Root.txt
Last updated