Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- guerrila guide to installing pwnagotchi [1.5.5/2022]
- 1) download
- *balena etcher [https://www.balena.io/etcher/]
- *pwnagotchi v1.5.5 [https://github.com/evilsocket/pwnagotchi/releases/tag/v1.5.5]
- 2) burn a 1.5.5 with balena etcher to microsd
- 3) connect rasppi data port <-> pc
- 4)
- *in cmd window*
- ssh pi@10.0.0.2
- #default password: raspberry [change it later]
- **if you get WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
- ** Go to C:\Users\{user}\.ssh, open know_hosts and comment out (#) every line; save
- ** connect again with pi (ssh pi@10.0.0.2); confirm/authorize (yes in terminal)
- ***
- in /etc/resolv.conf change
- nameserver 127.0.0.1
- to
- nameserver 8.8.8.8
- ***
- Internet sharing for win10
- #if your script have different name (than "pwn-internet-sharing.ps1") just change "pwn-internet-sharing.ps1" in
- #commands below to the name of your script
- Those powershell commands:
- powershell -ExecutionPolicy ByPass -File .\pwn-internet-sharing.ps1 -SetPwnagotchiSubnet
- powershell -ExecutionPolicy ByPass -File .\pwn-internet-sharing.ps1 -EnableInternetConnectionSharing
- *enable mobilehotspot on pc # and turn off power saving mode for hotspot*
- **possible fixes for no internet
- **might need that later if you cant reach internet with pi
- **##adding dns-nameservers 8.8.8.8 under the gateway line in /etc/network/interfaces.d/usb0-cfg
- **##add: "server=8.8.8.8@usb0" to /etc/dnsmasq.conf
- **##systemctl disable dnsmasq
- **##sudo chattr +i /etc/resolv.conf makes file immutable (make sure beforehand there is 8.8.8.8 or 1.1.1.1 insted of 127.0.0.0)
- 5) password change
- passwd #change pi's password
- sudo su
- passwd root #change root's password
- 6)to get root access through FTP client:
- sudo nano /etc/ssh/sshd_config
- ***
- uncomment and change
- #PermitRootLogin prohibit-password
- to
- PermitRootLogin yes
- ***
- service ssh restart
- login FTP with:
- host: 10.0.0.2
- username: root
- password: *password*
- port: 22
- 7) connect through ftp and upload:
- *your config.toml*
- #make directory /etc/pwnagotchi/custom-plugins
- *custom plugins to that directory ^^
- minimum is to change BT settings in stock/default config
- 7a) internet access (do it if you dont supply your premade/working config in previous step)
- change following options:
- main.plugins.bt-tether.enabled = true
- main.plugins.bt-tether.devices.android-phone.enabled = true
- main.plugins.bt-tether.devices.android-phone.search_order = 1
- main.plugins.bt-tether.devices.android-phone.mac = "CH:AN:GE:ME:HE:RE" #phone: settings-> about device -> status "bluetooth address"
- main.plugins.bt-tether.devices.android-phone.ip = "192.168.44.44"
- main.plugins.bt-tether.devices.android-phone.netmask = 24
- main.plugins.bt-tether.devices.android-phone.interval = 1
- main.plugins.bt-tether.devices.android-phone.scantime = 10
- main.plugins.bt-tether.devices.android-phone.max_tries = 0
- main.plugins.bt-tether.devices.android-phone.share_internet = true
- main.plugins.bt-tether.devices.android-phone.priority = 1
- 8) reboot pwnagotchi through web UI on pc
- 9) *pair pwnagotchi with phone* IMPORTANT!
- #make sure BT and BT tethering is on (!!!)
- #keep phone unlocked
- *pair phone*
- #If for some reasons pwnagotchi will stop connecting to your phone after some time, try this:
- #*rasspi data port <--> pc*
- #>ssh [email protected]
- #>sudo su
- #>bluetoothctl
- #>scan on
- #>discoverable on
- #>paired-devices
- #*copy device adress*
- #>untrust *device adress* #run this commend few times
- #>remove *device adress* #run this commend few times
- #>paired-devices #make sure list is empty, if not- run previous command until it is empty
- #>pair *device adress*
- #*In short time (maybe not immediately) you will be prompted on the phone to allow connection from your pwnagotchi hostname- pair*
- #>trust *device adress*
- #>exit
- after that, open cmd window with ssh sesion(!), and
- ping google.com
- #if you cant ping:
- sudo nano /etc/resolv.conf
- # and change 127.0.0.1 to 8.8.8.8
- # ctrl+x; y; enter
- 10) install some pckgs
- cd ~
- sudo apt-get install aircrack-ng -y #aicrackonly plugin
- ##if you're using default config & airackonly plugin, dont forget to add this to config:
- ##main.plugins.aircrackonly.enabled = true
- ##main.plugins.aircrackonly.face = "(>.<)"
- git clone https://github.com/ZerBea/hcxtools.github #hashie plugin
- cd hcxtools
- sudo su
- apt-get install libcurl4-openssl-dev libssl-dev zlib1g-dev
- make #takes a while (30min?)
- sudo make install
- sudo pip3 install pySerial #unoficialgps plugin
- 11) change bettercup passes #IMPORTANT!!!
- sudo nano /etc/pwnagotchi/config.toml
- sudo nano /usr/local/share/bettercap/caplets/pwnagotchi-auto.cap
- sudo nano /usr/local/share/bettercap/caplets/pwnagotchi-manual.cap
- 12) some fixes for broken AI
- sudo pip3 install -v --upgrade numpy ##it taaaaakes a while, it really does. go clean your room, garage,
- ##neighbour's garage and fix your life in the meantime (2h?)
- #if you get a timeout error try:
- #sudo pip3 install --default-timeout=100 -v --upgrade numpy
- #if pwnagotchi still doesnt switch to AI after ~45min
- #sudo apt-get remove python-opencv; sudo apt-get install python-opencv
- 13) switch files ##SKIP THIS STEP!
- voice.py #for showerthoughts update
- *) /usr/local/lib/python3.7/dist-packages/pwnagotchi/ # This one is enough
- *) /usr/local/src/pwnagotchi/build/lib/pwnagotchi/
- *) /usr/local/src/pwnagotchi/pwnagotchi/
- waveshare2.py #adjusted peer position
- *) /usr/local/lib/python3.7/dist-packages/pwnagotchi/ui/hw/ #This one is enough
- *) /usr/local/src/pwnagotchi/build/lib/pwnagotchi/ui/hw/
- *) /usr/local/src/pwnagotchi/pwnagotchi/ui/hw/
- webgpsmap.html
- *) /usr/local/lib/python3.7/dist-packages/pwnagotchi/plugins/default/
- 13a) #OPTIONAL BUT RECOMENDED if you got showerthoughts voice## ##SKIP THIS STEP!
- #activate of looking around animation (feed rss r/showerthoughts) z 13 kroku
- sudo su
- crontab -e
- #add following
- 30 * * * * curl --silent https://www.reddit.com/r/showerthoughts.rss --user-agent 'Mozilla' --output /root/showerthoughts.rss
- *save and exit*
- sudo su
- curl --silent https://www.reddit.com/r/showerthoughts.rss --user-agent 'Mozilla' --output /root/showerthoughts.rss
- 14)
- sudo apt-get update --allow-releaseinfo-change #fix to: repository changed its 'Suite' value from 'stable' to 'oldstable'
- sudo apt-get update
- sudo apt install nmap macchanger #educational-purposes-only/home_base plugin// choose "no" for automatic random mac
- 15) Pisugar2 plugin # SKIP THIS STEP if you dont have pisugar2 hat
- # Go to the home directory
- cd ~
- # Install PiSugar Power Manager
- curl http://cdn.pisugar.com/release/Pisugar-power-manager.sh | sudo bash
- # Download the plugin and support library
- git clone https://github.com/PiSugar/pisugar2py.git
- git clone https://github.com/PiSugar/pwnagotchi-pisugar2-plugin.git
- # This installs the pisugar2 package into your python library
- sudo ln -s ~/pisugar2py/ /usr/local/lib/python3.7/dist-packages/pisugar2
- # Installs the user-plugin
- sudo ln -s ~/pwnagotchi-pisugar2-plugin/pisugar2.py /etc/pwnagotchi/custom-plugins/pisugar2.py
- *)SSH without password:
- *on your PC open cmd and:*
- cd .ssh/
- ssh-keygen
- *3x enter*
- *copy content of id_rsa.pub
- *back to pi*
- sudo nano ~/.ssh/authorized_keys
- *paste content of id_rsa.pub *[RMB]*; save*
- #####How to Delete Line in Nano?
- ##First, you need to press CTRL + Shift + 6 to mark the start of your block
- ##Now, shift the cursor to the end of the block with the arrow keys, and it will outline the text.
- ##Finally, press CTRL + K to cut/delete a block and it will remove a line in nano.
- *) RTC config (https://learn.adafruit.com/adding-a-real-time-clock-to-raspberry-pi/set-rtc-time) ##SKIP THIS STEP if you dont have RTC installed
- cd ~
- sudo apt-get install python-smbus i2c-tools -y
- sudo i2cdetect -y 1 #to ckeck if wiring is good. numbers = ok; if "uu" skip next command/step (dont edit file)
- sudo nano /boot/config.txt
- *edit the pi configuration and add to the end of the file whichever matches your RTC chip:
- **
- dtoverlay=i2c-rtc,pcf8523
- **
- sudo reboot
- *ssh to pi again*
- sudo i2cdetect -y 1 ## "UU" means we're good
- sudo apt-get -y remove fake-hwclock
- sudo update-rc.d -f fake-hwclock remove
- sudo systemctl disable fake-hwclock
- Run sudo nano /lib/udev/hwclock-set and comment out these five lines:
- #if [ -e /run/systemd/system ] ; then
- # exit 0
- #fi
- #/sbin/hwclock --rtc=$dev --systz --badyear
- #/sbin/hwclock --rtc=$dev --systz
- *save and exit*
- sudo hwclock -r ##read the time directly from the RTC
- date #if output is not a current date procced with next step
- sudo raspi-config
- *Got to “Localisation options”, then “Timezone
- *Pick a geographic area and a specific time zone then exit [esc]
- date ##if correct proceed
- sudo hwclock -w
- sudo systemctl stop pwnagotchi
- sudo reboot
- *) aliases
- add followng lines to .bashrc (for pi and root separetly) ##make sure there're no white spaces at the end!
- alias pwnlog='tail -f -n300 /var/log/pwn*.log | sed --unbuffered "s/,[[:digit:]]\{3\}\]//g" | cut -d " " -f 2-'
- alias pwnver='python3 -c "import pwnagotchi as p; print(p.version)"'
- *) SD card protection
- change config to
- fs.memory.enabled = true
- fs.memory.mounts.log.enabled = true
- fs.memory.mounts.data.enabled = true
- ~~~~~~~~~~~extra steps:~~~~~~~~~~~~~~~~~~~~~~~~~~~
- #change pwnagotchi at /usr/local/bin (home_base epoch cycling fix)
- https://github.com/evilsocket/pwnagotchi/pull/1003
- #change webgpsmap.html /usr/local/lib/python3.7/dist-packages/pwnagotchi/plugins/default for custom made ver
- #change watchdog /usr/local/lib/python3.7/dist-packages/pwnagotchi/plugins/default to v1.0.0
- https://github.com/dadav/pwnagotchi-custom-plugins/blob/master/watchdog.py
- #change paw-gps to 1.0.1
- https://github.com/evilsocket/pwnagotchi/pull/1054
- #change clock.py 1.0.3 ##changes allow you to customise the displayed time format by editing config.toml, e.g. switching from 12 to 24 hours clock format, or adding seconds
- https://github.com/evilsocket/pwnagotchi-plugins-contrib/pull/29/files
- #change hashie.py 1.0.3 ##newer than https://github.com/PwnPeter/pwnagotchi-plugins hashie 1.0.3 //it migh be slower than pwnpeter's version//do more tests//
- https://github.com/evilsocket/pwnagotchi-plugins-contrib/pull/36/files
- #display_version.py 1.0.0
- https://github.com/evilsocket/pwnagotchi-plugins-contrib/pull/35/files
- #wpa-sec-list 1.0.0 ##List cracked passwords from wpa-sec
- https://github.com/evilsocket/pwnagotchi-plugins-contrib/pull/34/files
- #HandshakesDL 0.2.2 ##Download handshake captures from web-ui [newer than handshakes 1.0.3 https://github.com/PwnPeter/pwnagotchi-plugins]
- https://github.com/evilsocket/pwnagotchi-plugins-contrib/pull/27/files
- #aircrack-ng 2.0.0.
- https://github.com/dadav/pwnagotchi-custom-plugins/blob/master/aircrackonly.py
- #webcfg update?
- https://github.com/dadav/pwnagotchi/blob/master/pwnagotchi/plugins/default/webcfg.py
- #home_base 1.0.0 & away_base 1.0.0
- https://github.com/troystauffer/home_base
- #plus this fix
- https://github.com/evilsocket/pwnagotchi/pull/1003
- #unoficialGPS 1.0.0
- https://github.com/evilsocket/pwnagotchi-plugins-contrib/pull/22/files
- #auto_update.py 2.0.0
- https://github.com/dadav/pwnagotchi-custom-plugins/blob/master/auto_backup.py
- ##update it with this:
- https://github.com/evilsocket/pwnagotchi-plugins-contrib/issues/30
- #exp 1.0.5
- https://github.com/GaelicThunder/Experience-Plugin-Pwnagotchi
- #onlinehashcrack 2.1.5
- https://github.com/dadav/pwnagotchi-custom-plugins/blob/master/onlinehashcrack.py
- #wpa-sec.py 3.0.2
- https://github.com/dadav/pwnagotchi-custom-plugins/blob/master/wpa-sec.py
- #screen_refresh 2.0.0
- https://github.com/dadav/pwnagotchi-custom-plugins/blob/master/screen_refresh.py
- #wpa-sec2 #It will only do a check and make .gps.cracked files from the downloaded .cracked.potfile after it downloads from wpa-sec
- https://github.com/xenDE/pwnagotchi-tools/issues/1
- #yml config for it below. NOTE! i didnt test this plugin yet, you need to translate it to toml before you put it in a config
- wpa-sec2:
- enabled: false
- api_key: ''
- api_url: "https://wpa-sec.stanev.org"
- download_results: true
- #watchdog.py 1.0.0
- https://github.com/dadav/pwnagotchi-custom-plugins/blob/master/watchdog.py
- #paw-gps.py 1.0.1
- https://github.com/evilsocket/pwnagotchi/pull/1054
- ~~~~~~~~~~~~extra info:~~~~~~~~~~~~~~~~~~~~~~~~
- blind mon bug fix?:
- https://github.com/evilsocket/pwnagotchi/issues/267#issuecomment-571025443
- https://github.com/seemoo-lab/nexmon/issues/335#issuecomment-738928287
- if you want to use quick-dic make sure to add
- #main.plugins.quickdic.wordlist_folder = “/opt/wordlists/“
- to /etc/pwnagotchi/config.toml
- default plugins directory:
- /usr/local/lib/python3.7/dist-packages/pwnagotchi/plugins/default/
- custom plugins directory
- /etc/pwnagotchi/custom-plugins/
- config directory
- /etc/pwnagotchi/
- AI
- the neural network is located at /root/brain.nn
- information about its age at /root/brain.json
- Logs
- /var/log/pwnagotchi.log
- Memory
- /root/peers/
- handshakes
- /root/handshakes/
Add Comment
Please, Sign In to add comment