Lucene search
+L

Comtrend Cross Site Request Forgery

🗓️ 17 Aug 2015 00:00:00Reported by Javier Vicente VallejoType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 27 Views

Security issue found with Comtrend routers allowing unauthorized configuration changes via crafted URLs

Code
`Hello all,  
  
i would like to share with you a security issue that i found with some  
Comtrend's routers and probably other manufacturer's routers.  
  
The method would let us to configure some router models when a user  
clicks a link created by us. I have not read about this method on the  
internet, sorry if I am wrong and it’s not new. The method is quite  
simple. It is usual to find routers with default passwords. And these  
devices usually offers a HTTP based interface to configure them. And  
some models accept configuration parameters through the URL.  
  
For example, here it is the javascript source code of the VR-3025un’s  
menu for DNS configuration:  
  
function btnApply() {  
var loc = 'dnscfg.cgi?';  
with ( document.forms[0] ) {  
if ( isValidIpAddress(dnsPrimary.value) == false ) {  
alert('Primary DNS "' + dnsPrimary.value + '" has invalid IP address.');  
return;  
}  
loc += 'dnsPrimary=' + dnsPrimary.value;  
if (dnsSecondary.value != '') {  
if ( isValidIpAddress(dnsSecondary.value) == false ) {  
alert('Secondary DNS "' + dnsSecondary.value + '" has invalid  
IP address.');  
return;  
}  
loc += '&dnsSecondary=' + dnsSecondary.value;  
}  
else  
loc += '&dnsSecondary=' + '0.0.0.0';  
loc += '&dnsRefresh=1';  
}  
loc += '&sessionKey=' + sessionKey;  
var code = 'location="' + loc + '"';  
eval(code);  
}  
  
The default user:password for this router is admin:admin. The default  
ip address for the network router is 192.168.1.1.  
  
If the user clicks this simple URL (for example if he receives it by  
email), our malicious DNS server will be set to the device:  
  
http://admin:[email protected]/dnscfg.cgi?dnsRefresh=1&dnsPrimary=<ip_address_malicious_dns_server>&dnsSecondary=<ip_address_malicious_dns_server2>  
  
Other configurations could be modified too (proxies, DMZ, WAN  
interface access,…).  
  
(Note in the javascript code, a sessionKey is used. It seems to be  
ignored by dnscfg.cgi and the new DNS configuration is set with no  
problems).  
  
  
Here you can find the complete article that i wrote in my web:  
http://vallejo.cc/2015/08/16/poor-security-in-soho-routers-again-changing-configuration-parameters-with-a-click/  
  
  
Models tested:  
  
Comtrend VR-3025un  
Comtrend AR-5387un  
Comtrend AR-5381un  
  
These routers are currently being used by many jazztel ISP’s clients  
in Spain (maybe other ISPs in other countries use these models too).  
  
Almost sure, other Comtrend models are vulnerable. And probably,  
models from other manufacturers are vulnerable to this method too  
(adapting the URL to the specific device).  
  
  
Mitigation:  
  
Internet Explorer doesn’t accept username and password in the URL (I  
mean the syntax http://user:[email protected]). Currently Chrome and  
Firefox are accepting username and password in the URL. I don’t know  
about other browsers.  
  
  
  
--   
Javier Vicente Vallejo  
http://www.vallejo.cc  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

17 Aug 2015 00:00Current
0.6Low risk
Vulners AI Score0.6
27