SBN

FortiGuard Labs Discovers Vulnerability in Asus Router

 

Over the last few weeks, ASUS released a series of patches aimed at addressing a number of vulnerabilities discovered in their RT routers running AsusWRT firmware. The models listed at the end of this post are known to be vulnerable. If you are not sure which model or firmware you are using, I recommend double-checking the ASUS support website to get the latest information and updates.

FortiGuard

FG-VD-17-216 is an ASUS authenticated remote code execution vulnerability that FortiGuard Labs originally discovered and reported. If your web management portal is available via your WAN connection, and you don’t use that feature, we recommend disabling it (it’s not the default parameter). If, however, you depend on that feature, we suggest setting a strong password and only using HTTPS for router administrative tasks. If a criminal is able to access that portal, or if he can trick you into following a malicious link, he will be able to execute an HTTP request that injects operating system commands that can run directly on the router.

Technically, vulnerable models are prone to OS command injections via unsanitized parameters passed to the /apply.cgi. We believe that this vulnerability is a regression that was inadvertently reintroduced in the previous firmware version (in our case, the test device was a RT-AC3200 running firmware 3.0.0.4.382_19466).

In Main_Analysis_Content.asp in particular, the SystemCmd variable is created on the client side in the JavaScript function updateOptions(), which in turn uses the values from the input fields pingCNT and destIP. A web proxy can then be used to bypass the local checks that are normally done, and then /cmdRet_check.htm is used to asynchronously return the response from the request. The command is then executed with no further checks performed on the server side.

FortiGuard Labs has rated this vulnerability as High because if the HTTP injection attack is successful, commands will be executed with the device’s highest privileges (root user). However, it should be noted that to be successful the attacker would also need to obtain the valid authentication token passed in the HTTP Cookie header.

Affected Models:

  • ASUS RT-AC66U, RT-AC68U, RT-AC86U, RT-AC88U, RT-AC1900, RT-AC2900, and RT-AC3100 versions before 3.0.0.4.384_10007 are vulnerable.
  • ASUS RT-N18U versions before 3.0.0.4.382.39935 are vulnerable.
  • ASUS RT-AC87U, RT-AC3200 versions before 3.0.0.4.382.50010 are vulnerable.
  • ASUS RT-AC5300 versions before 3.0.0.4.384.20287 are vulnerable.

Disclosure Timeline:

  • Dec 23 2017 – FortiGuard Labs contacts the ASUS Security Team by email
  • Dec 25 2017 – The ASUS Security Team replies that they have started their investigation
  • Dec 27 2017 – The ASUS Security Team provides a patch for the FortiGuard Labs team to test
  • Dec 27 2017 – FortiGuard Labs confirms that the patch fixes the vulnerability
  • Jan 02 2018 – ASUS begins to widely roll out the new patch

When this vulnerability was initially discovered Fortinet also immediately released IPS signature Asus.Apply.CGI.POST.Buffer.Overflow to proactively protect our customers.

I would like to thank the ASUS Security Team for their quick turn-around in fixing the vulnerability we reported.

-= FortiGuard Lion Team =-

 

Sign up for our weekly FortiGuard intel briefs or to be a part of our open beta of Fortinet’s FortiGuard Threat Intelligence Service.