# DLL Hijacking when creating Rescue Media Builder leading to Privilege Escalation

Acronis MediaBuilder.exe loads missing tcmalloc.dll from user-writable WindowsApps PATH folder, giving admin code execution and SYSTEM escalation.

- Payout: $250
- Severity: medium
- Program: Acronis
- Found by: z3ron3
- Disclosed: 2024-08-27
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/1010552
- Library page: https://bugbountylibrary.com/r/h1%3A1010552
- Tags: area:os domain:desktop impact:privesc kind:bounty platform:hackerone sev:medium tech:windows technique:default-creds vuln:misconfiguration vuln:privilege-escalation

**Target:** MediaBuilder.exe (Rescue Media Builder) DLL search path
**Root cause:** MediaBuilder.exe loads tcmalloc.dll without a full path; Windows DLL search order includes user-writable directories like %USERPROFILE%\AppData\Local\Microsoft\WindowsApps, which is in the User PATH.
**Steps:**
1. Place malicious `tcmalloc.dll` in `%USERPROFILE%\AppData\Local\Microsoft\WindowsApps` (or add any attacker-controlled folder to User PATH).
2. Open Tools tab in True Image and launch Rescue Media Builder.
3. MediaBuilder.exe loads the DLL, spawning `cmd.exe` with Administrator privileges (verify via `net session`).
4. Escalate: `schtasks /create /SC WEEKLY /RU "NT AUTHORITY\SYSTEM" /TN EOP /TR C:\Windows\System32\winver.exe /IT /RL HIGHEST`
5. Run task: `schtasks /run /I /TN EOP` to execute as NT AUTHORITY\SYSTEM.
**How found:** Researcher likely used Procmon/DLL search-order analysis on MediaBuilder.exe and noticed it probing for a non-existent tcmalloc.dll in user-writable PATH folders.
**Exploitation:** A local unprivileged user drops a crafted tcmalloc.dll into a user-writable PATH directory; when an admin launches Rescue Media Builder, the elevated process loads the DLL, yielding admin code execution, then a scheduled task escalates to SYSTEM.
**Escalation:** Admin code execution escalated to NT AUTHORITY\SYSTEM via schtasks creating and running a SYSTEM-level task.
**Insight:** Check elevated vendor binaries for missing-DLL loads of uncommon dependencies (e.g. tcmalloc.dll) and confirm whether the User PATH's WindowsApps folder is writable by the invoking user.

## Proof of concept (copied exactly from the original report)

**schtasks create SYSTEM task for escalation**

```
schtasks /create /SC WEEKLY /RU "NT AUTHORITY\SYSTEM" /TN EOP /TR C:\Windows\System32\winver.exe /IT /RL HIGHEST
```

**schtasks run the SYSTEM task**

```
schtasks /run /I /TN EOP
```

