panoptyk

pwnInstallZ1.5.5.txt

Feb 5th, 2022 (edited)
7,277
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 13.47 KB | None | 1 0
  1. guerrila guide to installing pwnagotchi [1.5.5/2022]
  2.  
  3.  
  4. 1) download
  5.     *balena etcher  [https://www.balena.io/etcher/]
  6.     *pwnagotchi v1.5.5  [https://github.com/evilsocket/pwnagotchi/releases/tag/v1.5.5]
  7.  
  8. 2) burn a 1.5.5 with balena etcher to microsd
  9.  
  10. 3) connect rasppi data port <-> pc
  11.  
  12. 4)
  13.         *in cmd window*
  14.     ssh pi@10.0.0.2
  15.         #default password: raspberry   [change it later]
  16.  
  17.         **if you get  WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
  18.         ** Go to C:\Users\{user}\.ssh, open know_hosts and comment out (#) every line; save
  19.         ** connect again with pi (ssh pi@10.0.0.2); confirm/authorize  (yes in terminal)
  20.  
  21.  
  22.         ***
  23.         in /etc/resolv.conf change
  24.             nameserver 127.0.0.1
  25.         to 
  26.             nameserver 8.8.8.8
  27.         ***
  28.  
  29.  
  30. Internet sharing for win10
  31.  
  32.     #if your script have different name (than "pwn-internet-sharing.ps1") just change "pwn-internet-sharing.ps1" in
  33.     #commands below to the name of your script
  34.  
  35.     Those powershell commands:
  36.  
  37.         powershell -ExecutionPolicy ByPass -File .\pwn-internet-sharing.ps1 -SetPwnagotchiSubnet
  38.  
  39.         powershell -ExecutionPolicy ByPass -File .\pwn-internet-sharing.ps1 -EnableInternetConnectionSharing
  40.  
  41.     *enable mobilehotspot on pc # and turn off power saving mode for hotspot*
  42.  
  43.  
  44.     **possible fixes for no internet
  45.     **might need that later if you cant reach internet with pi
  46.     **##adding dns-nameservers 8.8.8.8 under the gateway line in /etc/network/interfaces.d/usb0-cfg
  47.     **##add: "server=8.8.8.8@usb0" to /etc/dnsmasq.conf
  48.     **##systemctl disable dnsmasq
  49.     **##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)
  50.  
  51. 5) password change
  52.  
  53.     passwd #change pi's password
  54.     sudo su
  55.     passwd root #change root's password
  56.  
  57. 6)to get root access through FTP client:
  58.  
  59.     sudo nano /etc/ssh/sshd_config
  60.  
  61.        
  62.         ***
  63.         uncomment and change
  64.     #PermitRootLogin prohibit-password  
  65.         to
  66.     PermitRootLogin yes
  67.         ***
  68.  
  69.     service ssh restart
  70.  
  71.  
  72. login FTP with:
  73.  
  74.     host: 10.0.0.2
  75.     username: root
  76.     password: *password*
  77.     port: 22
  78.  
  79. 7) connect through ftp and upload:
  80.     *your config.toml*
  81.     #make directory /etc/pwnagotchi/custom-plugins
  82.      *custom plugins to that directory ^^
  83.  
  84.  
  85.  
  86.  minimum is to change BT settings in stock/default config
  87.  
  88.  7a) internet access (do it if you dont supply your premade/working config in previous step)
  89.  change following options:
  90.  
  91. main.plugins.bt-tether.enabled = true
  92. main.plugins.bt-tether.devices.android-phone.enabled = true
  93. main.plugins.bt-tether.devices.android-phone.search_order = 1
  94. main.plugins.bt-tether.devices.android-phone.mac = "CH:AN:GE:ME:HE:RE" #phone: settings-> about device -> status "bluetooth address"  
  95. main.plugins.bt-tether.devices.android-phone.ip = "192.168.44.44"
  96. main.plugins.bt-tether.devices.android-phone.netmask = 24
  97. main.plugins.bt-tether.devices.android-phone.interval = 1
  98. main.plugins.bt-tether.devices.android-phone.scantime = 10
  99. main.plugins.bt-tether.devices.android-phone.max_tries = 0
  100. main.plugins.bt-tether.devices.android-phone.share_internet = true
  101. main.plugins.bt-tether.devices.android-phone.priority = 1
  102.  
  103. 8) reboot pwnagotchi  through web UI on pc
  104.  
  105. 9) *pair pwnagotchi with phone* IMPORTANT!
  106.  
  107.             #make sure BT and BT tethering is on (!!!)
  108.             #keep phone unlocked
  109.         *pair phone*
  110.  
  111.             #If for some reasons pwnagotchi will stop connecting to your phone after some time, try this:  
  112.             #*rasspi data port <--> pc*
  113.             #>ssh [email protected]
  114.             #>sudo su
  115.             #>bluetoothctl
  116.             #>scan on
  117.             #>discoverable on
  118.             #>paired-devices
  119.             #*copy device adress*
  120.             #>untrust *device adress*  #run this commend few times
  121.             #>remove *device adress*   #run this commend few times
  122.             #>paired-devices           #make sure list is empty, if not- run previous command until it is empty
  123.             #>pair *device adress*
  124.             #*In short time (maybe not immediately) you will be prompted on the phone to allow connection from your pwnagotchi hostname- pair*
  125.             #>trust *device adress*
  126.             #>exit
  127.  
  128.  
  129. after that, open cmd window with ssh sesion(!), and
  130.  
  131.     ping google.com
  132.         #if you cant ping:
  133.         sudo nano /etc/resolv.conf
  134.         # and change 127.0.0.1 to 8.8.8.8
  135.         # ctrl+x; y; enter
  136.  
  137. 10) install some pckgs
  138.  
  139.     cd ~
  140.     sudo apt-get install aircrack-ng -y                     #aicrackonly plugin
  141.  
  142.         ##if you're using default config & airackonly plugin, dont forget to add this to config:
  143.         ##main.plugins.aircrackonly.enabled = true
  144.         ##main.plugins.aircrackonly.face = "(>.<)"
  145.  
  146.                                                            
  147.     git clone https://github.com/ZerBea/hcxtools.github     #hashie plugin
  148.     cd hcxtools
  149.     sudo su
  150.     apt-get install libcurl4-openssl-dev libssl-dev zlib1g-dev
  151.     make #takes a while (30min?)
  152.     sudo make install
  153.  
  154.  
  155.     sudo pip3 install pySerial                              #unoficialgps plugin
  156.  
  157. 11) change bettercup passes #IMPORTANT!!!
  158.  
  159.     sudo nano /etc/pwnagotchi/config.toml  
  160.  
  161.     sudo nano /usr/local/share/bettercap/caplets/pwnagotchi-auto.cap
  162.  
  163.     sudo nano /usr/local/share/bettercap/caplets/pwnagotchi-manual.cap
  164.  
  165. 12) some fixes for broken AI
  166.  
  167.     sudo pip3 install -v --upgrade numpy        ##it taaaaakes a while, it really does. go clean your room, garage,
  168.                                                                                     ##neighbour's garage and fix your life in the meantime (2h?)
  169.  
  170.         #if you get a timeout error try:
  171.         #sudo pip3 install --default-timeout=100 -v --upgrade numpy
  172.  
  173.     #if pwnagotchi still doesnt switch to AI after ~45min
  174.     #sudo apt-get remove python-opencv; sudo apt-get install python-opencv
  175.  
  176.  
  177. 13) switch files            ##SKIP THIS STEP!
  178.  
  179. voice.py #for showerthoughts update
  180.     *)  /usr/local/lib/python3.7/dist-packages/pwnagotchi/  # This one is enough
  181.         *)  /usr/local/src/pwnagotchi/build/lib/pwnagotchi/  
  182.         *)  /usr/local/src/pwnagotchi/pwnagotchi/
  183.  
  184. waveshare2.py #adjusted peer position
  185.     *) /usr/local/lib/python3.7/dist-packages/pwnagotchi/ui/hw/  #This one is enough
  186.         *) /usr/local/src/pwnagotchi/build/lib/pwnagotchi/ui/hw/
  187.         *) /usr/local/src/pwnagotchi/pwnagotchi/ui/hw/
  188.  
  189. webgpsmap.html
  190.     *) /usr/local/lib/python3.7/dist-packages/pwnagotchi/plugins/default/
  191.  
  192.  
  193. 13a) #OPTIONAL BUT RECOMENDED if you got showerthoughts voice##    ##SKIP THIS STEP!
  194.  
  195. #activate of looking around animation (feed rss r/showerthoughts) z 13 kroku
  196.  
  197.     sudo su
  198.     crontab -e
  199.  
  200. #add following
  201.  
  202.     30 * * * * curl --silent https://www.reddit.com/r/showerthoughts.rss --user-agent 'Mozilla' --output /root/showerthoughts.rss
  203.  
  204. *save and exit*
  205.  
  206.     sudo su
  207.     curl --silent https://www.reddit.com/r/showerthoughts.rss --user-agent 'Mozilla' --output /root/showerthoughts.rss
  208.  
  209. 14)
  210.  
  211.     sudo apt-get update --allow-releaseinfo-change #fix to: repository changed its 'Suite' value from 'stable' to 'oldstable'  
  212.  
  213.     sudo apt-get update
  214.    
  215.     sudo apt install nmap macchanger            #educational-purposes-only/home_base plugin// choose "no" for automatic random mac
  216.  
  217.  
  218. 15) Pisugar2 plugin     # SKIP THIS STEP if you dont have pisugar2 hat
  219.     # Go to the home directory
  220.         cd ~
  221.  
  222.     # Install PiSugar Power Manager
  223.         curl http://cdn.pisugar.com/release/Pisugar-power-manager.sh | sudo bash
  224.  
  225.     # Download the plugin and support library
  226.         git clone https://github.com/PiSugar/pisugar2py.git
  227.         git clone https://github.com/PiSugar/pwnagotchi-pisugar2-plugin.git
  228.  
  229.     # This installs the pisugar2 package into your python library
  230.         sudo ln -s ~/pisugar2py/ /usr/local/lib/python3.7/dist-packages/pisugar2
  231.  
  232.     # Installs the user-plugin
  233.         sudo ln -s ~/pwnagotchi-pisugar2-plugin/pisugar2.py /etc/pwnagotchi/custom-plugins/pisugar2.py
  234.  
  235.  
  236. *)SSH without password:
  237.  
  238.     *on your PC open cmd and:*
  239.  
  240.         cd .ssh/
  241.         ssh-keygen
  242.         *3x enter*
  243.  
  244.         *copy content of id_rsa.pub
  245.  
  246.     *back to pi*
  247.  
  248.         sudo nano ~/.ssh/authorized_keys
  249.  
  250.     *paste content of id_rsa.pub *[RMB]*; save*
  251.  
  252.  
  253.  
  254.     #####How to Delete Line in Nano?
  255.     ##First, you need to press CTRL + Shift + 6 to mark the start of your block
  256.     ##Now, shift the cursor to the end of the block with the arrow keys, and it will outline the text.
  257.     ##Finally, press CTRL + K to cut/delete a block and it will remove a line in nano.
  258.  
  259. *) 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
  260.  
  261.         cd ~
  262.         sudo apt-get install python-smbus i2c-tools -y
  263.         sudo i2cdetect -y 1                             #to ckeck if wiring is good. numbers = ok; if "uu" skip next command/step (dont edit file)
  264.         sudo nano /boot/config.txt
  265.  
  266.     *edit the pi configuration and add to the end of the file whichever matches your RTC chip:
  267.         **
  268.         dtoverlay=i2c-rtc,pcf8523
  269.         **
  270.         sudo reboot
  271.  
  272.     *ssh to pi again*
  273.  
  274.         sudo i2cdetect -y 1  ## "UU" means we're good
  275.  
  276.         sudo apt-get -y remove fake-hwclock
  277.         sudo update-rc.d -f fake-hwclock remove
  278.         sudo systemctl disable fake-hwclock
  279.  
  280.     Run sudo nano /lib/udev/hwclock-set and comment out these five lines:
  281.  
  282.         #if [ -e /run/systemd/system ] ; then
  283.         # exit 0
  284.         #fi
  285.  
  286.         #/sbin/hwclock --rtc=$dev --systz --badyear
  287.         #/sbin/hwclock --rtc=$dev --systz
  288.  
  289.     *save and exit*
  290.  
  291.         sudo hwclock -r   ##read the time directly from the RTC
  292.         date  #if output is not a current date  procced with next step
  293.  
  294.         sudo raspi-config
  295.  
  296.     *Got to “Localisation options”, then “Timezone
  297.     *Pick a geographic area and a specific time zone then exit [esc]
  298.  
  299.         date ##if correct proceed
  300.         sudo hwclock -w
  301.  
  302.         sudo systemctl stop pwnagotchi
  303.         sudo reboot
  304.  
  305.  
  306.  
  307. *) aliases
  308.     add followng lines to .bashrc (for pi and root separetly) ##make sure there're no white spaces at the end!
  309.  
  310.         alias pwnlog='tail -f -n300 /var/log/pwn*.log | sed --unbuffered "s/,[[:digit:]]\{3\}\]//g" | cut -d " " -f 2-'        
  311.         alias pwnver='python3 -c "import pwnagotchi as p; print(p.version)"'
  312.  
  313.  
  314.  
  315. *) SD card protection
  316.  
  317.     change config to
  318.         fs.memory.enabled = true
  319.         fs.memory.mounts.log.enabled = true
  320.         fs.memory.mounts.data.enabled = true
  321.        
  322.  
  323.  
  324. ~~~~~~~~~~~extra steps:~~~~~~~~~~~~~~~~~~~~~~~~~~~
  325.  
  326.  
  327. #change pwnagotchi at /usr/local/bin (home_base epoch cycling fix)
  328. https://github.com/evilsocket/pwnagotchi/pull/1003
  329.  
  330. #change  webgpsmap.html /usr/local/lib/python3.7/dist-packages/pwnagotchi/plugins/default for custom made ver
  331.  
  332. #change watchdog /usr/local/lib/python3.7/dist-packages/pwnagotchi/plugins/default to v1.0.0
  333. https://github.com/dadav/pwnagotchi-custom-plugins/blob/master/watchdog.py
  334.  
  335. #change paw-gps to 1.0.1
  336. https://github.com/evilsocket/pwnagotchi/pull/1054
  337.  
  338. #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
  339. https://github.com/evilsocket/pwnagotchi-plugins-contrib/pull/29/files
  340.  
  341. #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//
  342. https://github.com/evilsocket/pwnagotchi-plugins-contrib/pull/36/files
  343.  
  344. #display_version.py 1.0.0
  345. https://github.com/evilsocket/pwnagotchi-plugins-contrib/pull/35/files
  346.  
  347. #wpa-sec-list 1.0.0   ##List cracked passwords from wpa-sec
  348. https://github.com/evilsocket/pwnagotchi-plugins-contrib/pull/34/files
  349.  
  350. #HandshakesDL 0.2.2 ##Download handshake captures from web-ui [newer than handshakes 1.0.3 https://github.com/PwnPeter/pwnagotchi-plugins]
  351. https://github.com/evilsocket/pwnagotchi-plugins-contrib/pull/27/files
  352.  
  353. #aircrack-ng 2.0.0.
  354. https://github.com/dadav/pwnagotchi-custom-plugins/blob/master/aircrackonly.py
  355.  
  356. #webcfg update?
  357. https://github.com/dadav/pwnagotchi/blob/master/pwnagotchi/plugins/default/webcfg.py
  358.  
  359. #home_base 1.0.0 & away_base 1.0.0
  360. https://github.com/troystauffer/home_base
  361. #plus this fix
  362. https://github.com/evilsocket/pwnagotchi/pull/1003
  363.  
  364. #unoficialGPS 1.0.0
  365. https://github.com/evilsocket/pwnagotchi-plugins-contrib/pull/22/files
  366.  
  367. #auto_update.py 2.0.0
  368. https://github.com/dadav/pwnagotchi-custom-plugins/blob/master/auto_backup.py
  369. ##update it with this:
  370. https://github.com/evilsocket/pwnagotchi-plugins-contrib/issues/30
  371.  
  372. #exp 1.0.5
  373. https://github.com/GaelicThunder/Experience-Plugin-Pwnagotchi
  374.  
  375.  
  376. #onlinehashcrack 2.1.5
  377. https://github.com/dadav/pwnagotchi-custom-plugins/blob/master/onlinehashcrack.py
  378.  
  379. #wpa-sec.py 3.0.2
  380. https://github.com/dadav/pwnagotchi-custom-plugins/blob/master/wpa-sec.py
  381.  
  382. #screen_refresh 2.0.0
  383. https://github.com/dadav/pwnagotchi-custom-plugins/blob/master/screen_refresh.py
  384.  
  385. #wpa-sec2  #It will only do a check and make .gps.cracked files from the downloaded .cracked.potfile after it downloads from wpa-sec
  386. https://github.com/xenDE/pwnagotchi-tools/issues/1
  387.             #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
  388.           wpa-sec2:
  389.             enabled: false
  390.             api_key: ''
  391.             api_url: "https://wpa-sec.stanev.org"
  392.             download_results: true
  393.  
  394. #watchdog.py 1.0.0
  395. https://github.com/dadav/pwnagotchi-custom-plugins/blob/master/watchdog.py
  396.  
  397.  
  398. #paw-gps.py 1.0.1
  399. https://github.com/evilsocket/pwnagotchi/pull/1054
  400.  
  401.  
  402. ~~~~~~~~~~~~extra info:~~~~~~~~~~~~~~~~~~~~~~~~
  403.  
  404. blind mon bug fix?:
  405. https://github.com/evilsocket/pwnagotchi/issues/267#issuecomment-571025443
  406. https://github.com/seemoo-lab/nexmon/issues/335#issuecomment-738928287
  407.  
  408. if you want to use quick-dic make sure to add
  409. #main.plugins.quickdic.wordlist_folder = “/opt/wordlists/“
  410. to /etc/pwnagotchi/config.toml
  411.  
  412.  
  413. default plugins directory:
  414. /usr/local/lib/python3.7/dist-packages/pwnagotchi/plugins/default/
  415.  
  416. custom plugins directory
  417. /etc/pwnagotchi/custom-plugins/
  418.  
  419. config directory
  420. /etc/pwnagotchi/
  421.  
  422. AI
  423. the neural network is located at /root/brain.nn
  424. information about its age at /root/brain.json
  425.  
  426. Logs
  427. /var/log/pwnagotchi.log
  428.  
  429. Memory
  430. /root/peers/
  431.  
  432. handshakes
  433. /root/handshakes/
  434.  
Add Comment
Please, Sign In to add comment