Code Execution through Control Panel Add-ins
It's possible to force explorer.exe to load your DLL that is compiled as a Control Panel Item and is registered as a Control Panel Add-in.
Execution
Let's compile our control panel item (which is a simple DLL with an exported function Cplapplet
) from the below code:
Let's now register our control panel item as an add-in (defenders beware of these registry modifications):
Now, whenever the Control Panel is opened, our DLL will be injected into explorer.exe and our code will execute:
Below shows that our DLL is injected into explorer.exe:
Detection
Look for modifications in the following registry key:
HKCU\Software\Microsoft\Windows\CurrentVersion\Control Panel\CPLs
Look for / prevent DLLs from loading from unsecure locations
References
PreviousExecuting Code as a Control Panel Item through an Exported Cplapplet FunctionNextT1191: CMSTP
Last updated
Was this helpful?