T1003.008 CrowdStrike LogScale · LogScale

Detect /etc/passwd and /etc/shadow in CrowdStrike LogScale

Adversaries read /etc/passwd and /etc/shadow on Linux and Unix systems to extract password hashes for offline cracking. /etc/passwd contains usernames and user information (world-readable), while /etc/shadow contains the actual password hashes (root-readable only). Together they can be combined with `unshadow` and cracked with John the Ripper or Hashcat. Tools include LaZagne (shadow.py module), direct cat commands, and Python one-liners. Also includes reading from backup copies (/etc/shadow-, /etc/shadow.bak) and cloud instance metadata for default credentials. Used by multiple threat actors as a standard post-exploitation step on Linux systems.

MITRE ATT&CK

Tactic
Credential Access
Technique
T1003 OS Credential Dumping
Sub-technique
T1003.008 /etc/passwd and /etc/shadow
Canonical reference
https://attack.mitre.org/techniques/T1003/008/

LogScale Detection Query

CrowdStrike LogScale (LogScale)
cql
// Shadow file access and credential cracking tool detection — T1003.008
#repo=base_sensor
(
  (
    #event_simpleName = "ProcessRollup2"
    | CommandLine = /\/etc\/(shadow|shadow-|shadow\.bak|master\.passwd|security\/passwd)/
    | ImageFileName != /\/(usr\/)?(s?bin|sbin)\/(passwd|chpasswd|useradd|usermod|chage|login|newusers)$/
  )
  or
  (
    #event_simpleName = "ProcessRollup2"
    | CommandLine = /unshadow|lazagne.*(shadow|linux|all)|(john|hashcat).*shadow/i
  )
  or
  (
    #event_simpleName = "ProcessRollup2"
    | CommandLine = /\/etc\/shadow/ AND CommandLine = /\/etc\/passwd/
  )
)
| case {
    CommandLine = /unshadow|lazagne|john|hashcat/i | risk_level := "CRITICAL" ;
    CommandLine = /python[0-9.]?|perl|ruby/ AND CommandLine = /\/etc\/shadow/ | risk_level := "HIGH" ;
    * | risk_level := "MEDIUM"
  }
| groupBy(
    [ComputerName, UserName, FileName, CommandLine, risk_level],
    function=[
      count(aid, as=event_count),
      min(@timestamp, as=first_seen),
      max(@timestamp, as=last_seen)
    ]
  )
| sort(last_seen, order=desc)
high severity high confidence

CrowdStrike LogScale (Falcon) detection for unauthorized /etc/shadow access and password cracking tool execution on Linux endpoints. Queries ProcessRollup2 events from the Falcon sensor base repository for command lines accessing shadow credential files or invoking unshadow, john, hashcat, or lazagne. Results are risk-tiered and grouped by host/user/command for analyst triage.

Data Sources

CrowdStrike Falcon Endpoint Protection (Linux sensor)CrowdStrike Falcon LogScale (Humio) base_sensor repositoryFalcon ProcessRollup2 events

Required Tables

#repo=base_sensor (ProcessRollup2 events)

False Positives & Tuning

  • Legitimate privileged automation using Python or shell scripts to manage Linux users in CI/CD pipelines — Falcon agents on build servers may generate high-volume hits requiring suppression by ComputerName tag
  • CrowdStrike RTR (Real Time Response) sessions where analysts run cat /etc/shadow for live forensic triage — these appear as ProcessRollup2 events with Falcon's own RTR process ancestry and can be distinguished by ParentImageFileName
  • Custom PAM modules compiled with debug logging that fork child processes reading /etc/shadow during authentication testing in QA environments
  • Docker or Podman container build steps on monitored Linux hosts where Dockerfile RUN layers copy or transform /etc/shadow for hardened base image construction
Download portable Sigma rule (.yml)

Other platforms for T1003.008


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Direct /etc/shadow Read with cat

    Expected signal: Auditd file watch event (type=SYSCALL, syscall=openat) for /etc/shadow with exe=/bin/cat. DeviceFileEvents (if MDE Linux agent) for /etc/shadow read by cat. Process creation event for cat command with /etc/shadow argument.

  2. Test 2Unshadow and Password Hash Preparation

    Expected signal: Auditd SYSCALL events for openat on both /etc/passwd and /etc/shadow with exe=/usr/bin/unshadow. File creation event for /tmp/atomic_hashes.txt. DeviceProcessEvents for unshadow execution. DeviceFileEvents for shadow and passwd access.

  3. Test 3LaZagne Linux Shadow Module

    Expected signal: DeviceNetworkEvents for GitHub download connection. DeviceProcessEvents for lazagne execution with 'linux -shadow' arguments. Auditd openat events for /etc/shadow with exe=/tmp/lazagne. DeviceFileEvents for /etc/shadow access.

Unlock Pro Content

Get the full detection package for T1003.008 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections