Grandmaster rank emblem

Lvl 99

Level XP3,807/5,718

3807 of 5718
Grandmaster dreadnaught
Machine
Mailroom
OS
Linux
Difficulty
Hard
Steps
6
Added
19 Aug 2023

A blind XSS proxies an internal panel and a NoSQL injection dumps a password; a panel command injection gives www-data, a leaked Git config reaches Matthew, and a KeePass password straced from a process gives root.

0Reconnmap1Footholdblind XSS2FootholdNoSQL inject3Footholdtristan4Lateralinspect.php5Lateralmatthew6Priv escKeePass strace
1Recon2Foothold3Lateral4Priv escnmap1blind XSS2NoSQL inject3tristan4inspect.php5matthew6KeePass strace7

How it went

  1. 0
    nmap

    An nmap scan shows a shipping site; ffuf and the Git repo's auth.php reveal Git and staff-review-panel subdomains.

  2. 1
    blind XSS

    A stored XSS in the contact form makes the viewer's browser request the 403-protected staff-review-panel on our behalf.

  3. 2
    NoSQL inject

    The panel's MongoDB auth.php is vulnerable to a NoSQL injection; a $ne then a $regex brute, driven through the XSS, dumps Tristan's password.

  4. 3
    tristan

    Tristan's password logs in over SSH; a token in the mail spool plus SSH forwarding open the staff panel fully.

  5. 4
    inspect.php

    inspect.php fails to filter backticks, so a staged PHP reverse shell runs as www-data.

  6. 5
    matthew

    Matthew's credentials sit in a Git config readable as www-data; su lands his account and the user flag.

  7. 6
    KeePass strace

    pspy shows kpcli opened periodically; stracing it recovers the keybox password (minus a stray backspace), and its Root entry gives su to root.