Grandmaster rank emblem

Lvl 99

Level XP3,807/5,718

3807 of 5718
Grandmaster dreadnaught
Machine
Cap
OS
Linux
Difficulty
Easy
Steps
5
Added
5 Jun 2021

An unauthenticated Security Dashboard with an IDOR on /data/0 leaks another user's packet capture; the plaintext FTP credentials inside reuse over SSH for a foothold, and a cap_setuid capability on python3.8 escalates to root.

0Reconnmap1FootholdIDOR /data/02Footholdpcap FTP creds3Footholdnathan SSH4Priv esccap_setuid5Priv escsetuid(0)
1Recon2Foothold3Priv escnmap1IDOR /data/02pcap FTP creds3nathan SSH4cap_setuid5setuid(0)6

How it went

  1. 0
    nmap

    nmap finds vsftpd 3.0.3, OpenSSH, and a gunicorn Security Dashboard on 80.

  2. 1
    IDOR /data/0

    The dashboard auto-authenticates as Nathan, and an IDOR on /data/0 downloads another user's packet capture.

  3. 2
    pcap FTP creds

    tshark on the capture recovers plaintext FTP credentials for nathan.

  4. 3
    nathan SSH

    Those credentials reuse over SSH to log in as nathan and read the user flag.

  5. 4
    cap_setuid

    getcap shows /usr/bin/python3.8 carries the cap_setuid capability.

  6. 5
    setuid(0)

    python3.8 calls setuid(0) and escalates to root.