Detection rules › Sigma

Binary Padding - Linux

Status
test
Severity
high
Log source
product linux, service auditd
Author
Igor Fits, oscd.community
Source
github.com/SigmaHQ/sigma

Adversaries may use binary padding to add junk data and change the on-disk representation of malware. This rule detect using dd and truncate to add a junk data to file.

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Binary Padding - Linux
id: c52a914f-3d8b-4b2a-bb75-b3991e75f8ba
status: test
description: |
    Adversaries may use binary padding to add junk data and change the on-disk representation of malware.
    This rule detect using dd and truncate to add a junk data to file.
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1027.001/T1027.001.md
author: Igor Fits, oscd.community
date: 2020-10-13
modified: 2023-05-03
tags:
    - attack.stealth
    - attack.t1027.001
logsource:
    product: linux
    service: auditd
detection:
    selection_execve:
        type: 'EXECVE'
    keywords_truncate:
        '|all':
            - 'truncate'
            - '-s'
    keywords_dd:
        '|all':
            - 'dd'
            - 'if='
    keywords_filter:
        - 'of='
    condition: selection_execve and (keywords_truncate or (keywords_dd and not keywords_filter))
falsepositives:
    - Unknown
level: high
simulation:
    - type: atomic-red-team
      name: Pad Binary to Change Hash - Linux/macOS dd
      technique: T1027.001
      atomic_guid: ffe2346c-abd5-4b45-a713-bf5f1ebd573a

Stages and Predicates

Stage 0: condition

selection_execve and (keywords_truncate or (keywords_dd and not keywords_filter))

Stage 1: selection_execve

selection_execve:
    type: 'EXECVE'

Stage 2: keywords_truncate

keywords_truncate:
    '|all':
        - 'truncate'
        - '-s'

Stage 3: keywords_dd

keywords_dd:
    '|all':
        - 'dd'
        - 'if='

Stage 4: not keywords_filter

keywords_filter:
    - 'of='

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
typeeq
  • EXECVE