The Component Object Model (COM) is a Windows framework that allows software components to communicate and create dynamic objects. COM objects are often implemented as DLLs and registered in the Windows Registry with unique Class Identifiers (CLSID). Attackers manipulate COM registrations to execute malicious code whenever a COM object is instantiated, providing stealthy persistence.
Shell.Application interacts with Windows Shell).{D2E7041B-2927-42FB-8E9F-7CE93B6DC937}).Excel.Application).
COM Hijacking:
Original key: C:\\Windows\\System32\\Good.dll
Hijacked path: C:\\Users\\Hacker\\Bad.dll
Example Attack Flow:
Registry Modification Example
reg add "HKCU\\Software\\Classes\\CLSID\\{MaliciousCLSID}\\InProcServer32" /ve /t REG_SZ /d "C:\\malicious.dll" /f
This registers the attacker's DLL under a COM CLSID, granting persistence whenever the associated application runs.
Windows Event Logs
HKLM\\SOFTWARE\\Classes\\CLSID\\HKCU\\SOFTWARE\\Classes\\CLSID\\Sysmon Event IDs
excel.exe spawning malicious.dll).