Removal of Potential COM Hijacking Registry Keys

Detects any deletion of entries in ".*\shell\open\command" registry keys. These registry keys might have been used for COM hijacking activities by a threat actor or an attacker and the deletion could indicate steps to remove its tracks.

Sigma rule (View on GitHub)

 1title: Removal of Potential COM Hijacking Registry Keys
 2id: 96f697b0-b499-4e5d-9908-a67bec11cdb6
 3status: test
 4description: |
 5    Detects any deletion of entries in ".*\shell\open\command" registry keys.
 6    These registry keys might have been used for COM hijacking activities by a threat actor or an attacker and the deletion could indicate steps to remove its tracks.    
 7references:
 8    - https://github.com/OTRF/detection-hackathon-apt29/issues/7
 9    - https://github.com/OTRF/ThreatHunter-Playbook/blob/2d4257f630f4c9770f78d0c1df059f891ffc3fec/docs/evals/apt29/detections/3.C.1_22A46621-7A92-48C1-81BF-B3937EB4FDC3.md
10    - https://learn.microsoft.com/en-us/windows/win32/shell/launch
11    - https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nn-shobjidl_core-iexecutecommand
12    - https://learn.microsoft.com/en-us/windows/win32/shell/shell-and-managed-code
13author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research)
14date: 2020/05/02
15modified: 2023/01/19
16tags:
17    - attack.defense_evasion
18    - attack.t1112
19logsource:
20    product: windows
21    category: registry_delete
22detection:
23    selection:
24        EventType: 'DeleteKey'
25        TargetObject|endswith: '\shell\open\command'
26    filter_svchost:
27        Image: 'C:\Windows\system32\svchost.exe'
28    filter_office:
29        Image|startswith:
30            - 'C:\Program Files\Common Files\Microsoft Shared\ClickToRun\'
31            - 'C:\Program Files\Common Files\Microsoft Shared\ClickToRun\Updates\'
32        Image|endswith: '\OfficeClickToRun.exe'
33    filter_integrator:
34        Image: 'C:\Program Files (x86)\Microsoft Office\root\integration\integrator.exe'
35    filter_dropbox:
36        Image|endswith: '\Dropbox.exe'
37        # We don't use the HKCR anchor as it could be logged as a different variation (HKEY_CLASSES_ROOT)
38        TargetObject|contains: '\Dropbox.'
39    filter_wireshark:
40        Image|endswith: '\AppData\Local\Temp\Wireshark_uninstaller.exe'
41        # We don't use the HKCR anchor as it could be logged as a different variation (HKEY_CLASSES_ROOT)
42        TargetObject|contains: '\wireshark-capture-file\'
43    filter_opera:
44        Image|startswith:
45            - 'C:\Program Files\Opera\'
46            - 'C:\Program Files (x86)\Opera\'
47        Image|endswith: '\installer.exe'
48    filter_peazip:
49        Image|contains: 'peazip'
50        # We don't use the HKCR anchor as it could be logged as a different variation (HKEY_CLASSES_ROOT)
51        TargetObject|contains: '\PeaZip.'
52    filter_everything:
53        Image|endswith: '\Everything.exe'
54        # We don't use the HKCR anchor as it could be logged as a different variation (HKEY_CLASSES_ROOT)
55        TargetObject|contains: '\Everything.'
56    filter_uninstallers:
57        # This image path is linked with different uninstallers when running as admin unfortunately
58        Image|startswith: 'C:\Windows\Installer\MSI'
59    filter_java:
60        Image|startswith: 'C:\Program Files (x86)\Java\'
61        Image|endswith: '\installer.exe'
62        TargetObject|contains: '\Classes\WOW6432Node\CLSID\{4299124F-F2C3-41b4-9C73-9236B2AD0E8F}'
63    condition: selection and not 1 of filter_*
64falsepositives:
65    - Legitimate software (un)installations are known to cause some false positives. Please add them as a filter when encountered
66level: medium

References

Related rules

to-top