🎯 Contexte

L’article est publiĂ© le 25 avril 2026 par StepSecurity, sociĂ©tĂ© spĂ©cialisĂ©e en sĂ©curitĂ© de la chaĂźne d’approvisionnement logicielle. Il documente la compromission du package Python elementary-data (outil de data observability pour dbt) via une attaque de supply chain ciblant l’infrastructure CI/CD du projet.

🔓 Vecteur d’attaque : injection de script GitHub Actions

L’attaquant, opĂ©rant depuis le compte GitHub realtungtungtungsahur (créé le 22 avril 2026), a exploitĂ© une vulnĂ©rabilitĂ© d’injection de script dans le workflow .github/workflows/update_pylon_issue.yml. Ce workflow interpolait directement ${{ github.event.comment.body }} dans un bloc run:, permettant l’exĂ©cution de code arbitraire via un simple commentaire sur la PR #2147.

Le payload injecté a exécuté un stager curl | bash depuis https://litter.catbox.moe/iqesmbhukgd2c7hq.sh, exploitant le GITHUB_TOKEN du workflow pour :

  1. Forger un commit signĂ© (b1e4b1f3) avec un message copiĂ© d’une PR lĂ©gitime
  2. Créer le tag v0.23.3 pointant vers ce commit orphelin
  3. Dispatcher le pipeline de publication lĂ©gitime via l’API GitHub

📩 Artefacts compromis

  • PyPI : elementary-data==0.23.3 uploadĂ© le 24 avril 2026 Ă  22:20:47 UTC
  • GHCR : ghcr.io/elementary-data/elementary:0.23.3 et :latest (digest sha256:31ecc5939de6d24cf60c50d4ca26cf7a8c322db82a8ce4bd122ebd89cf634255), multi-arch linux/amd64 + linux/arm64

La modification malveillante consiste en l’ajout d’un fichier elementary.pth (~245 Ko de base64) Ă  la racine du package. Python exĂ©cute automatiquement les fichiers .pth au dĂ©marrage de l’interprĂ©teur, garantissant l’exĂ©cution du payload sur toute invocation Python dans l’environnement infectĂ©.

🩠 Payload : stealer en trois Ă©tapes

Le payload utilise trois couches d’obfuscation :

  • Étape 1 : dĂ©codage base64
  • Étapes 2 et 3 : chiffrement XOR avec keystream MD5, deux seeds hardcodĂ©es (swabag et un Session ID)

Le collecteur final cible :

  • 🔑 IdentitĂ© : clĂ©s SSH privĂ©es, ~/.git-credentials, token gh auth
  • ☁ Cloud : credentials AWS + appel IMDSv2 + Secrets Manager/SSM via SigV4 ; GCP application_default_credentials.json ; Azure ~/.azure
  • 🐳 Conteneurs/orchestration : ~/.docker/config.json, ~/.kube/config, tokens ServiceAccount, secrets Kubernetes
  • 📄 Secrets au repos : fichiers .env*, .npmrc, .pypirc, .cargo/credentials.toml, .vault-token, .netrc, .pgpass, .my.cnf
  • 💰 Wallets crypto : Bitcoin, Litecoin, Dogecoin, Zcash, Dash, Monero, Ripple, Ethereum, Cardano, Solana
  • đŸ–„ïž SystĂšme : /etc/passwd, /etc/shadow, historiques shell, /var/log/auth.log

Les données collectées sont archivées en trin.tar.gz et exfiltrées via curl --data-binary vers le C2 igotnofriendsonlineorirl-imgonnakmslmao.skyhanni.cloud avec le header X-Rise-To-The-Trinny: agree.

🔁 RemĂ©diation

SignalĂ© par crisperik le 25 avril 2026 Ă  06:18 UTC (issue #2205), confirmĂ© par H-Max. L’Ă©quipe Elementary a retirĂ© la version 0.23.3 de PyPI et GHCR et publiĂ© une version propre 0.23.4 le mĂȘme jour.

📋 Type d’article

Il s’agit d’un rapport d’incident technique dĂ©taillĂ© produit par StepSecurity, visant Ă  documenter l’attaque, fournir les IoCs et prĂ©senter les capacitĂ©s de dĂ©tection de la plateforme Harden-Runner.

🧠 TTPs et IOCs dĂ©tectĂ©s

TTP

  • T1195.001 — Supply Chain Compromise: Compromise Software Dependencies and Development Tools (Initial Access)
  • T1059.004 — Command and Scripting Interpreter: Unix Shell (Execution)
  • T1027 — Obfuscated Files or Information (Defense Evasion)
  • T1552.001 — Unsecured Credentials: Credentials In Files (Credential Access)
  • T1552.005 — Unsecured Credentials: Cloud Instance Metadata API (Credential Access)
  • T1041 — Exfiltration Over C2 Channel (Exfiltration)
  • T1608.001 — Stage Capabilities: Upload Malware (Resource Development)
  • T1078 — Valid Accounts (Defense Evasion)
  • T1087 — Account Discovery (Discovery)
  • T1530 — Data from Cloud Storage (Collection)

IOC

  • Domaines : igotnofriendsonlineorirl-imgonnakmslmao.skyhanni.cloud — VT · URLhaus · ThreatFox
  • URLs : https://litter.catbox.moe/iqesmbhukgd2c7hq.sh — URLhaus
  • URLs : https://igotnofriendsonlineorirl-imgonnakmslmao.skyhanni.cloud/ — URLhaus
  • SHA256 : 31ecc5939de6d24cf60c50d4ca26cf7a8c322db82a8ce4bd122ebd89cf634255 — VT · MalwareBazaar
  • SHA256 : b3bbfafde1a0db3a4d47e70eb0eb2ca19daef4a19410154a71abee567b35d3d9 — VT · MalwareBazaar
  • Fichiers : elementary.pth
  • Fichiers : trin.tar.gz
  • Chemins : $TMPDIR/.trinny-security-update

Malware / Outils

  • elementary.pth credential stealer (stealer)

🟡 Indice de vĂ©rification factuelle : 63/100 (moyenne)

  • ⬜ stepsecurity.io — source non rĂ©fĂ©rencĂ©e (0pts)
  • ✅ 16468 chars — texte complet (fulltext extrait) (15pts)
  • ✅ 8 IOCs dont des hashes (15pts)
  • ✅ 1/5 IOC(s) confirmĂ©(s) (MalwareBazaar, ThreatFox, URLhaus, VirusTotal) (8pts)
  • ✅ 10 TTPs MITRE identifiĂ©es (15pts)
  • ✅ date extraite du HTML source (10pts)
  • ⬜ aucun acteur de menace nommĂ© (0pts)
  • ⬜ pas de CVE Ă  vĂ©rifier (0pts)

IOCs confirmés externellement :

  • igotnofriendsonlineorirl-imgonnakmslmao.skyhanni.cloud (domain) → VT (7/94 dĂ©tections) + ThreatFox (Unknown malware)

🔗 Source originale : https://www.stepsecurity.io/blog/elementary-data-compromised-on-pypi-and-ghcr-forged-release-pushed-via-github-actions-script-injection