Saturday, January 18, 2020

[Westermo] Source Code Disclousure in Router MRD-315 (CVE-2020-7227)


Westermo is a company that provides a full range of industrial data communications solutions for demanding applications in the transport, water and energy markets among others. It has its own line of network products and one of these are the MRD Series. 

Searching for interesting devices on shodan, I came across one of these Westermo brand technologies that uses industrial routers for the different operations that ICS products do (https://www.westermo.com/products/routers/wireless-routers/mrd-315).







The device has a HTTP webpage on port 80, which allow us to enter the administration panel with the correct credentials. In this sense, the manual indicate us that the default credentials of these devices are admin:westermo, so with a bit of luck, we can enter to  these devices hosted on the internet.




One of the first things I noticed on the web page is that the device uses different URLs that end with the ASP extension, so the web page uses Visual Basic Script or Jscript in order to works. Browsing some of the device's functionalities, I began to capture some of the requests that were made in the application frontend.



In this case, I am trying to change the admin password and everything flows normally, but, if we delete a mandatory field on the request (for example, the "usr" parameter), the application crash and show us an error with all the source code.






And here is, the source code for the system.asp file. Similarly, it is possible to do this with other functionalities in order to get a huge part of the application source code. 

Let see another example. If we navigate to Network --> Diagnostics, we can excecute a ping  command in order to test the connectiĆ³n funcionality.






If we capture the request in the frontend, we can delete a mandatory parameter and reveal the application source code.






With some of patience, an attacker can reveal a huge mount of the source code, in order to search for more vulnerabilities in the web application.

This was tested on MRD-315 Firmware v1.7.4.0 and v1.7.3.0

Saludos,
@h4tt0r1

H4tt0r1

Autor

0 comentarios:

Post a Comment

 
biz.