Grandmaster rank emblem

Lvl 99

Level XP3,807/5,718

3807 of 5718
Grandmaster dreadnaught
Machine
Alert
OS
Linux
Difficulty
Easy
Steps
4
Added
23 Nov 2024

Stored XSS in a markdown viewer drives the admin bot to read messages.php, whose path traversal leaks a .htpasswd; the cracked hash gives SSH as albert, and a management-group-writable config included by a root monitor injects PHP for root.

0Reconnmap1Footholdmarkdown XSS2FootholdLFI via XSS3Lateralalbert SSH4Priv escPHP Injection
1Recon2Foothold3Lateral4Priv escnmap1markdown XSS2LFI via XSS3albert SSH4PHP Injection5

How it went

  1. 0
    nmap

    nmap shows Apache serving a Markdown Viewer app.

  2. 1
    markdown XSS

    Uploaded markdown renders unfiltered HTML, giving stored XSS against the admin bot that visits shared links.

  3. 2
    LFI via XSS

    The XSS reads messages.php, whose file parameter is a path traversal exposing the Apache config and a statistics vhost .htpasswd.

  4. 3
    albert SSH

    The .htpasswd hash cracks from rockyou and logs in over SSH as albert for the user flag.

  5. 4
    PHP Injection

    albert's management group can write configuration.php, included by a root-run monitor; injected PHP runs as root.