Detection rules › Sigma

Suspicious Commands Linux

Status
test
Severity
medium
Log source
product linux, service auditd
Author
Florian Roth (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects relevant commands often related to malware or hacking activity

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Suspicious Commands Linux
id: 1543ae20-cbdf-4ec1-8d12-7664d667a825
status: test
description: Detects relevant commands often related to malware or hacking activity
references:
    - Internal Research - mostly derived from exploit code including code in MSF
author: Florian Roth (Nextron Systems)
date: 2017-12-12
modified: 2022-10-05
tags:
    - attack.execution
    - attack.t1059.004
logsource:
    product: linux
    service: auditd
detection:
    cmd1:
        type: 'EXECVE'
        a0: 'chmod'
        a1: 777
    cmd2:
        type: 'EXECVE'
        a0: 'chmod'
        a1: 'u+s'
    cmd3:
        type: 'EXECVE'
        a0: 'cp'
        a1: '/bin/ksh'
    cmd4:
        type: 'EXECVE'
        a0: 'cp'
        a1: '/bin/sh'
    condition: 1 of cmd*
falsepositives:
    - Admin activity
level: medium

Stages and Predicates

Stage 0: condition

1 of cmd*

Stage 1: cmd1

cmd1:
    type: 'EXECVE'
    a0: 'chmod'
    a1: 777

Stage 2: cmd2

cmd2:
    type: 'EXECVE'
    a0: 'chmod'
    a1: 'u+s'

Stage 3: cmd3

cmd3:
    type: 'EXECVE'
    a0: 'cp'
    a1: '/bin/ksh'

Stage 4: cmd4

cmd4:
    type: 'EXECVE'
    a0: 'cp'
    a1: '/bin/sh'

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
a0eq
  • chmod
  • cp
a1eq
  • /bin/ksh
  • /bin/sh
  • 777
  • u+s
typeeq
  • EXECVE