Skip to content

installing

otter edited this page May 14, 2024 · 14 revisions

installing is very easy (i think)
dont use this until the project has been renamed to pwnhyve
artemis = pwnhyve
PLEASE let me know if you have any issues with the installation
im so tired its not even funny

OS

get kali linux arm: https://www.kali.org/get-kali/#kali-arm
do NOT get anything else but the raspberry pi zero (2) images; no pitail, no p4wnp1 aloa, just the image without anything else
once done flashing, boot to it on your raspi and log in (this will take 1-10ish minutes since the pi is slow)

log into wifi using nmtui in the terminal, and setup ssh: sudo systemctl enable ssh
once done, remove xfce to reduce cpu usage: sudo apt purge xfce4* lightdm*

reboot the pi

kernel stuff

update and upgrade the pi DON'T UPGRADE THE PI!!!! THIS WILL BREAK ABSOLUTELY EVERYTHING!!!

!!!!!!!!MAKE SURE YOU ARE ROOT!!!!!!!!!!!

setup dwc2 and dtoverlay, for the usb hid gadget and spi

sudo su

echo dtoverlay=dwc2 | sudo tee -a /boot/config.txt
echo dwc2 | sudo tee -a /etc/modules
echo dtparam=spi=on | sudo tee -a /boot/config.txt
echo "libcomposite" | sudo tee -a /etc/modules

git clone the repository:

git clone https://github.com/whatotter/pwnhyve && cd pwnhyve

install requirements:

pip install -r requirements.txt
sudo apt-get install python3-smbus bettercap

setup usb modules

sudo cp ./core/installation/pwnhyveusb /bin/ && sudo chmod +x /bin/pwnhyveusb
mkdir /mnt/otterusb

make little usb drive file - this will show up when usb mass storage
feel free to edit the size
size values are in kilobytes

sudo dd if=/dev/zero of=/piusb.bin bs=65535 count=65535 
mkdosfs /piusb.bin

usb module run on boot

theres different ways of doing this (cronjobs, systemctl) but i just used rc.local since it's easy and im lazy

add /bin/pwnhyveusb at the end of the file, but before the exit 0 line
for example:

# stuff n code n stuff
/bin/pwnhyveusb
exit 0

for cron:

echo "@reboot /bin/pwnhyveusb" | sudo tee -a /etc/crontab

making pwnhyve to start on boot

i used systemctl since i can just do systemctl restart pwnhyve and it auto restarts
you can use rc.local but it wont work as well

make a file in /bin/ called pwnhyveStart

make sure you're still in pwnhyve's folder

cp ./core/installation/startup.sh /bin/
mv /bin/startup.sh /bin/pwnhyveStart
pwd # save the output of this command, in your memory or ctrl+c
chmod +x /bin/pwnhyveStart
nano /bin/pwnhyveStart

replace all %cwd% in the file with your pwd value
eventually ill make it use variables and auto figure it out

save and exit

now for the final part

cp ./core/installation/pwnhyve.service /etc/systemd/system/
systemctl enable pwnhyve.service

now reboot your pi or do systemctl start pwnhyve.service

congradulations on ur new pi with pwnhyve installed
report any issues on the github, or any suggestions

Clone this wiki locally