Anonymous communication with PirateBox
Treasure Chest
PirateBox provides an easily accessible server for files, chats, and forum posts for meetings of all kinds. The system works without logins and protocols, so users remain anonymous.
Pirates used to have a hard time finding a suitable place for their ill-gotten booty. Today, treasures mainly exist in digital form, but finding a suitable location for a digital treasure chest is still difficult. You need to assemble and set up a small server and install and configure server services. PirateBox uses a Raspberry Pi [1] – any model will do – as a platform for your treasure trove. The system does not even require network access and works completely independently, if required.
Laying Down the Ship
The software comes in the form of a ZIP archive that you unpack and then dd
to the memory card as you would a Raspbian image (Listing 1); or, you could use a program like Win32 Disk Imager.
Listing 1
Installing PirateBox
$ sudo dd if=piratebox*.img of=/dev/sdc bs=1M; sync 2068840448 bytes (2,1 GB, 1,9 GiB) copied, 4 s, 517 MB/s 2048+0 Data sets on 2048+0 Data sets off 2147483648 bytes (2,1 GB, 2,0 GiB) copied, 4,95754 s, 433 MB/s
On Linux, you discover the output device ID required for the dd
command with the lsblk
command (in Listing 1, it's /dev/sdc/
). A 4GB SD memory card is sufficient, because the system partition does not automatically expand to the entire disk. The system later stores data on a USB stick or a corresponding hard drive.
PirateBox does not come with a graphical interface. Therefore, you don't need to connect the Raspberry Pi used for the box to a display. Network access is not absolutely necessary, either. On a Raspberry Pi 3 (RPi3) with an integrated WiFi chip, PirateBox automatically sets up a wireless network named PirateBox – Share Freely (Figure 1). You need to associate with this network to configure the system.
Next, proceed to manage the system through SSH. To access the treasure chest, use
ssh alarm@piratebox.lan
with the alarm
password. If you are not working in the PirateBox wireless network,
ssh alarm@alarmpi
also works. If name resolution does not work, you can discover the PirateBox's IP address on a Linux system with an ARP scanner (Listing 2). Alternatively, the classic approach is to look at the network configuration on your Internet router.
Listing 2
Finding the IP Address
$ sudo arp-scan --localnet | grep Raspberry 192.168.188.25 b8:27:eb:31:86:6c Raspberry Pi Foundation 192.168.188.26 b8:27:eb:66:ab:44 Raspberry Pi Foundation
Starboard Side
After flashing the image file and logging in via SSH, PirateBox informs you of the installed version and gives instructions for your first steps (Figure 2). The first thing you should do is change the admin user password with the passwd
command. Then, use the date
command to enter the current time; the format is YYYYMMDD HHMM. This step is necessary because the Raspberry Pi does not have a battery-buffered clock and has to do without a time server in standalone operation without network access (Listing 3, lines 1-4).
Listing 3
Setting the Current Time
01 $ sudo timedatectl set-ntp false 02 $ sudo date -s "20180418 1841" 03 $ cd /opt/piratebox && sudo ./bin/timesave.sh ./conf/piratebox.conf install 04 $ sudo systemctl enable timesave 05 $ sudo /opt/piratebox/bin/board-autoconf.sh
As the third step, activate an image and discussion board (last line), if required. During installation, you only need to assign a password for administrative tasks. You can then reach the forum from http://piratebox.lan/board – but only if the user is on the box's wireless LAN. The Kareha [2] software used here is strongly reminiscent of the notorious 4chan anonymous forum (Figure 3). The discussion board only offers the bare essentials, with no user administration.
For more space, connect a USB storage device, which must be formatted with a VFAT partition. Because the PirateBox system does not support the necessary Linux mkfs.vfat
command, you have to do this on another computer first. The following command then automatically integrates the medium into the system:
$ sudo /opt/piratebox/rpi/bin/usb_share.sh
PirateBox offers a DLNA service (Listing 4), so multimedia files (music and videos) can be played with the appropriate players without having to provide a server or access data.
Listing 4
Setting Up a Media Server
$ sudo cp /etc/minidlna.conf /etc/minidlna.conf.bkp $ sudo cp /opt/piratebox/src/linux.example.minidlna.conf /etc/minidlna.conf $ sudo systemctl start minidlna $ sudo systemctl enable minidlna
Step 6 in Figure 2 is only required if you have equipped the PirateBox Raspberry Pi with a real-time clock (RTC) in the form of a HAT add-on board.
Preparing to Board
Now fully equipped, you can deploy PirateBox at your next pirate meeting, such as a LAN party. You don't have to announce the existence of the box, because the wireless PirateBox – Share Freely will quickly attract the attention of the participants (see also the "On the Network" box). If a known pirate logs in, the web front end opens automatically as a hotspot page with the URL http://piratebox.lan (Figure 4). Thanks to its responsive design, the latest version of PirateBox also works on smartphones.
On the Network
If you do not work with PirateBox's wireless network but would rather connect the system directly to a router, the piratebox.lan address name resolution will not work. Instead, you can access the box with http://alarmpi/content and http://alarmpi/board or, alternatively, through the IP address. However, you must note that the upload function only works with http://piratebox.lan, which is hard coded in the page source. As a remedy, call the routine for uploading data directly through http://alarmpi:8080.
On the PirateBox page, participants can chat anonymously, upload data anonymously, and download data after clicking on Files in the page header (Figure 5). However, in our lab, I encountered limits when uploading: You have to be patient when transferring large files through the Raspberry Pi's WiFi network, and the filesystem used for the USB data carrier does not support files of more than 4GB.
You can access the media server with an appropriate DLNA client without any further configuration. On Windows, for example, foobar2000 [3] acts as a DLNA client (with an additional plugin). The VLC Media Player [4] runs on almost any system, and under Android, you can find free DLNA clients like Slick UPnP [5]. The combination of these two applications lets you play the videos stored on PirateBox on an Android smartphone (Figure 6).
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Thousands of Linux Servers Infected with Stealth Malware Since 2021
Perfctl is capable of remaining undetected, which makes it dangerous and hard to mitigate.
-
Halcyon Creates Anti-Ransomware Protection for Linux
As more Linux systems are targeted by ransomware, Halcyon is stepping up its protection.
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.
-
OSI and LPI Form Strategic Alliance
With a goal of strengthening Linux and open source communities, this new alliance aims to nurture the growth of more highly skilled professionals.
-
Fedora 41 Beta Available with Some Interesting Additions
If you're a Fedora fan, you'll be excited to hear the beta version of the latest release is now available for testing and includes plenty of updates.
-
AlmaLinux Unveils New Hardware Certification Process
The AlmaLinux Hardware Certification Program run by the Certification Special Interest Group (SIG) aims to ensure seamless compatibility between AlmaLinux and a wide range of hardware configurations.
-
Wind River Introduces eLxr Pro Linux Solution
eLxr Pro offers an end-to-end Linux solution backed by expert commercial support.
-
Juno Tab 3 Launches with Ubuntu 24.04
Anyone looking for a full-blown Linux tablet need look no further. Juno has released the Tab 3.
-
New KDE Slimbook Plasma Available for Preorder
Powered by an AMD Ryzen CPU, the latest KDE Slimbook laptop is powerful enough for local AI tasks.