Grandmaster rank emblem

Lvl 99

Level XP3,807/5,718

3807 of 5718
Grandmaster dreadnaught
Machine
Bookworm
OS
Linux
Difficulty
Insane
Steps
5
Added
20 Jan 2024

A CSP-bypassing XSS reaches a bot; a download traversal leaks creds, a file-converter traversal overwrites a user's keys, and a sudo genlabel PostScript injection writes root's keys.

0Reconnmap1FootholdXSS + CSP bypass2Footholddownload traversal3Footholdfrank4Lateralconvert traversal5Priv escsudo genlabel
1Recon2Foothold3Lateral4Priv escnmap1XSS + CSP bypass2download traversal3frank4convert traversal5sudo genlabel6

How it went

  1. 0
    nmap

    A full-port nmap scan serves the bookworm.htb Node.js shop.

  2. 1
    XSS + CSP bypass

    Basket notes allow stored XSS; CSP is bypassed by uploading JavaScript as a profile picture, and spraying basket IDs lands it in a staff bot's session.

  3. 2
    download traversal

    The bulk download ZIP takes an injectable bookIds parameter; path traversal reads the Node source and database, leaking frank's credentials.

  4. 3
    frank

    frank:FrankTh3JobGiver logs in over SSH for the user flag.

  5. 4
    convert traversal

    An internal file-conversion service on port 3001 mishandles its output path; a traversal plus a symlink overwrites Neil's authorized_keys for an SSH login as Neil.

  6. 5
    sudo genlabel

    Neil can sudo a genlabel tool; a PostScript injection copies Neil's key into root's authorized_keys for a root login.