Grandmaster rank emblem

Lvl 99

Level XP3,807/5,718

3807 of 5718
Grandmaster dreadnaught
Machine
OnlyForYou
OS
Linux
Difficulty
Medium
Steps
4
Added
26 Aug 2023

A source leak exposes a command injection for a shell; a Neo4j injection reaches a user, and a sudo pip install gives root.

0Reconnmap1Footholdsource leak2Footholddig injection3LateralNeo4j to john4Priv escsudo pip
1Recon2Foothold3Lateral4Priv escnmap1source leak2dig injection3Neo4j to john4sudo pip5

How it went

  1. 0
    nmap

    A full-port nmap scan serves the only4you.htb site.

  2. 1
    source leak

    A source-download feature on a beta subdomain is path-traversable, leaking the app's nginx config and Python source.

  3. 2
    dig injection

    form.py passes an email domain into a shell dig command, giving command injection and a foothold.

  4. 3
    Neo4j to john

    Internal Gogs and Neo4j services are reachable; a Cypher injection dumps john's password for an SSH login and the user flag.

  5. 4
    sudo pip

    john can sudo pip to install a Gogs-hosted package; a malicious setup.py runs as root.