Grandmaster rank emblem

Lvl 99

Level XP3,807/5,718

3807 of 5718
Grandmaster dreadnaught
Machine
EvilCUPS
OS
Linux
Difficulty
Medium
Steps
3
Added
2 Oct 2024

A spoofed cups-browsed printer injection gives a shell as lp; an old root print job in the CUPS spool leaks the root password.

0Reconnmap1FootholdCUPS injection2Lateralprint spool3Priv escsu root
1Recon2Foothold3Lateral4Priv escnmap1CUPS injection2print spool3su root4

How it went

  1. 0
    nmap

    nmap finds SSH and CUPS 2.4.2, with cups-browsed listening on UDP 631.

  2. 1
    CUPS injection

    A spoofed browse packet feeds cups-browsed a poisoned PPD, so printing a test page runs an injected command as lp (CVE-2024-47176).

  3. 2
    print spool

    lp can traverse /var/spool/cups; the old root print job d00001-001 holds the root password.

  4. 3
    su root

    su with the recovered password gives root.