Skip to content
RCE Disclosed report Intermediate

Local Privilege Escalation via DLL Search-Order Hijacking with Cyber Protection Agent - systeminfo.exe utility

The Cyber Protection Agent's systeminfo.exe utility loads a DLL (snapapi.dll) from directories listed in the PATH environment variable without verifying its authenticity. A local attacker with write access to any PATH folder can place a malicious DLL there, which then executes with elevated privileges when systeminfo.exe runs.

mmg Follow

Originally disclosed on HackerOne

Medium 6.3 View original
  • Triaged in 45 hours
  • Fixed in 7 months
  • Paid in 3 days
  • Disclosed after 4.0 years

Using the latest version of Cyber Protection Agent (Version 12.5.23130) is possible to perform DLL Search-Order Hijacking. The only requirement is to have modify rights to one folder defined in the PATH system variable, due to the order in which the DLL is loaded.

-Impact: If a local attacker has modifying rights to one of the folders defined in the PATH system variable, will be able to load his malicious DLL, when the systeminfo.exe starts, and execute his code with elevated privileges.

-How to Reproduce: 1.Download the latest version for the Windows Agent URL: https://mc-beta-cloud.acronis.com/download/u/baas/4.0/12.5.23130/Cyber_Protection_Agent_for_Windows_web.exe

2.Start a procmon utility, from Sysinternal, and monitor "systeminfo.exe" As part of my PATH system variables, I have the Python's location, which was installed in the C:\Python27 folder.

After the installation is complete, manually start the systeminfo.exe, which in my case is pointing to "C:\Program Files\Common Files\Acronis\AdvReport\systeminfo.exe" executable. Below is an output of the process is which is looking for snapapi.dll:

systeminfo.exe 2132 CreateFile C:\python27\snapapi.dll NAME NOT FOUND

The test was perform on my Windows 10 Pro Version 1909 (OS Build 18363.1016).

I have attached a sample DLL, when loaded this will call C:\attacker\mmg.bat file. You will need to create the c:\attcker folder and you can add in the mmg.bat file any command you want. For validation i usually append in the file "whoami /all >> c:\attacker\who.txt" to confirm the security context in which my code was executed.

Impact

The software executable is not verifying the authenticity of the DLL files, or the Search-Order before loading, thus an attacker may leverage this vulnerability to execute arbitrary code on the victim's machine, with the highest privileges.

The original report as published on HackerOne, by mmg. 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

Impact

A local attacker with write access to a PATH folder could execute arbitrary code with the highest privileges on the victim's machine.

What the attacker needed

Local access to the machine; write access to a PATH folder

How it was found

  1. Download and install the latest Windows Agent.
  2. Start Process Monitor and monitor systeminfo.exe.
  3. Ensure a folder in the PATH variable (e.g., Python's install folder) is writable by the attacker.
  4. Place a malicious snapapi.dll in that folder.
  5. Run systeminfo.exe manually.
  6. The malicious DLL loads and executes attacker code with elevated privileges.

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 Windows program starts, it often needs extra code from DLL files. It searches for these files in a set order, including folders listed in the PATH setting. If an attacker can put a fake DLL in one of those folders, the program will load it and run the attacker's code with the program's permissions, which can be high.

What is RCE?

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

More by mmg

View all

6 more disclosed reports, best first.

More from Acronis

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.