Urgent.News

What's breaking now, across thousands of outlets.

Tech

The rooting, firmware analysis and hardcoded, reset-persistent credentials of the TP-Link TL-841N

In the pursuit of a deeper understanding of IoT device security, the author obtained a TP-Link TL-841N router from a Facebook Marketplace deal at a discounted price of $10. The primary purpose of acquiring this device was to gain hands-on experience in dissecting IoT hardware, accessing debug logs, obtaining a root shell, extracting firmware, and exploring the filesystem for potential security vulnerabilities.

To begin, the author searched the router's model number on the FCCID to retrieve its datasheet, which provided essential information about the PCB, voltage levels, and available chips on the board. The router's flash memory was found on the underside of the board, specifically the GD25Q64CSIG chip, with a datasheet available to aid in the analysis process.

The author then proceeded to remove the router's back panel and located the well-labeled UART ports, which facilitated serial and debug interface access. To identify the correct UART pins for connection, the author utilized a multimeter to probe the ports at boot time; the TX pin would show a fluctuating voltage due to transmitted boot logs, while the GND pin would remain at 0V.

Using an AliExpress USB-to-UART adapter compatible with both 3.3V and 5V output, the author connected the device's GND port to the USB adapter's GND port, the router's TX pin to the adapter's RX port, and the router's RX pin to the adapter's TX port. The process was finalized with a persistent connection, allowing the author to drop into a root shell via picocom -b 115200 --logfile bootlog-tplink.txt /dev/tty.usbserial-1210, utilizing a common baud rate of 115200.

After gaining access to the router's admin console, the author proceeded to list the flash partitions using /proc/mtd, paving the way for subsequent firmware dumps. To facilitate the transfer of firmware files, the author installed and started a tftp-now server using tftp-now serve on their Mac (with Brew installed). The author also ensured a temporary /var directory on their local device to match the file path requested by the tftp agent, preventing the "No such file exists" error.

With the firmware files successfully extracted, the author explored the possibility of conducting an on-chip firmware extraction using CH341A programmer. Before using the programmer, the author confirmed the flash chip's voltage, which in this case was 3.3V, ensuring compatibility with the CH341A. The author then positioned the programmer's clip over the flash chip's pins, ensuring proper alignment and voltage compatibility, to safely extract the chip's firmware.

Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at blog.juni-mp4.com →

More in Tech

More from Sunday 2 August →