_research / zichatbot-malware-pypi-packages-zulip-api-attack
RESEARCH ANALYSIS 7 min read

ZiChatBot Uncovered: How Three PyPI Packages Weaponized Zulip APIs to Silently Compromise Windows and Linux Systems

Three trojanized PyPI packages delivered the novel ZiChatBot malware using Zulip APIs as covert C2 channels, targeting both Windows and Linux systems simultaneously.

2026-05-07 · Source: The Hacker News
🔬
RESEARCH ANALYSIS

This analysis is based on research published by The Hacker News. CypherByte adds analysis, context, and security team recommendations.

Original research credit: Kaspersky, as reported by The Hacker News. CypherByte analysis and perspective are independent and additive to the source findings.

Executive Summary

Cybersecurity researchers at Kaspersky have identified three malicious packages hosted on the Python Package Index (PyPI) that serve as trojanized delivery vehicles for a previously undocumented malware family designated ZiChatBot. What distinguishes this campaign from the steady drumbeat of supply chain attacks is the dual-platform targeting — simultaneous compromise of both Windows and Linux endpoints — combined with the abuse of the legitimate Zulip messaging API as a covert command-and-control (C2) channel. The packages presented functional, described features on their PyPI landing pages, a deliberate deception designed to lower the guard of developers who perform even cursory due diligence before installing a dependency.

Security teams embedded in software development organizations, DevSecOps practitioners, and anyone responsible for managing open-source dependency pipelines should treat this disclosure as an urgent operational signal. The threat actor behind ZiChatBot has demonstrated a sophisticated understanding of developer trust models and modern collaboration tooling — two vectors that traditional endpoint and perimeter defenses are poorly calibrated to intercept. The consequences of a successful infection extend beyond the individual developer workstation; in CI/CD-integrated environments, a single compromised package can propagate malware laterally across build infrastructure, staging environments, and ultimately into production artefacts.

Technical Analysis

The three malicious packages were distributed as wheel files (.whl), a prebuilt distribution format natively supported by pip. Wheel packages bypass the setup.py execution step that many security scanners flag as a high-risk trigger, making them a structurally advantaged delivery mechanism compared to source distributions. Each package's PyPI description accurately advertised utility functionality — a common technique observed in advanced supply chain campaigns where the attacker invests effort in legitimacy to survive automated and manual review.

Key Finding: The use of .whl (wheel) format deliberately sidesteps setup.py-based execution hooks that many static analysis pipelines and PyPI scanning tools treat as their primary malicious trigger point. This represents a deliberate evasion of first-generation supply chain defenses.

Upon installation, the packages execute a cross-platform payload dropper that identifies the host operating system and delivers the appropriate ZiChatBot binary — a PE executable on Windows and a compatible binary on Linux. The malware's post-installation execution is embedded within the package's __init__.py or equivalent entry-point module, ensuring the malicious code runs the moment any component of the package is imported by a developer or an automated build process.

The most technically noteworthy architectural decision in ZiChatBot is its use of the Zulip messaging platform API as its command-and-control backbone. Rather than connecting to attacker-controlled infrastructure that would generate anomalous DNS queries or trigger IP reputation blocklists, the malware authenticates to Zulip using hardcoded or dynamically retrieved API credentials and uses legitimate Zulip streams as bidirectional communication channels. This technique — broadly categorized as Living off Trusted Sites (LoTS) — means that outbound traffic to zulip.com or a self-hosted Zulip instance appears indistinguishable from legitimate team communication software activity to most network monitoring tools.

Technique Spotlight — Living off Trusted Sites (LoTS): By routing C2 through Zulip's API, ZiChatBot's operator receives exfiltrated data and issues commands over HTTPS connections to a domain with strong reputation scores. Standard proxy filtering, firewall allowlisting, and even many DLP solutions will pass this traffic without inspection.

The ZiChatBot payload itself exhibits characteristics consistent with a modular remote access trojan (RAT) framework. While the full capability set disclosed at time of writing encompasses file system enumeration, credential harvesting from common developer tools (including stored tokens, SSH keys, and environment variables), and remote command execution, the modular architecture suggests additional capabilities can be pushed to compromised hosts post-infection without redeployment of the core implant.

Impact Assessment

Affected Systems: Any Windows or Linux endpoint that installs one of the three identified malicious PyPI packages is considered potentially compromised. Given that Python environments are ubiquitous across software development, data science, machine learning infrastructure, and DevOps toolchains, the potential victim pool is exceptionally broad. macOS exposure has not been confirmed in current disclosures but should not be presumed absent given the cross-platform intent evidenced in the campaign design.

Supply Chain Blast Radius: The most severe real-world consequence materializes in organizations where developers' local environments are trusted nodes within a broader CI/CD pipeline. A developer machine infected via a malicious PyPI package can expose repository credentials (GITHUB_TOKEN, AWS_ACCESS_KEY_ID, and similar environment variables are explicitly targeted), SSH keys used for deployment, and secrets stored in .env files or local credential managers. In containerized build environments where the same requirements.txt or pyproject.toml is applied across multiple runners, the infection can achieve horizontal scale without any additional attacker action.

Detection Latency Risk: Because ZiChatBot's C2 traffic mimics legitimate SaaS communication, organizations relying solely on network-layer detection will face significant mean-time-to-detect (MTTD) disadvantages. The functional legitimacy of the packages further delays behavioral detection — the malware performs its advertised task while simultaneously operating as an implant, reducing the likelihood that a developer notices anomalous behavior and raises an alert.

CypherByte's Perspective

ZiChatBot is not an isolated anomaly — it is a confirmation of a maturing threat category. The software supply chain has become the highest-leverage attack surface available to adversaries targeting technology organizations, and the PyPI ecosystem, despite meaningful improvements in scanning and reporting infrastructure, remains structurally exploitable. What this campaign adds to the threat landscape narrative is the deliberate combination of three compounding evasion layers: wheel format abuse to sidestep execution hook detection, functional package legitimacy to defeat human review, and LoTS C2 to blind network defenders. No single layer is novel in isolation; the assembly of all three into a coherent operational package represents a meaningful step in attacker sophistication.

The Zulip API abuse also carries a broader implication for the security community's posture toward SaaS communication platforms as attack infrastructure. We have observed similar techniques leveraging Slack webhooks, Discord bots, Telegram APIs, and Microsoft Teams connectors in previous campaigns. ZiChatBot's use of Zulip specifically suggests threat actors are deliberately rotating across less-scrutinized platforms as defenders build detection logic against the more commonly abused services. Security teams should anticipate this rotation pattern and develop platform-agnostic behavioral detection rather than maintaining per-platform blocklists.

Indicators and Detection

The following indicators and behavioral signatures should be operationalized in detection engineering pipelines. Note that specific package names should be confirmed against the Kaspersky and PyPI security advisories and treated as known-bad for immediate retrospective log review:

Behavioral Indicators of Compromise (BIOCs):

• Python processes spawning child processes that initiate outbound HTTPS connections to zulip.com or Zulip-hosted API endpoints immediately post-import

• pip install events followed within seconds by network connections to messaging platform APIs (Zulip, Slack, Discord, Telegram) — particularly from CI runners or headless build environments

• Enumeration of ~/.ssh/, ~/.aws/credentials, .env files, or browser credential stores by a Python interpreter process

• Wheel package installations from PyPI packages with recent publication dates, low download counts, and no verifiable organizational ownership

• Presence of unexpected binaries in %TEMP% (Windows) or /tmp/ (Linux) directories created by a Python package installation process

Network Detection: Implement TLS inspection on endpoints where policy permits and create detection rules for Python interpreter processes (python.exe, python3) initiating direct API calls to communication platforms. Legitimate developer tooling rarely requires the Python runtime itself — as opposed to a developer-facing application built in Python — to communicate with messaging APIs during package installation phases.

Recommendations for Security Teams

1. Audit Installed PyPI Packages Immediately. Cross-reference all Python environments — developer workstations, CI/CD runners, containerized build environments, and production systems — against the three identified malicious package names disclosed by Kaspersky. Treat any match as a confirmed incident requiring full IR response, not merely package removal.

2. Implement Private Package Mirrors and Allowlisting. Organizations with mature software supply chain postures should route all pip installations through a controlled private mirror (Artifactory, AWS CodeArtifact, or equivalent) with an explicit allowlist of approved packages. New packages should require a review workflow before promotion to the approved mirror.

3. Deploy Dependency Scanning with Behavioral Analysis. Static name-and-version scanning is insufficient against this threat class. Integrate tools capable of sandboxed behavioral execution of packages during CI pipeline stages — solutions such as pip-audit, Phylum, or Socket.dev provide varying degrees of behavioral and reputation analysis beyond hash matching.

4. Apply Least-Privilege Principles to Build Environments. CI/CD runners and developer environments should operate with the minimum credential scope required. Avoid storing long-lived cloud provider credentials, SSH private keys, or repository tokens in environment variables accessible to arbitrary Python processes. Use short-lived OIDC-based credentials where the cloud provider supports them.

5. Develop Platform-Agnostic C2-over-SaaS Detection. Update SIEM detection rules to flag any process that is not an explicitly approved application initiating API connections to collaboration and messaging platforms. The specific platform is less important than the behavioral pattern — this class of LoTS C2 abuse will continue to rotate across services.

6. Educate Development Teams on Supply Chain Hygiene. Functional legitimacy — the fact that a package appears to work as described — is no longer a reliable trust signal. Developers should be briefed on this specific campaign as a case study and encouraged to apply skepticism to recently published, low-provenance packages regardless of described functionality.

This analysis is based on research originally reported by The Hacker News, citing findings by Kaspersky. CypherByte's technical assessment and recommendations represent independent analytical work built upon those disclosed findings. Organizations are encouraged to consult the primary Kaspersky research publication for full technical indicators of compromise.

// TOPICS
#research#analysis

How this article was produced

This analysis was produced by CypherByte's automated research pipeline, starting from the published summary of the original report credited below. Articles are published automatically. It can include context and recommendations that are not in the original report, so read the original for the researchers' own findings.

Sources

Spotted an error? Tell us on X (@cypherbyteio) with this page's address so we can fix it.

// WANT MORE LIKE THIS?

CypherByte Premium is coming soon, with deep-dive writeups and a weekly threat briefing. Join the waitlist for founding member pricing.