Detection rules › Sigma

New Netsh Helper DLL Registered From A Suspicious Location

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

Detects changes to the Netsh registry key to add a new DLL value that is located on a suspicious location. This change might be an indication of a potential persistence attempt by adding a malicious Netsh helper

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 13RegistryEvent (Value Set)

Rule body yaml

title: New Netsh Helper DLL Registered From A Suspicious Location
id: e7b18879-676e-4a0e-ae18-27039185a8e7
related:
    - id: 56321594-9087-49d9-bf10-524fe8479452
      type: similar
    - id: c90362e0-2df3-4e61-94fe-b37615814cb1
      type: similar
status: test
description: |
    Detects changes to the Netsh registry key to add a new DLL value that is located on a suspicious location. This change might be an indication of a potential persistence attempt by adding a malicious Netsh helper
references:
    - https://www.ired.team/offensive-security/persistence/t1128-netsh-helper-dll
    - https://pentestlab.blog/2019/10/29/persistence-netsh-helper-dll/
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-11-28
tags:
    - attack.privilege-escalation
    - attack.persistence
    - attack.t1546.007
logsource:
    category: registry_set
    product: windows
detection:
    selection_target:
        TargetObject|contains: '\SOFTWARE\Microsoft\NetSh'
    selection_folders_1:
        Details|contains:
            - ':\Perflogs\'
            - ':\Users\Public\'
            - ':\Windows\Temp\'
            - '\AppData\Local\Temp\'
            - '\Temporary Internet'
    selection_folders_2:
        - Details|contains|all:
              - ':\Users\'
              - '\Favorites\'
        - Details|contains|all:
              - ':\Users\'
              - '\Favourites\'
        - Details|contains|all:
              - ':\Users\'
              - '\Contacts\'
        - Details|contains|all:
              - ':\Users\'
              - '\Pictures\'
    condition: selection_target and 1 of selection_folders_*
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

selection_target and 1 of selection_folders_*

Stage 1: selection_target

selection_target:
    TargetObject|contains: '\SOFTWARE\Microsoft\NetSh'

Stage 2: selection_folders_1

selection_folders_1:
    Details|contains:
        - ':\Perflogs\'
        - ':\Users\Public\'
        - ':\Windows\Temp\'
        - '\AppData\Local\Temp\'
        - '\Temporary Internet'

Stage 3: selection_folders_2

selection_folders_2:
    - Details|contains|all:
          - ':\Users\'
          - '\Favorites\'
    - Details|contains|all:
          - ':\Users\'
          - '\Favourites\'
    - Details|contains|all:
          - ':\Users\'
          - '\Contacts\'
    - Details|contains|all:
          - ':\Users\'
          - '\Pictures\'

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
Detailsmatch
  • :\Perflogs\ corpus 4 (sigma 4)
  • :\Users\ corpus 4 (sigma 4)
  • :\Users\Public\ corpus 4 (sigma 4)
  • :\Windows\Temp\ corpus 4 (sigma 4)
  • \AppData\Local\Temp\ corpus 8 (sigma 8)
  • \Contacts\ corpus 4 (sigma 4)
  • \Favorites\ corpus 3 (sigma 3)
  • \Favourites\ corpus 3 (sigma 3)
  • \Pictures\ corpus 3 (sigma 3)
  • \Temporary Internet corpus 3 (sigma 3)
TargetObjectmatch
  • \SOFTWARE\Microsoft\NetSh corpus 2 (sigma 2)