Hey everyone!

For a while now, I’ve been thinking about ways someone could discretely hide a Raspberry Pi inside of a computer. If you could do so, it could give you permanent physical access to the computer. My motive for this project, though, was to basically create a rouge access point.

I had two main objectives for the project:

The Raspberry Pi needs an infinite power source. Tying it to a battery would mean that the batteries would either need to be constantly switched or somehow charged on a regular basis. I wanted something that you could just plug in and forget about for a year. The Raspberry Pi and the WiFi card had to be concealed inside of the computer. Someone shouldn’t be able to peak in and realize something’s amiss.

It’s important to note that while doing this, I mostly had a corporate mindset. The idea that you were on a penetration testing job site and the computer in question isn’t really inspected by the end-user very much.

My initial idea was to just take a male molex connector and solder the 5V and ground to the Raspberry Pi. While this would fulfill requirement 1, it would be very obvious if someone glanced in the case and saw a dangling Raspberry Pi hanging from a power connector.

I started to wonder if I could maybe hide it inside of a hardware component. A CD drive would provide plenty of room for a Raspberry Pi 3 and more but there’s one downside: the drive wouldn’t be operational. It also breaks requirement 2 because even though the Raspberry Pi is concealed, people will very quickly notice if they not only suddenly have an extra disk drive, but a broken disk drive.

Then, I thought of it: why not the inside of a hard drive. A Raspberry Pi Zero could probably fit inside of a scrapped out one with a little room to spare.

Here is a picture of the final product (it actually worked, lol):

For about $30 (cheaper if you soldered the WiFi card directly to the board), you can hide an entire, fully working, internet-connected computer inside of a old hard drive.

Here is the process I went through to get this to work.

Just to give you some scope, here is a picture of the top and bottom of a broken drive I had laying around:

The first thing I did was open the hard drive up. In order to do this, I had to unscrew the top 6 screws and the screw in the center of the drive (covered by a sticker).

Taking out all of the components of the drive are a tiny bit trickier if you’ve never done it (like me).

There’s four screws around the disk, two in the head controller, one in the bolt holding the head and two for the magnets.

Once it’s done, it should look about like this:

The inner ring of the plate spinner is still magnetized. I didn’t remove it when I did this but you should be fine as long as you don’t rub your Raspberry Pi all along it. The reason I kept it was because if you remove it, it leaves a giant hole in the middle of the drive.

The next thing I did was figure out how to supply the Raspberry Pi with power. As luck would have it, there is a little hole where the head controller used to be. It turns out that the circuit board has about 10 connectors that come through that hole. One of them is 5V and one is ground, how lucky!

In order to figure out which of those pins was 5V power and which was ground, I looked at the data sheet for a SATA connector:

From there, I just took a multimeter and trace which connector connects to the 5V power and which to ground. It turns out for this drive, it was the right side, fourth one down.

As for the ground, it was on the right side, second one down (sorry this image is super blurry).

It may different from drive to drive.

After I found out which of the pins were what, I went ahead and instead of soldering two wires directly to the Raspberry Pi, I cut and stripped a micro-USB cable and soldered that to the hard drive. This allowed me to be able to unplug the Raspberry Pi and change it out for another, etc. It wasn’t the best of soldering job but it worked. When I did this, I should have soldered the cables in the opposite direction. It turns out that the hole is quite tight and I had to fold the cables inwards on themselves.

From there all I needed to do was screw back in the circuit board and plug in the Raspberry Pi.

For my initial test, I left the cover off and grabbed the fire extinguisher — just in-case. It surprisingly worked! I did notice that the spindle was spinning, so I went ahead and disconnected the power to it on the back.

The second test, I plugged the network card back in and screwed back on the hard drive cover. My Raspberry Pi was setup to act as an access-point and broadcast an SSID of “Hogwarts Greathall Wifi”. Here’s a picture of it actually working (it’s the lower drive):

And there we go! A Raspberry Pi inside of a hard drive!

I think it would be pretty cool if you could solder a second USB wire and get the Raspberry Pi to actually act as a hard drive. You could probably do some pretty cool stuff with something like that.

If you want to try this for yourself (at your own risk), all you need is:

A Raspberry Pi Zero ($5)

A MicroSD card ($10)

A microUSB to USB ($5)

A WiFi card ($10)

A spare anything to micro-USB cable ($2)

A spare 3.5" hard drive of any size ($5–10)

You can probably get spare dead 3.5" drives and micro-USB cables for free and if you don’t want WiFi this would only cost ~$15 (but once again, only try at your own risk. I’m not responsible for anything you do lol).

Hope you found this interesting and if you have any questions or ideas about how to expand this project, feel free to leave them below!

Just as a note, I did try a Raspberry Pi 3, but it was too big!

It might be able to fit if you milled out a cavity and soldered off the USB / Ethernet jacks.