knowledge/htb-challenge-downloader/SKILL.md
Download Hack The Box CTF challenge artifacts and metadata through BrowserMCP. Use when given an HTB CTF event URL, a destination path, and a selector describing either a challenge category or a challenge name. If any of those three inputs is missing, return an error and stop. The workflow filters matching challenges, downloads files when present, always spawns Docker when a spawn control exists, and writes one `readme.md` per challenge folder with title, description, and an `ip:porta` array when endpoints are exposed.
npx skillsauth add aeondave/malskill htb-challenge-downloaderInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill to collect challenge artifacts from Hack The Box CTF events with BrowserMCP. It does not solve the challenge; it only finds the requested challenge set, downloads attached files when present, writes local metadata, and starts a Docker or instance whenever HTB exposes a spawn control.
Gather these required inputs before acting:
./testdownloadTreat "family" as the visible HTB category or badge text. Prefer exact challenge-name matches over substring matches.
If any of the three required inputs is missing, return an error and stop. Do not guess defaults, do not reuse an old destination, and do not start browsing the event without a selector.
Connect.No connection to browser extension, stop and ask the user to connect the extension before retrying.Why: the browsermcp MCP server cannot drive tabs until the browser extension is actively connected.
account.hackthebox.com/login or shows Sign in to Hack The Box.Why: HTB CTF event pages are gated. Unauthenticated sessions cannot enumerate challenges, download files, or spawn machines.
If the user supplied a direct challenge URL, verify the name on the page before proceeding and skip broad event enumeration.
For each matched challenge:
<dest>/
<challenge-slug>/
readme.md
downloads/
downloads/ only when at least one attachment is recovered.<dest>/<challenge-slug>/downloads/.scripts/recover_browser_download.py before marking it missing.Running, Stop, Reset, connection details, or another active-instance indicator.already running rather than forcing a respawn.ip:porta array, even if only one endpoint appears.readme.mdAfter metadata extraction, downloads, and spawn handling, write <dest>/<challenge-slug>/readme.md with scripts/write_challenge_markdown.py.
Include:
ip:porta values as an array when Docker or another spawned target exposes endpointsThe helper expects JSON on stdin or via --input. Use it after BrowserMCP work is finished so the markdown reflects the final download and spawn state.
Summarize, per matched challenge:
ip:porta array when presentpage.waitForEvent('download').scripts/recover_browser_download.py before calling the attachment unavailable.Input:
https://ctf.hackthebox.com/event/1434./testdownloadWebExpected agent flow:
Web challenges../testdownload/<challenge-slug>/.readme.md.Single-challenge example:
https://ctf.hackthebox.com/event/1434./pippo/caioJailbreakResult:
Jailbreak by name../pippo/caio/Jailbreak/../pippo/caio/Jailbreak/readme.md with title, description, downloads array, and ip:porta array.scripts/write_challenge_markdown.py — write deterministic readme.md files from extracted JSON metadata after BrowserMCP finishes a challenge.scripts/recover_browser_download.py — recover recent Chromium-family downloads from browser history and fallback locations, then copy them into the challenge downloads/ directory.references/browsermcp-recipes.md — HTB-specific BrowserMCP and Playwright patterns for login-gate detection, challenge extraction, download saving, and guarded spawning.development
Auth/lab ref: Unicorn Engine CPU-only emulation for shellcode, decryptors, custom VM handlers, instruction tracing, memory hooks, and register-level experiments.
development
Auth/lab ref: Renode board and SoC simulation for MCU/RTOS firmware, UART/GPIO/peripheral modeling, GDB remote debugging, REPL platforms, and RESC scripts.
development
Auth/lab ref: Qiling OS-layer binary emulation for PE/ELF/Mach-O/UEFI/shellcode with rootfs, syscall/API hooks, filesystem mapping, and runtime patching.
databases
Auth/lab ref: QEMU user-mode and full-system emulation for cross-arch binaries, firmware, kernels, disks, serial consoles, networking, and GDB stubs.