Grandmaster rank emblem

Lvl 99

Level XP3,807/5,718

3807 of 5718
Grandmaster dreadnaught
Machine
Academy
OS
Linux
Difficulty
Easy
Steps
6
Added
23 Mar 2023

A roleid tamper opens an admin panel; a leaked Laravel key gives RCE, then credential reuse and a sudo composer rule lead to root.

0Reconnmap1Footholdroleid parameter2FootholdLaravel RCE3Lateralcry0l1t34Lateral/var/log5Lateralmrb3n6Priv esccomposer
1Recon2Foothold3Lateral4Priv escnmap1roleid parameter2Laravel RCE3cry0l1t34/var/log5mrb3n6composer7

How it went

  1. 0
    nmap

    An nmap scan points to a web app that redirects to academy.htb.

  2. 1
    roleid parameter

    Registering a user and tampering with the roleid parameter unlocks the admin panel.

  3. 2
    Laravel RCE

    A dev-staging-01 subdomain leaks the Laravel APP_KEY, enabling a deserialization RCE as www-data.

  4. 3
    cry0l1t3

    Credentials recovered from the config and .env log us in over SSH as cry0l1t3 for the user flag.

  5. 4
    /var/log

    cry0l1t3's adm group grants read access to /var/log, where mrb3n's password turns up in command history.

  6. 5
    mrb3n

    su to mrb3n, who holds a sudo rule on composer.

  7. 6
    composer

    composer's sudo entry spawns a root shell.