Raspberry Pi Dropbox

If you found yourself reading this article you probably know what a dropbox is already but to summarize, it's a piece of hardware that is either overtly or covertly planted on the network.  This particular model that I've constructed is using a Raspberry Pi Zero running Raspbian Lite.  In the diagram below, my dropbox is sitting the customer network.  It uses OpenVPN and calls home to our C2 server.  Logging into our C2 server, we can then SSH back into our dropbox bypassing all of the security measures.  What we do next depends on the engagement and this post is about the setup of the dropbox.

Our flow:


I'm making some assumptions -- like you can get Raspbian installed.  If not, this post I wrote on setting up a Tor Proxy goes into the details of installing Raspbian.  Once you get it installed, we're going to install OpenVPN:


Next, we'll modify /etc/default/openvpn:


We're going to uncomment #AUTOSTART="all"


Save and close.

Rather than making a mess with arrows, I'll post the commands and you can view the image and output below:

sudo cp ./dropbox.ovpn /etc/openvpn/client.conf

sudo systemctl enable openvpn@client.service
sudo systemctl daemon-reload
sudo service openvpn@client start
sudo systemctl status openvpn@client.service

Obviously, you'll need to have the C2 server setup running OpenVPN server and a config file. 

Walking through this -- we're enabling the OpenVPN client service, we're reloading the system services, we're starting the OpenVPN client service, and we're checking the status:


On the C2 server, we check our connections and we see that we have an inbound connection from our dropbox:


And finally, we SSH into our dropbox and it's game over: