← Lab /Security & privacy

Defend for Containers can surface a full TeamPCP ransomware attack chain inside containers

Elastic Defend for Containers (D4C) can detect every stage of the TeamPCP ransomware attack within container runtimes and, when combined with Attack Discovery, can automatically reconstruct the complete kill chain.

Security & privacy Elastic Security Labs 20 Mar 2026 Tooling Simulation evidence

Published as “Linux & Cloud Detection Engineering - TeamPCP Container Attack Scenario”

Why it matters

Demonstrates that container-runtime telemetry combined with AI-driven correlation can give defenders end-to-end visibility of multi-stage ransomware attacks.

Summary

The post walks through a realistic TeamPCP ransomware scenario, mapping each ATT&CK-aligned step to D4C telemetry and pre-built detection rules. It shows alerts for download-via-pipe, process killing, Kubernetes discovery, persistence attempts, runtime package installs, tunneling tools, encoded payload execution, miner deployment, and node-escape actions. The authors then feed the generated alerts into Elastic's Attack Discovery AI, which automatically correlates them into a coherent attack narrative. The evidence is based on a simulated attack that produced over 130 alerts, demonstrating that D4C can capture the relevant signals, though full visibility also requires Kubernetes audit logs.

What they found 2

  1. Download-and-pipe execution is detected even without a written file

    “This rule detects the download → interpreter execution pattern, even when no file is written to disk.”

  2. Privileged pod creation triggers multiple alerts for hostPath, hostNetwork, and hostPID usage

    “- Kubernetes Privileged Pod Created”

Caveats 3

  • The detection narrative is built from a simulated attack, not from real-world victim telemetry.
  • The authors note that not all package installations in containers are malicious, which can generate false positives.
  • While D4C provides deep runtime visibility inside containers, certain escalation steps, such as privileged workload creation or control-plane manipulation, require Kubernetes audit log telemetry for full visibility.

What’s new here 4

  • Detection rule for download-and-pipe execution (curl | bash) inside containers
  • Process-killing detection for pkill/kill commands used to remove competing miners
  • Kubernetes environment discovery and API abuse detection via service-account token reads
  • Persistence detection covering systemd unit files, cron jobs, and sudoers modifications from a container context