Grandmaster rank emblem

Lvl 99

Level XP3,807/5,718

3807 of 5718
Grandmaster dreadnaught
Machine
Laboratory
OS
Linux
Difficulty
Easy
Steps
4
Added
23 Mar 2023

A GitLab file-read leads to a deserialization RCE; a SUID binary with a relative chmod call gives root via a PATH hijack.

0Reconnmap1FootholdGitLab vhost2Footholdcookie forge3Lateraldexter4Priv escdocker-security
1Recon2Foothold3Lateral4Priv escnmap1GitLab vhost2cookie forge3dexter4docker-security5

How it went

  1. 0
    nmap

    An nmap scan redirects to laboratory.htb over HTTPS.

  2. 1
    GitLab vhost

    Vhost fuzzing uncovers the git.laboratory.htb subdomain running GitLab.

  3. 2
    cookie forge

    A GitLab file-read flaw leaks the secret key; a forged signed cookie triggers a deserialization RCE as git inside a container.

  4. 3
    dexter

    The GitLab Rails console dumps and resets Dexter's account, yielding his SSH key for a login to the host and the user flag.

  5. 4
    docker-security

    A SUID docker-security binary calls chmod by relative path; a PATH hijack points it at a planted binary for root.