Defending Against TeamPCP’s CanisterWorm: A Guide to Detecting and Mitigating Cloud-Native Wiper Attacks
By ⚡ min read
<h2 id="overview">Overview</h2>
<p>In late 2025, the cybercrime group TeamPCP launched a sophisticated wiper campaign targeting systems in Iran. Their tool, dubbed <strong>CanisterWorm</strong> by researchers, uses a blockchain-based command-and-control (C2) infrastructure—an Internet Computer Protocol (ICP) canister—to orchestrate attacks. The worm spreads through poorly secured cloud services like exposed Docker APIs, Kubernetes clusters, Redis servers, and exploits the React2Shell vulnerability. Once inside, it moves laterally, steals credentials, and ultimately wipes data on any machine that matches Iran’s time zone or has Farsi as the default language. This guide explains the attack chain, outlines prerequisites for understanding it, and provides step-by-step defensive measures. By following these recommendations, security teams can reduce their exposure to similar cloud-native threats.</p><figure style="margin:20px 0"><img src="https://krebsonsecurity.com/wp-content/uploads/2021/03/kos-27-03-2021.jpg" alt="Defending Against TeamPCP’s CanisterWorm: A Guide to Detecting and Mitigating Cloud-Native Wiper Attacks" style="width:100%;height:auto;border-radius:8px" loading="lazy"><figcaption style="font-size:12px;color:#666;margin-top:5px">Source: krebsonsecurity.com</figcaption></figure>
<h2 id="prerequisites">Prerequisites</h2>
<p>Before diving into the technical details, you should have:</p>
<ul>
<li>A solid understanding of cloud infrastructure (AWS, Azure, GCP) and common misconfigurations.</li>
<li>Familiarity with Docker, Kubernetes, and container orchestration.</li>
<li>Basic knowledge of network security, lateral movement, and credential theft.</li>
<li>Awareness of the <strong>React2Shell</strong> vulnerability (CVE-2023-22960) and its impact on Jenkins and related tools.</li>
<li>Experience with security monitoring tools like vulnerability scanners (Trivy, Wiz, Aikido).</li>
</ul>
<h2 id="step-by-step">Step-by-Step Defensive Guide</h2>
<h3 id="1-understand-the-attack-chain">1. Understand the Attack Chain</h3>
<p>TeamPCP’s CanisterWorm follows a multi-stage attack pattern:</p>
<ol>
<li><strong>Initial Compromise:</strong> The worm scans the internet for exposed Docker APIs, Kubernetes APIs, Redis servers without authentication, and targets the React2Shell vulnerability. Once found, it deploys itself and establishes a foothold.</li>
<li><strong>Lateral Movement:</strong> Using stolen credentials (obtained via keylogging, credential dumping, or from the ICP canister), the worm moves across the network, compromising additional cloud resources.</li>
<li><strong>Payload Delivery:</strong> The worm downloads the wiper component from the ICP canister only when the system’s time zone matches Iran (UTC+3:30) or the default language is Farsi. For Kubernetes clusters, it destroys data on all nodes; otherwise, it wipes the local machine.</li>
<li><strong>Exfiltration and Extortion:</strong> Before wiping data, TeamPCP may exfiltrate sensitive files and then demand payment via Telegram to avoid destruction—though the wiper runs regardless in targeting scenarios.</li>
</ol>
<h3 id="2-secure-exposed-cloud-services">2. Secure Exposed Cloud Services</h3>
<p>The worm exploits misconfigurations in Docker, Kubernetes, and Redis. Follow these hardening steps:</p>
<ul>
<li><strong>Docker API:</strong> Never expose the Docker daemon socket (unix:///var/run/docker.sock) over TCP without TLS. Use mutual authentication and restrict API access to trusted IPs.</li>
<li><strong>Kubernetes API:</strong> Enable RBAC, use network policies, and ensure the API server is not publicly accessible. Employ authenticated proxies or VPNs for remote management.</li>
<li><strong>Redis:</strong> Bind Redis to localhost or a private network; require authentication with a strong password and disable the <code>CONFIG SET</code> command if not needed.</li>
<li><strong>React2Shell:</strong> Patch Jenkins and related software immediately. Disable unnecessary plugins and use a web application firewall to block known exploit patterns.</li>
</ul>
<h3 id="3-monitor-for-anomalous-activity">3. Monitor for Anomalous Activity</h3>
<p>TeamPCP’s infrastructure relies on ICP canisters, which generate unique blockchain transactions. Look for:</p>
<ul>
<li>Unusual outbound connections to ICP nodes or canister endpoints (e.g., <code>ic0.app</code>).</li>
<li>Large numbers of failed authentication attempts on cloud consoles.</li>
<li>Unexpected Docker or Kubernetes API calls from public IP ranges.</li>
<li>Tools like <strong>Flare</strong> and <strong>Aikido</strong> can help detect the worm’s signatures—integrate them into your SIEM.</li>
</ul>
<h3 id="4-protect-against-supply-chain-attacks">4. Protect Against Supply Chain Attacks</h3>
<p>TeamPCP executed a supply chain attack on Trivy by injecting malicious code into GitHub Actions. To defend:</p><figure style="margin:20px 0"><img src="https://krebsonsecurity.com/wp-content/uploads/2026/03/aikido-iranwiper.png" alt="Defending Against TeamPCP’s CanisterWorm: A Guide to Detecting and Mitigating Cloud-Native Wiper Attacks" style="width:100%;height:auto;border-radius:8px" loading="lazy"><figcaption style="font-size:12px;color:#666;margin-top:5px">Source: krebsonsecurity.com</figcaption></figure>
<ul>
<li>Pin third-party actions and container images to specific versions and hashes.</li>
<li>Scan all pulled images using a trusted scanner before deployment.</li>
<li>Use GitHub’s secret scanning and Dependabot alerts to detect compromised dependencies.</li>
<li>Regularly audit your CI/CD pipeline for unauthorized changes.</li>
</ul>
<h3 id="5-implement-timezone-and-locale-monitoring">5. Implement Timezone and Locale Monitoring</h3>
<p>The wiper activates only when the system’s timezone is Iran (Asia/Tehran) or locale is Farsi. While you may not control all endpoints, you can:</p>
<ul>
<li>Deploy endpoint detection agents that flag processes reading timezone or locale settings and then performing destructive actions.</li>
<li>Use behavioral rules: if a process like <code>rm -rf</code> or <code>shred</code> is launched shortly after checking <code>/etc/timezone</code>, it’s suspicious.</li>
<li>Sandbox any application that attempts to enumerate locale information.</li>
</ul>
<h3 id="6-develop-incident-response-plans">6. Develop Incident Response Plans</h3>
<p>If you suspect a CanisterWorm infection:</p>
<ol>
<li>Isolate affected systems immediately to prevent lateral movement.</li>
<li>Disconnect cloud environments from the internet while preserving forensic evidence.</li>
<li>Take snapshots of compromised containers and volumes for analysis.</li>
<li>Rotate all credentials and revoke any tokens that may have been stolen.</li>
<li>Notify law enforcement and your security vendor (e.g., Aqua Security, Wiz, Aikido).</li>
</ol>
<h2 id="common-mistakes">Common Mistakes</h2>
<ul>
<li><strong>Leaving default credentials:</strong> Many compromised servers used default or weak passwords for Docker and Redis. Always change defaults.</li>
<li><strong>Ignoring cloud misconfiguration:</strong> Exposing APIs without authentication is a primary entry point. Regularly scan with tools like <strong>ScoutSuite</strong> or <strong>Prowler</strong>.</li>
<li><strong>Neglecting supply chain hygiene:</strong> The Trivy attack succeeded because organizations trusted unsigned releases. Verify all third-party software.</li>
<li><strong>Assuming wipers only target your region:</strong> Even if your org isn’t in Iran, the worm might still infect your environment and then lay dormant until conditions match. Monitor all endpoints.</li>
<li><strong>Relying solely on signature-based detection:</strong> CanisterWorm uses polymorphic payloads delivered via blockchain—behavioral analysis is essential.</li>
</ul>
<h2 id="summary">Summary</h2>
<p>The CanisterWorm campaign by TeamPCP shows how cybercriminals combine cloud misconfigurations, supply chain compromise, and blockchain-based C2 to deliver targeted wiper attacks. By hardening exposed services, monitoring for ICP canister activity, securing CI/CD pipelines, and implementing timezone-aware behavioral detection, organizations can drastically reduce the risk of such attacks. The key takeaway: automation and integration of well-known techniques amplify the damage—stay vigilant and patch proactively.</p>