Detection rules › Sigma

New RUN Key Pointing to Suspicious Folder

Status
experimental
Severity
high
Log source
category registry_set, product windows
Author
Florian Roth (Nextron Systems), Markus Neis, Sander Wiebing, Swachchhanda Shrawan Poudel (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects suspicious new RUN key element pointing to an executable in a suspicious folder

Known false positives

  • Software using weird folders for updates

MITRE ATT&CK coverage

Telemetry coverage

Rule body

title: New RUN Key Pointing to Suspicious Folder
id: 02ee49e2-e294-4d0f-9278-f5b3212fc588
status: experimental
description: Detects suspicious new RUN key element pointing to an executable in a suspicious folder
references:
    - https://www.fireeye.com/blog/threat-research/2018/08/fin7-pursuing-an-enigmatic-and-evasive-global-criminal-operation.html
    - https://github.com/HackTricks-wiki/hacktricks/blob/e4c7b21b8f36c97c35b7c622732b38a189ce18f7/src/windows-hardening/windows-local-privilege-escalation/privilege-escalation-with-autorun-binaries.md
author: Florian Roth (Nextron Systems), Markus Neis, Sander Wiebing, Swachchhanda Shrawan Poudel (Nextron Systems)
date: 2018-08-25
modified: 2025-10-06
tags:
    - attack.privilege-escalation
    - attack.persistence
    - attack.t1547.001
logsource:
    category: registry_set
    product: windows
detection:
    selection_target:
        TargetObject|contains:
            - '\Software\Microsoft\Windows\CurrentVersion\Run'
            - '\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Run'
            - '\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run'
    selection_suspicious_paths_1:
        Details|contains:
            - ':\Perflogs'
            - :\ProgramData'
            - ':\Windows\Temp'
            - ':\Temp'
            - '\AppData\Local\Temp'
            - '\AppData\Roaming'
            - ':\$Recycle.bin'
            - ':\Users\Default'
            - ':\Users\public'
            - '%temp%'
            - '%tmp%'
            - '%Public%'
            - '%AppData%'
    selection_suspicious_paths_user_1:
        Details|contains: ':\Users\'
    selection_suspicious_paths_user_2:
        Details|contains:
            - '\Favorites'
            - '\Favourites'
            - '\Contacts'
            - '\Music'
            - '\Pictures'
            - '\Documents'
            - '\Photos'
    filter_main_windows_update:
        TargetObject|contains: '\Microsoft\Windows\CurrentVersion\RunOnce\'
        Image|startswith: 'C:\Windows\SoftwareDistribution\Download\'
        Details|contains|all:
            - 'rundll32.exe '
            - 'C:\WINDOWS\system32\advpack.dll,DelNodeRunDLL32'
        Details|contains:
            - '\AppData\Local\Temp\'
            - 'C:\Windows\Temp\'
    filter_optional_spotify:
        Image|endswith:
            - 'C:\Program Files\Spotify\Spotify.exe'
            - 'C:\Program Files (x86)\Spotify\Spotify.exe'
            - '\AppData\Roaming\Spotify\Spotify.exe'
        TargetObject|endswith: 'SOFTWARE\Microsoft\Windows\CurrentVersion\Run\Spotify'
        Details|endswith: 'Spotify.exe --autostart --minimized'
    condition: selection_target and (selection_suspicious_paths_1 or (all of selection_suspicious_paths_user_* )) and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
    - Software using weird folders for updates
level: high

Stages and Predicates

Stage 0: condition

selection_target and (selection_suspicious_paths_1 or (all of selection_suspicious_paths_user_* )) and not 1 of filter_main_* and not 1 of filter_optional_*

Stage 1: selection_target

selection_target:
    TargetObject|contains:
        - '\Software\Microsoft\Windows\CurrentVersion\Run'
        - '\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Run'
        - '\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run'

Stage 2: selection_suspicious_paths_1

selection_suspicious_paths_1:
    Details|contains:
        - ':\Perflogs'
        - :\ProgramData'
        - ':\Windows\Temp'
        - ':\Temp'
        - '\AppData\Local\Temp'
        - '\AppData\Roaming'
        - ':\$Recycle.bin'
        - ':\Users\Default'
        - ':\Users\public'
        - '%temp%'
        - '%tmp%'
        - '%Public%'
        - '%AppData%'

Stage 3: selection_suspicious_paths_user_1

selection_suspicious_paths_user_1:
    Details|contains: ':\Users\'

Stage 4: selection_suspicious_paths_user_2

selection_suspicious_paths_user_2:
    Details|contains:
        - '\Favorites'
        - '\Favourites'
        - '\Contacts'
        - '\Music'
        - '\Pictures'
        - '\Documents'
        - '\Photos'

Stage 5: not filter_main_windows_update

filter_main_windows_update:
    TargetObject|contains: '\Microsoft\Windows\CurrentVersion\RunOnce\'
    Image|startswith: 'C:\Windows\SoftwareDistribution\Download\'
    Details|contains|all:
        - 'rundll32.exe '
        - 'C:\WINDOWS\system32\advpack.dll,DelNodeRunDLL32'
    Details|contains:
        - '\AppData\Local\Temp\'
        - 'C:\Windows\Temp\'

Stage 6: not filter_optional_spotify

filter_optional_spotify:
    Image|endswith:
        - 'C:\Program Files\Spotify\Spotify.exe'
        - 'C:\Program Files (x86)\Spotify\Spotify.exe'
        - '\AppData\Roaming\Spotify\Spotify.exe'
    TargetObject|endswith: 'SOFTWARE\Microsoft\Windows\CurrentVersion\Run\Spotify'
    Details|endswith: 'Spotify.exe --autostart --minimized'

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
DetailsmatchC:\Windows\Temp\excludes:Details field:"Details" value:"C:\Windows\Temp\"
Detailsmatch\AppData\Local\Temp\excludes:Details field:"Details" value:"\AppData\Local\Temp\"
DetailsmatchC:\WINDOWS\system32\advpack.dll,DelNodeRunDLL32excludes:Details field:"Details" value:"C:\WINDOWS\system32\advpack.dll,DelNodeRunDLL32"
Detailsmatchrundll32.exe excludes:Details field:"Details" value:"rundll32.exe "
Imagestarts_withC:\Windows\SoftwareDistribution\Download\excludes:Image field:"Image" value:"C:\Windows\SoftwareDistribution\Download\"
TargetObjectmatch\Microsoft\Windows\CurrentVersion\RunOnce\excludes:TargetObject field:"TargetObject" value:"\Microsoft\Windows\CurrentVersion\RunOnce\"
Imageends_withC:\Program Files (x86)\Spotify\Spotify.exeexcludes:Image field:"Image" value:"C:\Program Files (x86)\Spotify\Spotify.exe"
Imageends_withC:\Program Files\Spotify\Spotify.exeexcludes:Image field:"Image" value:"C:\Program Files\Spotify\Spotify.exe"
Imageends_with\AppData\Roaming\Spotify\Spotify.exeexcludes:Image field:"Image" value:"\AppData\Roaming\Spotify\Spotify.exe"
Detailsends_withSpotify.exe --autostart --minimizedexcludes:Details field:"Details" value:"Spotify.exe --autostart --minimized"
TargetObjectends_withSOFTWARE\Microsoft\Windows\CurrentVersion\Run\Spotifyexcludes:TargetObject field:"TargetObject" value:"SOFTWARE\Microsoft\Windows\CurrentVersion\Run\Spotify"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Detailsmatch
  • %AppData% corpus 4 (sigma 3, chronicle 1)
  • %Public% corpus 2 (sigma 1, chronicle 1)
  • %temp% corpus 5 (sigma 4, chronicle 1)
  • %tmp% corpus 5 (sigma 4, chronicle 1)
  • :\$Recycle.bin
  • :\Perflogs
  • :\ProgramData'
  • :\Temp
  • :\Users\ corpus 4 (sigma 4)
  • :\Users\Default
  • :\Users\public
  • :\Windows\Temp
  • \AppData\Local\Temp
  • \AppData\Roaming
  • \Contacts
  • \Documents
  • \Favorites
  • \Favourites
  • \Music
  • \Photos
  • \Pictures
field:"Details" kind:match
TargetObjectmatch
  • \Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run corpus 4 (sigma 3, kusto 1)
  • \Software\Microsoft\Windows\CurrentVersion\Run corpus 4 (sigma 4)
  • \Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Run corpus 3 (sigma 3)
field:"TargetObject" kind:match