Table of Contents
  • Home
  • /
  • Blog
  • /
  • Forescout Uncovers 14 Vulnerabilities in DrayTek Routers Leading Multiple Cyber Attacks
October 7, 2024
|
11m

Forescout Uncovers 14 Vulnerabilities in DrayTek Routers Leading Multiple Cyber Attacks


Critical DRAY Flaws in DrayTek Routers

On October 2nd, 2024, Security researchers from Forescout Vedere Labs have uncovered a series of 14 vulnerabilities affecting various models of DrayTek routers, collectively dubbed DRAY:BREAK. These high-severity flaws could allow unauthenticated remote attackers to execute arbitrary commands with root privileges, cause denial of service (DoS) conditions, or perform cross-site scripting (XSS) attacks on vulnerable devices.

With over 704,000 DrayTek routers exposed online across 168 countries, these vulnerabilities pose a substantial risk to businesses and residential users alike. If left unpatched, they could enable espionage, data exfiltration, ransomware attacks, or denial-of-service (DoS) conditions, leading to severe operational disruptions and security breaches.

The vulnerabilities stem from improper input validation, buffer overflows, and other coding issues in the web-based management interface and underlying operating system of affected DrayTek routers. An attacker could exploit these flaws by sending specially crafted HTTP requests or malicious payloads to a vulnerable device.

With CVSS scores ranging from 4.9 to 10.0, these vulnerabilities pose a significant risk to organizations and individuals using the impacted DrayTek router models. Unlike some previous router vulnerabilities, patches are available for most affected devices, including some end-of-life models.

In this article, we'll examine the details of these critical vulnerabilities in DrayTek routers, analyze their potential impact, and discuss mitigation strategies for organizations and users of these popular networking devices.

Overview of DrayTek Routers

DrayTek Corporation, founded in 1997 in Taiwan, has established itself as a prominent player in the networking equipment industry. The company specializes in developing and manufacturing a wide range of networking devices, with a particular focus on routers, firewalls, and VPN solutions. DrayTek's product lineup caters primarily to small to medium-sized businesses (SMBs), home offices, and tech-savvy consumers looking for advanced networking capabilities.

  • VPN capabilities

  • Firewall protection

  • Content filtering

  • Bandwidth management

  • Multiple WAN interfaces

DrayTek devices run a proprietary operating system called DrayOS. While marketed as "backdoor-free", recent vulnerability disclosures highlight significant security issues in this OS and its web management interface.

Summary of DRAY:BREAK Vulnerabilities

The research team identified 14 critical vulnerabilities affecting various models of DrayTek routers, which could be exploited for a range of malicious activities, from complete system compromise to service disruptions. The vulnerabilities include multiple cross-site scripting (XSS) flaws, buffer overflows, and OS command injection vulnerabilities. The most critical vulnerabilities, CVE-2024-41585 and CVE-2024-41592, are rated with severity scores of 9.1 and 10, respectively, posing the highest risk to affected devices.

The research revealed that:

  • One vulnerability has a maximum severity score of 10, indicating that it can lead to full system compromise and allow remote code execution without any authentication.

  • Another vulnerability scored 9.1, reflecting a high likelihood of exploitation for OS command injection.

  • Nine vulnerabilities have medium severity ratings ranging from 4.9 to 7.5, which, while less critical, could still be leveraged for data theft, denial-of-service (DoS), or privilege escalation attacks.

These vulnerabilities arise due to improper input validation, inadequate memory handling, and insufficient access control mechanisms. Exploiting them could allow attackers to inject malicious code, gain unauthorized access, disrupt network services, and potentially launch further attacks on connected devices.

CVE ID
CVSS Score
Vulnerability Type
Potential Impact
Description
CVE-2024-41592
10.0
Buffer Overflow
Remote Code Execution
Buffer overflow in the Web UI's query string parsing functionality.
CVE-2024-41585
9.1
OS Command Injection
Remote Code Execution
OS command injection vulnerability in the recvCmd binary used for guest-host communication.
CVE-2024-41594
7.6
Weak PRNG Seeding
Information Disclosure / MitM
Web server backend uses a static string to seed the PRNG for SSL/TLS operations.
CVE-2024-41589
7.5
Credential Reuse
Full System Compromise
The same admin credentials are used across the entire system, including both guest and host operating systems.
CVE-2024-41591
7.5
Cross-Site Scripting (XSS)
Reflected XSS
Reflected XSS vulnerability in the 'doc/hslogp1_link.htm' page of the Web UI.
CVE-2024-41588
7.2
Buffer Overflow
Potential RCE / DoS
Buffer overflow vulnerabilities in '/cgi-bin/v2x00.cgi' and '/cgi-bin/cgiwcg.cgi' pages.
CVE-2024-41590
7.2
Buffer Overflow
Potential RCE / DoS
Multiple buffer overflow vulnerabilities in various CGI pages (requires valid credentials).
CVE-2024-41586
7.2
Buffer Overflow
Potential RCE / DoS
Stack buffer overflow vulnerability in the '/cgi-bin/ipfedr.cgi' page handling.
CVE-2024-41596
7.2
Buffer Overflow
Potential RCE / DoS
Multiple buffer overflow issues due to missing bounds checks when handling CGI form parameters.
CVE-2024-41593
7.2
Heap Buffer Overflow
Denial of Service
Heap-based buffer overflow in the 'ft_payloads_dns()' function of the Web UI.
CVE-2024-41595
7.2
Unvalidated User Input
Potential RCE / DoS
Lack of input validation in several CGI pages, allowing controlled writes into certain global variables.
CVE-2024-41587
4.9
Cross-Site Scripting (XSS)
Stored XSS
Stored XSS vulnerability in the custom greeting message functionality.
CVE-2024-41583
4.9
Cross-Site Scripting (XSS)
Stored XSS
Stored XSS vulnerability in the custom router name setting.
CVE-2024-41584
4.9
Cross-Site Scripting (XSS)
Reflected XSS
Reflected XSS vulnerability in the 'sFormAuthStr' parameter of the login page.

This table summarizes the 14 vulnerabilities, their severity scores, and potential impacts. Let's understand some of the most critical issues with a little more detail:

1 . Buffer Overflow Vulnerabilities

CVE-2024-41592 (CVSS 10.0): Critical Query String Parsing Flaw

This vulnerability is the most severe, affecting the web UI's query string parsing functionality. The flaw exists in the GetCGI() function.

The code lacks proper bounds checking when processing query string parameters. An attacker can exploit this by sending a request with numerous '&' characters, overflowing the a2 buffer on the stack. This could lead to overwriting the return address and achieving arbitrary code execution.

CVE-2024-41588 and CVE-2024-41590 (CVSS 7.2): Multiple CGI Page Vulnerabilities

These vulnerabilities affect various CGI pages, including '/cgi-bin/v2x00.cgi' and '/cgi-bin/cgiwcg.cgi'. The issues stem from improper use of functions like strncpy() without adequate length checks. This pattern can lead to buffer overflows if the source string is longer than the destination buffer.

2 . OS Command Injection

CVE-2024-41585 (CVSS 9.1): recvCmd Binary Vulnerability

This critical flaw affects the recvCmd binary, which facilitates communication between the guest OS (DrayOS) and the host OS. The vulnerable code constructs and executes system commands.

While intended to restrict commands to a predefined set, insufficient input sanitization allows arbitrary command execution. An attacker who compromises the guest OS could leverage this to execute commands on the host with root privileges.

3 . Cross-Site Scripting (XSS) Vulnerabilities

Multiple XSS vulnerabilities were discovered, including both stored and reflected variants:

CVE-2024-41587 (CVSS 4.9): Stored XSS in Custom Greeting

This vulnerability allows injecting JavaScript into a custom login greeting message. The flawed input sanitization only checks for the "<script>" tag.

This can be easily bypassed using alternative methods to execute JavaScript, such as event handlers on HTML elements.

CVE-2024-41591 (CVSS 7.5): Reflected XSS in Web UI

This vulnerability exists in the 'doc/hslogp1_link.htm' page of the Web UI. It accepts HTML code via the "content" query string parameter and reflects it without proper sanitization.

An attacker could craft a malicious URL to execute arbitrary JavaScript in the victim's browser context.

4 . Cryptographic Issues

CVE-2024-41594 (CVSS 7.6): Weak PRNG Seeding

The web server backend uses a static string to seed the pseudorandom number generator (PRNG) for SSL/TLS operations.

This predictable seeding could allow attackers to guess session keys and potentially perform man-in-the-middle attacks against encrypted communications.

5 . Privilege Escalation

CVE-2024-41589 (CVSS 7.5): Credential Reuse

This vulnerability stems from a design flaw where the same administrative credentials are used across both the guest and host operating systems. If an attacker compromises the guest OS (DrayOS), they can use the same credentials to access the host system, potentially leading to full system compromise.

6 . Denial of Service

CVE-2024-41593 (CVSS 7.2): Heap Buffer Overflow

A heap-based buffer overflow exists in the ft_payload_dns() function.

The use of a signed char for var_len can lead to integer overflow and subsequent large memory writes, potentially corrupting critical data structures and causing device instability or crashes.

Exploitation Techniques

Researchers demonstrated a proof-of-concept exploit chain combining CVE-2024-41592 and CVE-2024-41585:

  1. Exploit the buffer overflow in query string parsing (CVE-2024-41592) to achieve code execution on the guest OS.

  2. Use the compromised guest OS to trigger the command injection vulnerability (CVE-2024-41585) and execute commands on the host OS.

  3. Gain full control over the router, including the ability to intercept traffic, modify configurations, and pivot to other network resources.

This exploit chain requires no user interaction and can be fully automated, highlighting the severe risk posed by these vulnerabilities if left unpatched.

Global Impact Of DRAY:BREAK Vulnerabilities

The DRAY:BREAK vulnerabilities have a potentially massive impact due to the widespread deployment of affected DrayTek routers. Key findings from the researchers' analysis include:

  1. Over 704,000 vulnerable DrayTek routers exposed directly to the internet

  2. Affected devices found in 168 countries

  3. 63% of exposed routers are end-of-sale (EoS) or end-of-life (EoL) models

  4. 75% of vulnerable devices are used in commercial settings

This chart illustrates the geographic distribution of vulnerable DrayTek routers, with the UK, Vietnam, and the Netherlands being the most affected countries.

Products Affected by DRAY:BREAK Vulnerabilities

As of the latest reports, 24 distinct DrayTek device models are affected by the DRAY:BREAK vulnerabilities. These models span various product lines and target different market segments, from small office/home office (SOHO) routers to enterprise-grade devices.

Device Model
Fixed Versions
EoL?
Vigor1000B, Vigor2962, Vigor3910
4.3.2.8 and 4.4.3.1
No
Vigor3912
4.3.6.1
No
Vigor165, Vigor166
4.2.7
No
Vigor2135, Vigor2763, Vigor2765, Vigor2766
4.4.5.1
No
Vigor2865, Vigor2866, Vigor2915
4.4.5.3
No
Vigor2620, VigorLTE200
3.9.8.9
Yes
Vigor2133, Vigor2762, Vigor2832
3.9.9
Yes
Vigor2860, Vigor2925
3.9.8
Yes
Vigor2862, Vigor2926
3.9.9.5
Yes
Vigor2952, Vigor3220
3.9.8.2
Yes

How to Protect Your DrayTek Devices from DRAY:BREAK Vulnerabilities?

Protecting your DrayTek devices from the DRAY:BREAK vulnerabilities requires a multi-faceted approach. Start by conducting a thorough inventory of all your DrayTek routers, identifying affected models and their current firmware versions. For supported devices, immediately download and apply the latest firmware updates from the official DrayTek website, ensuring you back up configurations before updating. Verify the success of updates by checking the new firmware version in the device's web interface.

For end-of-life devices, consider replacement with supported models or apply any available partial updates while implementing additional security measures:

  • Disable remote management features if not essential, or restrict access using ACLs and enforce two-factor authentication if remote access is necessary.

  • Implement strong access controls by changing default credentials, using unique passwords, and enabling login failure lockout mechanisms.

  • Enhance network security through segmentation, placing vulnerable routers in separate VLANs and controlling traffic with firewalls.

  • Enable comprehensive logging and configure alerts for suspicious activities.

  • Secure VPN configurations with strong encryption protocols and perfect forward secrecy.

  • Conduct regular security assessments, including vulnerability scans and penetration tests.

  • Develop and maintain an incident response plan specific to router compromises.

  • Educate staff about potential risks and reporting procedures. Consider deploying additional security controls such as next-generation firewalls or intrusion detection systems.

  • Finally, document all security measures and conduct regular reviews of your network security posture, updating policies and procedures as needed.

By implementing these comprehensive measures, you can significantly mitigate the risks posed by the DRAY:BREAK vulnerabilities and strengthen your overall network security.

Conclusion

The DRAY:BREAK vulnerabilities in DrayTek routers pose a serious risk to organizations and individuals using the affected models. Given the critical nature of these flaws, it is essential to take immediate measures to mitigate the vulnerabilities. We recommend regularly checking the DrayTek Security Advisories page for updates and new firmware releases.

For more information on these vulnerabilities and the patching process, visit the official DrayTek security advisory. Stay vigilant and ensure that your DrayTek router environment is secured against these critical vulnerabilities.

We hope this post helps you learn about the details of the DRAY:BREAK vulnerabilities in DrayTek routers, their technical details, potential impact, affected models, and most importantly - how to protect your DrayTek devices from the DRAY:BREAK vulnerabilities. Stay secure, stay updated, and continue to prioritize the safety of your network and data. Thanks for reading this post. Please share this post and help secure the digital world. Visit our website thesecmaster.com, and our social media page on FacebookLinkedInTwitterTelegramTumblrMedium, and Instagram and subscribe to receive updates like this.

You may also like these articles:

Arun KL

Arun KL is a cybersecurity professional with 15+ years of experience in IT infrastructure, cloud security, vulnerability management, Penetration Testing, security operations, and incident response. He is adept at designing and implementing robust security solutions to safeguard systems and data. Arun holds multiple industry certifications including CCNA, CCNA Security, RHCE, CEH, and AWS Security.

Recently added

Vulnerabilities

View All

Learn More About Cyber Security Security & Technology

“Knowledge Arsenal: Empowering Your Security Journey through Continuous Learning”

Cybersecurity All-in-One For Dummies - 1st Edition

"Cybersecurity All-in-One For Dummies" offers a comprehensive guide to securing personal and business digital assets from cyber threats, with actionable insights from industry experts.

Tools

Featured

View All

Learn Something New with Free Email subscription

Subscribe

Subscribe