From c34db980a64da5133136983cba158dfe8108d038 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Fri, 20 Oct 2023 21:40:22 +0200 Subject: [PATCH 1/9] v2.5.0 Signed-off-by: Jeroen Oudshoorn --- builder/pwnagotchi.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index 222f87e1..da9b364a 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -27,6 +27,7 @@ - fstrim.timer - pwnagotchi.service - pwngrid-peer.service + - rfkill-unblock@all disable: - apt-daily-upgrade.service - apt-daily-upgrade.timer From 3dd09f447c1f82071a4bf9ddcad6babf66825c0c Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Sat, 21 Oct 2023 08:21:22 +0200 Subject: [PATCH 2/9] v2.5.0 Signed-off-by: Jeroen Oudshoorn --- builder/pwnagotchi.json | 8 ++++---- builder/pwnagotchi.yml | 8 +++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/builder/pwnagotchi.json b/builder/pwnagotchi.json index 40707c01..1a3befc4 100644 --- a/builder/pwnagotchi.json +++ b/builder/pwnagotchi.json @@ -3,13 +3,13 @@ { "name": "pwnagotchi", "type": "arm-image", - "iso_url": "https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-05-03/2023-05-03-raspios-bullseye-arm64-lite.img.xz", - "iso_checksum": "file:https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-05-03/2023-05-03-raspios-bullseye-arm64-lite.img.xz.sha256", + "iso_url": "https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-10-10/2023-10-10-raspios-bookworm-arm64-lite.img.xz", + "iso_checksum": "file:https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-10-10/2023-10-10-raspios-bookworm-arm64-lite.img.xz.sha256", "target_image_size": 8568709120, "qemu_binary": "qemu-aarch64-static", - "output_filename": "../../pwnagotchi-{{user `pwn_version`}}-arm64.img", + "output_filename": "../../pwnagotchi-{{user `pwn_version`}}-bookworm-arm64.img", "qemu_args": [ - "-r", "6.1.21-v8+" + "-r", "6.1.0-rpi4-rpi-v8" ] } ], diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index 531cccc0..33b3a950 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -6,7 +6,7 @@ vars: kernel: min: "6.1" - full: "6.1.21-v8+" + full: "6.1.0-rpi4-rpi-v8" pwnagotchi: hostname: "{{ lookup('env', 'PWN_HOSTNAME') | default('pwnagotchi', true) }}" version: "{{ lookup('env', 'PWN_VERSION') | default('pwnagotchi-torch', true) }}" @@ -27,7 +27,6 @@ - fstrim.timer - pwnagotchi.service - pwngrid-peer.service - - rfkill-unblock@all disable: - apt-daily-upgrade.service - apt-daily-upgrade.timer @@ -71,6 +70,7 @@ - bluez - build-essential - curl + - dhcpcd5 - dkms - dphys-swapfile - fbi @@ -84,8 +84,6 @@ - gcc-arm-none-eabi - git - libatlas-base-dev - - libavcodec58 - - libavformat58 - libblas-dev - libbz2-dev - libc-ares-dev @@ -118,7 +116,7 @@ - libsqlite3-dev - libssl-dev - libswscale5 - - libtiff5 + - libtiff6 - libtool - libusb-1.0-0-dev - lsof From 0df77f24d351a1266282e8ff3b07e79c55071e0e Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Sat, 21 Oct 2023 08:24:29 +0200 Subject: [PATCH 3/9] v2.5.0 Signed-off-by: Jeroen Oudshoorn --- builder/pwnagotchi.yml | 7 ++++--- pwnagotchi/plugins/default/auto-update.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index 33b3a950..68c4a83f 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -121,6 +121,7 @@ - libusb-1.0-0-dev - lsof - make + - pipx - python3-dbus - python3-flask - python3-flask-cors @@ -299,9 +300,9 @@ when: (pwnagotchigit.changed) or (pip_packages['pwnagotchi'] is undefined) or (pip_packages['pwnagotchi'] != pwnagotchi_version) - name: install pwnagotchi wheel and dependencies - pip: - name: "{{ lookup('fileglob', '/usr/local/src/pwnagotchi/dist/pwnagotchi*.whl') }}" - extra_args: "--no-cache-dir" + command: "pipx install dist/pwnagotchi*.whl" + args: + chdir: /usr/local/src/pwnagotchi when: (pwnagotchigit.changed) or (pip_packages['pwnagotchi'] is undefined) or (pip_packages['pwnagotchi'] != pwnagotchi_version) - name: remove pwnagotchi folder diff --git a/pwnagotchi/plugins/default/auto-update.py b/pwnagotchi/plugins/default/auto-update.py index 84dde6f3..f4b1999e 100644 --- a/pwnagotchi/plugins/default/auto-update.py +++ b/pwnagotchi/plugins/default/auto-update.py @@ -126,7 +126,7 @@ def install(display, update): source_path = "%s-%s" % (source_path, update['available']) # setup.py is going to install data files for us - os.system("cd %s && pip3 install ." % source_path) + os.system("cd %s && pipx install ." % source_path) return True From 11bccb4182fda3beddf8936b7eb1a203d150e737 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Sat, 21 Oct 2023 08:39:24 +0200 Subject: [PATCH 4/9] v2.5.0 Signed-off-by: Jeroen Oudshoorn --- builder/data/etc/NetworkManager/conf.d/basic.conf | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 builder/data/etc/NetworkManager/conf.d/basic.conf diff --git a/builder/data/etc/NetworkManager/conf.d/basic.conf b/builder/data/etc/NetworkManager/conf.d/basic.conf new file mode 100644 index 00000000..a5a1b8b1 --- /dev/null +++ b/builder/data/etc/NetworkManager/conf.d/basic.conf @@ -0,0 +1,3 @@ +[main] +plugins=keyfile +dhcp=dhcpcd \ No newline at end of file From efee0f8129de4b0dba22bf114859f97851d3afc3 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Sat, 21 Oct 2023 08:42:17 +0200 Subject: [PATCH 5/9] v2.5.0 Signed-off-by: Jeroen Oudshoorn --- builder/data/etc/NetworkManager/conf.d/basic.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/builder/data/etc/NetworkManager/conf.d/basic.conf b/builder/data/etc/NetworkManager/conf.d/basic.conf index a5a1b8b1..492483b6 100644 --- a/builder/data/etc/NetworkManager/conf.d/basic.conf +++ b/builder/data/etc/NetworkManager/conf.d/basic.conf @@ -1,3 +1,6 @@ [main] plugins=keyfile -dhcp=dhcpcd \ No newline at end of file +dhcp=dhcpcd + +[IFUPDOWN] +managed=false From 48fc0316eea914844590182ced8efc183960a67d Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Sat, 21 Oct 2023 09:12:43 +0200 Subject: [PATCH 6/9] v2.5.0 Signed-off-by: Jeroen Oudshoorn --- builder/pwnagotchi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index 68c4a83f..814c7222 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -300,7 +300,7 @@ when: (pwnagotchigit.changed) or (pip_packages['pwnagotchi'] is undefined) or (pip_packages['pwnagotchi'] != pwnagotchi_version) - name: install pwnagotchi wheel and dependencies - command: "pipx install dist/pwnagotchi*.whl" + command: "pipx install ./dist/pwnagotchi*.whl" args: chdir: /usr/local/src/pwnagotchi when: (pwnagotchigit.changed) or (pip_packages['pwnagotchi'] is undefined) or (pip_packages['pwnagotchi'] != pwnagotchi_version) From 7ac005596be80c09c44106cb9186fc6a2e53d4c4 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Sat, 21 Oct 2023 09:42:38 +0200 Subject: [PATCH 7/9] v2.5.0 Signed-off-by: Jeroen Oudshoorn --- builder/pwnagotchi.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index 814c7222..09b01473 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -300,9 +300,7 @@ when: (pwnagotchigit.changed) or (pip_packages['pwnagotchi'] is undefined) or (pip_packages['pwnagotchi'] != pwnagotchi_version) - name: install pwnagotchi wheel and dependencies - command: "pipx install ./dist/pwnagotchi*.whl" - args: - chdir: /usr/local/src/pwnagotchi + command: "pipx install /usr/local/src/pwnagotchi/dist/pwnagotchi*.whl" when: (pwnagotchigit.changed) or (pip_packages['pwnagotchi'] is undefined) or (pip_packages['pwnagotchi'] != pwnagotchi_version) - name: remove pwnagotchi folder From 7af71b6eb69f48713fbf9415fa342402a1b47090 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Sun, 22 Oct 2023 13:48:58 +0200 Subject: [PATCH 8/9] v2.5.0 Signed-off-by: Jeroen Oudshoorn --- builder/data/usr/bin/pwnlib | 8 ++------ builder/pwnagotchi.yml | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/builder/data/usr/bin/pwnlib b/builder/data/usr/bin/pwnlib index b50fb07a..d53d52fb 100755 --- a/builder/data/usr/bin/pwnlib +++ b/builder/data/usr/bin/pwnlib @@ -37,14 +37,10 @@ reload_brcm() { # starts mon0 start_monitor_interface() { + rfkill unblock all ifconfig wlan0 up iw dev wlan0 set power_save off - airmon-ng check kill - iw phy "$(iw phy | head -1 | cut -d" " -f2)" interface add wlan0mon type monitor && ifconfig wlan0mon up - - # If wlan0 is NOT taken down after bringing up mon0, then when switching to AUTO you will get: - # error 400: error while initializing wlan0mon to channel 1: iw: out=command failed: Device or resource busy (-16) err=exit status 240 - ifconfig wlan0 down + airmon-ng start wlan0 } # stops mon0 diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index 09b01473..68acd09e 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -300,7 +300,7 @@ when: (pwnagotchigit.changed) or (pip_packages['pwnagotchi'] is undefined) or (pip_packages['pwnagotchi'] != pwnagotchi_version) - name: install pwnagotchi wheel and dependencies - command: "pipx install /usr/local/src/pwnagotchi/dist/pwnagotchi*.whl" + command: "pipx install /usr/local/src/pwnagotchi/dist/pwnagotchi-{{ pwnagotchi.version }}-py3-none-any.whl" when: (pwnagotchigit.changed) or (pip_packages['pwnagotchi'] is undefined) or (pip_packages['pwnagotchi'] != pwnagotchi_version) - name: remove pwnagotchi folder From 47ae8a0a9731fbd7221adebdc104d2d00249f36b Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Sun, 22 Oct 2023 14:57:44 +0200 Subject: [PATCH 9/9] v2.5.0 Signed-off-by: Jeroen Oudshoorn --- builder/pwnagotchi.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index 68acd09e..202f177b 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -193,7 +193,7 @@ # Install nexmon to fix wireless scanning (takes 2.5G of space) - name: clone nexmon repository git: - repo: https://github.com/jayofelony/nexmon.git + repo: 'https://github.com/jayofelony/nexmon.git' dest: /usr/local/src/nexmon register: nexmongit @@ -289,7 +289,7 @@ - name: clone pwnagotchi repository git: - repo: https://github.com/jayofelony/pwnagotchi.git + repo: 'https://github.com/jayofelony/pwnagotchi.git' dest: /usr/local/src/pwnagotchi register: pwnagotchigit @@ -331,7 +331,7 @@ - name: download pwngrid 1.10.4 git: - repo: https://github.com/jayofelony/pwngrid.git + repo: 'https://github.com/jayofelony/pwngrid.git' dest: /usr/local/src/pwngrid register: pwngrid @@ -349,7 +349,7 @@ - name: download bettercap v2.32.1 git: - repo: https://github.com/jayofelony/bettercap.git + repo: 'https://github.com/jayofelony/bettercap.git' dest: /usr/local/src/bettercap register: bettercap