# Control Panel

Adversaries may abuse control.exe to proxy execution of malicious payloads. The Windows Control Panel process binary (control.exe) handles execution of Control Panel items, which are utilities that allow users to view and adjust computer settings.

Control Panel items are registered executable (.exe) or Control Panel (.cpl) files, that latter are actually renamed dynamic-link library (.dll) files that export a CPApplet function. For ease of use, Control Panel items typically include graphical menus available to users after being registered and loaded into the Control Panel. Control Panel items can be executed directly from the command line, programmatically via an application programming interface (API) call, or by simply double-clicking the file.

Malicious Control Panel items can be delivered via Phishing campaigns or executed as part of multi-stage malware. Control Panel items, specifically CPL files, may also bypass application and/or file extension allow lists.

Adversaries may also rename malicious DLL files (.dll) with Control Panel extensions  (.cpl) and register them to HKCU\Software\Microsoft\Windows\CurrentVersion\Control Panel\Cpls. Even when these registered DLLs do not comply with the CPL file specifications and do not export CPApplet functions, they are loaded and executed through its DllEntryPoint when Control Panel is executed. CPL files not exporting CPApplet are not directly executable.

**Example**

In this demo we will compile code to create a functional cpl file format, this is not necessary as these can also be exe format but in this occasion we are using this for demo purposes but also to demonstrate the different type of executable formats.

![](https://315180959-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MRh03Vwd4nuiUi3Oje7%2F-MRkX_5bf8lmdrI3_MiE%2F-MRkXfy4Gx8rCB1y5Dix%2Fimage.png?alt=media\&token=44e9bdb4-3b32-4668-8c64-31418fc43f10)

Once compile we can execute with a double-click on the file or simply using control.exe, you will need to add the full path of the payload.

**Demo**

References:

[https://pentestlab.blog/2017/05/24/applocker-bypass-control-panel/](https://pentestlab.blog/2017/05/24/applocker-bypass-control-panel/)

[https://lolbas-project.github.io/lolbas/Binaries/Control/](https://lolbas-project.github.io/lolbas/Binaries/Control/)
