Grandmaster rank emblem

Lvl 99

Level XP3,807/5,718

3807 of 5718
Grandmaster dreadnaught
Machine
Format
OS
Linux
Difficulty
Medium
Steps
5
Added
30 Sep 2023

A template file-write and a Redis HTTP-splitting trick give a Pro account and a shell; a Redis dump reaches Cooper, and a sudo license tool leaks the root password.

0Reconnmap1Footholdedit template2FootholdRedis splitting3FootholdPHP shell4Lateralcooper5Priv escsudo license
1Recon2Foothold3Lateral4Priv escnmap1edit template2Redis splitting3PHP shell4cooper5sudo license6

How it went

  1. 0
    nmap

    A full-port nmap scan shows Microblog on 80 and Gitea on 3000.

  2. 1
    edit template

    The Microblog source on Gitea reveals an edit template whose id parameter reads and writes arbitrary files.

  3. 2
    Redis splitting

    That file read exposes the nginx config; HTTP response splitting into the Redis socket flips an account to Pro.

  4. 3
    PHP shell

    Pro accounts can write to /uploads, so a PHP shell lands there as www-data.

  5. 4
    cooper

    From the shell, dumping the Redis socket reveals Cooper's password for su to Cooper and the user flag.

  6. 5
    sudo license

    Cooper can sudo a license tool; a format-string flaw dumps globals and the encryption secret, which decrypts the stored root password for a root shell.