5 ms·
Code execution as root via AT commands on the Quectel EG25-G modem (2021)
- asojfdowgh 5y agoI guess the proper takeaway is each time you load a new booty to the phone, make a point of reflashing the modem as well?
- deleted 5y ago[deleted]
- 3np 5y ago(Published September 2021) 03/04/2021 - Attempted to contact vendor 13/04/2021 - Vendor confirmed vulnerability 23/04/2021 - Vendor issued $2,000 bounty 24/04/2021 - Assigned ID CVE-2021-31698 08/09/2021 - Write-up published Looks like at Pine it's treated as a "Don't fix", or at least it's on Qualcomm to release a new firmware: https://forum.pine64.org/showthread.php?tid=14935 https://forum.pine64.org/showthread.php?tid=14935
- wthnrtghwr 5y agoQuectel, not Qualcomm. Of course Pine has to treat it as unfixable -- the modem is already an untrusted component out of the box, and the FCC (and peers) would never allow Pine to ship their own modem firmware.
- rootsudo 5y agooh that's fun, but it's pretty common on even commercial qualcomm phones, especially xiaomi/huawei where you can force the modem/baseband to have a com port/debug port.
- DHowett 5y agoFun fact! Earlier versions of the Quectel modem firmwares supported a more direct method for running code as root: AT+QLINUXCMD="/sbin/reboot"
- foxfluff 5y agoSo you can finally own your modem? I'd consider this a feature. Shame that someone's going to patch it now..
- spijdar 5y agoYou and everyone else can own your modem. I'd rather someone not be able to install an undetectable rootkit on my phone with nothing more than an AT command...
- yjftsjthsd-h 5y agoCan you even run AT commands without already having privileged access on the phone?
- spijdar 5y agoI'm honestly not sure (I haven't played with modems much), but I do know that doing a clean wipe of the eMMC or an SD card is way easier than a clean wipe of your modem. It's also a fair bit harder to check for anomalous activity, although with easier shell access, maybe that mitigates both problems? To be clear, I think it's a lose/lose situation, because I want access to the modem in my pinephone, but I'd rather shell access require some kind of physical attestation (serial connection over the pogopins or something), instead of ... this.
- entropyie 5y agoI believe the Bluetooth Serial Port Profile supports AT commands, and I've seen phones connect to bluetooth devices while locked... so...
- seba_dos1 5y ago...so nothing of substance is hiding there, because AT commands from Bluetooth peripherals have no way to reach the modem (they just happen to speak same-ish language the modem does).
- 5y ago
- kop316 5y agoThankfully, the Pinephone community has stepped up and made a FOSS firmware (mainly biktorgi, thank you!): https://github.com/Biktorgj/pinephone_modem_sdk/releases https://github.com/Biktorgj/pinephone_modem_sdk/releases It still uses the ADSP from Quectel, but from my usage (and from other's reports), it is FAR more stable than the stock firmware. It is also immune to this vunerability (I don't even think it has atfwd_daemon).
- pabs3 5y agoHow feature complete is it compared to the proprietary firmware?
- kop316 5y agoJust as feature complete.
- pabs3 5y agoWould it be feasible to power off the ARM core on the modem and do everything from the main PinePhone ARM SoC?
- kop316 5y agoI think the ARM core on that is pretty weak even compared to the A64 (and certainly compared to the RK3399 of the PPP!). So while possible, I think it is pretty infeasible. That and I think everything is wired to the main CPU anyways.
- pabs3 5y agoHas anyone looked at the ADSP firmware part of the modem?
- kop316 5y agoAside from clean room reverse engineering, I do not think there is anyway to actually replace that. One can wipe and reformat the ADSP, but to my knowledge, if the source code is out there, it is certainly leaed proprietary source code.
- 0xbadc0de5 5y agoThis is certainly interesting from a vulnerability perspective - and hats off for the effort. But there's still `adb shell`, so it feels a bit like picking the lock when the front door is wide open. For those with just the module, I believe at least some of these modems also have a root shell TTY exposed over RS232 on pins 11 & 12. (https://osmocom.org/projects/quectel-modems/wiki/EC25 https://osmocom.org/projects/quectel-modems/wiki/EC25)
- drblah 5y agoThis, exactly. I work with similar modems daily. The first thing I do is to run the AT command for enabling adb. From there you can do whatever. The modems are quite beefy, 100s MB of RAM and multiple CPU cores. They even come pre-installed with a http server, ftp client, ALSA and much more. Also, if you really want to get creative, I think you can just dump the firmware, which is just normal Linux. So just dump it, mount the filesystem and make whatever changes you want then re-flash. The quality and security of the software in these things is absolutely bottom tier.
- contingencies 5y agoIf you had to implement secure 4G/5G in an embedded environment, which hardware or approach would you reach for?
- solarkraft 5y agoDo they need all that power? Sounds like it's more of an SoC with a modem than just a modem. Why then have another processor?
- electricant 5y agoThe market for cellular modules is very competitive. From a time to market point of view is cheaper and faster to reuse smartphone-grade socs instead of reinventing the wheel. As far as I know, only u-blox is producing their own SoC (albeit for cat-m/nb-iot only) all the others are using existing solutions from Qualcomm and others. This is only scratching the surface. I did not talk about certification which is another beast altogether.
- gsich 5y agoThis looks like a feature, why the agitation?
- rurban 5y agoThe first thing I do on new Quectel firmware is the check with Ghidra. I don't use the insecure Linux modems, just the baremetal modems. Which are actually 2 CPU's with 2 firmwares. The modem itself is either a Broadcom or Qualcomm RF chip with all those AT commands and its completely insecure AT parsing via internal UART. The main CPU is best used baremetal, which is much more secure and needs much less energy than the Linux variants. I fixed dozens of security issues in their SDK, but still prefer it over STM, Atmel or Raspi.