Detection rules › Sigma

PUA - NSudo Execution

Status
test
Severity
high
Log source
product windows, category process_creation
Author
Florian Roth (Nextron Systems), Nasreddine Bencherchali
Source
github.com/SigmaHQ/sigma

Detects the use of NSudo tool for command execution

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: PUA - NSudo Execution
id: 771d1eb5-9587-4568-95fb-9ec44153a012
status: test
description: Detects the use of NSudo tool for command execution
references:
    - https://web.archive.org/web/20221019044836/https://nsudo.m2team.org/en-us/
    - https://www.winhelponline.com/blog/run-program-as-system-localsystem-account-windows/
author: Florian Roth (Nextron Systems), Nasreddine Bencherchali
date: 2022-01-24
modified: 2023-02-13
tags:
    - attack.execution
    - attack.t1569.002
    - attack.s0029
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith:
              - '\NSudo.exe'
              - '\NSudoLC.exe'
              - '\NSudoLG.exe'
        - OriginalFileName:
              - 'NSudo.exe'
              - 'NSudoLC.exe'
              - 'NSudoLG.exe'
    selection_cli:
        CommandLine|contains:
            # Covers Single/Double dash "-"/"--" + ":"
            - '-U:S ' # System
            - '-U:T ' # Trusted Installer
            - '-U:E ' # Elevated
            - '-P:E ' # Enable All Privileges
            - '-M:S ' # System Integrity
            - '-M:H ' # High Integrity
            # Covers Single/Double dash "-"/"--" + "="
            - '-U=S '
            - '-U=T '
            - '-U=E '
            - '-P=E '
            - '-M=S '
            - '-M=H '
            - '-ShowWindowMode:Hide'
    condition: all of selection_*
falsepositives:
    - Legitimate use by administrators
level: high

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_img

selection_img:
    - Image|endswith:
          - '\NSudo.exe'
          - '\NSudoLC.exe'
          - '\NSudoLG.exe'
    - OriginalFileName:
          - 'NSudo.exe'
          - 'NSudoLC.exe'
          - 'NSudoLG.exe'

Stage 2: selection_cli

selection_cli:
    CommandLine|contains:
        - '-U:S '
        - '-U:T '
        - '-U:E '
        - '-P:E '
        - '-M:S '
        - '-M:H '
        - '-U=S '
        - '-U=T '
        - '-U=E '
        - '-P=E '
        - '-M=S '
        - '-M=H '
        - '-ShowWindowMode:Hide'

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
CommandLinematch
  • -M:H
  • -M:S
  • -M=H
  • -M=S
  • -P:E
  • -P=E
  • -ShowWindowMode:Hide
  • -U:E
  • -U:S
  • -U:T
  • -U=E
  • -U=S
  • -U=T
Imageends_with
  • \NSudo.exe
  • \NSudoLC.exe
  • \NSudoLG.exe
OriginalFileNameeq
  • NSudo.exe
  • NSudoLC.exe
  • NSudoLG.exe