Connect with our team of offensive security, AI security and pen testing experts at Black Hat Europe 2023. Learn More

Connect with our team of offensive security, AI security and pen testing experts at Black Hat Europe 2023. Learn More

Managed Detection & Response

Eradicate cyberthreats with world-class intel and expertise

Managed Security Services

Expand your team’s capabilities and strengthen your security posture

Consulting & Professional Services

Tap into our global team of tenured cybersecurity specialists

Penetration Testing

Subscription- or project-based testing, delivered by global experts

Database Security

Get ahead of database risk, protect data and exceed compliance requirements

Email Security & Management

Catch email threats others miss with layered security & maximum control

Co-Managed SOC (SIEM)

Eliminate alert fatigue, focus your SecOps team, stop threats fast, and reduce cyber risk

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
The Trustwave Approach
Awards and Accolades
Trustwave SpiderLabs Team
Trustwave Fusion Platform
SpiderLabs Fusion Center
Security Operations Centers
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

Multiple Vulnerabilities in WD MyCloud

While performing security research on personal storage I found some vulnerabilities in the WD (Western Digital) MyCloud device. Trustwave reported them to WD back in 2017 and now that patches are available we can discuss the technical details.

The first finding was discovering hardcoded administrator credentials in the nas_sharing.cgi binary. These credentials allow anyone to authenticate to the device with the username "mydlinkBRionyg". Considering how many devices are affected this is very serious one. Interestingly enough another researcher independently released details on the same issue less than a month ago.

Another problem I discovered in nas_sharing.cgi is that it allows any user execute shell commands as root. To exploit this issue the "artist" parameter can be used. Figure 1 shows a proof of concept combining these two findings in order to log in using the hard coded credentials and executing a command to create a file. The command is passed inside the "artist" parameter using base64 encoding. In this particular screenshot the command decodes to: a" ; touch /jambon; echo ".

Figure 1: Proof of concept combing the hard coded credentials and the command execution

The final issue with the same nas_sharing.cgi binary is arbitrary file deletion. This is possible via the "path" parameter manipulation. Usually on embedded systems many processes run unrestricted (i.e. as root) so no security checks are performed at all once a command (file deletion in this case) is about to execute. Figure 2 shows a proof of concept combining the hard coded credentials and using the "path" parameter to delete a file. Just like with the "artist" parameter above, the command is passed using base64 encoding.

Figure 2: Proof of concept combing the hard coded credentials and the arbitrary file deletion

WD lists these issues as fixed in firmware version 2.30.172 and mention in their release notes:

"Resolved critical security vulnerabilities that potentially allowed unauthorized file deletion, unauthorized command execution and authentication bypass."

Latest SpiderLabs Blogs

The 2023 Retail Services Sector Threat Landscape: A Trustwave Threat Intelligence Briefing

The annual holiday shopping season is poised for a surge in spending, a fact well-known to retailers, consumers, and cybercriminals alike. The latter group, however, is poised to exploit any...

Read More

Pwning Electroencephalogram (EEG) Medical Devices by Default

Overall Analysis of Vulnerability Identification – Default Credentials Leading to Remote Code Execution During internal network testing, a document was discovered titled the “XL Security Site...

Read More

Hidden Data Exfiltration Using Time, Literally

I was looking at my watch last week and my attention was moved towards the seconds over at the right of the watch face, incrementing nicely along as you’d expect. Now, I don’t know if I’d just spent...

Read More