Detection rules › Sigma

Permission Misconfiguration Reconnaissance Via Findstr.EXE

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

Detects usage of findstr with the "EVERYONE" or "BUILTIN" keywords. This was seen being used in combination with "icacls" and other utilities to spot misconfigured files or folders permissions.

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: Permission Misconfiguration Reconnaissance Via Findstr.EXE
id: 47e4bab7-c626-47dc-967b-255608c9a920
status: test
description: |
    Detects usage of findstr with the "EVERYONE" or "BUILTIN" keywords.
    This was seen being used in combination with "icacls" and other utilities to spot misconfigured files or folders permissions.
references:
    - https://www.absolomb.com/2018-01-26-Windows-Privilege-Escalation-Guide/
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-08-12
modified: 2023-11-11
tags:
    - attack.credential-access
    - attack.t1552.006
logsource:
    category: process_creation
    product: windows
detection:
    selection_findstr_img:
        - Image|endswith:
              - '\find.exe'
              - '\findstr.exe'
        - OriginalFileName:
              - 'FIND.EXE'
              - 'FINDSTR.EXE'
    selection_findstr_cli:
        CommandLine|contains:
            - '"Everyone"'
            - "'Everyone'"
            - '"BUILTIN\\"'
            - "'BUILTIN\\'"
    selection_special:
        CommandLine|contains|all:
            # Example CLI would be: icacls "C:\Program Files\*" 2>nul | findstr "(M)" | findstr "Everyone"
            # You could extend it for other groups and users
            #   Example: icacls "C:\Program Files\*" 2>nul | findstr "(M)" | findstr "BUILTIN\Users"
            # Note: This selection only detects the command when executed from a handler such as a "cmd /c" or "powershell -c"
            - 'icacls '
            - 'findstr '
            - 'Everyone'
    condition: all of selection_findstr_* or selection_special
falsepositives:
    - Unknown
level: medium
regression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_findstr_recon_everyone/info.yml

Stages and Predicates

Stage 0: condition

all of selection_findstr_* or selection_special

Stage 1: selection_findstr_img

selection_findstr_img:
    - Image|endswith:
          - '\find.exe'
          - '\findstr.exe'
    - OriginalFileName:
          - 'FIND.EXE'
          - 'FINDSTR.EXE'

Stage 2: selection_findstr_cli

selection_findstr_cli:
    CommandLine|contains:
        - '"Everyone"'
        - "'Everyone'"
        - '"BUILTIN\\"'
        - "'BUILTIN\\'"

Stage 3: selection_special

selection_special:
    CommandLine|contains|all:
        - 'icacls '
        - 'findstr '
        - 'Everyone'

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
  • "BUILTIN\\"
  • "Everyone"
  • 'BUILTIN\'
  • 'Everyone'
  • Everyone
  • findstr
  • icacls
Imageends_with
  • \find.exe corpus 8 (sigma 8)
  • \findstr.exe corpus 12 (sigma 12)
OriginalFileNameeq
  • FIND.EXE corpus 7 (sigma 7)
  • FINDSTR.EXE corpus 12 (sigma 12)