Download and setup Pwnhyve
Become root
sudo suIf the system hasn't been updated already, please update it now 🙃
Clone the Pwnhyve repo
cd ~ git clone https://github.com/whatotter/pwnhyve && cd pwnhyveSetup
dwc2for usb gadget mode in /boot/firmware/config.txtecho dtoverlay=dwc2 | sudo tee -a /boot/firmware/config.txt echo dwc2 | sudo tee -a /etc/modules echo "libcomposite" | sudo tee -a /etc/modulesEnable SPI
echo dtparam=spi=on | sudo tee -a /boot/firmware/config.txtSetup special SPI pins
dtc -I dts -O dtb -o 3spi.dtbo ./core/install/spi-cs-extend.dts sudo cp 3spi.dtbo /boot/firmware/overlays/ echo "dtoverlay=3spi" >> /boot/firmware/config.txtInstall requirements using pip
sudo pip install -r requirements.txtInstall required tools
apt install bettercap eaphammer golang-goBuild FastIO
cd ./core/pio go build pio.go cd ../..Put the USB gadget script in
/bincp ./core/install/pwnhyveUSB /bin/ chmod +x /bin/pwnhyveUSBNo need to setup the USB script to run on boot, pwnhyve already runs it when started
Create
piusb.binfor usb mass storage (edit to your needs)sudo dd if=/dev/zero of=/piusb.bin bs=65535 count=65535 status=progress mkdosfs /piusb.binSetup pwnhyve's systemctl service
sed -i "s@cwd@$(pwd)@g" ./core/install/pwnhyve.service cp ./core/install/pwnhyve.service /etc/systemd/system/Restart systemctl's daemon and enable pwnhyve
systemctl daemon-reload systemctl enable pwnhyve.servicereboot
sudo reboot now
Pwnhyve should be running as soon as the RPi boots.
Last updated