Detection rules › Sigma

Insensitive Subfolder Search Via Findstr.EXE

Status
test
Severity
low
Log source
product windows, category process_creation
Author
Furkan CALISKAN, @caliskanfurkan_, @oscd_initiative, Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects execution of findstr with the "s" and "i" flags for a "subfolder" and "insensitive" search respectively. Attackers sometimes leverage this built-in utility to search the system for interesting files or filter through results of commands.

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: Insensitive Subfolder Search Via Findstr.EXE
id: 04936b66-3915-43ad-a8e5-809eadfd1141
related:
    - id: bf6c39fc-e203-45b9-9538-05397c1b4f3f
      type: obsolete
status: test
description: |
    Detects execution of findstr with the "s" and "i" flags for a "subfolder" and "insensitive" search respectively. Attackers sometimes leverage this built-in utility to search the system for interesting files or filter through results of commands.
references:
    - https://lolbas-project.github.io/lolbas/Binaries/Findstr/
    - https://oddvar.moe/2018/04/11/putting-data-in-alternate-data-streams-and-how-to-execute-it-part-2/
    - https://gist.github.com/api0cradle/cdd2d0d0ec9abb686f0e89306e277b8f
author: Furkan CALISKAN, @caliskanfurkan_, @oscd_initiative, Nasreddine Bencherchali (Nextron Systems)
date: 2020-10-05
modified: 2024-03-05
tags:
    - attack.credential-access
    - attack.command-and-control
    - attack.stealth
    - attack.t1218
    - attack.t1564.004
    - attack.t1552.001
    - attack.t1105
logsource:
    category: process_creation
    product: windows
detection:
    selection_findstr:
        - CommandLine|contains: findstr
        - Image|endswith: 'findstr.exe'
        - OriginalFileName: 'FINDSTR.EXE'
    selection_cli_search_subfolder:
        CommandLine|contains|windash: ' -s '
    selection_cli_search_insensitive:
        CommandLine|contains|windash: ' -i '
    condition: selection_findstr and all of selection_cli_search_*
falsepositives:
    - Administrative or software activity
level: low

Stages and Predicates

Stage 0: condition

selection_findstr and all of selection_cli_search_*

Stage 1: selection_findstr

selection_findstr:
    - CommandLine|contains: findstr
    - Image|endswith: 'findstr.exe'
    - OriginalFileName: 'FINDSTR.EXE'

Stage 2: selection_cli_search_subfolder

selection_cli_search_subfolder:
    CommandLine|contains|windash: ' -s '

Stage 3: selection_cli_search_insensitive

selection_cli_search_insensitive:
    CommandLine|contains|windash: ' -i '

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
  • -i transforms: windash corpus 4 (sigma 4)
  • -s transforms: windash corpus 4 (sigma 3, splunk 1)
  • findstr corpus 8 (sigma 6, splunk 2)
Imageends_with
  • findstr.exe corpus 2 (sigma 2)
OriginalFileNameeq
  • FINDSTR.EXE corpus 12 (sigma 12)