T1558.005 CrowdStrike LogScale · LogScale

Detect Ccache Files in CrowdStrike LogScale

Adversaries may attempt to steal Kerberos tickets stored in credential cache (ccache) files. These files store short-lived Kerberos session credentials created at authentication, enabling access to network services without re-entering passwords. On Linux, ccache files are typically located in /tmp with names in the format krb5cc_<UID> or krb5.ccache; storage is governed by the KRB5CCNAME environment variable and /etc/krb5.conf. On macOS, ccache entries are held in memory under an API:{uuid} naming scheme, accessible via lower-level Kerberos framework APIs. Adversaries steal these files and replay tickets to authenticate as the victim without knowing their password (Pass the Ticket). Impacket tools including getST.py, getTGT.py, and ticketer.py are commonly used to programmatically interact with ccache files. Kekeo can convert ccache files to Windows kirbi format for reuse on Windows systems, enabling cross-platform lateral movement. Real-world usage includes APT groups operating in Active Directory environments with Linux-integrated systems.

MITRE ATT&CK

Tactic
Credential Access
Technique
T1558 Steal or Forge Kerberos Tickets
Sub-technique
T1558.005 Ccache Files
Canonical reference
https://attack.mitre.org/techniques/T1558/005/

LogScale Detection Query

CrowdStrike LogScale (LogScale)
cql
// T1558.005 — Ccache File Theft Detection
// Branch 1: Impacket Kerberos tools executed
#event_simpleName=ProcessRollup2
| CommandLine = /getST\.py|getTGT\.py|ticketer\.py|getNTHash\.py|rbcd\.py|getServiceTicket\.py|getPac\.py|getUserSPNs\.py/
| groupBy([ComputerName, UserName, FileName, CommandLine, ParentBaseFileName],
    function=[
      count(aid, as=event_count),
      min(ContextTimeStamp, as=first_seen),
      max(ContextTimeStamp, as=last_seen)
    ])
| eval detection_type="ImpacketKerberosTool"

// Branch 2: Python scripts referencing ccache credential data
| union [
  #event_simpleName=ProcessRollup2
  | FileName = /python[23]?$/
  | CommandLine = /CCache|krb5cc_[0-9]+|KRB5CCNAME|\.ccache/
  | groupBy([ComputerName, UserName, FileName, CommandLine, ParentBaseFileName],
      function=[
        count(aid, as=event_count),
        min(ContextTimeStamp, as=first_seen),
        max(ContextTimeStamp, as=last_seen)
      ])
  | eval detection_type="PythonKerberosInteraction"
]

// Branch 3: Shell/exfil utilities referencing ccache file paths
| union [
  #event_simpleName=ProcessRollup2
  | FileName = /^(cp|mv|cat|base64|xxd|tar|scp|rsync|nc|ncat|curl|wget|dd)$/
  | CommandLine = /krb5cc_[0-9]+|krb5\.ccache/
  | groupBy([ComputerName, UserName, FileName, CommandLine, ParentBaseFileName],
      function=[
        count(aid, as=event_count),
        min(ContextTimeStamp, as=first_seen),
        max(ContextTimeStamp, as=last_seen)
      ])
  | eval detection_type="CcacheFileCopyOrExfiltration"
]

// Branch 4: File writes or reads on ccache paths
| union [
  #event_simpleName IN (FileOpenInfo, FileWrittenInfo, NewExecutableWritten)
  | TargetFileName = /\/tmp\/krb5cc_[0-9]+|\/krb5\.ccache|\/krb5\/.*\.ccache/
  | ContextProcessName != /kinit|klist|kdestroy|sssd|krb5kdc|kadmind|sshd|login|sudo/
  | groupBy([ComputerName, UserName, ContextProcessName, TargetFileName],
      function=[
        count(aid, as=event_count),
        min(ContextTimeStamp, as=first_seen),
        max(ContextTimeStamp, as=last_seen)
      ])
  | eval detection_type="UnexpectedCcacheFileAccess"
]

| sort(last_seen, order=desc)
high severity high confidence

CrowdStrike LogScale (Falcon) query detecting Kerberos ccache file theft across four branches: Impacket Kerberos tool execution (getST.py, getTGT.py, ticketer.py etc.), Python scripts interacting with ccache credential data, shell utilities staging or exfiltrating ccache files, and file system events on ccache paths from non-Kerberos processes. Groups results by host, user, and process for analyst triage.

Data Sources

CrowdStrike Falcon Endpoint ProtectionFalcon ProcessRollup2 eventsFalcon FileOpenInfo / FileWrittenInfo events

Required Tables

ProcessRollup2FileOpenInfoFileWrittenInfoNewExecutableWritten

False Positives & Tuning

  • Red team or pentest tooling on authorized assessment hosts — Impacket is widely used by both attackers and defenders
  • DevOps automation scripts using Python with Kerberos authentication to access Hadoop, Kafka, or other Kerberized data infrastructure
  • System backup jobs (rsync, tar) that archive /tmp including ccache files as part of full filesystem snapshots before maintenance windows
Download portable Sigma rule (.yml)

Other platforms for T1558.005


Testing Methodology

Validate this detection against 4 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 1Discover and Copy Ccache File

    Expected signal: DeviceProcessEvents: process creation for find (/tmp/krb5cc_*), klist (-c /tmp/krb5cc_<uid>), and cp. DeviceFileEvents: FileCreated for /tmp/.svc_cache_bak with InitiatingProcessFileName=cp. Auditd (linux_audit): SYSCALL records for open/read on /tmp/krb5cc_<uid> with exe=/bin/cp, plus PATH records for both source and destination files. key=kerberos_ccache if auditd watch is configured.

  2. Test 2Base64 Encode Ccache for Exfiltration

    Expected signal: DeviceProcessEvents: process creation for base64 with ProcessCommandLine containing 'krb5cc_<uid>' and xxd with the same path. Auditd (linux_audit): SYSCALL open/read records on /tmp/krb5cc_<uid> with exe=/usr/bin/base64 and exe=/usr/bin/xxd. These processes will appear in linux_audit events alongside EXECVE records showing the full command.

  3. Test 3Use Impacket Python Library to Read Ccache Tickets

    Expected signal: DeviceProcessEvents: python3 process creation with ProcessCommandLine containing 'CCache', 'ccache', 'krb5cc_'. DeviceFileEvents: FileRead event on /tmp/krb5cc_<uid> with InitiatingProcessFileName=python3. Auditd (linux_audit): SYSCALL open record with exe=/usr/bin/python3 on the ccache path. EXECVE record showing full python3 -c invocation with ccache string patterns.

  4. Test 4Set KRB5CCNAME to Stolen Ticket and Authenticate

    Expected signal: DeviceProcessEvents: cp process with /tmp/krb5cc_<uid> in command line, klist process with -c /tmp/attacker_krb5cc argument. DeviceFileEvents: FileCreated for /tmp/attacker_krb5cc with InitiatingProcessFileName=cp. Auditd (linux_audit): SYSCALL records for cp (open/read on source, open/write/creat on destination) and klist (open/read on /tmp/attacker_krb5cc). The unusual ccache path /tmp/attacker_krb5cc is a behavioral anomaly.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections