I bought a few Raspberry Pi Zero W’s for $10. It was happenstance I also purchased the Udemy course Learn Ethical Hacking from Scratch. I figure, I might as well put these things together.
I also discovered the Sticky Fingers Kali Pi kernel and distros put together by Re4son.
It has worked well so far. However, I’ve not fully tested the Bluetooth LE hardware on the custom kernel.
One of the issues I’ve had is not being able to connect to new hotspots headlessly. Usually, you’d boot the rp0w connected to a monitor, keyboard, mouse, and edit wpa_supplicant.conf directly. But what if you want to go into a new location with only your laptop and the rp0w. How would you add the wifi credentials to the rp0w without a monitor, etc.
For awhile, I tried to get the ethernet gadget setup to work on the rp0w without any luck. I think the problems relates to trying to use the gadget hardware on a Mac rather than a Windows machine.
In the end, I decided I would add a script which would do the following:
- Mount the /boot partition (which is editable through PC’s SD card reader).
- Look for a file on the /boot called “wpa_supplicant.txt” and copy it to the /etc/wpa_supplicant.conf
- Look for a file on the /boot called “interfaces.txt” and copy it to the /etc/networks/interfaces
- Unmount /boot
- Remove the /boot directory
I saved this script in
wifi_setup.sh. I then added a call to it in
This has let me add a new network from my laptop with merely an SD card reader.