LG-Nortel ADSL modem - Multiple Vulnerabilities
These vulnerabilities were found during April - May 2015. This device is heavily deployed by Optus in Australia (Sydney) for its SOHO broadband customers.
(Potential) Estimated deployment size is 20-30% of customer base.
Optus, CERT-US, CERT-AU, are aware of these issues.
Ownership of this model by LG Nortel could not be identified.
This device may very well be used by other Service Providers and / or in other locations.
I am not sure if & how this device might connect back to Optus network. If it does connect / talk back, it'd be interesting what impact it can create.
Board ID: DV2020
Product Version: S1.064B2.3H0-0
Software Version: 3.04L.02V.sip._LE9500.dspApp3341A2pB022f.d19e
Bootloader (CFE) Version: 1.0.37-4.3
Wireless Driver Version: 220.127.116.11.cpe0.0
1. Weak Authorization controls (HTTP)
1.1 Non-admin users can access restricted, Administrative functionality (accessible to Admin only)
LG-Nortel ADSL modem allows three (3) users with different privilege levels for administering the device. Administrative ‘admin’ user has complete privileges to access and perform all functions on the modem. Other non-admin users – ‘support’ and ‘user’ – have restricted functional access and can perform limited functions.
Figure 1 - 'admin' home page
Figure 2 - 'user' home page
As seen above in Figure 2, a non-admin ‘user’ does not have access to administrative functions via GUI menu, i.e. there are no administrative function links seen/visible in the home page.
However, the application lacks sufficient Authorization controls and a ‘user’ can still access the administrative functionality via direct url access.
For example, a non-admin ‘user’ does not have a menu option to access the device configuration file. However, it can still access the file - backupsettings.conf - by directly accessing the url – http://<modem_ip>/backupsettings.conf.
With access to this configuration file, a low-privileged ‘user’ can easily access login passwords for ‘admin’ and any other valid users of the modem. The login passwords were found to be stored in base64-encoded format, which is a weak scheme to secure passwords, and can easily be de-obfuscated to reveal the clear-text password.
Figure 3 - 'user' access to device config + 'admin' password
In a similar manner, low-privileged ‘user’ and ‘support’ logins can also access other administrative functions.
1.2 Application does not secure sensitive configuration details from non-admin ‘user’ (HTTP)
Tthe application allows read-only access to ‘user’ login. But, as seen above, the application does not restrict or hide sensitive configuration information such as passwords, keys etc. All configuration details are readily accessible and readable to ‘user’ login.
The application / system should censure / encrypt the passwords, keys and any other crucial pieces of configuration, when a ‘user’ (read-only, non-admin) accesses the device configuration.
This is a design flaw in the LG-Nortel ADSL modem. On one hand, ‘admin’ and ‘user’ have different privileges, ‘user’ can only read the configuration details, and since ‘user’ can access all the configured passwords, ‘admin’ access is practically unrestricted. A ‘user’ can get ‘admin’ password from the configuration file, and simply login as ‘admin’. The current design does not enforce securing sensitive information and strict privilege separation correctly.
1.3 Password Change - Clear-text Password Disclosure
The application does not secure the new changed password either. Once the password is changed, the application simply reveals the new password in address bar, as:
Figure 5 - clear-text password after password change
As seen above, this HTTP request contains new, valid password in clear-text.
A suitably placed attacker / a malicious user can capture this clear-text password via sniffing.
2. Application does not secure configured passwords (HTTP)
Accounts, passwords, keys etc, shown in the application mgmt portal are masked and only ***** are shown in the corresponding fields.
This client-side restriction can easily be bypassed though - via intercepting proxy and / or Inspect element. Since values are stored / passed in clear, they can be retrieved easily.
The following HTTP GET request shows capture of SIP / voip password(s):
GET /voicesipset.cmd?proxyAddr=XXX.yesphone.optus.com.au&proxyPort=5060®Addr=XXX.yesphone.optus.com.au®Port=5060&extension1=<phone-num-removed>&extension2=&password1=<password-removed>&password2=&ifName=ppp_8_32_1&servermode=proxy&telurl=sip®expiry=1800&hostname=XXX.yesphone.optus.com.au&localport=5060&display1=<phone-num-removed>&display2=&authuser1=<phone-num-removed>&authuser2= HTTP/1.1Host: 10.1.1.1User-Agent: iTunes/11.1.3 (Macintosh; Intel Mac OS X 10.7) AppleWebKit/534.20.8Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: en-USAccept-Encoding: gzip,deflateReferer: http://10.1.1.1/voicesipview.cmdAuthorization: Basic YWRtaW46YWRtaW4=X-Forwarded-For: X.X.X.XVia: 1.1 A.B.C.DIf-None-Match: r9nejkpl2DNT: 1Connection: keep-alive
3. Lack of strict Authorization controls (Telnet)
3.1 Allows non-admin ‘user’ to access password hashes
Connecting to the modem over Telnet provides a CLI-based device administration console.
After logging in over Telnet as ‘user’, the system permits running system level commands and to read sensitive files from the file-system.
Figure 6 - 'user' login - 23t - access password hashes
As seen above, ‘user’ login can read the /etc/passwd file from the file-system. This file contained password hashes for all the users, including ‘admin’. At this point, it is easy for an attacker to capture the password hashes and crack them offline, using password-cracking tools. Once the hashes are cracked, they can provide direct, legitimate access to the device.
Looking at /etc/passwd file, we also find that all accounts – admin, support, user, nobody – have a UID and GID of 0. This implies that all these users have superuser (root) privileges, i.e. all of the users have full, unrestricted, administrative access to the system.!
This is a design flaw in the LG-Nortel ADSL modem. Regular users must have restricted privileges, just enough to perform respective tasks. Superuser/root privileges to all the users on the system are a recipe for security issues.
3.2 Allows non-admin user to change Admin password + create Denial of Service
After logging in to the modem as non-admin ‘user’ login, a password change functionality is available to ‘user’ login.
Usage: passwd <admin|support|user> <password> passwd –help
As seen above, the passwd command can be used to change passwords for all three users – ‘admin’, ‘support’, and ‘user’. Since the current login is a non-admin ‘user’ account, any attempts to change password for administrative user ‘admin’ are expected to fail and / or restricted by the system.
Ist attempt - Failed
> passwd admin admin1Connection closed by foreign host.
The first attempt to change ‘admin’ login password failed and the telnet connection drops.
Telnet daemon / service running on LG-Nortel ADSL modem, can be easily crashed by logging in as a low-privileged user and attempting to perform an unauthorized action, such as trying to change password for ‘admin’ user.
In the second attempt, the command executed and password for ‘admin’ was changed successfully.
2nd attempt - Successful
Usage: passwd <admin|support|user> <password> passwd --help> passwd admin admin1>
Following this password change, Telnet service again turned non-responsive within 10-15 seconds and the connection dropped.
The underlying system lacks sufficient authorization measures to ensure that a non-admin / low-privileged application user is restricted and cannot perform unauthorized, sensitive functions, especially the ones targeting administrative accounts.
Additionally, considering the consistent Telnet service crash after each unauthorized action attempt, it is evident that the underlying system also lacks sufficient measures to ensure service’s continued availability in the event of any unauthorized action(s).
3.3 Application does not secure sensitive configuration details from ‘user’
This issue is same as one described in section 1.2. The only difference is the method of exploitation (over Telnet).
The application permits ‘user’ login to view sensitive information in modem’s configuration. To view configuration, Telnet administrative console provides a command - dumpcfg - to the ‘user’. Running this command as ‘user’ login dumps the device configuration information. This information includes sensitive information such as passwords and keys.
The application / system should encrypt the passwords, keys and any other crucial pieces of configuration, when a ‘user’ (read-only, non-admin) accesses the device configuration.
Figure 7 - 'user' login - 23t - dumpcfg
This is a design flaw in the LG-Nortel ADSL modem. On one hand, ‘admin’ and ‘user’ have different privileges, ‘user’ can only read the configuration details, and since ‘user’ can access all the configured passwords, ‘admin’ access is practically unrestricted. A ‘user’ can potentially get ‘admin’ password from the configuration file, and simply login as ‘admin’. The current design does not enforce strict privilege separation correctly
3.4 Allows ‘user’ to access busybox shell + create Denial of Service
‘user’ login is allowed to access the base underlying BusyBox shell and also access certain set of commands.
Figure 8 - 'user' login - 23t - access busybox shell
As seen above, ‘user’ can access the BusyBox shell. Once certain command(s) are run, such as ‘vconfig’, it results in Telnet daemon / service crash, and the connection drops.