Potential Persistence Via MyComputer Registry Keys
Detects modification to the "Default" value of the "MyComputer" key and subkeys to point to a custom binary that will be launched whenever the associated action is executed (see reference section for example)
Detection logic
selection
TargetObject|contains: \Microsoft\Windows\CurrentVersion\Explorer\MyComputer
TargetObject|endswith: path\(Default)filter_main_default
Details|startswith:
- "%%SystemRoot%%\\"
- "%%Windir%%\\"
- "%SystemRoot%\\"
- "%Windir%\\"
- C:\Windows\filter_main_path_backup
TargetObject|endswith: \MyComputer\BackupPath\(Default)
Details|endswith:
- \System32\sdclt.exe
- \SysWOW64\sdclt.exefilter_main_path_cleanup
TargetObject|endswith: \MyComputer\cleanuppath\(Default)
Details|endswith:
- \System32\cleanmgr.exe /D %c
- \SysWOW64\cleanmgr.exe /D %c
- \System32\cleanmgr.exe /D %%c
- \SysWOW64\cleanmgr.exe /D %%cfilter_main_path_defrag
TargetObject|endswith: \MyComputer\DefragPath\(Default)
Details|endswith:
- \System32\dfrgui.exe
- \SysWOW64\dfrgui.exeCondition
selection and not (filter_main_default and 1 of filter_main_path_*)Raw YAML
title: Potential Persistence Via MyComputer Registry Keys
id: 8fbe98a8-8f9d-44f8-aa71-8c572e29ef06
status: test
description: Detects modification to the "Default" value of the "MyComputer" key and subkeys to point to a custom binary that will be launched whenever the associated action is executed (see reference section for example)
references:
- https://www.hexacorn.com/blog/2017/01/18/beyond-good-ol-run-key-part-55/
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-08-09
modified: 2026-11-16
tags:
- attack.persistence
logsource:
category: registry_set
product: windows
detection:
selection:
TargetObject|contains: '\Microsoft\Windows\CurrentVersion\Explorer\MyComputer'
TargetObject|endswith: 'path\(Default)'
filter_main_default:
Details|startswith:
- '%%SystemRoot%%\'
- '%%Windir%%\'
- '%SystemRoot%\'
- '%Windir%\'
- 'C:\Windows\'
filter_main_path_backup:
TargetObject|endswith: '\MyComputer\BackupPath\(Default)'
Details|endswith:
- '\System32\sdclt.exe'
- '\SysWOW64\sdclt.exe'
filter_main_path_cleanup:
TargetObject|endswith: '\MyComputer\cleanuppath\(Default)'
Details|endswith:
- '\System32\cleanmgr.exe /D %c'
- '\SysWOW64\cleanmgr.exe /D %c'
- '\System32\cleanmgr.exe /D %%c'
- '\SysWOW64\cleanmgr.exe /D %%c'
filter_main_path_defrag:
TargetObject|endswith: '\MyComputer\DefragPath\(Default)'
Details|endswith:
- '\System32\dfrgui.exe'
- '\SysWOW64\dfrgui.exe'
condition: selection and not (filter_main_default and 1 of filter_main_path_*)
falsepositives:
- Unlikely but if you experience FPs add specific processes and locations you would like to monitor for
level: highFalse positives
- Unlikely but if you experience FPs add specific processes and locations you would like to monitor for
References
Similar rules
Activate Suppression of Windows Security Center Notifications
mediumwindows · Same logsource category (registry_set)
Add Debugger Entry To AeDebug For Persistence
mediumwindows · Same logsource category (registry_set)
Add Debugger Entry To Hangs Key For Persistence
highwindows · Same logsource category (registry_set)
Add DisallowRun Execution to Registry
mediumwindows · Same logsource category (registry_set)