Large scale attack hijacks routers through users' browsers

Researchers found a Web attack tool designed specifically to exploit vulnerabilities in routers and hijack their DNS settings

Hackers force routers to use rogue DNS servers

Hackers force routers to use rogue DNS servers

Cybercriminals have developed a Web-based attack tool to hijack routers on a large scale when users visit compromised websites or view malicious advertisements in their browsers.

The goal of these attacks is to replace the DNS (Domain Name System) servers configured on routers with rogue ones controlled by attackers. This allows hackers to intercept traffic, spoof websites, hijack search queries, inject rogue ads on Web pages and more.

The DNS is like the Internet's phonebook and plays a critical role. It translates domain names, which are easy for people to remember, into numerical IP (Internet Protocol) addresses that computers need to know to communicate with each other.

The DNS works in a hierarchical manner. When a user types a website's name in a browser, the browser asks the operating system for that website's IP address. The OS then asks the local router, which then queries the DNS servers configured on it -- typically servers run by the ISP. The chain continues until the request reaches the authoritative server for the domain name in question or until a server provides that information from its cache.

If attackers insert themselves in this process at any point, they can respond with a rogue IP address. This will trick the browser to look for the website on a different server; one that could, for example, host a fake version designed to steal the user's credentials.

An independent security researcher known online as Kafeine recently observed drive-by attacks launched from compromised websites that redirected users to an unusual Web-based exploit kit that was specifically designed to compromise routers.

The vast majority of exploit kits sold on underground markets and used by cybercriminals target vulnerabilities in outdated browser plug-ins like Flash Player, Java, Adobe Reader or Silverlight. Their goal is to install malware on computers that don't have the latest patches for popular software.

The attacks typically work like this: Malicious code injected into compromised websites or included in rogue ads automatically redirect users' browsers to an attack server that determines their OS, IP address, geographical location, browser type, installed plug-ins and other technical details. Based on those attributes the server then selects and launches the exploits from its arsenal that are most likely to succeed.

The attacks observed by Kafeine were different. Google Chrome users were redirected to a malicious server that loaded code designed to determine the router models used by those users and to replace the DNS servers configured on the devices.

Many users assume that if their routers are not set up for remote management, hackers can't exploit vulnerabilities in their Web-based administration interfaces from the Internet, because such interfaces are only accessible from inside the local area networks.

That's false. Such attacks are possible through a technique called cross-site request forgery (CSRF) that allows a malicious website to force a user's browser to execute rogue actions on a different website. The target website can be a router's administration interface that's only accessible via the local network.

Many websites on the Internet have implemented defenses against CSRF, but routers generally lack such protection.

The new drive-by exploit kit found by Kafeine uses CSRF to detect over 40 router models from a variety of vendors, including Asustek Computer, Belkin, D-Link, Edimax Technology, Linksys, Medialink, Microsoft, Netgear, Shenzhen Tenda Technology, TP-Link Technologies, Netis Systems, Trendnet, ZyXEL Communications and HooToo.

Depending on the detected model, the attack tool tries to change the router's DNS settings by exploiting known command injection vulnerabilities or by using common administrative credentials. It uses CSRF for this as well.

If the attack is successful, the router's primary DNS server is set to one controlled by attackers and the secondary one, which is used as a failover, is set to Google's public DNS server. In this way, if the malicious server temporarily goes down, the router will still have a perfectly functional DNS server to resolve queries and its owner will have no reason to become suspicious and reconfigure the device.

According to Kafeine, one of the vulnerabilities exploited by this attack affects routers from multiple vendors and was disclosed in February. Some vendors have released firmware updates, but the number of routers updated over the past few months is probably very low, Kafeine said.

The vast majority of routers need to be updated manually through a process that requires some technical skill. That's why many of them never get updated by their owners.

Attackers know this too. In fact, some of the other vulnerabilities targeted by this exploit kit include one from 2008 and one from 2013.

The attack seems to have been executed on a large scale. According to Kafeine, during the first week of May the attack server got around 250,000 unique visitors a day, with a spike to almost 1 million visitors on May 9. The most impacted countries were the U.S., Russia, Australia, Brazil and India, but the traffic distribution was more or less global.

To protect themselves, users should check manufacturers' websites periodically for firmware updates for their router models and should install them, especially if they contain security fixes. If the router allows it, they should also restrict access to the administration interface to an IP address that no device normally uses, but which they can manually assign to their computer when they need to make changes to the router's settings.

Join the CSO newsletter!

Error: Please check your email address.

Tags LinksysMicrosoftsecurityAccess control and authenticationbelkinEdimax TechnologyD-LinkExploits / vulnerabilitiesAsustek ComputerintrusionMedialink

More about AsustekAsustek ComputerEdimaxEdimax TechnologyGoogleLinksysMicrosoftTechnologyTendaTP-LinkZyXEL

Show Comments

Featured Whitepapers

Editor's Recommendations

Solution Centres

Stories by Lucian Constantin

Latest Videos

  • 150x50

    CSO Webinar: Will your data protection strategy be enough when disaster strikes?

    Speakers: - Paul O’Connor, Engagement leader - Performance Audit Group, Victorian Auditor-General’s Office (VAGO) - Nigel Phair, Managing Director, Centre for Internet Safety - Joshua Stenhouse, Technical Evangelist, Zerto - Anthony Caruana, CSO MC & Moderator

    Play Video

  • 150x50

    CSO Webinar: The Human Factor - Your people are your biggest security weakness

    ​Speakers: David Lacey, Researcher and former CISO Royal Mail David Turner - Global Risk Management Expert Mark Guntrip - Group Manager, Email Protection, Proofpoint

    Play Video

  • 150x50

    CSO Webinar: Current ransomware defences are failing – but machine learning can drive a more proactive solution

    Speakers • Ty Miller, Director, Threat Intelligence • Mark Gregory, Leader, Network Engineering Research Group, RMIT • Jeff Lanza, Retired FBI Agent (USA) • Andy Solterbeck, VP Asia Pacific, Cylance • David Braue, CSO MC/Moderator What to expect: ​Hear from industry experts on the local and global ransomware threat landscape. Explore a new approach to dealing with ransomware using machine-learning techniques and by thinking about the problem in a fundamentally different way. Apply techniques for gathering insight into ransomware behaviour and find out what elements must go into a truly effective ransomware defence. Get a first-hand look at how ransomware actually works in practice, and how machine-learning techniques can pick up on its activities long before your employees do.

    Play Video

  • 150x50

    CSO Webinar: Get real about metadata to avoid a false sense of security

    Speakers: • Anthony Caruana – CSO MC and moderator • Ian Farquhar, Worldwide Virtual Security Team Lead, Gigamon • John Lindsay, Former CTO, iiNet • Skeeve Stevens, Futurist, Future Sumo • David Vaile - Vice chair of APF, Co-Convenor of the Cyberspace Law And Policy Community, UNSW Law Faculty This webinar covers: - A 101 on metadata - what it is and how to use it - Insight into a typical attack, what happens and what we would find when looking into the metadata - How to collect metadata, use this to detect attacks and get greater insight into how you can use this to protect your organisation - Learn how much raw data and metadata to retain and how long for - Get a reality check on how you're using your metadata and if this is enough to secure your organisation

    Play Video

  • 150x50

    CSO Webinar: How banking trojans work and how you can stop them

    CSO Webinar: How banking trojans work and how you can stop them Featuring: • John Baird, Director of Global Technology Production, Deutsche Bank • Samantha Macleod, GM Cyber Security, ME Bank • Sherrod DeGrippo, Director of Emerging Threats, Proofpoint (USA)

    Play Video

More videos

Blog Posts

Market Place