Safeguard
Supply Chain Security•

How Routers Get Hacked and How to Secure Them

How routers get hacked: default passwords, exposed admin pages, UPnP, firmware bugs, botnets and DNS hijacking, plus home and office hardening checklists.

Safeguard Security Team
57 min read

Routers get hacked in a small number of repeatable ways. Attackers log in with factory default or weak passwords, reach admin pages and management services that were left open to the internet, abuse UPnP to punch holes in the firewall, and exploit firmware bugs such as command injection and authentication bypass. Many of those bugs sit in old, shared code that vendors patch slowly or stop patching altogether.

Once inside, attackers enrol the router in a botnet, change its DNS settings to send you to fake sites, read or alter your traffic, or use it as a proxy to hide their own activity. Sometimes they destroy it. In October 2023 a single campaign left more than 600,000 routers belonging to one ISP's customers permanently unusable within 72 hours.

This guide explains each attack from the attacker's point of view so that you can defend against it: how it works, what the attacker needs, documented cases with CVE numbers, the impact, how to spot it and what to do. It ends with hardening checklists for homes, offices and router makers, and opens up the part most guides skip: the software supply chain inside the router, the real reason so many stay vulnerable for years.

It is written for home users wondering whether the box in the hallway is safe, for IT teams running routers in offices and branches, and for the engineers and ISPs who build and ship routers. Jargon is defined on first use.

This is a defender's guide. It contains no exploit code, no tool commands and no step-by-step attack instructions. Where a security tool is mentioned, it is only as context for authorised testing. Testing a router or network that you do not own, or have no written permission to test, is illegal in most countries. If you want to test your own equipment, do it on hardware you own, on a network you control, or under a signed scope of work.

Radio attacks against Wi-Fi itself, such as handshake cracking, WPS PIN attacks and evil twin access points, get their own treatment in the companion post, How Wi-Fi gets hacked and how to secure it. This post is about the router as a computer: its software, its services and its supply chain.

Contents

  1. How does a router work, and what software does it run?
  2. What is a router's attack surface?
  3. Which router attacks matter most?
  4. How do default and weak passwords get routers hacked?
  5. Why are exposed admin pages and remote management dangerous?
  6. How do attackers abuse UPnP?
  7. How do firmware vulnerabilities let attackers take over a router?
  8. How do botnets like Mirai and VPNFilter target routers?
  9. What is router DNS hijacking?
  10. Why are end-of-life routers so risky?
  11. Are ISP-supplied routers safe?
  12. What is TR-069, and how can it be abused?
  13. Why do router vulnerabilities take so long to fix?
  14. How can you tell if your router has been hacked?
  15. How do you secure a home router?
  16. How do you secure routers in an office?
  17. What should router makers and ISPs do?
  18. How Safeguard helps router and gateway makers
  19. The takeaway
  20. Frequently asked questions
  21. Sources

How does a router work, and what software does it run?

A home or office router is a small Linux computer between your devices and the internet. It shares one public address, filters inbound traffic, hands out local addresses, relays DNS lookups, runs Wi-Fi and serves an admin page. Most of that is open source and chip vendor software, with a thin layer written by the brand.

A router is a computer with one port facing the world. The WAN (wide area network) port connects to your ISP and so to the whole internet. The LAN (local area network) side connects your phones, laptops, TVs, cameras and printers.

In between, the router does several jobs at once. NAT (network address translation) lets every device share one public IP address. The firewall drops unsolicited inbound connections, which is why most home devices are not directly reachable from the internet. The DHCP server hands each device a local address and, importantly, the DNS servers it should use. The DNS forwarder receives nearly every name lookup on the network. The Wi-Fi access point handles the radio and encryption. An admin interface, a web page and often a phone app backed by a vendor cloud, changes all of the above. And management services such as Universal Plug and Play (UPnP), the ISP's remote management protocol (TR-069), a cloud agent, and sometimes SSH, Telnet, VPN or USB sharing, run alongside.

Block diagram of a router with the internet and ISP on the WAN side, seven internal jobs, and phones, TVs, cameras, printers and work devices on the LAN side

Figure 1. A router does seven jobs at once, and every one of them is software.

Business routers add site-to-site VPNs, VLANs (virtual LANs that split one physical network into separate segments), logging and central management. ISP gateways often combine modem, router and Wi-Fi in one box the ISP manages remotely.

What is inside the firmware?

Firmware is the complete software image on the router's flash memory, usually a stripped-down Linux system. When the German research institute Fraunhofer FKIE examined the latest firmware of 127 home routers from seven large vendors in 2020, at least 116 of them, 91 percent, ran Linux. From the bottom up, a typical image contains these layers.

  • Chipset and radio firmware: closed code running on the Wi-Fi, DSL or cable chips.
  • Bootloader: usually U-Boot or a variant, which starts the system and, on better designs, checks a signature first.
  • Linux kernel and the chip vendor's SDK: a software development kit (SDK) from Broadcom, Qualcomm, MediaTek, Realtek or another chip maker, bundling a specific kernel with drivers for the radios and switch. Router brands build on top of it.
  • BusyBox: one binary providing a shell and about a hundred Unix tools, "the Swiss Army Knife of embedded Linux" in Claroty's words.
  • Open source daemons: dnsmasq for DNS and DHCP, hostapd for Wi-Fi authentication, OpenSSL or another TLS library, a small HTTP server and the firewall tools.
  • Vendor services: the UPnP daemon, TR-069 client, cloud agent, USB sharing and parental controls, written by the brand, its contract manufacturer or a licensed third party.
  • The vendor web interface: CGI handlers (small programs that process each settings page) and the JavaScript UI. The brand usually writes this layer, and a large share of router vulnerabilities live here.

Layered stack of router software from chipset firmware and bootloader through the Linux kernel, BusyBox and open source daemons to vendor services and the web interface, with who supplies each layer

Figure 2. The software stack inside a typical router, and who usually supplies each layer.

That layering matters. Most of the code was not written by the company whose logo is on the box, so a flaw in a shared component lands in many brands at once. And every layer has its own owner and release schedule, so a fix has to hop from project to SDK to brand to device. The supply chain section below returns to this, because it explains more about router insecurity than any single bug.

How healthy is router firmware in practice?

The Fraunhofer study is still one of the clearest public snapshots. Of the 127 routers, 46 had no security update in the previous year, and the average time since the last update was 378 days. More than a third used Linux kernel 2.6.36 or older, which last had a security update in February 2011. Fifty shipped hard-coded login credentials, 16 of them well known or easy to crack, and the images held almost five private cryptographic keys each on average.

The report's summary was blunt: "There is no router without flaws." It also found real differences: AVM did better than the others on most measures. A router's security depends heavily on choices its maker made long before you bought it.

Bar chart of Fraunhofer FKIE 2020 results across 127 home routers: 116 run Linux, 81 updated in the last year, 50 ship hard-coded credentials, 46 had no security update in a year, 16 have well-known or easily cracked passwords

Figure 3. What Fraunhofer FKIE found in 127 home router firmware images in 2020.

What is a router's attack surface?

A router's attack surface is every way an attacker can send it input: services exposed to the internet, services reachable from devices on your network, web pages your browser loads, and the update, cloud and ISP channels that change its software. Default or weak credentials make every one of those paths easier.

An attack surface is the sum of the places where untrusted input reaches code. For a router, it splits into three directions.

From the internet (the WAN side). Anything the router answers on its public IP address. On a well-configured home router that should be almost nothing. In practice it can include the admin page, a vendor remote management service, the ISP's TR-069 port, UPnP that wrongly answers on the WAN, VPN servers and USB sharing. Anyone scanning the internet can reach these, and scanning all of IPv4 is now quick and cheap.

From inside the network (the LAN side). Any device on your network can talk to the admin page, DNS and UPnP, including the cheap camera with old firmware and malware on a family PC. Your browser is also a path: a malicious web page can make it send requests to the router's admin page, a cross-site request forgery (CSRF), and DNS rebinding tricks the browser into treating the router's local address as part of an attacker's site.

Through the supply chain. The firmware update channel and its signing keys, the chip vendor SDK and the shared open source components inside it, the ISP's management server, and the vendor cloud account behind the phone app. These are the paths that change the router's code or configuration without anyone touching the device.

Attack surface map with internet-facing entry points above the router, LAN-side entry points on the left and supply chain entry points on the right

Figure 4. Three directions of attack. Wi-Fi radio attacks are covered in the companion Wi-Fi guide.

Which router attacks matter most?

The attacks that matter most are the cheap ones: default or weak passwords, admin interfaces exposed to the internet, and known vulnerabilities in firmware that has not been patched or never will be. Botnets automate exactly those, at internet scale. Targeted zero-days and persistent implants are rarer but far harder to detect.

Defenders get more value from ranking threats by attacker effort against impact than by sophistication. Figure 5 does that, qualitatively, using the incidents in this guide.

Two by two matrix of router attack classes by attacker effort and impact, with default credentials, exposed admin, known bugs and DNS hijacking in the low effort high impact box

Figure 5. The top-left box is where botnets live, and where to spend your first hour.

The top-left box is the priority because it is fully automated. A botnet does not care who you are; it scans every address and tries every password and exploit it knows, all day. The 2016 Mirai analysis measured a 76-minute doubling time for infections in its early hours.

The top-right box is different. Zero-day exploits (attacks on flaws the vendor does not yet know about), persistent implants such as VPNFilter, and abuse of ISP management systems take skill and money. They are rarer, but most likely to survive a reboot and go unnoticed.

The timeline in Figure 6 shows the same few root causes repeating since 2014, with the numbers growing.

Timeline of router incidents from Misfortune Cookie in 2014 through Mirai, VPNFilter, GhostDNS, shared component flaws, Pumpkin Eclipse, D-Link end of life, AyySSHush and AryStinger in 2026

Figure 6. Router incidents from 2014 to 2026, with the counts reported at the time.

The sections that follow take each attack class in turn.

How do default and weak passwords get routers hacked?

Default and weak passwords get routers hacked because attackers already know them. Factory credentials such as admin and password are published in manuals and lists, and botnets try them automatically against every reachable router. If the admin page, Telnet or SSH answers from the internet, a default password is all an attacker needs.

How it works, and why it works

For years the norm was the same username and password on every unit of a model, printed in the manual, and many people never changed it because nothing forced them to. Some firmware also contains hard-coded credentials: accounts built into the image that the owner cannot see or change, often left over from development or support.

An attacker who reaches a login prompt simply tries the known pairs. No exploit is involved, which is exactly why it works so well.

What the attacker needs

A reachable login service (web admin, Telnet, SSH or a vendor management port) and a list of default credentials. From the internet, the service must be exposed on the WAN side; from the LAN, any foothold such as an infected laptop is enough.

Real cases

Mirai, 2016. First found in August 2016, according to Wikipedia, Mirai grew to a peak of about 600,000 infections of "DVRs, IP cameras, routers, and printers," in the words of the USENIX Security 2017 analysis. Bots scanned random addresses on Telnet ports 23 and 2323 and tried 10 pairs drawn from a list of 62 default credentials. The resulting botnet ran distributed denial of service (DDoS) attacks: an attack on journalist Brian Krebs's site exceeded 600 Gbps, other attacks hit the host OVH, and on 21 October 2016 an attack on the DNS provider Dyn disrupted many large websites.

Mirai lifecycle: scan Telnet, guess default credentials, report, load malware, attack and spread, with notes on what breaks the loop and why rebooting fails

Figure 7. How Mirai spread. Unique passwords and closed Telnet break the loop; a reboot alone does not.

Hard-coded credentials, 2020. Fraunhofer FKIE found them in 50 of 127 home router firmware images, 16 well known or easy to crack. It could not tell whether each was reachable remotely, but each is a standing risk.

Brute force, 2025. GreyNoise reported that attackers broke into about 9,000 ASUS routers using, among other methods, "brute-force login attempts and authentication bypasses". Password guessing is now one step in longer attack chains.

Impact

Full control of the router: DNS changes, new port forwards, remote management switched on, malicious firmware on some models, and a base for attacking your other devices or other people.

How to detect it

Look for admin logins you did not make and settings that changed: DNS servers, port forwards, remote management, new accounts. In an office, centralise router logs and alert on admin logins from unexpected addresses.

How to defend against it

  • Change the admin password on day one to a long, unique passphrase, and turn on multi-factor authentication (MFA) where the router or its cloud account supports it.
  • Turn off Telnet. Turn off SSH unless you use it, and then use keys.
  • Never expose a login service to the internet.
  • After a reboot or factory reset, set the password before connecting the WAN cable. The Mirai paper notes the malware did not survive reboots, but Wikipedia's summary points out a device with the same default password is reinfected within minutes.
  • When you buy, prefer routers that ship with a unique per-device password or force you to set one. The ETSI EN 303 645 consumer IoT security standard requires manufacturers to "use no universal default passwords". Look for routers whose makers say they meet it.

Why are exposed admin pages and remote management dangerous?

An admin page or management service exposed to the internet lets anyone in the world try to log in or exploit it, not just devices in your home. Router web interfaces have a long record of authentication bypass and command injection bugs, so exposure turns every future firmware flaw into a remote, unauthenticated attack.

How it works, and why it works

Remote administration exists for good reasons: an IT provider managing a branch router, or someone fixing their parents' Wi-Fi from across town. So routers offer a setting, often called remote management or web access from WAN, that makes the admin page answer on the public address. Some vendors also run dedicated management protocols on their own ports.

The problem is that admin interfaces are the most complex and least hardened code on the device. They parse input, call shell commands and handle authentication, often in C. Expose that code and you expose its bugs, and an authentication bypass makes even a strong password irrelevant.

What the attacker needs

An internet-facing management port and either valid credentials or a vulnerability in the management code. Locating exposed devices is trivial with internet-wide scanning.

Real cases

MikroTik Winbox, CVE-2018-14847. Winbox is the management service for MikroTik's RouterOS. The flaw let an unauthenticated attacker read arbitrary files, including the user database, and recover administrator credentials. MikroTik patched it in April 2018. By September 2018, Netlab 360 reported that more than 7,500 MikroTik routers were forwarding their owners' traffic to attacker-controlled addresses, 239,000 had a SOCKS4 proxy enabled maliciously, and 370,000 of 1.2 million MikroTik devices it identified (30.83 percent) were still vulnerable. Netlab's advice to MikroTik was to deny inbound access to the Winbox and WebFig ports from the internet. We cover this CVE in more depth in our CVE-2018-14847 explainer.

Cisco IOS XE web UI, CVE-2023-20198. An office and enterprise case: in October 2023 attackers exploited a CVSS 10.0 flaw in the web interface of Cisco IOS XE, which runs on many enterprise routers. According to Rapid7's analysis, a remote, unauthenticated attacker could create an account with full administrator privileges, and a second flaw, CVE-2023-20273, was then used to escalate to root. Only devices with the web UI enabled were affected. Cisco's emergency advice was to disable the web UI on internet-facing systems, and Rapid7 noted that doing so "does not mitigate risk from implants that may have already been successfully deployed."

Pumpkin Eclipse, 2023. Lumen's Black Lotus Labs suspected weak credentials or an exposed administrative interface behind the ISP routers destroyed in October 2023, covered below.

Impact

Remote takeover from anywhere, often without credentials. For a business, a compromised edge router is a foothold into the internal network.

How to detect it

Home users should confirm remote management is off. Businesses should scan the public IP addresses they own from outside, on a schedule. Search engines that index exposed services, such as Shodan or Censys, show what the world sees on your addresses; use them only for addresses you are responsible for. On the device, look for admin accounts you did not create.

How to defend against it

  • Turn off remote management, web access from WAN and vendor remote access unless you need them.
  • If you need remote administration, come in over a VPN or the vendor's cloud management with MFA, never through an exposed admin page.
  • In an office, restrict management to a management network and named accounts.
  • If an exposed interface had a flaw exploited in the wild, assume compromise: check for new accounts, reset, reconfigure and rotate credentials.

How do attackers abuse UPnP?

UPnP lets devices on your network ask the router to open ports automatically, with no password. Attackers abuse it in two ways: malware inside the network opens ports to expose devices, and badly built routers answer UPnP from the internet, letting outsiders add port forwarding rules that turn the router into a proxy.

How it works, and why it works

Universal Plug and Play lets devices configure the network without user involvement. Its Internet Gateway Device (IGD) feature lets a game console or call app ask the router to forward an external port to it. UPnP does not implement any authentication by default; it trusts everything on the LAN. So any compromised local device can open holes in your firewall, and routers whose UPnP also answers on the WAN let anyone on the internet add rules.

What the attacker needs

For the LAN-side abuse, a foothold on any device on your network. For the WAN-side abuse, a router whose UPnP implementation wrongly answers on its public interface.

Real cases

Rapid7, 2013. In a January 2013 study summarised by Wikipedia, Rapid7 found that some 6,900 network-aware products from 1,500 companies at 81 million IP addresses responded to UPnP discovery requests from the internet, and that about 80 percent of them were home routers.

UPnProxy and EternalSilence. Akamai found that vulnerable routers "expose themselves and their IGD (Internet Gateway Device) controls on the WAN/Internet side of the router", letting attackers inject NAT rules that turn the router into a proxy for their own traffic. Its 2018 research reported more than 65,000 routers used this way. In the follow-up campaign it called EternalSilence, Akamai confirmed injections on 45,113 routers that exposed about 1.7 million machines behind them, with rules that tried to open the Windows file sharing ports 139 and 445 on internal computers. Akamai also warned that "disabling UPnP might not clear existing NAT injections."

CallStranger, CVE-2020-12695. Announced on 8 June 2020, CallStranger let an attacker subvert UPnP's event subscription mechanism for DDoS amplification, network scanning and data exfiltration. The Open Connectivity Foundation fixed the specification in April 2020, but many UPnP devices are hard to update, so the issue persists in old equipment.

Impact

Internal devices exposed to the internet, and the router used as a proxy to hide criminal traffic.

How to detect it

Review every mapping on the router's UPnP or port forwarding page. Unknown mappings, especially to file sharing ports, are a red flag.

How to defend against it

  • Turn UPnP off unless a specific device needs it, and never run it on a business network.
  • If you suspect abuse, reset the router with UPnP disabled and update the firmware, because turning UPnP off alone may not clear injected rules.

How do firmware vulnerabilities let attackers take over a router?

Firmware vulnerabilities let attackers run their own commands on a router or skip its login entirely. The two most common classes are command injection, where input from a web request ends up inside a system command, and authentication bypass, where a crafted request reaches admin functions without a password. Both often come from shared vendor code.

How command injection works

Router web interfaces often implement settings by calling shell commands. A page that runs a diagnostic or sets the country code may pass a value from the request to the shell. If the code does not strictly validate it, the shell can be made to run a second command of the attacker's choosing, with the web server's privileges, which on many routers means root. The bug class is simply untrusted input meeting a shell.

How authentication bypass works

Any flaw that lets a request reach a protected function without valid credentials. Usual causes in routers are path handling mistakes, loosely matched lists of pages allowed without login, and session or cookie bugs.

What the attacker needs

Network access to the vulnerable service and knowledge of the flaw. Attackers study published patches to find the bug, which is why exploitation often starts soon after a fix ships.

Real cases

TP-Link Archer AX21, CVE-2023-1389 (command injection). The Zero Day Initiative describes it as an "unauthenticated command injection vulnerability in the locale API available via the web management interface". It was disclosed at the Pwn2Own Toronto 2022 hacking contest. The API was reachable on the LAN side, and one team reached it from the WAN side by chaining a race condition. TP-Link's fix was released on 17 March 2023. Public exploitation started on 11 April 2023, when Mirai added the bug to its arsenal. Less than four weeks separated the fix from botnet use. Our CVE-2023-1389 explainer has more detail.

Arcadyan firmware, CVE-2021-20090 (authentication bypass). Tenable found a path traversal flaw in the web interfaces of networking devices built on Arcadyan firmware that "could allow unauthenticated remote attackers to bypass authentication". It was first reported in Buffalo routers, but the root cause was in Arcadyan's underlying firmware, and Tenable's advisory lists 20 affected vendors and ISPs, including ASUS, British Telecom, Deutsche Telekom, O2, Orange, Telstra, Verizon and Vodafone. See our CVE-2021-20090 explainer.

Realtek SDK, CVE-2021-35395 (several web interface flaws). This CVE covers six bugs in the web interface that ships with Realtek's router SDK. The researchers who found them at IoT Inspector identified "nearly 200 unique types of affected devices" from 65 vendors. Realtek published its advisory on 15 August 2021, details followed the next day, and exploitation to deliver a Mirai variant was reported on 18 August, about three days later.

ASUS, CVE-2023-39780 (command injection, used for persistence). In the 2025 campaign GreyNoise reported, attackers got in through brute force and authentication bypasses, then exploited CVE-2023-39780, a command injection flaw, to change the router's configuration. They enabled SSH on port 53282 with their own key and turned off logging. Because the backdoor lived in the router's non-volatile configuration memory (NVRAM), it was "not removed during firmware upgrades or reboots". See our CVE-2023-39780 explainer.

Misfortune Cookie, CVE-2014-9222 (embedded web server). Check Point found a flaw in RomPager versions before 4.34, an embedded web server many router makers licensed. SecurityWeek reported "a total of 12 million vulnerable routers spread out across 189 countries", from Huawei, Edimax, D-Link, TP-Link, ZTE, ZyXEL and others.

Impact

Remote code execution as root, backdoors, botnet enrolment, interception and sometimes destruction of the device.

How to detect it

Hard, because attackers who can run commands can also hide. Look for SSH turned on, new keys, logging disabled, and outbound connections from the router to unfamiliar destinations. In an office, compare the running configuration with a known-good backup on a schedule.

How to defend against it

  • Keep firmware current with automatic updates, and follow your vendor's security advisories.
  • Never let the internet reach the admin interface.
  • After a known exploited flaw, do not stop at patching. As the ASUS case shows, a patch does not remove a backdoor that is already in place. Factory reset, reconfigure manually and then update.

How do botnets like Mirai and VPNFilter target routers?

Botnets target routers because routers are always on, rarely monitored, sit on fast connections and are often vulnerable. Mirai spread through default Telnet passwords and later firmware exploits to launch record DDoS attacks. VPNFilter installed persistent, modular malware that could spy on traffic and destroy the device.

A botnet is a network of compromised devices controlled through command and control (C2) servers. Routers suit botnets: always on, directly on the internet, decent bandwidth, a full operating system, and nobody watching.

Mirai and its descendants

Three more Mirai details matter for defenders.

First, Mirai's source code was published on a hacking forum on 30 September 2016. The USENIX paper notes that this "led to the proliferation of Mirai variants with competing operators." Variants added exploits for specific router flaws. Wikipedia lists Satori in December 2017 targeting Huawei HG532 routers, Masuta and PureMasuta in January 2018 targeting D-Link routers, and many more since. Mirai variants were still adding router exploits in 2023 with the TP-Link flaw above.

Second, Mirai did not persist. It deleted its downloaded file and disguised its process name, and it did not survive a reboot. That sounds reassuring, but as Wikipedia's summary notes, a device with an unchanged password was reinfected within minutes.

Third, botnet code can break devices by accident, as the Deutsche Telekom outage in the ISP section shows.

VPNFilter

VPNFilter, disclosed by Cisco Talos in May 2018, was a different kind of threat. Talos counted at least 500,000 infected devices in at least 54 countries, across routers from Linksys, MikroTik, Netgear and TP-Link and QNAP network storage devices. A June 2018 update added ASUS, D-Link, Huawei, Ubiquiti, UPVEL and ZTE and listed 71 named models.

Its design shows what a capable attacker does with a router:

  • Stage 1 persisted. Unlike most IoT malware, it survived a reboot by adding itself to the router's scheduled tasks, and it used several redundant ways to find its C2 server.
  • Stage 2 did the work. It collected files, ran commands and exfiltrated data. Some versions had a "kill" command that overwrote part of the firmware and made the device unusable.
  • Stage 3 plugins added capability. A packet sniffer hunted credentials and Modbus industrial traffic, and a Tor module hid communications. The "ssler" module rewrote HTTPS requests to plain HTTP, captured credentials and could inject JavaScript into pages. A "dstr" module wiped the flash and left the device unable to boot.

Talos advised a factory reset, reboot and firmware update for small office and home routers.

Impact

For you: slower internet, traffic interception, credential theft and sometimes a dead router. For everyone else: DDoS attacks on major services, and residential proxies that let criminals look like ordinary home users.

How to detect it

Signs include persistent slowness, unexplained reboots, ISP notices about malicious traffic and settings you did not change. In a business, the router itself starting connections to unknown addresses is a strong signal.

How to defend against it

  • Close the three ways in: default credentials, exposed services and known unpatched flaws.
  • For a suspected persistent implant, factory reset, update and reconfigure from scratch, or replace an end-of-life device.
  • In an office, filter what the router's own management plane may connect to.

What is router DNS hijacking?

Router DNS hijacking is when an attacker changes the DNS servers your router hands to every device, so name lookups go to a server the attacker controls. That server answers normally for most sites but sends chosen ones, such as banks, to look-alike phishing pages. One changed setting affects every device on the network.

How it works, and why it works

DNS, the Domain Name System, turns names into IP addresses. Devices use whatever DNS server the router hands them through DHCP. Point that at a rogue resolver and every device trusts it, and because it can lie selectively, the hijack is hard to notice. A subtler relative is DNS cache poisoning, which tricks a legitimate resolver into storing a false answer.

What the attacker needs

A way to change the router's DNS setting: admin credentials, an authentication bypass, or a CSRF attack from a malicious web page against a router with a weak admin page. For cache poisoning, a flaw in the router's DNS software.

Real cases

GhostDNS, 2018. Netlab 360 found a campaign that had hijacked the DNS settings of more than 100,000 routers, 87.8 percent of them in Brazil, across more than 70 router and firmware types. The operators guessed passwords on the router's web login page or bypassed authentication through a known flaw, then pointed the router at their own DNS servers. More than 50 domains were hijacked, including large Brazilian banks, to steal logins. Netlab's advice to users was to update router firmware, check whether the router's DNS server had changed, and set a stronger admin password.

DNSpooq, 2021. Researchers at JSOF disclosed seven vulnerabilities in dnsmasq, the DNS and DHCP software found in a very large number of routers. They split into DNS cache poisoning flaws and buffer overflows. JSOF estimated about 1 million vulnerable dnsmasq instances exposed to the internet and said over 40 vendors may be affected. All seven were fixed in dnsmasq 2.83, but each router vendor then had to ship new firmware.

DNS hijacking flow: normal lookups go through the router to a legitimate resolver and the real bank; hijacked lookups go to a rogue resolver and a phishing site

Figure 8. How router DNS hijacking works, and the defences that still protect you if DNS lies.

Impact

Credential theft through convincing phishing pages, fake updates and surveillance of your browsing, on every device, including well patched ones.

How to detect it

Check the DNS servers in the router's WAN and DHCP settings: blank (meaning the ISP's), your ISP's, or a resolver you chose. Certificate warnings on familiar sites are a strong sign; never click through them. In an office, alert on any change to router DNS settings.

How to defend against it

  • Strong admin password, no remote management and current firmware block most ways to change the setting.
  • Check the router's DNS settings monthly.
  • Use encrypted DNS, DNS over HTTPS (DoH) or DNS over TLS (DoT), on devices and browsers that support it, so they do not depend on the router's resolver.
  • Keep HTTPS everywhere and never ignore certificate warnings. Use passkeys or MFA for important accounts so that a phished password alone is not enough.
  • In an office, force DNS through resolvers you control and block outbound DNS to anything else.

Why are end-of-life routers so risky?

End-of-life routers no longer receive security updates, so every vulnerability found after support ends stays open forever. Attackers know this and target them on purpose. In 2025, VulnCheck found that 65 percent of the vulnerabilities exploited by botnets affected end-of-life or likely end-of-life products.

How it works, and why it works

A router bought ten years ago still forwards packets, but once a model is end of life (EOL), no more firmware is built for it. New vulnerabilities in its web interface, SDK or open source components are published and never fixed. For attackers that is ideal: a permanent hole, an owner who is not watching, and many identical devices.

What the attacker needs

A list of EOL models with known flaws, which public vulnerability databases provide, and internet scanning to find them.

Real cases

D-Link DIR-846, 2024. In September 2024 D-Link said it would not fix four remote code execution flaws, CVE-2024-44341, CVE-2024-44342, CVE-2024-41622 and CVE-2024-44340, because "the DIR-846, all hardware revisions, have reached their End of Life". D-Link's advice was for EOL devices "to be retired and replaced."

AryStinger, 2026. In June 2026, Malwarebytes reported a botnet that had taken over at least 4,300 D-Link DIR-850L and DIR-818LW routers, plus some network storage devices, using vulnerabilities disclosed 13 years earlier. The article notes that "although these devices are long past end-of-life, they are still widely used in homes and small offices."

The 2026 data. VulnCheck's 2026 report on network edge exploitation found that 42.5 percent of the edge device vulnerabilities exploited in 2025 affected devices that were end of life or likely end of life, that 65 percent of vulnerabilities exploited by botnets affected such products, and that consumer routers and globally distributed networking products made up 56 percent of exploited edge device vulnerabilities.

Stale even when supported. Fraunhofer's 2020 study shows the problem starts before official EOL: 46 of 127 current routers had no security update in the previous year, and more than a third ran a Linux kernel branch that had been without security fixes since 2011.

Impact

A permanent, known entry point into your network that you cannot fix with a setting.

How to detect it

Look up your model and hardware revision on the vendor's support site. If the latest firmware is more than a year old or the model is on an end-of-life list, treat it as unsupported.

How to defend against it

  • Replace EOL routers. There is no configuration that fixes unpatched code.
  • When buying, prefer vendors that publish a support period and a security advisory page, and that ship automatic updates.
  • If you cannot replace an EOL router immediately, follow the interim advice from the Malwarebytes article: latest available firmware, changed admin password, remote management off, UPnP off, WPA2 or WPA3, and a plan to replace it as soon as possible.
  • Some EOL hardware can run maintained open source firmware such as OpenWrt, if the model is supported and you are comfortable maintaining it.

Are ISP-supplied routers safe?

ISP-supplied routers are as safe as the ISP's patching and configuration. Their advantage is that the ISP can update a whole fleet remotely. Their risk is that one flaw, one bad update or one compromised management system affects hundreds of thousands of customers at once, and the customer often cannot change key settings.

How it works, and why it works

Many households use a gateway supplied and managed by their ISP, often built by a manufacturer such as Arcadyan, Sagemcom or ActionTec. The ISP can push firmware without the customer doing anything, which is a real benefit. It also concentrates risk: every customer runs the same firmware and management stack, the remote management channel is itself an attack surface, and customers may be locked out of key settings.

Real cases

Deutsche Telekom, November 2016. At the end of November 2016, about 900,000 Deutsche Telekom customers' routers, made by Arcadyan, went offline after failed exploitation attempts by a Mirai variant against the routers' remote management interface. The USENIX paper records Mirai-fingerprinted scanning of TCP port 7547, the standard port for the ISP management protocol CWMP, starting on 26 November 2016, and attributes the decline that followed to Deutsche Telekom patching its routers. Even a failed attack can cause a mass outage when every customer runs the same device.

Pumpkin Eclipse, October 2023. Between 25 and 27 October 2023, one ISP, which Lumen did not name, lost customer routers on a massive scale. Lumen's Black Lotus Labs found that 49 percent of all modems on the affected network disappeared from scan data, with ActionTec T3200 and T3260 models named in user reports. The devices were made "permanently inoperable and required a hardware-based replacement." The malware was Chalubo, a commodity remote access trojan first seen in 2018. BleepingComputer, reporting Lumen's research, put the total at over 600,000 routers and also named the Sagemcom F5380. Lumen could not determine how the attackers got in.

Arcadyan, 2021. The Arcadyan authentication bypass affected gateways shipped by ISPs including British Telecom, Deutsche Telekom, KPN, O2, Orange, Telstra, Telus, Verizon and Vodafone. Customers had to wait for each ISP to build and push fixed firmware.

How to detect problems

Customers have limited visibility: check the firmware version against the ISP's support pages and watch for unexplained outages. Businesses should ask their ISP how quickly security fixes are deployed and whether management access is restricted to the ISP's network.

How to defend

  • A well-managed ISP router that updates automatically is a reasonable choice for most households.
  • If your ISP router is old, ask your ISP whether a newer model is available and whether yours still receives updates.
  • You can run your own router behind the ISP gateway, or use bridge mode where supported. You gain control, and the duty to keep it updated.
  • Businesses should put patching timelines into ISP contracts and keep their own firewall behind any ISP-managed device.

What is TR-069, and how can it be abused?

TR-069 is the protocol ISPs use to configure, update and monitor customer routers remotely. It is useful, because it lets ISPs patch fleets. It is risky when the router's TR-069 service is reachable by anyone on the internet, when its implementation has bugs, or when the ISP's management server is compromised.

How it works

TR-069 is a Broadband Forum specification for the CPE WAN Management Protocol (CWMP), which runs over HTTP. CPE means customer premises equipment, such as your router. The router checks in with the ISP's auto-configuration server (ACS) for configuration and firmware, and listens for connection requests asking it to check in now, typically on TCP port 7547.

A related specification, TR-064, defines a LAN-side interface. Wikipedia notes that flaws in combined TR-064 and TR-069 implementations "are exploited by Mirai-based botnets and other malware" where one HTTP endpoint is reused for connection requests over the public internet.

Why it is a target

TR-069 gives whoever controls it complete authority over the router. A compromised ACS could redirect DNS or push backdoored firmware to a provider's whole subscriber base, and Wikipedia notes ACS software "has been found to be often implemented insecurely." The attacker needs either a flaw in the router's internet-facing TR-069 or TR-064 listener (the common case) or access to the ACS itself (rare and severe).

Real cases

The Deutsche Telekom outage above is the best documented case of mass exploitation of the management port. The Mirai variant compromised CWMP devices, in the USENIX paper's words, "through an RCE exploit in a SOAP configuration endpoint". The lesson for ISPs is that the management listener is internet-facing code and needs the same patching discipline as the admin page.

How to detect it

Businesses can scan their own public addresses for an open port 7547 and ask the ISP whether the listener is restricted to its network.

How to defend

  • ISPs should accept connection requests only from their own ACS addresses, authenticate both sides, and keep the TR-069 client in their firmware patched like any other internet-facing code.
  • If you own your router and your ISP does not need to manage it, turn TR-069 off. On an ISP-managed router, leave it on, because it is how your updates arrive, but ask your ISP how it is protected.
  • Businesses should not let an ISP-managed device be the only security boundary.

Why do router vulnerabilities take so long to fix?

Router fixes are slow because they pass through a long supply chain. An open source project or chip vendor fixes a flaw, the chip SDK adopts it, each router maker rebuilds and tests firmware for every model, ISPs may add a release cycle, and the update must reach the device. Models drop out at every step.

This section explains the rest: router insecurity is mostly a software supply chain problem.

The chain a fix has to travel

Consider a vulnerability in dnsmasq, BusyBox or the Linux kernel. The fix goes through these steps.

  1. Upstream fix. The open source project releases a patched version. dnsmasq fixed DNSpooq in version 2.83 and BusyBox fixed its 2021 set in version 1.34.0.
  2. Chip vendor SDK. The SDK pins component versions, often on an old kernel branch, so it must pick up the fix or each router maker must backport it.
  3. Router maker or ODM. The brand, or the original design manufacturer (ODM) that builds for it, rebuilds and tests firmware for every affected model. Older models may get nothing.
  4. ISP. For ISP-branded gateways, the ISP may run its own testing and release schedule.
  5. The device. Finally the update must be installed, automatically or by the owner.

Every hop adds delay and is a place where a model can fall out of support, while the public fix tells attackers what to look for. That is why exploitation of the TP-Link flaw started within four weeks of the patch, and why the Realtek SDK flaws were exploited about three days after disclosure.

Shared components multiply the blast radius

Because so many brands build on the same SDKs and open source packages, one flaw lands in dozens of products at once. Figure 9 collects the documented examples from this guide. Two not covered above are worth noting. KCodes NetUSB, a kernel module that shares USB devices over the network, had a flaw, CVE-2021-45608, that SecurityWeek said could allow remote code execution on millions of routers from Netgear, TP-Link, Tenda, EDiMAX, D-Link and Western Digital; it took from September to December 2021 for the fix to travel from researchers to KCodes to vendor firmware. And in BusyBox, Claroty and JFrog found 14 vulnerabilities in 2021, with 40 percent of more than 10,000 embedded firmware images JFrog examined containing a BusyBox executable linked with an affected applet.

Six shared router components and the reach of one documented flaw in each: Realtek SDK, Arcadyan firmware, KCodes NetUSB, dnsmasq, BusyBox and RomPager

Figure 9. One component flaw, many router brands. An SBOM is the fast way to know which of your products are affected.

What router makers often do not know

The hardest question after a shared component flaw is "which of our products contain it, at which version?" A brand that buys firmware from an ODM built on a chip vendor SDK may not have a full component list for each image. Fraunhofer's results show the consequences: old kernels, compiled binaries missing exploit mitigations such as stack canaries and RELRO, keys and credentials left in images.

The answer is a software bill of materials (SBOM) for every firmware release: a machine-readable list of every component and version, generated at build time and checked against new vulnerability data daily. Ranked by reachability and exploitation, it turns "are we affected?" from a weeks-long investigation into a query. We cover the practical side in Buildroot SBOMs with CycloneDX and CVE checks for firmware and binary SBOM analysis.

How can you tell if your router has been hacked?

Signs a router has been hacked include DNS servers you did not set, unknown port forwards or admin accounts, remote management or SSH switched on, logging disabled, a changed admin password, unexplained slowness or reboots, and notices from your ISP. Some implants hide well, so a clean-looking router is not proof of safety.

Routers give owners little visibility, and capable attackers turn off what logging exists. Still, most compromises leave traces in the configuration.

For home users

Log in to the router's admin page or app and check:

  1. DNS servers in the WAN and DHCP settings. Anything you did not set, and do not recognise as your ISP's, is suspicious.
  2. Port forwarding and UPnP mappings. Remove anything you do not recognise.
  3. Remote management. It should be off unless you turned it on.
  4. Admin accounts and SSH. Look for extra users, SSH turned on, or unfamiliar SSH keys. In the 2025 ASUS campaign, the signs were SSH listening on TCP port 53282 and an unknown entry in the authorized keys.
  5. Firmware version. Compare it with the vendor's latest release.
  6. Logs. If logging is turned off and you did not turn it off, treat that as a strong sign.

Outside the router, watch for certificate warnings on familiar sites, unexpected ads, and ISP notices about malicious traffic.

For businesses

  • Compare router configurations automatically against the last known-good version, and alert on changes to DNS, NAT rules, users, keys, management settings or logging.
  • Centralise router logs and alert on unexpected admin logins and on logging being disabled.
  • Use flow logs to spot the router itself connecting to unknown hosts.
  • Treat any exposed device with a known exploited flaw as possibly compromised until checked.

What to do if you think it has been hacked

  1. Disconnect the router from the internet.
  2. Factory reset it. A reboot is not enough for persistent implants such as VPNFilter's first stage or the ASUS NVRAM backdoor.
  3. Install the latest firmware from the vendor's official site, or let the router update before connecting other devices.
  4. Reconfigure manually. Do not restore an old configuration backup, which may carry the attacker's changes.
  5. Set a new, unique admin password and a new Wi-Fi passphrase.
  6. Change passwords for important accounts used on the network while the router was compromised, and turn on MFA.
  7. If the model is end of life, replace it.

How do you secure a home router?

To secure a home router, change the admin password, update the firmware and turn on automatic updates, turn off remote management, UPnP, WPS and Telnet, use WPA3 or WPA2 with a long passphrase, put visitors and smart devices on a guest network, check DNS settings monthly, and replace the router when support ends.

Figure 10 shows the defence layers; the checklist below turns them into actions you can finish in under an hour.

Seven defence layers for a router: choose a supported router, close the internet-facing surface, lock the admin plane, keep firmware current, segment the network, watch DNS and logs, plan the replacement

Figure 10. Defence in layers. Home users need at least layers 1 to 4 and 7.

The home checklist

  1. Change the admin password. Use a long, unique passphrase in a password manager. This is different from the Wi-Fi password.
  2. Update the firmware now, from the admin page or the vendor's app, and turn on automatic updates. If the latest firmware is more than a year old, check whether the model is end of life.
  3. Turn off remote management, web access from WAN, and any remote access feature you do not use. If you manage the router through the vendor's app, protect that cloud account with MFA.
  4. Turn off UPnP unless a device you rely on needs it. Turn off WPS, whose PIN method has a long history of weaknesses, as the Wi-Fi guide explains. Turn off Telnet and SSH if they exist and you do not use them.
  5. Use WPA3, or WPA2 with AES if some devices cannot do WPA3, with a long Wi-Fi passphrase.
  6. Use the guest network for visitors and for smart TVs, cameras, plugs and speakers, so a weak gadget cannot reach your laptops and phones.
  7. Check DNS and port forwards monthly. DNS should be blank, your ISP's, or a resolver you chose.
  8. Consider encrypted DNS on your devices and browsers, which protects lookups even if the router is tampered with.
  9. Replace the router when the vendor stops updating it.

When buying, look for a published support period, automatic updates, a security advisory page, a unique default password, WPA3 and an isolating guest network.

Two checklists side by side: nine router hardening steps for home users and nine for offices

Figure 11. Router hardening checklists for home and office.

How do you secure routers in an office?

To secure office routers, keep an inventory with firmware versions and end-of-life dates, allow management only from a dedicated management network with MFA and named accounts, never expose admin interfaces to the internet, scan your own public addresses, back up and monitor configurations, centralise logs, patch exploited flaws within days, and segment the network with VLANs.

The principles match the home list; the discipline is stricter.

The office checklist

  1. Inventory every router, firewall and ISP gateway with model, hardware revision, firmware version, owner and end-of-life date. Branch offices are where forgotten routers live.
  2. Management plane: admin access only from a management VLAN or jump host, never the internet. Turn off the web UI on interfaces that do not need it; the Cisco IOS XE case shows why.
  3. Accounts: named admin accounts with MFA and central authentication, no shared or default logins.
  4. Exposure: scan your own public IP addresses from outside on a schedule and alert on new open ports, especially management, VPN, TR-069 and UPnP.
  5. Configuration control: automatic backups, comparison with the last approved version, and an incident for any unexplained change.
  6. Logging: central logs with alerts on admin logins, logging being disabled, new users or keys, and firmware changes.
  7. Patching: known exploited vulnerabilities within days, the rest on a defined schedule, and a compromise check for exposed devices.
  8. Segmentation: staff, guest, IoT, voice and servers on separate VLANs.
  9. Egress control: restrict the router's own outbound connections and force DNS through approved resolvers.
  10. Contracts: patching timelines and end-of-life replacement written into ISP, MSP and vendor agreements.
  11. Replacement of end-of-life devices before support ends.

In ISO 27001 or the CIS Controls, these map directly to asset inventory, secure configuration, vulnerability management, logging and segmentation.

What should router makers and ISPs do?

Router makers and ISPs should ship unique credentials and secure defaults, keep the internet-facing surface minimal, build an SBOM for every firmware release, track and fix vulnerabilities in third-party components quickly, sign firmware and verify it at boot, publish a support period, run a vulnerability disclosure program, and make updates automatic.

Most attacks in this guide depend on decisions made before the router left the factory.

The manufacturer and ISP checklist

  1. No universal default passwords. Ship a unique random password per device, or force the user to set one at first use. This is a core provision of ETSI EN 303 645, which also asks makers to receive and manage vulnerability reports and provide secure, manageable software updates. Treat that standard as the floor, not the ceiling.
  2. Secure defaults. Remote management, UPnP on the WAN, Telnet and WPS off by default. No service on the WAN side unless the product truly needs it, and then only with authentication.
  3. Know what is in every image. Generate an SBOM for each firmware build covering the kernel, SDK components, open source packages and licensed third-party code, with exact versions. Keep it with the release.
  4. Monitor continuously. Match every shipped SBOM against new vulnerability data daily, ranked by exploitation and reachability.
  5. Fix your own code. Run static analysis (SAST) on the web interface, CGI handlers and daemons you write, with particular attention to command injection and authentication logic. Scan for secrets so that private keys and credentials never enter an image; Fraunhofer found almost five private keys per image on average.
  6. Harden the build. Enable compiler protections such as stack canaries, RELRO, PIE and FORTIFY_SOURCE across all binaries, which Fraunhofer found rarely used outside one vendor.
  7. Do not wait on upstream for critical fixes. When a chip vendor or open source project is slow, backport or patch the component yourself and ship.
  8. Sign firmware and verify it. Sign every image, protect the signing keys in hardware, and verify the signature in the bootloader where the hardware allows.
  9. Make updates automatic and resilient, with rollback protection and a dual-image design.
  10. Publish a support period at the point of sale, honour it, and announce end of life clearly.
  11. Run a vulnerability disclosure program and publish advisories with CVE numbers and fixed versions.
  12. For ISPs: restrict TR-069 connection requests to your ACS, authenticate both ends, protect the ACS like core infrastructure, monitor the fleet for configuration drift, and plan replacement of models that leave support.

How Safeguard helps router and gateway makers

Safeguard gives router makers, ODMs and ISPs one platform for the software supply chain inside their devices: SBOMs for firmware and apps, binary and image upload scanning, reachability-ranked vulnerabilities, SCA, SAST and secrets scanning on code they own, fix pull requests gated by their own CI, Gold patched packages, supplier risk and compliance evidence.

Router security teams usually piece this together from separate tools for source composition analysis, static analysis, secrets, binary analysis, SBOM management and audits, each with its own inventory. Safeguard covers it end to end, from the first inventory to the merged fix and the audit evidence, on one inventory and one vulnerability model.

Safeguard flow for router makers: source, binaries and extracted firmware go into SCA, SAST, secrets and binary analysis, producing an SBOM and reachability ranking, then fix pull requests or Gold patched packages, leading to a fixed signed release, customer SBOMs and compliance evidence

Figure 12. Where Safeguard fits in a router maker's pipeline.

See inside the binaries and images you ship and receive

In the Safeguard console, Integrations > Upload App Binary accepts compiled software and images: Windows EXE, MSI and DLL files, Android APK and iOS IPA apps, VM and disk images in QCOW2, VMDK, VHD and OVA formats, and container tarballs. Safeguard unpacks the file, identifies embedded libraries and versions, maps them to known vulnerabilities with EPSS (a score estimating the probability a flaw will be exploited) and known exploited enrichment, records licences, and produces a project with a full SBOM.

For a router business that covers the companion phone app, the Windows setup utility, a management controller shipped as a VM image, and the containerised cloud services behind the app. Router firmware images usually need to be extracted into their files first, with your normal firmware tooling; Safeguard does not claim to parse every raw firmware format. Heavy obfuscation, encryption or unusual compression can give incomplete results. More in our guide to scanning app binaries with Safeguard and the explainer on binary composition analysis.

Source scanning where you own the code

The web interface, CGI handlers, cloud agent, phone app and build system are code you own, and that is where command injection and authentication bypass bugs are born. Safeguard runs software composition analysis across the full transitive dependency tree, SAST on your own code, and secrets scanning that catches private keys and hard-coded credentials before they ship in an image, the exact problem Fraunhofer found across most vendors. Vulnerabilities are ranked by reachability, EPSS and known exploitation, so the team fixes the injection flaw in an internet-facing CGI handler before a theoretical issue in a module that is never loaded.

SBOMs your customers and ISPs can use

Every project produces an SBOM you can export in CycloneDX or SPDX, so you can answer an ISP's "what is in this firmware?" for every release, and "are we affected?" the morning a new dnsmasq or BusyBox flaw lands. SLSA, Sigstore and in-toto attestation add build provenance. For background, see CycloneDX vs SPDX.

Fix it without waiting for upstream

This is where Safeguard differs most from a scanner. For code in your repositories, Griffin, Safeguard's remediation model, opens a fix pull request that your own CI builds and tests before anyone merges it, and your policies decide what can merge. For open source components where upstream has not shipped a fix, or the fix sits in a version your SDK cannot move to, Safeguard Gold provides patched, hardened builds of the packages it carries, and Safeguard can fork and patch the vulnerable package so your next firmware build pulls a fixed version. For a router team stuck behind a chip vendor's SDK release, that is the difference between shipping the fix in the next build and leaving customers exposed for a quarter.

Supplier risk and compliance evidence

Safeguard's Third-Party Risk Manager lets you request SBOMs from chip vendors, ODMs and software suppliers, score them and monitor them continuously (more on Safeguard TPRM). The compliance suite collects evidence for frameworks such as ISO 27001 and SOC 2 from the same scans. Guard adds runtime guardrails on the Linux servers that build, sign and distribute firmware, inspecting system calls, library calls and network egress, so a tampered build or update server is noticed early.

Deploy where your code lives

Firmware source and signing infrastructure are sensitive. Safeguard runs as SaaS in US and EU regions, in your own VPC, or fully on premises, and can run in Zero AI mode with no language model in the loop, or with your own model. Safeguard is SOC 2 Type I and Type II audited.

How this compares

Router teams often pair a source SCA tool such as Snyk or Black Duck with a firmware analysis specialist such as Finite State, which describes itself as a "Product Security Automation Platform", or ONEKEY, which offers "product cybersecurity and compliance" for connected devices, plus a GRC platform for audits. Those are capable products, and for deep analysis of raw firmware images the specialists go further. Safeguard's case is consolidation and remediation: one inventory across source, binaries and images, fix pull requests and patched packages instead of tickets, and supplier risk and compliance evidence from the same data. For wider context, read our firmware supply chain security guide and hardware supply chain trust boundaries.

This post is part of a device security series. The laptop teardown follows the firmware inside a laptop, and the post on fabless chip designers covers how the chips themselves are designed and supplied.

The takeaway

Most routers are not hacked by brilliant attackers. They are hacked by automated scripts trying factory passwords, reaching admin pages that should never have faced the internet, and firing exploits for flaws that were fixed upstream months or years earlier. Owners can close most of that gap in an hour: a strong admin password, no remote management, UPnP and WPS off, current firmware, a guest network, and a replacement plan.

The harder part belongs to the people who build and ship routers. A router is a stack of other people's software, secure only as fast as a fix can travel from an open source project or chip vendor to a router in someone's hallway. Makers and ISPs who know what is in every image, fix their own code, patch shared components without waiting, and support devices for as long as people use them, stop appearing in botnet reports.

Try it yourself

Click through these interactive Safeguard demos to see the steps described in this guide.

Test yourself

Why do default and weak passwords get routers hacked so often?

Attackers already know them. Factory credentials like admin and password are published in manuals and lists, and botnets try them automatically against every reachable router, so no exploit is needed.

How did Mirai spread in 2016, and what broke its loop?

Bots scanned random addresses on Telnet ports 23 and 2323 and tried default credentials, reaching a peak of about 600,000 infections. Unique passwords and closed Telnet break the loop; a reboot alone does not, because a device with the same default password was reinfected within minutes.

Why is UPnP risky, and why is turning it off not always enough?

UPnP does not implement any authentication by default, so any compromised device on your network can ask the router to open ports. Akamai warned that disabling UPnP might not clear existing NAT injections, so if you suspect abuse, reset the router with UPnP disabled and update the firmware.

What did VPNFilter do that most IoT malware did not?

Cisco Talos counted at least 500,000 infected devices in at least 54 countries. Its first stage survived a reboot by adding itself to scheduled tasks, and later stages could spy on traffic, rewrite HTTPS to plain HTTP, or wipe the device so it could not boot.

What is router DNS hijacking, and what is a real example?

An attacker changes the DNS servers your router hands to every device, so chosen sites such as banks go to look-alike phishing pages. In 2018 the GhostDNS campaign hijacked the DNS settings of more than 100,000 routers, 87.8 percent of them in Brazil.

Name two defences that protect you even if the router's DNS is tampered with.

Use encrypted DNS (DoH or DoT) on devices and browsers that support it, and never click through certificate warnings. Passkeys or MFA on important accounts also mean a phished password alone is not enough.

Frequently asked questions

Can a router be hacked remotely?

Yes. If the router exposes an admin page, remote management, TR-069, UPnP or another service to the internet, an attacker anywhere can try default passwords or exploit firmware flaws. Botnets such as Mirai do this automatically. Turning off remote management and keeping firmware current removes most of that risk.

How do I know if my router has been hacked?

Check for DNS servers you did not set, unknown port forwards, remote management or SSH switched on, extra admin accounts, logging turned off, and firmware far behind the vendor's latest. Browser certificate warnings on familiar sites and notices from your ISP are also signs. Some implants hide well, so reset if in doubt.

Does restarting a router remove malware?

Sometimes. Restarting clears malware that does not persist, such as the original Mirai, but the router can be reinfected within minutes if the weakness remains. Persistent implants such as VPNFilter's first stage and the 2025 ASUS SSH backdoor survive reboots. A factory reset, firmware update and new passwords are the reliable fix.

Should I turn off UPnP on my router?

For most homes, yes, unless a game console or app you rely on needs it. UPnP lets any device on your network open ports with no password, and badly built routers have exposed it to the internet. Offices should keep it off. If you turn it off after suspected abuse, also reset the router.

What is TR-069 and should I worry about it?

TR-069 is the protocol ISPs use to configure and update customer routers remotely. On an ISP-managed router it is how your updates arrive, so leave it on and ask your ISP how it is secured. On a router you own and manage yourself, turn it off. Its management port has been mass-exploited, as in the 2016 Deutsche Telekom outage.

Is the router from my ISP safe?

It can be, if your ISP updates it regularly. ISP routers benefit from automatic fleet updates, but one flaw affects every customer at once, and you may not control key settings. If yours is old or never updated, ask for a newer model, or run your own updated router behind it.

How often should I update my router firmware?

Turn on automatic updates if your router supports them. Otherwise check at least monthly, and immediately when your vendor announces a security fix. Botnets have exploited router flaws within days of disclosure: Realtek SDK flaws were exploited about three days after the advisory, and a TP-Link flaw within four weeks of its patch.

When should I replace my router?

Replace it when the vendor stops releasing firmware for it, when the latest firmware is more than a year old with no announced support, or when it cannot do WPA2 with AES or newer. End-of-life routers never get security fixes, and in 2025 most vulnerabilities exploited by botnets affected end-of-life or likely end-of-life products.

Sources

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

We email you a link to confirm, and only then add you to the list. Unsubscribe in one click. Privacy

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.