Find sigma rule
Attack: Event Triggered Execution: Component Object Model Hijacking
Adversaries may establish persistence by executing malicious content triggered by hijacked references to Component Object Model (COM) objects. COM is a system within Windows to enable interaction between software components through the operating system.(Citation: Microsoft Component Object Model) References to various COM objects are stored in the Registry.
Adversaries can use the COM system to insert malicious code that can be executed in place of legitimate software through hijacking the COM references and relationships as a means for persistence. Hijacking a COM object requires a change in the Registry to replace a reference to a legitimate system component which may cause that component to not work when executed. When that system component is executed through normal system operation the adversary’s code will be executed instead.(Citation: GDATA COM Hijacking) An adversary is likely to hijack objects that are used frequently enough to maintain a consistent level of persistence, but are unlikely to break noticeable functionality within the system as to avoid system instability that could lead to detection.
MITRE
Tactic
- privilege-escalation
- persistence
technique
- T1546.015
Test : COM hijacking via TreatAs
OS
- windows
Description:
This test first create a custom CLSID class pointing to the Windows Script Component runtime DLL. This DLL looks for the ScriptletURL key to get the location of the script to execute. Then, it hijacks the CLSID for the Work Folders Logon Synchronization to establish persistence on user logon by creating the ‘TreatAs’ with the malicious CLSID as default value. The test is validated by running ‘rundll32.exe -sta “AtomicTest”’ to avoid logging out.
References:
https://youtu.be/3gz1QmiMhss?t=1251
https://github.com/enigma0x3/windows-operating-system-archaeology
Executor
powershell
Sigma Rule
-
posh_ps_susp_keywords.yml (id: 1f49f2ab-26bc-48b3-96cc-dcffbc93eadf)
-
registry_set_persistence_scrobj_dll.yml (id: fe20dda1-6f37-4379-bbe0-a98d400cae90)
-
registry_set_treatas_persistence.yml (id: dc5c24af-6995-49b2-86eb-a9ff62199e82)
-
registry_set_treatas_persistence.yml (id: dc5c24af-6995-49b2-86eb-a9ff62199e82)
-
proc_creation_win_powershell_susp_child_processes.yml (id: e4b6d2a7-d8a4-4f19-acbd-943c16d90647)
-
proc_creation_win_rundll32_uncommon_dll_extension.yml (id: c3a99af4-35a9-4668-879e-c09aeb4f2bdf)
-
net_connection_win_rundll32_net_connections.yml (id: cdc8da7d-c303-42f8-b08c-b4ab47230263)
-
net_connection_win_susp_file_sharing_domains_susp_folders.yml (id: e0f8ab85-0ac9-423b-a73a-81b3c7b1aa97)