Windows Process Creation: NirCmd runasSystem CommandLine Usage
Alerts on NirCmd being used to run commands as LocalSystem based on the process command line.
- Product
- windows
- Category
- process_creation
- Author
- Florian Roth (Nextron Systems), Nasreddine Bencherchali (Nextron Systems) (SigmaHQ), DRL 1.1
- Published
- 2022-01-24
- Updated
- 2026-07-30
ATT&CK techniques
ExecutionRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule flags Windows process creation events where the command line contains the ' runassystem ' string, indicating use of NirCmd to execute commands in the LocalSystem context. Attackers can leverage this capability to elevate execution privileges and run actions with high authority. The detection relies on process creation telemetry and the recorded command line content.
Reporting behind it
- nirsoft.nethttps://www.nirsoft.net/utils/nircmd.html
- winhelponline.comhttps://www.winhelponline.com/blog/run-program-as-system-localsystem-account-windows/
- nirsoft.nethttps://www.nirsoft.net/utils/nircmd2.html#using
- github.comhttps://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_pua_nircmd_as_system.yml
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.
title: "Windows Process Creation: NirCmd runasSystem CommandLine Usage"
id: d1edd47b-1dc4-4022-adba-f3dd710a8221
status: test
description: This rule flags Windows process creation events where the command line contains the ' runassystem ' string, indicating use of NirCmd to execute commands in the LocalSystem context. Attackers can leverage this capability to elevate execution privileges and run actions with high authority. The detection relies on process creation telemetry and the recorded command line content.
references:
- https://www.nirsoft.net/utils/nircmd.html
- https://www.winhelponline.com/blog/run-program-as-system-localsystem-account-windows/
- https://www.nirsoft.net/utils/nircmd2.html#using
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_pua_nircmd_as_system.yml
author: Florian Roth (Nextron Systems), Nasreddine Bencherchali (Nextron Systems), Huntrule Team
date: 2022-01-24
modified: 2023-02-13
tags:
- attack.execution
- attack.t1569.002
- attack.s0029
logsource:
category: process_creation
product: windows
detection:
selection:
CommandLine|contains: " runassystem "
condition: selection
falsepositives:
- Legitimate use by administrators
level: high
license: DRL-1.1
related:
- id: d9047477-0359-48c9-b8c7-792cedcdc9c4
type: derived