Direct Autorun Keys Modification

Detects direct modification of autostart extensibility point (ASEP) in registry using reg.exe.

Sigma rule (View on GitHub)

 1title: Direct Autorun Keys Modification
 2id: 24357373-078f-44ed-9ac4-6d334a668a11
 3status: test
 4description: Detects direct modification of autostart extensibility point (ASEP) in registry using reg.exe.
 5references:
 6    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1547.001/T1547.001.md
 7    - https://github.com/HackTricks-wiki/hacktricks/blob/e4c7b21b8f36c97c35b7c622732b38a189ce18f7/src/windows-hardening/windows-local-privilege-escalation/privilege-escalation-with-autorun-binaries.md
 8author: Victor Sergeev, Daniil Yugoslavskiy, oscd.community, Swachchhanda Shrawan Poudel (Nextron Systems)
 9date: 2019-10-25
10modified: 2025-02-17
11tags:
12    - attack.persistence
13    - attack.t1547.001
14logsource:
15    category: process_creation
16    product: windows
17detection:
18    selection_1:
19        Image|endswith: '\reg.exe'
20        CommandLine|contains: 'add'     # to avoid intersection with discovery tactic rules
21    selection_2:
22        CommandLine|contains:           # need to improve this list, there are plenty of ASEP reg keys
23            - '\software\Microsoft\Windows\CurrentVersion\Run' # Also covers the strings "RunOnce", "RunOnceEx", "RunServices", "RunServicesOnce"
24            - '\software\WOW6432Node\Microsoft\Windows\CurrentVersion\Run'
25            - '\software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run'
26            - '\software\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit'
27            - '\software\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell'
28            - '\software\Microsoft\Windows NT\CurrentVersion\Windows'
29            - '\software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders'
30            - '\system\CurrentControlSet\Control\SafeBoot\AlternateShell'
31    condition: all of selection_*
32fields:
33    - CommandLine
34    - ParentCommandLine
35falsepositives:
36    - Legitimate software automatically (mostly, during installation) sets up autorun keys for legitimate reasons.
37    - Legitimate administrator sets up autorun keys for legitimate reasons.
38    - Discord
39level: medium

References

Related rules

to-top