Potential Persistence Attempt Via Run Keys Using Reg.EXE

 Original Source: [Sigma source]
Title: Potential Persistence Attempt Via Run Keys Using Reg.EXE
Status: test
Description:Detects suspicious command line reg.exe tool adding key to RUN key in Registry
References:
  -https://app.any.run/tasks/9c0f37bc-867a-4314-b685-e101566766d7/
  -https://learn.microsoft.com/en-us/windows/win32/setupapi/run-and-runonce-registry-keys
  -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), Swachchhanda Shrawan Poudel (Nextron Systems)
Date: 2021-06-28
modified:2025-02-17
Tags:
  • -'attack.privilege-escalation'
  • -'attack.persistence'
  • -'attack.t1547.001'
Logsource:
  • category: process_creation
  • product: windows
Detection:
  selection:
    Image|endswith: '\reg.exe'
    CommandLine|contains|all:
      -'reg'
      -' add '

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

  condition:selection
Falsepositives:
  -Legitimate software automatically (mostly, during installation) sets up autorun keys for legitimate reasons.
  -Legitimate administrator sets up autorun keys for legitimate reasons.
  -Discord
Level: medium