Detection rules › Sigma

Suspicious Program Location Whitelisted In Firewall Via Netsh.EXE

Status
test
Severity
high
Log source
product windows, category process_creation
Author
Sander Wiebing, Jonhnathan Ribeiro, Daniil Yugoslavskiy, oscd.community
Source
github.com/SigmaHQ/sigma

Detects Netsh command execution that whitelists a program located in a suspicious location in the Windows Firewall

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: Suspicious Program Location Whitelisted In Firewall Via Netsh.EXE
id: a35f5a72-f347-4e36-8895-9869b0d5fc6d
status: test
description: Detects Netsh command execution that whitelists a program located in a suspicious location in the Windows Firewall
references:
    - https://www.virusradar.com/en/Win32_Kasidet.AD/description
    - https://www.hybrid-analysis.com/sample/07e789f4f2f3259e7559fdccb36e96814c2dbff872a21e1fa03de9ee377d581f?environmentId=100
author: Sander Wiebing, Jonhnathan Ribeiro, Daniil Yugoslavskiy, oscd.community
date: 2020-05-25
modified: 2023-12-11
tags:
    - attack.defense-impairment
    - attack.t1686.003
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\netsh.exe'
        - OriginalFileName: 'netsh.exe'
    selection_cli:
        - CommandLine|contains|all:
              - 'firewall'
              - 'add'
              - 'allowedprogram'
        - CommandLine|contains|all:
              - 'advfirewall'
              - 'firewall'
              - 'add'
              - 'rule'
              - 'action=allow'
              - 'program='
    selection_paths:
        CommandLine|contains:
            - ':\$Recycle.bin\'
            - ':\RECYCLER.BIN\'
            - ':\RECYCLERS.BIN\'
            - ':\SystemVolumeInformation\'
            - ':\Temp\'
            - ':\Users\Default\'
            - ':\Users\Desktop\'
            - ':\Users\Public\'
            - ':\Windows\addins\'
            - ':\Windows\cursors\'
            - ':\Windows\debug\'
            - ':\Windows\drivers\'
            - ':\Windows\fonts\'
            - ':\Windows\help\'
            - ':\Windows\system32\tasks\'
            - ':\Windows\Tasks\'
            - ':\Windows\Temp\'
            - '\Downloads\'
            - '\Local Settings\Temporary Internet Files\'
            - '\Temporary Internet Files\Content.Outlook\'
            - '%Public%\'
            - '%TEMP%'
            - '%TMP%'
    condition: all of selection_*
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_img

selection_img:
    - Image|endswith: '\netsh.exe'
    - OriginalFileName: 'netsh.exe'

Stage 2: selection_cli

selection_cli:
    - CommandLine|contains|all:
          - 'firewall'
          - 'add'
          - 'allowedprogram'
    - CommandLine|contains|all:
          - 'advfirewall'
          - 'firewall'
          - 'add'
          - 'rule'
          - 'action=allow'
          - 'program='

Stage 3: selection_paths

selection_paths:
    CommandLine|contains:
        - ':\$Recycle.bin\'
        - ':\RECYCLER.BIN\'
        - ':\RECYCLERS.BIN\'
        - ':\SystemVolumeInformation\'
        - ':\Temp\'
        - ':\Users\Default\'
        - ':\Users\Desktop\'
        - ':\Users\Public\'
        - ':\Windows\addins\'
        - ':\Windows\cursors\'
        - ':\Windows\debug\'
        - ':\Windows\drivers\'
        - ':\Windows\fonts\'
        - ':\Windows\help\'
        - ':\Windows\system32\tasks\'
        - ':\Windows\Tasks\'
        - ':\Windows\Temp\'
        - '\Downloads\'
        - '\Local Settings\Temporary Internet Files\'
        - '\Temporary Internet Files\Content.Outlook\'
        - '%Public%\'
        - '%TEMP%'
        - '%TMP%'

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
  • %Public%\
  • %TEMP% corpus 16 (sigma 13, chronicle 2, kusto 1)
  • %TMP% corpus 15 (sigma 13, chronicle 2)
  • :\$Recycle.bin\
  • :\RECYCLER.BIN\
  • :\RECYCLERS.BIN\
  • :\SystemVolumeInformation\
  • :\Temp\ corpus 14 (sigma 14)
  • :\Users\Default\ corpus 3 (sigma 3)
  • :\Users\Desktop\
  • :\Users\Public\ corpus 18 (sigma 18)
  • :\Windows\Tasks\ corpus 6 (sigma 6)
  • :\Windows\Temp\ corpus 16 (sigma 16)
  • :\Windows\addins\
  • :\Windows\cursors\
  • :\Windows\debug\
  • :\Windows\drivers\
  • :\Windows\fonts\
  • :\Windows\help\ corpus 2 (sigma 2)
  • :\Windows\system32\tasks\ corpus 4 (sigma 4)
  • \Downloads\ corpus 14 (sigma 14)
  • \Local Settings\Temporary Internet Files\
  • \Temporary Internet Files\Content.Outlook\
  • action=allow corpus 2 (sigma 1, splunk 1)
  • add corpus 34 (sigma 26, splunk 4, chronicle 2, kusto 2)
  • advfirewall corpus 7 (sigma 6, kusto 1)
  • allowedprogram
  • firewall corpus 13 (sigma 7, splunk 6)
  • program=
  • rule corpus 2 (sigma 2)
Imageends_with
  • \netsh.exe corpus 28 (sigma 28)
OriginalFileNameeq
  • netsh.exe corpus 23 (sigma 14, splunk 7, elastic 2)