Establishing a UART Root Connection to a TP-Link Wireless Router

Feb. 16, 2023

Background

Many IoT devices today use a serial communication interface known as the Univeral Asynchronous Receiver Transmitter (UART). The purpose of this interface is to give direct access to the IoT operating system via a command line interface (CLI) for debugging. In many cases, the underlying operating system is just a Unix system, which means backdooring these systems should be (hopefully) very simple.

I worked on this a while ago but finally was able to get all of the images together and uploaded. I found an unused TP-Link router and thought I’d mess with it a little. I noticed it had a UART connection which gave me an easy root shell. Then I modded the firmware and flashed it onto the device. It was easy enough… But I may have soft locked it 😛

Recon

Here is the device in question:

TP-Link Technologies Co., Ltd. 300Mbps Wireless N Router WR841NV14

FCCID: TE7WR841NV14

I threw the ID into fccid.io and found its documentation along with internal photographs:

fcc.id/TE7WR841NV14

I took mine apart and found that the internals were pretty much the same (obviously):

Then I looked around at the various chips and discovered a row of 4 pins which looks to be a UART connection interface! (I soldered on the header pins after I found it)

I grabbed my UART to USB interface adapter and plugged in everything:

Then I opened up PuTTY and connected to COM7 which was the serial device that appeared in the Windows Device Manager:

I set the baud rate to 115200 because the device was relatively new and I figured it would be a good first starting guess. And I was right!

And just like that I had a root shell on the router.

Pilfering

After gaining access like a total 1337 h4x0r I took a look at /etc/passwd

This made it easy enough to throw into hashcat and I came across a pretty funny result:

This will give us SSH access to the router with the user admin, and based off of the running processes, ssh an active service:

Modding the Firmware

I wanted to install some sort of backdoor but the filesystem is read-only. So I had to resort to modding the firmware and reflashing it.

I went to the TP-Link site and downloaded their latest firmware image

I downloaded it, unzipped it, and then used firmware-mod-kit to extract it. I could have just use binwalk to extract, but doing it this way allowed me to repack it with relative ease.

After making a seemingly minor addition to one of the web files and repacking the firmware, I flashed it onto my device.

After the router rebooted, I traveled to its IP address and found that my changes were applied successfully! However, the page it now broken and I cannot access any of the routers functions. Sloppy front end development on my part. Hopefully I can fix it soon.

Conclusion

Being able to identify certain aspects of SBCs can be very valuable for hardware hacking! This was a great experiment in firmware modding and the UART interface.

Read More
Qiana Center

Latest

Tottenham Hotspur vs Getafe

Tottenham Hotspur will return to London after their pre-season tour of Australia to take on Spanish side Getafe in a friendly at Hotspur Way on Saturday. It has been an eventful pre-season for the North London club following significant changes to a squad that struggled over the past two seasons, while Getafe arrive looking to

Bonang Matheba to receive Basadi in Music Trailblazer Award

403 ERROR Request blocked. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner. If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent

Two-minute drill: Patrick Mahomes’ health, Bijan Robinson’s historic deal, former No. 1 overall pick’s reunion

As the Arizona Cardinals and Carolina Panthers prepare for Thursday's Hall of Fame Game in Canton, Ohio, to officially kick off the 2026 NFL preseason slate, there is a lot to digest around the league. From a three-time Super Bowl champion's health, Baker Mayfield's contract drama and new deals for Bijan Robinson and Zay Flowers

AI Framework Helps Classify Renal Tumors, Predict Outcomes

TOPLINE Researchers developed an AI framework that identified tissue components, classified nine renal cell tumor subtypes, predicted nuclear grade, and stratified survival across multicenter cohorts. The AI-derived risk score outperformed World Health Organization/International Society of Urological Pathology (WHO/ISUP) grading in predicting recurrence-free survival (RFS) and disease-specific survival (DSS...

Newsletter

Don't miss

Tottenham Hotspur vs Getafe

Tottenham Hotspur will return to London after their pre-season tour of Australia to take on Spanish side Getafe in a friendly at Hotspur Way on Saturday. It has been an eventful pre-season for the North London club following significant changes to a squad that struggled over the past two seasons, while Getafe arrive looking to

Bonang Matheba to receive Basadi in Music Trailblazer Award

403 ERROR Request blocked. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner. If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent

Two-minute drill: Patrick Mahomes’ health, Bijan Robinson’s historic deal, former No. 1 overall pick’s reunion

As the Arizona Cardinals and Carolina Panthers prepare for Thursday's Hall of Fame Game in Canton, Ohio, to officially kick off the 2026 NFL preseason slate, there is a lot to digest around the league. From a three-time Super Bowl champion's health, Baker Mayfield's contract drama and new deals for Bijan Robinson and Zay Flowers

AI Framework Helps Classify Renal Tumors, Predict Outcomes

TOPLINE Researchers developed an AI framework that identified tissue components, classified nine renal cell tumor subtypes, predicted nuclear grade, and stratified survival across multicenter cohorts. The AI-derived risk score outperformed World Health Organization/International Society of Urological Pathology (WHO/ISUP) grading in predicting recurrence-free survival (RFS) and disease-specific survival (DSS...

Katsina unveils family planning procurement guideline to boost maternal healthcare

The Katsina State Government has unveiled domesticated guidelines for state-funded procurement of family planning commodities to strengthen healthcare financing and improve access to childbirth spacing services. The guidelines were unveiled on Wednesday at a dissemination workshop organised by the State Ministry of Health in collaboration with the Access to Medicines Initiative (AMI). The event brought

Global Business Travel Spending to Hit Record $1.71 Trillion in 2026, While Trips Reach 1.84 Billion, Says GBTA Forecast

In Brief: GBTA’s latest Business Travel Index report shows spending gains driven by higher prices as geopolitical uncertainty and transportation pressures weigh on the outlook Global Business Travel Spending to Hit Record $1.71 Trillion in 2026, While Trips Reach 1.84 Billion, Says GBTA Forecast - Image Credit Unsplash+    Global business travel spending is forecast to

Boulevard Business Park: Saudi Arabia’s Bold Bet on Mixed-Use Development

Boulevard Business Park Saudi Arabia has marked another milestone in its urban and entertainment transformation with the completion of the Kingdom’s first entertainment-focused business park and corporate resort. This remarkable achievement reflects a new approach to commercial development that thoughtfully blends business, hospitality and leisure within a single destination. More Than an Office Park Located

How Chaoshan Business Was Built on Morals, Not Contracts

This is the second article in a series on China's southern Chaoshan region, exploring the history, culture, and identities behind its recent resurgence in the spotlight. Read Part 1. In the Chinatowns of early 20th-century Bangkok, Chinese laborers who had just collected their wages would make their way to the qiaopiju, a private institution that