Grandmaster rank emblem

Lvl 99

Level XP3,807/5,718

3807 of 5718
Grandmaster dreadnaught
Machine
SneakyMailer
OS
Linux
Difficulty
Medium
Steps
5
Added
23 Mar 2023

SMTP phishing and a mailbox leak FTP creds for a webshell; a malicious internal PyPI package gives a user, and sudo pip3 gives root.

0Reconnmap1FootholdSMTP phish2FootholdPaul's mailbox3FootholdFTP webshell4LateralPyPI package5Priv escsudo pip3
1Recon2Foothold3Lateral4Priv escnmap1SMTP phish2Paul's mailbox3FTP webshell4PyPI package5sudo pip36

How it went

  1. 0
    nmap

    An nmap scan redirects to sneakycorp.htb.

  2. 1
    SMTP phish

    A dev subdomain lists staff emails; an SMTP phishing spray captures Paul's credentials.

  3. 2
    Paul's mailbox

    Paul's mailbox holds a sent email leaking the developer FTP credentials.

  4. 3
    FTP webshell

    FTP write access as developer drops a PHP webshell in the webroot for www-data, and the password sus to developer.

  5. 4
    PyPI package

    A cracked password for the internal PyPI server allows a malicious package upload that returns a shell and the user flag.

  6. 5
    sudo pip3

    That account can sudo pip3, whose install hook runs as root.