-
11Installing the Raspberry Pi
- Cut the Raspberry Pi mounting bracket to fit snuggly above the switch.
- Screw the Pi to the bracket with four screws & nuts.
- Add some sticky foam to the underside of the bracket (optional).
- Mark out where the holes in the mount line up inside the BBU enclosure.
- Hot glue the long stand offs that came with the bracket to the enclosure where you marked.
- Screw the bracket to the enclosure.
-
12Plugging Everything In
This is the wiring part. Just follow the schematic.
- Plug in the Pi's USB cable for power.
- Plug the short patch cable into the Pi & the other end into the switch.
- Plug the patch cables coming from the RJ45 jacks into the switch.
- Plug the red wire from the LED into pin 32 (GPIO 12).
-
Plug the black wire from the LED into pin 30 (ground).
- Plug the wire with the resistor from the button into pin 1 (3.3V).
- Plug the wire attached to the same lead on the button as the resistor into pin 36 (GPIO 16).
- Plug the last wire from the button into pin 34 (ground).
- Plug in the USB WiFi adapter.
-
13Fitting the Enclosure
The final hardware portion of the build is to trim and fit the rest of the enclosure. Basically just use some end snips and a file or a Dremel tool to cut away at any plastic that gets in the way of buttoning up the enclosure.
-
14Software
Here we are setting up the Pi's OS and some of the code I used for the button and LED. You will need to be somewhat comfortable editing files in Linux.
- Install Kali Linux to the Raspberry Pi's SD card. Go HERE (Kali Linux's Website) to get the instructions for whatever board you are using.
- Download my scripts to the Pi, change the extension from ".txt" to ".sh", & make them executable.
- Add a crontab entry to start the scripts at boot. In /etc/crontab file, add:
# Flash LED after successful boot @reboot root sleep 10s && bash /opt/scripts/flashled.sh &> /dev/null # Enable power button @reboot root sleep 10s && bash /opt/scripts/powerbutton.sh &> /dev/null
- Change the directory & name of the scripts to match where you put them & what you named them.
- Optionally, run sudo systemctl disable lightdm.service to boot Kali without a gui & save some resources.
-
15Go Pentesting!
That's everything you need to get a Raspberry Pi running inside an old BBU!
I eventually want to add a relay and button to turn on and off power to the outlets on top. A couple of lithium batteries and a piezo buzzer would be kool, too.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.