Skip to content
RCE Disclosed report Intermediate

DLL hijacking in Monero GUI for Windows 0.17.3.0 would allow an attacker to perform remote command execution

The Monero GUI for Windows loads a DLL named perf.dll from its installation folder without verifying its origin, so an attacker who can place a malicious file there can execute arbitrary code when the victim runs the program. This gives the attacker a remote shell and, if the victim runs as administrator, full administrator privileges.

fukuyama Follow

Originally disclosed on HackerOne

  • Disclosed after 16 hours

Summary: Monero for windows contains a DLL hijacking vulnerability that allows to get a meterpreter command (metasploit remote shell), The moment the victim runs the program it will execute our payload (malicious .dll) that will give an attacker a meterpreter console. This will allow the attacker obtain a remote command execution console and If the victim runs the program frequently this will give the attacker permanent access to the it's computer.

The moment the user or the attacker runs the program it will execute our malicious.dll. If the attacker has a low-privileged shell or a basic shell that does not allow him to perform too many actions beyond the basic ones, then he can upgrade his shell and use all the advantages that the meterpreter has, which will allow him to perform more actions than a basic shell and also the opportunity to escalate privileges using post exploitation modules.

If for any reason the user runs the program as an administrator user, it is 100% sure that the attacker will obtain administrator privileges.

Observation I used my own local IP and a normal .dll malicious file creator (maybe your antivirus will detect it, remember to disable it temporarily or add an exception) just for the PoC. In real situation an attacker will use a public IP (real or faked), and the malicious .dll would be encoded.

Releases Affected: monero-gui-install-win-x64-v0.17.3.0.exe ( https://downloads.getmonero.org/gui/win64install )

Steps To Reproduce:

  1. Create the malicious .DLL file named as: perf.dll (Screenshot_1.png)
  2. Drop perf.dll in the install folder location ( C:\Users<Your username here>\AppData\Local\Microsoft\WindowsApps) (Screenshot_2.png)
  3. In the attacker's computer , using metasploit configure a multi/handler meterpreter. (Screenshot_3.png)
  4. Execute the program
  5. Now the attacker will have a meterpreter connection (Remote Code Execution). (Screenshot_4.png)

Supporting Material/References: https://attack.mitre.org/techniques/T1574/001/

Impact

An attacker can exploit this vulnerability to load a DLL file of the attacker's choosing that could execute arbitrary code which will give an opportunity for the attacker to escalate privileges if he uses the post-exploitation modules or post-exploitation techniques.

If for any reason the user runs the program as an administrator user, it is 100% sure that the attacker will obtain administrator privileges.

Attachments

Screenshot_1.PNG
Screenshot_1.PNG From the original on HackerOne
Screenshot_2.PNG
Screenshot_2.PNG
Screenshot_3.PNG
Screenshot_3.PNG
Screenshot_4.PNG
Screenshot_4.PNG

The original report as published on HackerOne, by fukuyama. 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 searches for a required DLL in a user-writable directory (the WindowsApps folder) without validating its source, allowing a malicious DLL to be loaded.

Impact

An attacker could execute arbitrary code and escalate privileges, and if the victim runs the program as administrator the attacker would gain administrator privileges.

What the attacker needed

Write access to the install folder; victim runs the program

How it was found

  1. Create a malicious DLL file named perf.dll.
  2. Place perf.dll in the Monero GUI installation folder under the user's AppData\Local\Microsoft\WindowsApps.
  3. On the attacker's machine, configure a Metasploit multi/handler meterpreter listener.
  4. Run the Monero GUI program.
  5. The attacker receives a meterpreter connection, achieving remote code execution.

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 loads extra code from shared library files called DLLs. If the program looks for a DLL in a folder that other people can write to, an attacker can put a fake DLL there. The program then runs the attacker's code instead of the real library, giving the attacker control of the computer.

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 Monero

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.