Detection rules › Sigma

Forfiles.EXE Child Process Masquerading

Severity
high
Author
Nasreddine Bencherchali (Nextron Systems), Anish Bogati
Source
upstream

Detects the execution of "forfiles" from a non-default location, in order to potentially spawn a custom "cmd.exe" from the current working directory.

MITRE ATT&CK coverage

TacticTechniques
Defense EvasionT1036 Masquerading

Event coverage

ProviderEvent IDTitle
Sysmon1Process creation

Stages and Predicates

Stage 1: selection

or:
ParentCommandLine|endswith: .exe
ParentCommandLine|endswith: '.exe"'
CommandLine|startswith: '/c echo "'
Image|endswith: '\cmd.exe'

Stage 2: not 1 of filter_main_parent_not_sys

or:
Image|contains: ':\Windows\SysWOW64\'
Image|contains: ':\Windows\System32\'
or:
ParentImage|contains: ':\Windows\SysWOW64\'
ParentImage|contains: ':\Windows\System32\'
Image|endswith: '\cmd.exe'
ParentImage|endswith: '\forfiles.exe'

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
CommandLinestarts_with
  • /c echo "
Imageends_with
  • \cmd.exe corpus 92 (sigma 92)
Imagematch
  • :\Windows\SysWOW64\ corpus 7 (sigma 7)
  • :\Windows\System32\ corpus 6 (sigma 6)
ParentCommandLineends_with
  • .exe
  • .exe"
ParentImageends_with
  • \forfiles.exe
ParentImagematch
  • :\Windows\SysWOW64\ corpus 2 (sigma 2)
  • :\Windows\System32\ corpus 2 (sigma 2)