Windows regsvr32 Execution with DLL Path in Common Temporary/Public Directories

Alert on regsvr32.exe runs whose command line points to DLLs in Temp/Public-style directories.

FreeReviewedSigma · Medium · v1
Product
windows
Category
process_creation
Author
Florian Roth (Nextron Systems), Nasreddine Bencherchali (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2023-05-26
Updated
2026-07-30
title: Windows regsvr32 Execution with DLL Path in Common Temporary/Public Directories
id: 572f653e-0d35-4e96-a043-bf023cd875a6
related:
  - id: 8e2b24c9-4add-46a0-b4bb-0057b4e6187d
    type: obsolete
  - id: 9525dc73-0327-438c-8c04-13c0e037e9da
    type: derived
status: test
description: This rule flags process executions of regsvr32.exe where the command line indicates the DLL is located in directories commonly used for temporary or public staging, such as ProgramData, Temp, Users\Public, Windows\Temp, and AppData\Local\Temp or AppData\Roaming. Attackers may use regsvr32 to proxy execution via a DLL placed in locations that are less strictly monitored than system directories. The detection relies on Windows process creation telemetry, matching the executed binary name and correlating it with suspicious path fragments in the process command line.
references:
  - https://web.archive.org/web/20171001085340/https://subt0x10.blogspot.com/2017/04/bypass-application-whitelisting-script.html
  - https://app.any.run/tasks/34221348-072d-4b70-93f3-aa71f6ebecad/
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_regsvr32_susp_exec_path_1.yml
author: Florian Roth (Nextron Systems), Nasreddine Bencherchali (Nextron Systems), Huntrule Team
date: 2023-05-26
tags:
  - attack.stealth
  - attack.t1218.010
logsource:
  category: process_creation
  product: windows
detection:
  selection_img:
    - Image|endswith: \regsvr32.exe
    - OriginalFileName: REGSVR32.EXE
  selection_cli:
    CommandLine|contains:
      - :\ProgramData\
      - :\Temp\
      - :\Users\Public\
      - :\Windows\Temp\
      - \AppData\Local\Temp\
      - \AppData\Roaming\
  condition: all of selection_*
falsepositives:
  - Some installers might execute "regsvr32" with DLLs located in %TEMP% or in %PROGRAMDATA%. Apply additional filters if necessary.
level: medium
license: DRL-1.1