Real-Fruit-Snacks GitHub

pwn-broker 0.1.7Kali Linux · x86_64 · glibcMIT

pwn-broker

Keeps a box's targets, notes, creds and tools in order

I launch it when I start a Hack The Box machine. It asks a few questions, builds the workspace, opens my notes in vim, and stays open as a prompt for the whole session. When the box is done it packs everything into one archive.

  1. InstallRun once
    curl -fsSL https://github.com/Real-Fruit-Snacks/pwn-broker/releases/latest/download/install.sh | sh

    As the user who will use pwn-broker, not with sudo. It downloads one release file, checks its SHA-256, and puts the app and its own Python in /opt/pwn-broker. Run it again to upgrade.

  2. Box and targetCreated
  3. /etc/hostsUpdated
  4. CredentialSaved
  5. FinishArchived

Box closed out

$ pwn-broker new
pwn-broker 0.1.7

  ok    8 checks passed

New box
  box name     > forest
  platform     [htb] > 
  date         [2026-11-14] > 
  os           > windows
  difficulty   > easy

  add a target? [Y/n] > 

Target 1
  ip           > 10.10.10.161
  hostname     > forest.htb.local
  scope        [external] > 
  name         [forest.htb.local] > dc01

  ok    target dc01 created

  add another? [y/N] > 

  add dc01's hostnames to /etc/hosts? [Y/n] > 

  ok    /etc/hosts updated
        10.10.10.161 forest.htb.local
  ok    10.10.10.161 answered in 43 ms
  ok    box forest created

forest/dc01 > cred add

New credential
  username     > svc-alfresco
  domain       > htb.local
  secret       > s3rvice
  kind         [password] > 
  found on     [dc01] > 
  note         > 

  ok    cred 1 saved, found on dc01
  ok    lists updated: 1 username, 1 password, 1 pair

forest/dc01 > finish

  box      forest (htb), started 2026-11-14
  targets  1
  files    14
  archive  /home/kali/pwn-broker/wrapped/2026-11-14_htb_forest.finished.tar.gz
  hosts    1 line to remove from /etc/hosts

  finish this box? [y/N] > y

  ok    archive /home/kali/pwn-broker/wrapped/2026-11-14_htb_forest.finished.tar.gz
  ok    removed 1 line from /etc/hosts

  remove working folder? [y/N] > y

  ok    removed /home/kali/pwn-broker/active/2026-11-14_htb_forest

$ 

One box from start to finish. The lines are the app's own output from a scripted run of its code, as root with a VPN up, with the paths a user called kali would see; the launch checks' look-ups, the tunnel and the ping's answer were stand-ins, and so was the terminal that opens the note. The note window opens beside it.

No network on the Kali machine

Copy the release file and install.sh from the latest release across, then run this. It prints the file's SHA-256 to compare with the release page, and contacts nothing. x86_64 Linux with glibc only; it needs no Python from the machine. The guide has the options and what the install trusts.

sh install.sh --from pwn-broker-0.1.7-linux-x86_64.tar.gz

What it does

  • A folder per boxactive/

    A box lives in ~/pwn-broker/active/<date>_<platform>_<name>/. Each target gets its own folder with creds/, files/, loot/, scans/, exploits/, screenshots/ and recordings/. A second box with the same name and platform on the same day gets -2, so one box's archive is never offered to another for replacing.

  • A prompt for the sessionforest/dc01 >

    Commands for targets, hostnames, credentials, flags, files, recordings, the VPN and status. help lists them; exit leaves as quit does. A yes or no question takes y, yes, n, no or Enter for its default; a wrong argument gets the command's usage under the fail line. One box is open at a time.

  • Credentials as typedcreds.toml

    One credential list for the whole box, each answer stored exactly as typed. The lists/ folder is rebuilt from it, so other tools can read usernames.txt, userpass.txt, hashes.txt or hosts.txt as they are.

  • The note windownotes.md

    A second terminal runs vim on the note with its own vimrc; your ~/.vimrc is never read. It saves when you leave the window and reloads when you come back, and finish closes it. It keeps the folder, with a warn line, when the note has unsaved changes or changed since the archive was made.

  • Finish, export, importwrapped/

    finish archives the box and closes it. export writes a snapshot and keeps working. Both write to ~/pwn-broker/wrapped/, and pwn-broker import <file> unpacks one.

  • /etc/hosts and the VPNvpn start

    A target with an IP and a hostname can have one line in /etc/hosts, marked with the box ID; host add adds names and finish takes it out. Lines that are not the app's are never changed. vpn start copies a .ovpn file into the box and starts OpenVPN in the background; the file is never archived, and vpn stop stops only the process the app started. Each new target with an IP is pinged once.

  • Scans in the backgroundscan

    nmap against the current target: the top 1,000 ports first, then every TCP port with scripts on only the ones it found, with -oA output in the target's scans/. A line in the prompt says when each is done and which ports are open. scan udp takes the top 100 UDP ports as root, and finish waits while a scan runs.

  • Files served to the targetserve

    The target's upload/ folder and the tools' files over HTTP on the tunnel's address, behind a random path, with nothing listed. serve files prints the iwr or wget line for each file, and a PUT back saves a file into loot/, never over one already there. It runs until serve stop or finish.

  • Search across the boxsearch

    Text in the current target's files, the text copies of its recordings and its section of the note, or with search all the whole box, credential lists included. Binary files and the VPN folder are skipped, and so is a playbook's text until you fill it in.

  • Tools, on and off againtool install

    A package from pwn-shop's index, with its size and SHA-256 checked and no install script: NetExec, Impacket, Certipy, Rubeus and the BloodHound collectors, PEASS-ng and pspy, the potatoes, ligolo-ng and chisel, and the rest of its list. The Python ones bring their own Python as a shared runtime that puts nothing on PATH. finish takes them off unless another unfinished box still uses them, and tool history lists every tool the box has had.

  • Playbooks in the note:Pb

    tool install playbooks gets pwn-playbooks, short notes for one job each. :Pb <name> in the note window reads one in below the cursor, Tab completing the name from any part of it, and its few lines of vim fill in its <Placeholder> values in that playbook and nowhere else.

  • Recording a windowrecord

    Typed in any terminal while a box is open, it records that window under a pinned asciinema 3.2.1 into the target's recordings/, with [rec dc01] in front of the prompt. Beside each .cast goes a .txt with the time on every line, for grep; replay plays them. Keystrokes are not recorded, but a password typed on a command line is.

The note

notes.md starts with a box drawn in # that holds the box details and one row per target; the app redraws it whenever the targets change. Each target has a section in a vim fold that starts with its Target: line, and the note opens with every fold closed down to that line.

  • New foldF8
  • Target's IP,i
  • A credential,c
  • Date and time,t
  • Tick a box,x
  • List the keys,h
  • Read a playbook in:Pb <name>

IP addresses are amber and <Placeholder> text is orange wherever they appear. The app changes nothing else in the note, apart from a Target: line it wrote when that target is renamed or edited. Here dc01's fold is open and ws01's closed; the two lines under enumeration are mine.

################################################################
#  Box:         forest                                         #
#  Platform:    htb                                            #
#  Date:        2026-11-14                                     #
#  OS:          windows                                        #
#  Difficulty:  easy                                           #
#                                                              #
#  Targets:                                                    #
#    dc01   10.10.10.161   forest.htb.local   external         #
#    ws01   10.10.10.162   -                  internal         #
################################################################

##########@@@@@@@@@@
Target: dc01   10.10.10.161   forest.htb.local   external

## enumeration
nmap -sC -sV -oA scans/dc01 10.10.10.161
GetNPUsers.py htb.local/<DomainUser> -no-pass -dc-ip 10.10.10.161

## foothold

## privilege escalation

@@@@@@@@@@##########

Target: ws01   10.10.10.162   -   internal
~
notes.md in vim: the box of details with two targets, dc01's section open under its fold markers, and ws01's section closed to its Target line.

Tested on

Every check below passed. The full record, with counts, dates and what has not been run, is in docs/tested.md.

  • The unit suitePassed

    On Windows 11 under Python 3.13, and on Ubuntu 24.04 in CI under Python 3.11, 3.12, 3.13 and 3.14 and once more as root, with warnings treated as errors.

  • A whole box in Kali, in CIPassed

    The official Kali image (Kali 2026.3, as root): installed from the release file with the container's network off, then new box to finish and import, with a real OpenVPN and tun0, under a virtual display with xterm.

  • A bare Debian installPassed

    In a debian:stable-slim container with no Python and no network.

  • Every command by handPassed

    In Kali 2026.2 under WSL 2, as root, with Kali's own qterminal, including building the release file there and upgrading an install made by the old installer.

  • Each published releaseAll 8

    The install line, then a box with all six tools from the published index, taken off again by finish; each later release as an upgrade over it, with the feature it added: ,h, serve, scan, search, and in 0.1.7 playbooks read into the note and filled in.

  • A normal user with sudoPassed

    Whose sudo asks for a password: the install line, then a box with /etc/hosts, the VPN, three tools, a recording, files made with sudo and finish.

Known issues