Pwnbox offers a browser interface that is both easy and fun to use, providing users with a seamless experience. In addition to the convenience of using its pre-installed tools and scripts, we also have some customization features that let you personalize your hacking experience as if you were operating a virtual machine on your computer.
Using the my_data Folder
NOTE: The version of Pwnbox on academy.hackthebox.com
does not include the my_data
and user_init
features.
my_data
is a directory created in the user's home directory when they log in to a Pwnbox. This directory is intended to be used by the user to store any data or files they might need for future sessions. You can add files, scripts, tools, binaries ... any file that you might need that Pwnbox does not offer.
The folder has a lost+found folder, a README.txt, and a user_init script file.
The lost+found directory is a special directory in Unix-based operating systems, including Linux. It is used to store recovered files and directories that were found during a file system check. When the file system check is run, it may encounter files or directories that are not associated with any particular directory or inode. These files and directories are then moved to the
lost+found
directory.
The README.txt contains a very important warning that everyone must know before storing files in the folder:
Anything you save in the my_data folder will persist between instances you spawn.
Remember! Do not store personal or sensitive data!
We do not back up this folder and only provide it on a best effort basis.
The user_init is an empty bash script that looks like this :
This script is running automatically every time your PwnBox is spawned, and you can use this to automate some tasks or run other scripts (More on this below).
Some usage of this folder will be adding your own custom scripts, web shells, small wordlist, or notes to keep for your next session:
You get around 50MB of storage in this folder, so use it responsibly.
User Init Script:
This script is a great tool to customize your experience when using PwnBox as this runs automatically when a user logs in and is used to set up the user's shell environment, configure any necessary tools or settings, and perform any other necessary tasks to prepare the user's environment for use.
It is important to note that any changes made to the user_init
file will only take effect the next time the user logs in.
One simple example to showcase this is setting up a listener every time your PwnBox starts, as you might need it later. This can simply be done using :
You can also use this to create a new directory every time you spawn PwnBox, copy files, or delete files, or simply make your vim
better looking with your own vimsrc
file that you store it in my_data
.
Note: You should avoid putting large or time consuming operations in the init script, such as apt upgrade
, as the init script is executed during the spawning process, and will delay the amount of time it takes for your instance to become available.