Modification of OpenSSH Binaries

edit

Adversaries may modify SSH related binaries for persistence or credential access by patching sensitive functions to enable unauthorized access or by logging SSH credentials for exfiltration.

Rule type: query

Rule indices:

  • auditbeat-*
  • logs-endpoint.events.*

Severity: medium

Risk score: 47

Runs every: 5 minutes

Searches indices from: now-9m (Date Math format, see also Additional look-back time)

Maximum alerts per execution: 100

References:

Tags:

  • Elastic
  • Host
  • Linux
  • Threat Detection
  • Credential Access
  • Persistence

Version: 100 (version history)

Added (Elastic Stack release): 7.12.0

Last modified (Elastic Stack release): 8.5.0

Rule authors: Elastic

Rule license: Elastic License v2

Potential false positives

edit

Trusted OpenSSH executable updates. It’s recommended to verify the integrity of OpenSSH binary changes.

Rule query

edit
event.category:file and event.type:change and process.name:* and
(file.path:(/usr/sbin/sshd or /usr/bin/ssh or /usr/bin/sftp or
/usr/bin/scp) or file.name:libkeyutils.so) and not
process.name:("dpkg" or "yum" or "dnf" or "dnf-automatic")

Threat mapping

edit

Framework: MITRE ATT&CKTM

Rule version history

edit
Version 100 (8.5.0 release)
  • Formatting only
Version 3 (8.4.0 release)
  • Updated query, changed from:

    event.category:file and event.type:change and process.name:* and
    (file.path:(/usr/sbin/sshd or /usr/bin/ssh or /usr/bin/sftp or
    /usr/bin/scp) or file.name:libkeyutils.so) and not
    process.executable:/usr/bin/dpkg