Skip to content
RCE Disclosed report Intermediate

DLL side-loading vulnerability in Sony Music Center for PC Ver. 2.7.2 (Latest version)

The Sony Music Center for PC application searches for a missing DLL file in directories listed in the system PATH environment variable. An attacker with local access can place a malicious DLL with the expected name in a PATH directory, and the application will load and execute it, leading to arbitrary code execution.

resurrect20 Follow

Originally disclosed on HackerOne

High 7.3 View original
  • Disclosed after 8 months

Overview The application insecurely searches for the missing DLL file in system PATH environment, allowing an attacker with access to victim's local machine host to achieve arbitrary code execution by implanting a malicious DLL file in any PATH environment.

MITRE reference: https://attack.mitre.org/techniques/T1574/001/

Proof of Concept

  1. Open Procmon and observe that the application searches for a missing DLL file named "z-bes.dll" in the system PATH variables (e.g. C:\Program Files\Git\cmd\z-bes.dll, C:\Users\████████\Desktop\tools\z-bes.dll etc)
image.png
image.png From the original on HackerOne
  1. To exploit this insecured behaviour, I crafted a fake DLL file. When this DLL file is being used, it launches a calc.exe

Calc.c

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
    switch (ul_reason_for_call) {
        case DLL_PROCESS_ATTACH:
            system("calc.exe"); 
            break;
        case DLL_THREAD_ATTACH:
        case DLL_THREAD_DETACH:
        case DLL_PROCESS_DETACH:
            break;
    }
    return TRUE;
}
image.png
image.png From the original on HackerOne
  1. Next i placed it in the C:\Users\████████\Desktop\tools\ directory which was registered in the system PATH environment

  2. Open the application again and observe that the calculator shows up.

image.png
image.png From the original on HackerOne
  1. Observe Prcomon output, we found that the malicious DLL file is mapped and executed.
image.png
image.png From the original on HackerOne

Remediation I believe this DLL file is removed but the application is still search for it. I think if the application is no longer use this DLL file, stopping the application from searching for it should solve the problem. Additionally, specifying DLL full paths is the solution to prevent this kind of attack.

Impact

A successful exploitation allows an attacker to achieve code execution on target machine or secretly install a trojan using SONY application to masquerade itself to avoid anti-virus detection.

The original report as published on HackerOne, by resurrect20. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the application loads a DLL by name without specifying its full path, so the operating system searches the PATH environment and may load a malicious DLL from a user-writable directory.

Impact

An attacker with local access could execute arbitrary code on the victim's machine or install a trojan that masquerades as the Sony application to avoid antivirus detection.

What the attacker needed

Local access to the victim's machine; ability to write to a directory in the system PATH

The fix

The application should stop searching for the unused DLL and should load DLLs using their full paths.

How it was found

  1. Use Procmon to observe the application searching for a missing DLL named z-bes.dll in PATH directories.
  2. Create a fake DLL that runs calc.exe when loaded.
  3. Place the fake DLL in a directory that is part of the system PATH.
  4. Launch the application again and see the calculator appear.
  5. Check Procmon to confirm the malicious DLL is mapped and executed.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When a program starts, it often needs extra code stored in files called DLLs. This program looked for a missing DLL in several folders listed in a system setting called PATH, which can include folders a normal user can write to. An attacker who can put a file with the right name in one of those folders can make the program run their own code instead.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More from Sony

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.