New UAC bypass for Silent Cleanup for CobaltStrike
This project implements a DLL planting technique to bypass UAC Always Notify and execute code in a high integrity process.
When SilentCleanup task is launched, dismhost
searches for the non existing DLL api-ms-win-core-kernel32-legacy-l1.dll
under:
C:\Users\USER\Appdata\Local\Microsoft\WindowsApps
The above path exists by default in the PATH of the user.
By crafting a malicious DLL and placing it in the above directory, it will be loaded by dismhost.exe
and executed with High Integrity privileges.
The project consists of:
SilentClean .NET project - Launching SilentClean scheduled task with the use of the TaskScheduler library
DLLmain_template.c - A DLL skeleton which will spawn a process and inject the shellcode of our choice. Sample provided implements a simple CreateRemoteThread injector.
Cobalt strike aggressor script responsible for:
dllmain_template.c
. This is just a POC cmd.exe
.