pwnbox-cli
The CLI tool that lets you easily deploy, customize and manage PwnBox.
Features
- A fully customizable deployment of PwnBox using a config file.
- Automatic update checks for newer PwnBox images and CLI.
- Verbose output so you can tell what commands are being run.
- Easy deployment and teardown of PwnBox containers.
- View image download progress in real-time.
- Cool ASCII banners.
Installation
Using Python >= 3.6, you can install this CLI using pip directly:
pip install pwnbox
And that's it! You're all set to use PwnBox CLI!
Usage
$ pwnbox -h # or --help
usage: pwnbox [-h] [-v] [--version] [-b] [-n] [-c CONFIG] [-t TIMEOUT] COMMAND
Launch and manage PwnBox containers.
positional arguments:
COMMAND The action to perform.
optional arguments:
-h, --help show this help message and exit
-v, --verbose Enable verbose output.
--version Print the current version of the program.
-b, --no-banner Disable printing the banner.
-n, --no-update Disable the automatic check for newer PwnBox versions.
-c CONFIG, --config CONFIG
Specify the path to a PwnBox config file.
-t TIMEOUT, --timeout TIMEOUT
Specify the timeout of waiting for SSH to be available.
Commands:
up Starts the PwnBox container if not already started, and connects to it.
down Stop the PwnBox container.
pull Download the latest PwnBox image.
generate Write the default config to a file.
Configuration
All configuration of the PwnBox container can be done from pwnbox.conf, which is by default stored (and created on first run) at $HOME/.pwnbox/pwnbox.conf.
The configuration file syntax is as follows:
[IMAGE]
# Where to pull the image from, can be 'ghcr.io' or 'registry.hub.docker.com'
DOCKER_REPOSITORY=registry.hub.docker.com
# The tag of the image to pull. Can be any specific version you'd like
IMAGE_TAG=latest
[CONTAINER]
# Name of the container that Docker will give
NAME=pwnbox
# Hostname inside the container
HOSTNAME=pwnbox
# Should the container run privileged?
PRIVILEGED=true
# Should the container be removed when stopped?
AUTO_REMOVE=true
# Enable this to run GUI applications outside the container
X11_FORWARDING=true
# Enable this to automatically forward all ports and have direct interace access (only linux)
HOST_NETWORKING=true
# What ports would you like forwarded? (syntax HOST:CONTAINER with multiple ones being comma seperated)
# Should keep 2222 for SSH port
FORWARDED_PORT=2222:2222,9000-9010:9000-9010
# Where to store the data thats from /mnt/external
EXTERNAL_VOLUME=$HOME/.pnbox/external
# Where to fetch public ssh keys from
SSH_VOLUME=$HOME/.ssh
You can always re-generate this file using pwnbox generate and copy it to other places to have multiple configurations.
How It Works
When bringing up a container, the CLI will:
- Check if Docker is accesible
- Check if the desired PwnBox image is downloaded
- If it is, check if there is a newer version of the PwnBox image
- If not, download the latest version available of the image
- Bring up the PwnBox container with the desired settings
- If X11 Forwarding is enabled,
xhostis executed to whitelist remote connections from localhost
- If X11 Forwarding is enabled,
- Wait for SSH to be available, then SSH into the container
Contributions
PRs are more than welcome! Fix bugs, add features, improve speed or anything else. I will gladly merge them once I have reviewed them.
Metadata
Release files for pwnbox 2.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pwnbox-2.3.1.tar.gz | 11.1 kB | Without provenance | Details for pwnbox-2.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pwnbox-2.3.1-py3-none-any.whl | Python 3 | none | any | Details for pwnbox-2.3.1-py3-none-any.whl |
Total release size: 21.9 kB
Release files / pwnbox-2.3.1.tar.gz
| Download URL | pwnbox-2.3.1.tar.gz |
|---|---|
| Size | 11.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3a583b26af128308de59dcd53858213efcde482be54911268803297e685179ca
|
|
BLAKE2b-256 checksum How to use checksums |
031a178bda370481d231a278a0241eed41b8f174ce210fa59bb10c3a6cb8fe70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / pwnbox-2.3.1-py3-none-any.whl
| Download URL | pwnbox-2.3.1-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
06cf640051eb367d03759d24ee92232af821d84a45e6bbffc7d70ef23d86afa1
|
|
BLAKE2b-256 checksum How to use checksums |
679d77aa1ca3c1e187b45e9d648161eee65c45300429f3cb0551c5c163bf4aab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Security for pwnbox 2.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.