Suspicious Rundll32 Setupapi.dll Behavior (via process_creation)
This rule detects setupapi.dll library provide InstallHinfSection function for processing INF files. INF file may contain instructions allowing to create values in the registry, modify files and install drivers. This method could be used to obtain persistence via modifying one of Run or RunOnce registry keys, run process or use other DLLs chain calls (see references) InstallHinfSection function in setupapi.dll calls runonce.exe executable regardless of actual content of INF file.
SigmamediumWindowsv1
sigma
suspicious-rundll32-setupapi-dll-behavior-via-process-creation
title: Suspicious Rundll32 Setupapi.dll Behavior (via process_creation)
id: 1c1e6bcc-1caf-5742-9153-a103abf57867
status: stable
description: This rule detects setupapi.dll library provide InstallHinfSection function for processing INF files. INF file may contain instructions allowing to create values in the registry, modify files and install drivers. This method could be used to obtain persistence via modifying one of Run or RunOnce registry keys, run process or use other DLLs chain calls (see references) InstallHinfSection function in setupapi.dll calls runonce.exe executable regardless of actual content of INF file.
references:
- https://attack.mitre.org/techniques/T1218/011/
- https://lolbas-project.github.io/lolbas/Libraries/Setupapi/
- https://gist.githubusercontent.com/bohops/0cc6586f205f3691e04a1ebf1806aabd/raw/baf7b29891bb91e76198e30889fbf7d6642e8974/calc_exe.inf
- https://raw.githubusercontent.com/huntresslabs/evading-autoruns/master/shady.inf
- https://twitter.com/Z3Jpa29z/status/1313742350292746241?s=20
author: Huntrule Team
date: 2026-02-06
tags:
- attack.stealth
- attack.t1218.011
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith: '\runonce.exe'
ParentImage|endswith: '\rundll32.exe'
ParentCommandLine|contains|all:
- 'setupapi.dll'
- 'InstallHinfSection'
condition: selection
falsepositives:
- Unknown
level: medium
Known false positives
- Unknown
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.