Module 03 // lab runbook
HTB runbook.
A repeatable path from health check and VPN connection to evidence capture, backup and clean disconnect.
Preflight
pe doctor
pe vpn ls
pe status- Read the HTB machine or lab scope and allowed techniques.
- Confirm you are using either the local VPN or Pwnbox, never both simultaneously.
- Check time, free disk space and the tool paths reported by
pe doctor.
Connect and prove the route
# one-time import
pe vpn import ~/Downloads/lab.ovpn lab
# foreground connection; keep this terminal open
pe vpn up lab
# from another terminal
pe vpn status
ip route get 10.10.10.10The route output should name a lab interface such as tun0. An interface existing does not prove that a particular target uses it.
Register the target
newbox keeper 10.10.11.227 htb
useip
pe status
pe vpn route "$IP"newbox adds and activates the target, creates a private directory, and changes into it. For an existing record use pe target use keeper. useip exports both IP and RHOST.
Launch the workspace
htb-session
# or
pe session keeper~/htb/keeper/
├── nmap/ # Nmap -oA sets
├── scans/ # other scanner output
├── web/ # web evidence
├── exploit/ # lab-only working files
├── loot/ # collected artifacts; keep private
└── notes/
└── notes.mdThe tmux session is htb-keeper with recon, shell and notes windows. Inside tmux, prefix + P returns to the active workspace; prefix + V opens a foreground VPN window.
Enumerate in layers
scan
fullscan
udpquick
webenum 'http://10.10.11.227/FUZZ'These helpers write evidence beneath the target directory and refuse to scan unless the route traverses tun, tap or wg. Review results before moving from broad discovery to a service-specific page: recon, web, or AD/Windows.
Record as you go
pe note add -t "initial surface" -b "22/ssh, 80/http"
pe host add --ip "$IP" --hostname keeper.htb --os linux
pe host port 1 80 --service http
pe cred add -u USER -s 'SECRET' -S ssh
pe flag add user FLAG_VALUE --notes "user.txt"The leading space before the credential command invokes Zsh history suppression. Verify IDs and active target before attaching evidence.
Close cleanly
Save findings
Update
notes/notes.md, add structuredperecords, and hash important evidence.Back up
pe backupEnd processes
Stop listeners, servers and tunnels; press Ctrl-C in the OpenVPN window.
Clear transient secrets
Clear the desktop clipboard and close panes holding credentials. Tmux disk persistence is off, but live scrollback remains until the pane/server ends.
No entry matches. Press Esc to reset.