How to Check Your Router for Malware - Security Guide

Router Security: Assessing Potential Compromises
The security posture of many consumer routers is demonstrably weak. A significant number of routers are being targeted by malicious actors due to insufficient security practices by their manufacturers.
This situation arises from a pattern of neglect in the router industry. Many manufacturers prioritize rapid production and diverse device offerings over consistent security updates.
Identifying a Compromised Router
Determining whether your router has been compromised is a crucial step in maintaining network security. Several indicators can suggest a potential breach.
The current state of the home router market shares similarities with the Android smartphone ecosystem. Both are characterized by a proliferation of devices often lacking ongoing support and security patches.
- Unusual Network Activity: Monitor your network for unexpected data transfers or connections to unfamiliar destinations.
- Redirects: Be alert for being automatically redirected to websites you didn't intend to visit.
- Slow Performance: A compromised router can exhibit noticeably slower internet speeds.
- Changes to Router Settings: Investigate any alterations to your router's configuration that you did not authorize.
The lack of consistent updates leaves these devices vulnerable to exploitation. Attackers actively seek out and compromise these routers, often leveraging them for malicious purposes.
Proactive monitoring and regular security checks are essential for safeguarding your home network. Addressing vulnerabilities promptly can mitigate the risk of a successful attack.
The Potential for Router Compromise
DNS server settings on your router are frequently targeted by malicious actors. These attackers aim to redirect your internet traffic to fraudulent websites.
When you attempt to access a legitimate site, such as your financial institution, a compromised DNS server can lead you to a phishing website designed to steal your credentials. The address bar might display the correct URL, but you'll unknowingly be interacting with a malicious imitation.
A malicious DNS server doesn't always respond to every request. It may intentionally delay responses for most queries, ultimately defaulting to your Internet Service Provider’s (ISP) standard DNS server.
Noticeably sluggish DNS response times can indicate a potential security breach on your network.
HTTPS and SSL Stripping
While observant users might recognize the absence of HTTPS encryption on a phishing site, many individuals may not detect this crucial security indicator.
Furthermore, SSL-stripping attacks can actively remove encryption during data transmission, further concealing the malicious nature of the connection.
Beyond Phishing: Additional Threats
Attackers can also utilize compromised routers to inject unwanted advertisements into your browsing experience.
They may manipulate search results or attempt to install malware through drive-by downloads. Capturing requests for common web scripts, like those used by Google Analytics, allows them to redirect traffic to servers that inject advertisements.
The appearance of inappropriate or pornographic advertisements on reputable websites, such as How-To Geek or the New York Times, strongly suggests a security compromise on either your router or computer.
Exploiting Router Vulnerabilities
Many attacks leverage cross-site request forgery (CSRF) techniques. Attackers embed malicious JavaScript code into web pages.
This JavaScript then attempts to access and modify your router’s administrative settings. Because the code runs on a device within your local network, it can access the router’s interface.
Remote Access and UPnP
Some routers have remote administration enabled with default usernames and passwords, making them vulnerable to automated scanning and unauthorized access by bots.
Various other router vulnerabilities can be exploited. For instance, UPnP (Universal Plug and Play) has proven to be a security risk on numerous router models.
Identifying Router Compromises
A primary indicator of a router security breach is an alteration to its configured DNS server. Regularly inspecting your router’s web interface to verify its DNS server settings is crucial.
Initially, you must gain access to your router’s configuration page. Determine your network connection’s gateway address, or refer to your router’s manual for specific instructions.
Authenticate using your router’s credentials, if prompted. Locate the "DNS" setting, typically found within the WAN or Internet connection settings. A setting of "Automatic" is acceptable, as it indicates the router is obtaining DNS information from your Internet Service Provider.
However, if the setting is "Manual" and custom DNS server addresses are present, this could signify a potential issue. Configuring your router to utilize reputable alternative DNS servers, such as 8.8.8.8 and 8.8.4.4 (Google DNS) or 208.67.222.222 and 208.67.220.220 (OpenDNS), is perfectly acceptable.
Unrecognized DNS servers are a strong indication that malware has modified your router’s settings. If you encounter unfamiliar DNS server addresses, conduct an online search to verify their legitimacy. An entry of "0.0.0.0" is often benign, signifying an empty field and automatic DNS server acquisition.
Security professionals recommend periodic checks of this setting to proactively detect potential compromises to your router.

Addressing a Compromised DNS Server
Should a malicious DNS server be detected in your router’s configuration, immediate action is necessary. You can deactivate the problematic server and instruct your router to utilize the DNS server automatically provided by your Internet Service Provider (ISP).
Alternatively, you may manually input the addresses of trusted DNS servers, such as those offered by Google DNS or OpenDNS.
In cases where a malicious DNS server has been identified, a comprehensive security measure is recommended. Consider restoring your router to its factory default settings after completely erasing all existing configurations.
This ensures a clean slate before re-establishing the router, and subsequently implementing the security enhancements detailed below to prevent future compromises.
Further Router Security
Taking these steps will help protect your router from additional security threats.

Strengthening Router Security
Related: Securing Your Wireless Router: 8 Immediate Steps
While complete security isn't always achievable, it is possible to significantly enhance your router's defenses against potential attacks. If vulnerabilities exist within the router's firmware that haven't been addressed by the manufacturer, absolute protection cannot be guaranteed.
- Apply Firmware Updates: Regularly install the newest firmware version for your router. Utilize automatic updates if your router supports this feature – though many models do not. This helps safeguard against known vulnerabilities that have been resolved.
- Deactivate Remote Administration: Disable remote access to the router’s configuration interface.
- Modify Default Password: Change the default administrative password to prevent unauthorized access.
- Disable UPnP: Universal Plug and Play (UPnP) has historically presented security risks. Even if your router’s UPnP implementation is secure, malware on your network could exploit it to alter your DNS settings.
A visual representation of router security checks can be helpful in understanding potential vulnerabilities.
Although DNSSEC aims to improve security, it isn't a foolproof solution in this context. Currently, most client operating systems inherently trust the DNS server they are configured to use.
A compromised DNS server could falsely report the absence of DNSSEC information, or falsely validate an incorrect IP address as legitimate.
Image Credit: nrkbeta on Flickr