Skip to content

Add support for Pi Zero 2W - #1108

Open
DrSchottky wants to merge 6 commits into
evilsocket:masterfrom
DrSchottky:master
Open

Add support for Pi Zero 2W#1108
DrSchottky wants to merge 6 commits into
evilsocket:masterfrom
DrSchottky:master

Conversation

@DrSchottky

@DrSchottky DrSchottky commented Jul 30, 2022

Copy link
Copy Markdown

Description

This patch uses a newer base image and kalipi kernel in order to support newer Pi revisions, like Zero 2W

Motivation and Context

As pointed out in #1046, it would be nice to support the new Zero 2W.

How Has This Been Tested?

This patch has been crowd-tested since I don't have the resources to test all the possible configurations and scenarios.
Since I ported nexmon to 2W I distributed unofficial images (on #1046 and /r/pwnagotchi) to let people test them and report bugs.
Since I didn't touch the pwnagotchi code itself I wasn't expecting major issues, but wanted to be sure new distro/kernel/firmware weren't introducing regressions

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s

Signed-off-by: DrSchottky <6048264+DrSchottky@users.noreply.github.com>
… on official repo

Signed-off-by: DrSchottky <6048264+DrSchottky@users.noreply.github.com>
…e not compatible with that version of Flask

Signed-off-by: DrSchottky <6048264+DrSchottky@users.noreply.github.com>
… and Raspbian to Raspberry Pi OS

Signed-off-by: DrSchottky <6048264+DrSchottky@users.noreply.github.com>
Signed-off-by: DrSchottky <6048264+DrSchottky@users.noreply.github.com>
Signed-off-by: DrSchottky <6048264+DrSchottky@users.noreply.github.com>
@AmelieTails

AmelieTails commented Jul 30, 2022

Copy link
Copy Markdown

Thanks for your work. This is very cool!
It would be great if you add drivers rtl8812, rtl8814
I can't compile them myself on a raspberry, because have a absence error glibc 2.33.
I thought, if someone builds image on a fresh version of OS and kernel, then problem will solve... But not :(

@DrSchottky

Copy link
Copy Markdown
Author

@AmelieTails aren't them already included in kalipi kernel?
If you want to check for this you can find a pre-built image for with these changes on my pwnagotchi fork

@220242

220242 commented Jul 30, 2022

Copy link
Copy Markdown

@AmelieTails aren't them already included in kalipi kernel? If you want to check for this you can find a pre-built image for with these changes on my pwnagotchi fork

Not included, I tried right now 8812 on v1.5.6-beta2. But ive got a raspberry 2, not 2W

@DrSchottky

Copy link
Copy Markdown
Author

@AmelieTails aren't them already included in kalipi kernel? If you want to check for this you can find a pre-built image for with these changes on my pwnagotchi fork

Not included, I tried right now 8812 on v1.5.6-beta2. But ive got a raspberry 2, not 2W

VID:PID (lsusb) of your dongle?

@AmelieTails

Copy link
Copy Markdown

Bus 001 Device 005: ID 0bda:8813 Realtek Semiconductor Corp. RTL8814AU 802.11a/b/g/n/ac Wireless Adapter

@220242

220242 commented Jul 30, 2022

Copy link
Copy Markdown

0bda:8812

@AmelieTails aren't them already included in kalipi kernel? If you want to check for this you can find a pre-built image for with these changes on my pwnagotchi fork

Not included, I tried right now 8812 on v1.5.6-beta2. But ive got a raspberry 2, not 2W

VID:PID (lsusb) of your dongle?

0bda:8812

@220242

220242 commented Jul 30, 2022

Copy link
Copy Markdown

image
same, required LIBC 2.33, on image 2.28

@220242

220242 commented Jul 30, 2022

Copy link
Copy Markdown

Thanks for your work. This is very cool! It would be great if you add drivers rtl8812, rtl8814 I can't compile them myself on a raspberry, because have a absence error glibc 2.33. I thought, if someone builds image on a fresh version of OS and kernel, then problem will solve... But not :(

You may try take it from here https://http.kali.org/pool/main/g/glibc/ and install via dpkg libc-bin_2.33arch and libc6_2.33arch. but I think it requires some dependencies from kali repo. And these dependencies can break everything :)

@DrSchottky

Copy link
Copy Markdown
Author

You can try to load these ( I cross compiled https://github.com/aircrack-ng/rtl8812au/ for Re4son)
rtl8812au-kalipi-5.15.44-20220704.tar.gz

But be careful, it won't work out of the box with pwnagotchi since (AFAIK) it doesn't natively support external adapters so it tries to start and use the embedded wlan as monitor interface

@AmelieTails

Copy link
Copy Markdown

Thank you so much! But, "kernel panic" occurs after connecting the adapter. Does not react to anything. With this mod.

@DrSchottky

Copy link
Copy Markdown
Author

Thank you so much! But, "kernel panic" occurs after connecting the adapter. Does not react to anything. With this mod.

Did you try plugging the dongle, loading the driver with insmod (from 5.15.44-Re4son-v7+) and turning on the monitor mode as explained on driver repo?
Also try stopping pwnagotchi/bettercap services before loading the driver
I'm on a 3B (same image)/kernel with a 0bda:a811 dongle and it works for me.

@AmelieTails

AmelieTails commented Jul 31, 2022

Copy link
Copy Markdown

Nope, i copied everything to /lib/modules/ , add 88XXau in /etc/modules and used depmod.
Reburning card and try insmod, modprobe
With insmod "insmod: ERROR: could not insert module 88XXau.ko: Invalid module format".
And modprobe "modprobe: FATAL: Module 88XXau.ko not found in directory /lib/modules/5.15.44-Re4son-v7+" after copied 88XXau.ko to this path getting same messenge

image

@DrSchottky

Copy link
Copy Markdown
Author

Nope, i copied everything to /lib/modules/ , add 88XXau in /etc/modules and used depmod. Reburning card and try insmod, modprobe With insmod "insmod: ERROR: could not insert module 88XXau.ko: Invalid module format". And modprobe "modprobe: FATAL: Module 88XXau.ko not found in directory /lib/modules/5.15.44-Re4son-v7+" after copied 88XXau.ko to this path getting same messenge

Ouput of uname -a?
Also, is cfg80211 loaded? If not load it (modprobe cfg80211) before loading the driver

@AmelieTails

AmelieTails commented Jul 31, 2022

Copy link
Copy Markdown

Linux pwnagotchi 5.15.44-Re4son-v7+ #1 SMP Debian kali-pi (2022-07-03) armv7l GNU/Linux
I did it, awesome! Thank you! But it works until again start bettercap

systemctl stop pwnagotchi
systemctl stop bettercap
insmod 5.15.44-Re4son-v7+/88XXau.ko
airmon-ng check kill
ip link set wlan0 down
iw dev wlan0 set type monitor
ip link set wlan0 up
systemctl start pwnagotchi

Airodump-ng looks like a scanning(changing channels) but not found any access points

@DrSchottky

Copy link
Copy Markdown
Author

But it works until again start bettercap

What do you mean?
Anyway, as previously said, there's no native support for external dongles so you need to patch things here and there to use that

@AmelieTails

Copy link
Copy Markdown

System freezes after launch bettercap

@makerph

makerph commented Aug 1, 2022

Copy link
Copy Markdown

@DrSchottky v1.5.6-beta2 was release 4 days ago and this fix was committed 2 days ago. I assume it not yet included on the latest release? Thanks

@DrSchottky

Copy link
Copy Markdown
Author

System freezes after launch bettercap

Expected, rtl8812au driver doesn't like to be put in monitor mode like pwnlib does

@DrSchottky v1.5.6-beta2 was release 4 days ago and this fix was committed 2 days ago. I assume it not yet included on the latest release? Thanks

It is, commits have the wrong timestamp because I forgot to sign off them

@makerph

makerph commented Aug 1, 2022

Copy link
Copy Markdown

Thanks for clarification. will test it today on my pi zero 2w and provide feedback if I encounter any issue.

@makerph

makerph commented Aug 1, 2022

Copy link
Copy Markdown

I've tested the v1.5.6-beta2 image everything is work fine however the rpi seems to be overheating and I can hear whining/high pitch noise after about ~1-2hrs running. No Issues after switching back to my old SD card with your previously released image. I cannot see any errors on debug mode. Not sure if anyone encounter this.

edit: this noise might be caused by by UPS HAT... will investigate more.

@raine-y

raine-y commented Sep 18, 2022

Copy link
Copy Markdown

I can corroborate this experience. The sound persisted when powered with different battery packs and adapters and seems independent from Wavshare v2 HAT and PiSugar 2. This did not occur with the previous image for me either. I have also experienced my pwnagotchi crashing after around 30 minutes and cannot see errors when this does occur.

@makerph

makerph commented Sep 19, 2022

Copy link
Copy Markdown

another observation also, in this this image I got fewer handshakes even I'm in malls (lots of AP around).

@llamasoft llamasoft mentioned this pull request Oct 4, 2022
9 tasks
@adi170-alt

adi170-alt commented Dec 16, 2022

Copy link
Copy Markdown

I think that there will need to be a separate image for this because on my pi0 it leads to performance issues(It pwn's very few wifi's).

@chunkywill

Copy link
Copy Markdown

i have a pi 0 2w and a waveshare v3 and i can connect to pwnagotchi through ssh and everything seems fine but the screen is not working

@TQMatvey

TQMatvey commented Oct 26, 2023

Copy link
Copy Markdown

Raspberry Pi zero 2w, unable to find any APs, Auto, AI, Display, all working, but unable to scan anything

v1.5.6-beta2

dmesg_rp2w.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants