https://github.com/RoganDawes/P4wnP1_aloa

https://nano.dannyvacar.ca/post/2019-12-13-raspberry-pi-ssh-over-bluetooth/

https://github.com/fO-000/bluescan
https://github.com/t6x/reaver-wps-fork-t6x
https://github.com/R33V/wifite3
https://whitedome.com.au/re4son/sticky-fingers-kali-pi-pre-installed-image/
https://github.com/DIYElectronicsZA/RPi-OLED-1.3-HAT-WaveShare
https://stackoverflow.com/questions/49550355/how-to-stop-a-program-when-a-key-is-pressed-in-python

Methods of connecting to pawnpi:

Bluetooth (to do)

Ethernet gadget RNDIS:

– ssh to kali.local
– ssh to 172.16.0.1

Web GUI access:

http://172.16.0.1:8000/#/usb
http://kali.local:8000/#/usb

Wifi access point

– haven’t tried it yet, but it shows up.

– To connect P4wnP1 to internet, first connect via RNDIS and then use the web GUI to change WiFi to Client mode and enter network name and password, deploy the settings and reset the WiFi (using web GUI).

Build process

1) Install p4wnpi
2) Plug device into computer USB port
3) Wait a minute and open kali.local:8000 in browser
4) Change WiFi mode to Client mode and enter WiFI pw
5) Store and Deploy the changes. P4wnP1 should now have web
6) sudo apt-get update, install kali-tools-wireless

7) To change Wifi mode / re-enable Client mode / Disable monitor mode (may be unnecessary if you use the P4wnp1 web ui to change WiFi back to Client mode)
https://forums.kali.org/showthread.php?22559-How-can-I-re-enable-managed-mode-after-monitor-mode

8) run updates
9) sudo apt-get install kalipi-config
10) run kalipi-config – go to option 5 and enable SPI
11) Git clone and install github-diyelectronicsza OLED repo: run ./setup.sh

12) install rpi gpio: sudo apt-get update && sudo apt-get install rpi.gpio
13A) install spidev: pip3 install spidev
13B) install psutil: pip3 install psutil

14) Run the OLED demo: sudo python3 Demo.py

if it works, make a backup of the SD card

15) Import my OLED script (menuwithip.py from thumb drive)

16) Run my OLED script: root@kali:~/python3# sudo python3 menuwithip.py

17) Try these steps to get a pre-made menu running: if it doesn’t work, follow these steps: https://gideonwolfe.com/posts/security/p4wnp1/
https://github.com/beboxos/P4wnP1_ALOA_OLED_MENU_V2

20 – 30) use OLED to launch Wifite, bluescan, blueranger (bluekill2), etc

Getting IP Addresses

check what mode is enabled (if usbeth is enabled, then mode = usbeth, else mode = client,

if usbeth_is_enabled then

————–

Restoring from menuwithip.img

0. successfully tested switching wifi to client mode
0. crontab -e
(comment out the entry)

0a. Install “sudo apt-get install libjpeg-dev” to prepare for papertty

0b. Install papertty

install oledterm (fixed) (see full code in https://github.com/satoshinm/oledterm/issues/4 )

install luma
sudo apt-get install luma.core -y
( https://github.com/rm-hull/luma.examples )
https://github.com/pimoroni/sh1106-python

Check this out: https://github.com/robert-hh/SH1106

— Install ntp to sync clock to allow system updates

1. Install ntp:
sudo apt-get install ntp -y

Then enable and start the ntp service to enable sudo apt-get update:
systemctl enable ntp.service && systemctl start ntp.service

— Update the system
2. sudo apt-get update -y

— Install xfce
3. sudo apt update && sudo apt install -y kali-desktop-xfce -y
(60 mins)

— Install tightvncserver
4. sudo apt-get install tightvncserver -y
pw is toortoor

— Test VNC with new GUI
5. Use RealVNCViewer on another device to connect to 172.16.0.1:2 (or try “kali:2”)
*** Note that the GUI runs on :2 or :3, while the CLI runs on :1

5B. HUGE BONUS! Install NoVNC for VNC control via Web:
Use this guide: https://www.kali.org/docs/general-use/novnc-kali-in-browser/

Install NoVNC:

sudo apt install -y novnc x11vnc
(10 mins)

Start x11vnc:
x11vnc -display :2 -autoport -nopw -bg -xkb -ncache -ncache_cr -quiet -forever
(or change the :2 to :1 for CLI via web)

Start NoVNC:
/usr/share/novnc/utils/launch.sh –listen 8081 –vnc localhost:5900
(where 5900 is the port output by the previous command to start x11vnc)

After that, local (RNDIS) machine can access via this URL:
http://kali:8081/vnc.html?host=kali&port=8081

Then if you connect P4wnP1 to your WiFi (use Client mode in the P4wnP1 web GUI), your other devices can connect via this URL:
http://192.168.68.121:8081/vnc.html?host=kali&port=8081
or try
http://kali:8081/vnc.html?host=kali&port=8081
(But P4wnp1 must be connected to the network – in client mode not AP mode)

*** Backed up to menuwithip-boo.img

– (YOU ARE HERE In progress) Build from menuwithip.img, then re-make img

6. Add webserver (python3-tornado)
sudo apt-get install python3-tornado
Create the basic.py file shown here: https://www.acmesystems.it/tornado_web_server_python
run “python3 basic.py” to start the web server
Then navigate to 172.16.0.1:8080 to make sure the index.html file appears

9. install script-server

P4wnP1 to do:
– install script server
– import my script runners

– Add macchanger
– Add torghost (+ tor browser)

Experiments:
Install pwnagotchi?

Try these again:
FAILED – Add webmin to control RPi at system level? (dependency issues)

— Couldn’t install docker successfully on RPi 0
3. Install docker
Try this: https://markmcgookin.com/2019/08/04/how-to-install-docker-on-a-raspberry-pi-zero-w-running-raspbian-buster/
Try this: https://withblue.ink/2020/06/24/docker-and-docker-compose-on-raspberry-pi-os.html
sudo apt-get install docker.io -y
sudo systemctl enable docker –now
sudo usermod -aG docker $USER #Add user so sudo isnt reqd

Attempted programs

FAILED – Adding guacamole for VNC via HTTP (Couldn’t install dependencies)

(X – Use tornado instead) 9. Add web.py webserver
Use this to install: https://webpy.org/
(Maybe use it to see the terminal output tail and refresh every x seconds? https://stackoverflow.com/questions/16399355/refresh-a-local-web-page-using-python )
(Or just use tornado? Not sure)

— (Replaced by NoVNC :1 anyway) Couldn’t install wetty (can’t install NodeJS on RPi 0)
4. Install wetty / run with docker –
git clone https://github.com/butlerx/wetty
cd wetty
docker run –rm -p 3000:3000 wettyoss/wetty –ssh-host=172.0.16.1

(Replaced by NoVNC) (Couldn’t get this to connect) 7. Install SSHy (manually clone the github folder to the /var/www/html folder.
https://github.com/stuicey/SSHy

8. (Replaced by NoVNC :1) Webssh
look at github/webssh and see install steps
Then go to http://172.16.0.1:8888/ on another device
Enter this info:
Hostname: kali.local
Port: 22 (default)
User: root
Pass: toor
(Leave private key, passphrase, and totp empty)
(May take several seconds to connect)
Press “Connect”

*** Took forever to install/build