2023-07-19 12:02:11 +02:00
|
|
|
# Pwnagotchi Torch installation
|
2023-07-23 10:36:39 +02:00
|
|
|
I assume you have a new (fully upgraded) image of Raspberry Pi OS lite 64-bit flashed to a micro sd-card.
|
2019-09-19 15:15:46 +02:00
|
|
|
|
2023-07-23 10:03:40 +02:00
|
|
|
|
|
|
|
# Install GoLang
|
|
|
|
```
|
|
|
|
wget https://go.dev/dl/go1.20.6.linux-arm64.tar.gz
|
|
|
|
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.20.6.linux-arm64.tar.gz
|
|
|
|
sudo nano /etc/profile
|
|
|
|
export PATH=$PATH:/usr/local/go/bin # Add this line to the bottom
|
|
|
|
sudo nano ~/.profile
|
|
|
|
export PATH=$PATH:/usr/local/go/bin # Add this line to the bottom
|
|
|
|
sudo visudo
|
|
|
|
:/usr/local/go/bin # Add this to secure_path= line
|
|
|
|
```
|
|
|
|
|
2023-07-23 10:36:39 +02:00
|
|
|
# Install nexmon for Raspberry Pi Zero 2 W or Raspberry Pi 4
|
|
|
|
First use dmesg | grep brcm
|
2023-07-23 10:03:40 +02:00
|
|
|
|
2023-07-23 10:36:39 +02:00
|
|
|
Write down what chip it uses (bcm43430 / bcm43455 / bcm43436)
|
|
|
|
|
|
|
|
-------------
|
2023-07-19 12:02:11 +02:00
|
|
|
```
|
2023-07-23 10:36:39 +02:00
|
|
|
sudo apt install raspberrypi-kernel-headers git libgmp3-dev gawk qpdf bison flex make autoconf libtool texinfo gcc-arm-none-eabi wl libfl-dev g++ xxd
|
|
|
|
cd ~
|
|
|
|
git clone https://github.com/jayofelony/nexmon.git
|
|
|
|
cd nexmon
|
2023-07-19 12:02:11 +02:00
|
|
|
```
|
2023-07-23 10:36:39 +02:00
|
|
|
Follow [README](https://github.com/jayofelony/nexmon#build-patches-for-bcm43430a1-on-the-rpi3zero-w-or-bcm434355c0-on-the-rpi3rpi4-or-bcm43436b0-on-the-rpi-zero-2w-using-raspbianraspberry-pi-os-recommended)
|
2019-09-28 20:45:06 +02:00
|
|
|
|
2023-07-19 12:02:11 +02:00
|
|
|
# Set-up dependencies
|
|
|
|
```
|
|
|
|
cat > /tmp/dependencies << EOF
|
|
|
|
time
|
|
|
|
rsync
|
|
|
|
vim
|
|
|
|
wget
|
|
|
|
screen
|
|
|
|
git
|
|
|
|
build-essential
|
|
|
|
dkms
|
|
|
|
python3-pip
|
|
|
|
python3-smbus
|
|
|
|
unzip
|
|
|
|
gawk
|
|
|
|
libopenmpi-dev
|
|
|
|
libatlas-base-dev
|
|
|
|
libelf-dev
|
|
|
|
libopenjp2-7
|
|
|
|
libtiff5
|
|
|
|
tcpdump
|
|
|
|
lsof
|
|
|
|
libgstreamer1.0-0
|
|
|
|
libavcodec58
|
|
|
|
libavformat58
|
|
|
|
libswscale5
|
|
|
|
libusb-1.0-0-dev
|
|
|
|
libnetfilter-queue-dev
|
|
|
|
libopenmpi3
|
|
|
|
dphys-swapfile
|
|
|
|
libdbus-1-dev
|
|
|
|
libdbus-glib-1-dev
|
|
|
|
liblapack-dev
|
|
|
|
libhdf5-dev
|
|
|
|
libc-ares-dev
|
|
|
|
libeigen3-dev
|
|
|
|
fonts-dejavu
|
|
|
|
fonts-dejavu-core
|
|
|
|
fonts-dejavu-extra
|
|
|
|
python3-pil
|
|
|
|
python3-smbus
|
|
|
|
libfuse-dev
|
|
|
|
libatlas-base-dev
|
|
|
|
libopenblas-dev
|
|
|
|
libblas-dev
|
|
|
|
bc
|
|
|
|
libgl1-mesa-glx
|
|
|
|
libncursesw5-dev
|
|
|
|
libssl-dev
|
|
|
|
libsqlite3-dev
|
|
|
|
tk-dev
|
|
|
|
libgdbm-dev
|
|
|
|
libc6-dev
|
|
|
|
libbz2-dev
|
|
|
|
libffi-dev
|
|
|
|
zlib1g-dev
|
|
|
|
fonts-freefont-ttf
|
|
|
|
fbi
|
|
|
|
python3-flask
|
|
|
|
python3-flask-cors
|
|
|
|
python3-flaskext.wtf
|
|
|
|
EOF
|
2019-09-19 15:45:05 +02:00
|
|
|
|
2023-07-19 12:02:11 +02:00
|
|
|
cat /tmp/dependencies | xargs -n5 sudo apt install -y
|
|
|
|
```
|
2019-10-14 16:16:59 +02:00
|
|
|
|
2023-07-19 12:02:11 +02:00
|
|
|
# Install Bettercap
|
|
|
|
```
|
|
|
|
cd ~
|
|
|
|
git clone https://github.com/jayofelony/bettercap.git
|
|
|
|
cd bettercap
|
2023-07-23 10:36:39 +02:00
|
|
|
sudo make
|
2023-07-19 12:02:11 +02:00
|
|
|
sudo make install
|
|
|
|
sudo bettercap -eval "caplets.update; ui.update; quit"
|
2023-07-20 20:40:25 +02:00
|
|
|
sudo nano /usr/local/share/bettercap/caplets/pwnagotchi-auto.cap # change iface to wlan0
|
|
|
|
sudo nano /usr/local/share/bettercap/caplets/pwnagotchi-manual.cap # change iface to wlan0
|
2023-07-19 12:02:11 +02:00
|
|
|
```
|
2019-09-19 15:27:08 +02:00
|
|
|
|
2023-07-19 12:02:11 +02:00
|
|
|
# Install PwnGrid
|
|
|
|
```
|
|
|
|
cd ~
|
2023-07-23 10:03:40 +02:00
|
|
|
git clone https://github.com/jayofelony/pwngrid.git
|
2023-07-19 12:02:11 +02:00
|
|
|
cd bettercap
|
2023-07-23 10:36:39 +02:00
|
|
|
sudo make
|
2023-07-19 12:02:11 +02:00
|
|
|
sudo make install
|
|
|
|
sudo pwngrid -generate -keys /etc/pwnagotchi
|
|
|
|
```
|
2019-10-05 17:07:22 -04:00
|
|
|
|
2023-07-19 12:02:11 +02:00
|
|
|
# Install Pwnagotchi-Torch
|
|
|
|
```
|
|
|
|
cd ~
|
|
|
|
git clone -b pwnagotchi-torch https://github.com/jayofelony/pwnagotchi.git
|
|
|
|
cd pwnagotchi
|
|
|
|
for i in $(grep -v ^# requirements.txt | cut -d \> -f 1); do sudo apt -y install python3-$i; done
|
2023-07-23 00:19:34 +02:00
|
|
|
sudo pip3 install -r requirements.txt
|
2023-07-23 00:49:41 +02:00
|
|
|
sudo pip3 install .
|
2023-07-23 00:19:34 +02:00
|
|
|
sudo pip3 install --upgrade numpy
|
2023-07-19 12:02:11 +02:00
|
|
|
sudo ln -s `pwd`/bin/pwnagotchi /usr/local/bin
|
|
|
|
sudo ln -s `pwd`/pwnagotchi /usr/local/lib/python3.9/dist-packages/pwnagotchi
|
|
|
|
sudo mkdir -p /usr/local/share/pwnagotchi/custom-plugins
|
2019-09-19 16:01:15 +02:00
|
|
|
|
2019-10-05 17:07:22 -04:00
|
|
|
|
2023-07-19 12:02:11 +02:00
|
|
|
sudo bash -c 'cat > /etc/pwnagotchi/config.toml' << EOF
|
|
|
|
main.name = "new_ai_CHANGEME"
|
|
|
|
main.custom_plugins = "/usr/local/share/pwnagotchi/custom-plugins"
|
2019-09-19 15:15:46 +02:00
|
|
|
|
2023-07-19 12:02:11 +02:00
|
|
|
main.plugins.led.enabled = false
|
2019-10-03 11:27:51 +02:00
|
|
|
|
2023-07-19 12:02:11 +02:00
|
|
|
personality.deauth = false
|
2019-10-03 11:27:51 +02:00
|
|
|
|
2023-07-19 12:02:11 +02:00
|
|
|
ui.display.enabled = false
|
|
|
|
ui.web.username = "pwny"
|
|
|
|
ui.web.password = "pwny1234"
|
|
|
|
EOF
|
2019-09-19 15:51:33 +02:00
|
|
|
|
2023-07-19 12:02:11 +02:00
|
|
|
for file in `find builder/data -type f`; do
|
|
|
|
dest=${file#builder/data}
|
|
|
|
if [ -s $dest ]; then
|
|
|
|
echo File $dest exists. Skipping
|
|
|
|
else
|
|
|
|
echo Copying $file to $dest
|
|
|
|
sudo cp -p $file $dest
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
```
|
2019-10-03 19:07:13 -07:00
|
|
|
|
2023-07-23 00:19:34 +02:00
|
|
|
# Downgrade libpcap
|
|
|
|
```
|
|
|
|
cd ~
|
|
|
|
wget http://ports.ubuntu.com/pool/main/libp/libpcap/libpcap0.8_1.9.1-3_arm64.deb
|
|
|
|
wget http://ports.ubuntu.com/pool/main/libp/libpcap/libpcap0.8-dev_1.9.1-3_arm64.deb
|
|
|
|
wget http://ports.ubuntu.com/pool/main/libp/libpcap/libpcap-dev_1.9.1-3_arm64.deb
|
|
|
|
sudo apt -y install ./libpcap*.deb --allow-downgrades
|
|
|
|
sudo apt-mark hold libpcap-dev libpcap0.8 libpcap0.8-dev
|
|
|
|
```
|
|
|
|
|
2023-07-23 10:36:39 +02:00
|
|
|
# Enable all services, permissions and reboot
|
2023-07-19 12:02:11 +02:00
|
|
|
```
|
2023-07-23 10:36:39 +02:00
|
|
|
sudo chmod 755 /usr/local/bin/bettercap
|
|
|
|
sudo chown root:root /usr/local/bin/bettercap
|
|
|
|
sudo chmod 755 /usr/bin/bettercap-launcher
|
|
|
|
sudo chmod 755 /usr/local/bin/pwngrid
|
|
|
|
sudo chown root:root /usr/local/bin/pwngrid
|
|
|
|
sudo chmod 755 /usr/local/bin/pwnagotchi
|
|
|
|
sudo chown root:root /usr/local/bin/pwnagotchi
|
|
|
|
sudo chmod 711 /usr/bin/pwnagotchi-launcher
|
|
|
|
sudo chmod 755 /usr/local/share/bettercap/
|
|
|
|
sudo systemctl enable bettercap pwngrid-peer pwnagotchi bluetooth
|
2023-07-19 12:02:11 +02:00
|
|
|
sudo sync
|
|
|
|
sudo reboot
|
2023-07-20 20:40:25 +02:00
|
|
|
```
|