2023-07-23 11:53:41 +02:00
2019-10-09 16:03:12 +02:00
2023-07-19 12:01:54 +02:00
2023-07-23 11:53:41 +02:00
2023-07-21 15:50:23 +02:00
2021-04-24 14:36:03 +02:00
2020-06-08 11:46:16 -04:00
2021-04-18 19:04:34 +02:00
2019-10-04 00:27:05 +02:00
2019-09-19 15:15:46 +02:00
2023-07-21 14:03:41 +02:00
2023-07-23 10:51:58 +02:00
2021-04-18 15:43:15 +02:00
2023-07-21 10:25:09 +02:00
2023-07-21 18:49:22 +02:00

Pwnagotchi Torch installation

I assume you have a new (fully upgraded) image of Raspberry Pi OS lite 64-bit flashed to a micro sd-card. With SPI turned on through raspi-config

If you install on a Pi02W:

sudo fallocate -l 4G /var/swapfile
sudo chmod 600 /var/swapfile
sudo mkswap /var/swapfile
# start the swap service
sudo swapon /var/swapfile
# make the service permantent
sudo bash -c 'cat >> /etc/fstab' <<EOF
# add the following line to fstab
/var/swapfile   swap    swap     defaults   0       0
EOF
swapon -s

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

Install nexmon for Raspberry Pi Zero 2 W or Raspberry Pi 4

First use dmesg | grep brcm

Write down what chip it uses (bcm43430 / bcm43455 / bcm43436)


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

Follow README

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

cat /tmp/dependencies | xargs -n5 sudo apt install -y

Install Bettercap

cd ~
git clone https://github.com/jayofelony/bettercap.git
cd bettercap
sudo make
sudo make install
sudo bettercap -eval "caplets.update; ui.update; quit"
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

Install PwnGrid

cd ~
git clone https://github.com/jayofelony/pwngrid.git
cd bettercap
sudo make
sudo make install
sudo pwngrid -generate -keys /etc/pwnagotchi

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
sudo pip3 install -r requirements.txt
sudo pip3 install .
sudo pip3 install --upgrade numpy
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


sudo bash -c 'cat > /etc/pwnagotchi/config.toml' << EOF
main.name = "new_ai_CHANGEME"
main.custom_plugins = "/usr/local/share/pwnagotchi/custom-plugins"

main.plugins.led.enabled = false

personality.deauth = false

ui.display.enabled = false
ui.web.username = "pwny"
ui.web.password = "pwny1234"
EOF

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

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

Enable all services, permissions and reboot

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
sudo sync
sudo reboot
Description
No description provided
Readme 34 MiB
Languages
JavaScript 44.3%
Python 43.9%
CSS 10.4%
HTML 0.8%
PowerShell 0.3%
Other 0.3%