Detection rules › Sigma

Potential Arbitrary Command Execution Via FTP.EXE

Status
test
Severity
medium
Log source
product windows, category process_creation
Author
Victor Sergeev, oscd.community
Source
github.com/SigmaHQ/sigma

Detects execution of "ftp.exe" script with the "-s" or "/s" flag and any child processes ran by "ftp.exe".

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: Potential Arbitrary Command Execution Via FTP.EXE
id: 06b401f4-107c-4ff9-947f-9ec1e7649f1e
status: test
description: Detects execution of "ftp.exe" script with the "-s" or "/s" flag and any child processes ran by "ftp.exe".
references:
    - https://lolbas-project.github.io/lolbas/Binaries/Ftp/
author: Victor Sergeev, oscd.community
date: 2020-10-09
modified: 2024-04-23
tags:
    - attack.execution
    - attack.stealth
    - attack.t1059
    - attack.t1202
logsource:
    category: process_creation
    product: windows
detection:
    selection_parent:
        ParentImage|endswith: '\ftp.exe'
    selection_child_img:
        - Image|endswith: '\ftp.exe'
        - OriginalFileName: 'ftp.exe'
    selection_child_cli:
        CommandLine|contains|windash: '-s:'
    condition: selection_parent or all of selection_child_*
falsepositives:
    - Unknown
level: medium

Stages and Predicates

Stage 0: condition

selection_parent or all of selection_child_*

Stage 1: selection_parent

selection_parent:
    ParentImage|endswith: '\ftp.exe'

Stage 2: selection_child_img

selection_child_img:
    - Image|endswith: '\ftp.exe'
    - OriginalFileName: 'ftp.exe'

Stage 3: selection_child_cli

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

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
  • -s: transforms: windash
Imageends_with
  • \ftp.exe corpus 2 (sigma 2)
OriginalFileNameeq
  • ftp.exe corpus 2 (sigma 2)
ParentImageends_with
  • \ftp.exe