text
stringlengths
0
1.99k
One example: I found one blog post about wardriving/sniffing V2X (DSRC)
signals which utilized old Atheros ATH9K wireless cards with custom drivers
and a great DefCon lecture [16] but that's it. Then I found an academic
paper and a GitHub Repo -- which tracks which ATH9K Wireless NICs are
supported. The academic paper and GitHub repo mention that, *in theory* some
ATH10 wireless cards should work on the devices as well.
So it was then wild to find a custom ATH10 firmware on the devices.
This firmware is located at:
/mnt/c3platpersistent/opt/firmware/ath10k/QCA988X/hw2.0/
--[ 4 - Achieving Root
--[ 4.1 - Simple and Useful
These systems come shipped with an EFI shell (I know, right?) which makes
things a lot easier to deal with. There is a lot you can do via the EFI
shell but this section is going to cover the simplest path to gaining root
access on the device.
Unscrew the four screws to pop the cover off the unit. Then attach your UART
adapter to get output, insert your FAT32 formatted microSD card into the
port, and insert a keyboard into the USB port. Press F5 to enter the boot
menu upon connecting your PoE cable and select “Internal Shell”. Once in the
EFI shell, you'll see that the microSD is mounted as fs0 and the system's
emmc is mounted as fs1. Use the cp command to copy fs1: to fs0:.
Command:
cp -r fs1:\ fs0:\images
Unplug the PoE cable to shut off the unit, pop out the microSD and insert
it into a Linux box. cd to the microSD and then the /live/ directory.
Now use unsquashfs -s rootfs to get information including compression and
block size which are needed to resquash the EOS after making modifications.
Cool, now you can cd into squashfs and view the EOS files. By default, these
units are configured for IPv6 exclusively, so at minimum you need to add a
bridge to etc/network/interfaces such as the following:
auth eth0:1
iface eth0:1 inet static
address 192.168.1.XXX
netmask 255.255.255.0
gateway 19.168.1.1
Now, add your ssh public key to root/.ssh/authorized_keys and be sure
to chmod the .ssh/ and authorized_keys files properly. Lastly,
uncomment the authorized_keys line within the sshd configuration file.
Now resquash the modified EOS filesystem via:
mksquashfs squashfs-root output/rootfs -comp gzip -b 131072 -noappend
Copy the new rootfs to the microSD, etc. Once back in the EFI shell,
cp the new rootfs to /live/rootfs. For good measure, mv the Manifest
and Manifest.asc files and rename them with .bak.
Now exit the EFI shell, wait for the unit to boot and:
ssh -i root_priv_key root@192.168.1.XXX.
If you're prompted for a password, it's likely that the ssh server is
asking for an outdated algorithm for the key, so use this to get around
that temporarily:
ssh -o PubkeyAcceptedAlgorithms=+ssh-rsa -i root_priv_key root@192.168.1.XXX
Grats, you now have root access.
--[ 4.2 Quickest
To gain just any type of root access, you can just add a netcat backdoor
to rc.local, cron.d, a custom service or some other ways that you know.
--[ 4.3 Troubleshooting
On some units I needed to disable IPV6 completely. There are
a bunch of ways to do this such as via modifying kernel parameters in
/live/LIVE or in syslinux.cfg by adding 'ipv6.disable=1' to the
APPEND line. Alternatively, by adding the following lines to
/usr/tmplt/etc/sysctl.d/99-sysctl.conf:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
If you're still having trouble getting the unit to be accessible over
IPv4, I have a few other tips:
- Remove 'quiet' from the APPEND line
- add 'console=ttyS0,115200N8'
There are a ton of other kernel parameters you can add to assist in
troubleshooting.
Although this shouldn't be needed, here are some other changes you can