Detection rules › Sigma

Formbook Process Creation

Status
test
Severity
high
Log source
product windows, category process_creation
Author
Florian Roth (Nextron Systems), oscd.community, Jonhnathan Ribeiro
Source
github.com/SigmaHQ/sigma

Detects Formbook like process executions that inject code into a set of files in the System32 folder, which executes a special command command line to delete the dropper from the AppData Temp folder. We avoid false positives by excluding all parent process with command line parameters.

MITRE ATT&CK coverage

TacticTechniques
Resource DevelopmentT1587.001 Develop Capabilities: Malware

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: Formbook Process Creation
id: 032f5fb3-d959-41a5-9263-4173c802dc2b
status: test
description: Detects Formbook like process executions that inject code into a set of files in the System32 folder, which executes a special command command line to delete the dropper from the AppData Temp folder. We avoid false positives by excluding all parent process with command line parameters.
references:
    - https://inquest.net/blog/2018/06/22/a-look-at-formbook-stealer
    - https://app.any.run/tasks/388d5802-aa48-4826-b069-250420504758/
    - https://app.any.run/tasks/8e22486b-5edc-4cef-821c-373e945f296c/
    - https://app.any.run/tasks/62bb01ae-25a4-4180-b278-8e464a90b8d7/
author: Florian Roth (Nextron Systems), oscd.community, Jonhnathan Ribeiro
date: 2019-09-30
modified: 2022-10-06
tags:
    - attack.resource-development
    - attack.t1587.001
    - detection.emerging-threats
logsource:
    category: process_creation
    product: windows
detection:
    selection1:
        # Parent command line should not contain a space value
        # This avoids false positives not caused by process injection
        # e.g. wscript.exe /B sysmon-install.vbs
        ParentCommandLine|startswith:
            - 'C:\Windows\System32\'
            - 'C:\Windows\SysWOW64\'
        ParentCommandLine|endswith: '.exe'
    selection2:
        - CommandLine|contains|all:
              - '/c'
              - 'del'
              - 'C:\Users\'
              - '\AppData\Local\Temp\'
        - CommandLine|contains|all:
              - '/c'
              - 'del'
              - 'C:\Users\'
              - '\Desktop\'
        - CommandLine|contains|all:
              - '/C'
              - 'type nul >'
              - 'C:\Users\'
              - '\Desktop\'
    selection3:
        CommandLine|endswith: '.exe'
    condition: all of selection*
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

all of selection*

Stage 1: selection1

selection1:
    ParentCommandLine|startswith:
        - 'C:\Windows\System32\'
        - 'C:\Windows\SysWOW64\'
    ParentCommandLine|endswith: '.exe'

Stage 2: selection2

selection2:
    - CommandLine|contains|all:
          - '/c'
          - 'del'
          - 'C:\Users\'
          - '\AppData\Local\Temp\'
    - CommandLine|contains|all:
          - '/c'
          - 'del'
          - 'C:\Users\'
          - '\Desktop\'
    - CommandLine|contains|all:
          - '/C'
          - 'type nul >'
          - 'C:\Users\'
          - '\Desktop\'

Stage 3: selection3

selection3:
    CommandLine|endswith: '.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
CommandLineends_with
  • .exe corpus 6 (sigma 6)
CommandLinematch
  • /C corpus 15 (sigma 13, splunk 2)
  • /c corpus 15 (sigma 13, splunk 2)
  • C:\Users\ corpus 7 (sigma 7)
  • \AppData\Local\Temp\ corpus 26 (sigma 26)
  • \Desktop\ corpus 13 (sigma 13)
  • del corpus 3 (sigma 2, splunk 1)
  • type nul >
ParentCommandLineends_with
  • .exe corpus 2 (sigma 2)
ParentCommandLinestarts_with
  • C:\Windows\SysWOW64\
  • C:\Windows\System32\