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.
- InstallRun once
curl -fsSL https://github.com/Real-Fruit-Snacks/pwn-broker/releases/latest/download/install.sh | shAs 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. - Box and targetCreated
- /etc/hostsUpdated
- CredentialSaved
- 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.gzWhat it does
- A folder per box
active/A box lives in
~/pwn-broker/active/<date>_<platform>_<name>/. Each target gets its own folder withcreds/,files/,loot/,scans/,exploits/,screenshots/andrecordings/. 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 session
forest/dc01 >Commands for targets, hostnames, credentials, flags, files, recordings, the VPN and status.
helplists them;exitleaves asquitdoes. A yes or no question takesy,yes,n,noor Enter for its default; a wrong argument gets the command's usage under thefailline. One box is open at a time. - Credentials as typed
creds.tomlOne credential list for the whole box, each answer stored exactly as typed. The
lists/folder is rebuilt from it, so other tools can readusernames.txt,userpass.txt,hashes.txtorhosts.txtas they are. - The note window
notes.mdA second terminal runs vim on the note with its own vimrc; your
~/.vimrcis never read. It saves when you leave the window and reloads when you come back, andfinishcloses it. It keeps the folder, with awarnline, when the note has unsaved changes or changed since the archive was made. - Finish, export, import
wrapped/finisharchives the box and closes it.exportwrites a snapshot and keeps working. Both write to~/pwn-broker/wrapped/, andpwn-broker import <file>unpacks one. - /etc/hosts and the VPN
vpn startA target with an IP and a hostname can have one line in
/etc/hosts, marked with the box ID;host addadds names andfinishtakes it out. Lines that are not the app's are never changed.vpn startcopies a.ovpnfile into the box and starts OpenVPN in the background; the file is never archived, andvpn stopstops only the process the app started. Each new target with an IP is pinged once.
- Scans in the background
scannmap against the current target: the top 1,000 ports first, then every TCP port with scripts on only the ones it found, with
-oAoutput in the target'sscans/. A line in the prompt says when each is done and which ports are open.scan udptakes the top 100 UDP ports as root, andfinishwaits while a scan runs. - Files served to the target
serveThe target's
upload/folder and the tools' files over HTTP on the tunnel's address, behind a random path, with nothing listed.serve filesprints theiwrorwgetline for each file, and aPUTback saves a file intoloot/, never over one already there. It runs untilserve stoporfinish. - Search across the box
searchText in the current target's files, the text copies of its recordings and its section of the note, or with
search allthe 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 again
tool installA 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.
finishtakes them off unless another unfinished box still uses them, andtool historylists every tool the box has had. - Playbooks in the note
:Pbtool install playbooksgets 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 window
recordTyped 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.castgoes a.txtwith the time on every line, for grep;replayplays 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
~
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
finishandimport, with a real OpenVPN andtun0, under a virtual display withxterm. - A bare Debian installPassed
In a
debian:stable-slimcontainer 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
sudoasks for a password: the install line, then a box with/etc/hosts, the VPN, three tools, a recording, files made withsudoandfinish.
Known issues
- x86_64 Linux with glibc only. On any other machine the installer stops and says so.
- The app's Python and its OpenSSL are as new as the release, not as Kali; a fix to them reaches you only in a new release. They take about 100 MB more on disk.
- Close pwn-broker before you upgrade. The installer replaces
app/andpython/under a running prompt, and does not check. - On a terminal that hosts all its windows in one process, such as gnome-terminal,
finishcloses the note's vim but cannot close its window. - Nothing is signed.
SHA256SUMS.txtcomes from the same release as the file it checks, and the tool index every zip is checked against is not signed either: the checks catch a corrupted download or a swapped zip, not who published them. - A password typed on a command line in a recorded window is in the recording and the archive. One typed at a hidden prompt is not.
quitleaves the box's/etc/hostslines in place; onlyfinishremoves them.finishrefuses while a window is recording for the box or one of its tools is running. Exit those first.