đŻ 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 :
- Forger un commit signé (
b1e4b1f3) avec un message copiĂ© d’une PR lĂ©gitime - CrĂ©er le tag
v0.23.3pointant vers ce commit orphelin - Dispatcher le pipeline de publication lĂ©gitime via l’API GitHub
đŠ Artefacts compromis
- PyPI :
elementary-data==0.23.3uploadé le 24 avril 2026 à 22:20:47 UTC - GHCR :
ghcr.io/elementary-data/elementary:0.23.3et:latest(digestsha256: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 (
swabaget un Session ID)
Le collecteur final cible :
- đ IdentitĂ© : clĂ©s SSH privĂ©es,
~/.git-credentials, tokengh 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