Shoppy

nice box tbh

Recon

nmap scan

directory scanning

  • I found few directories /admin & /login were intresting

  • /admin was redirecting to /login

subdomain scan

  • found mattermost

  • Adding mattermost.shoppy.htb in /etc/hosts

Initial FootHold

Web attack

  • Mattermost index page had login page, tried sqli, didnt' work.

  • Tried nosqli paylaod, worked!!

  • payload :

  • Read similar payloads from hacktricks

Admin access (shoppy.htb)

  • After getting admin, we can see a feature called search-users

  • i tried with same payload eariler, and it worked ( admin' || 'a'=='a )

  • the admin has wasn't crackable

  • password for josh was remembermethisway

Login josh on subdomain

User shell (jaeger)

Sh0ppyBest@pp!

Decompilng Binary

  • we can run password-manager as deploy

Decompiling the binary with ghidra

  • main function

  • it's checking the input with word Sample

  • if it's satisfied we can read creds.txt file

Priv Esc (jaeger -> deploy)

Root Shell

  • we had a docker image , searching docker on GTFObins, we get a payload.

  • Using that payload get us root shell

Last updated