Sensitive file read

Severity highLinuxSingle eventstablelinux.credential_access.sensitive_file_read · v1.0.0

What it detects

Access to a sensitive credential file — /etc/shadow, an SSH private key (id_rsa/id_ed25519), or cloud credentials (~/.aws/credentials) — a credential- access signal.

MITRE ATT&CK mapping

  • T1003.008OS Credential Dumping: /etc/passwd and /etc/shadow· Credential Access
  • T1552.001Unsecured Credentials: Credentials In Files· Credential Access

False positives and triage

Backup and config-management jobs read some of these. Confirm the reading process and user; a shell/interpreter reading /etc/shadow or an SSH key is suspicious.

The rule

Declarative YAML read by the detection engine — data, never executed. Confidence 70%. Source: rules/linux/sensitive_file_read.yaml, licensed under the Apache License 2.0.

id: linux.credential_access.sensitive_file_read
version: 1.0.0
status: stable
severity: high
confidence: 0.7
platforms: [linux]
mitre_techniques: [T1003.008, T1552.001]
description: |
  Access to a sensitive credential file — /etc/shadow, an SSH private key
  (id_rsa/id_ed25519), or cloud credentials (~/.aws/credentials) — a credential-
  access signal.
match:
  file_path_regex: '(?i)/etc/shadow$|/\.ssh/id_(rsa|ed25519|ecdsa|dsa)$|/\.aws/credentials$|/\.kube/config$'
false_positive_guidance: |
  Backup and config-management jobs read some of these. Confirm the reading
  process and user; a shell/interpreter reading /etc/shadow or an SSH key is
  suspicious.

Related detections

Run this rule on your own logs — offline

KIROSEC runs this rule and the rest of the library over Windows, Linux, macOS and cloud audit logs on the analyst's own machine. Every alert links to the events that raised it, and nothing leaves the device.

Browse all detections