🔍 Contexte
L’Ontinue Cyber Defense Center a publié le 18 août 2026 l’analyse technique d’un implant Python inédit, baptisé TWINLOOT, découvert lors d’une investigation active en juillet 2026. L’article constitue une publication de recherche approfondie avec extraction complète des modules, configuration C2 et indicateurs d’infrastructure.
🎯 Vecteur d’accès initial
L’accès initial a été obtenu via ingénierie sociale sur Microsoft Teams : un acteur externe se faisant passer pour le support IT a convaincu un utilisateur d’exécuter une commande PowerShell téléchargeant une archive contenant un runtime Python 3.12.9 embarqué et un payload compilé de 39 Mo (bootstrap-fat.pyc).
🏗️ Architecture C2 : entièrement dans le périmètre Microsoft
TWINLOOT opère deux canaux parallèles :
- Canal de tasking (SharePoint dead-drop) : l’implant s’authentifie sur le tenant Azure de l’attaquant et interroge un drive SharePoint toutes les 15 secondes via la Microsoft Graph API. Le trafic transite vers
login.microsoftonline.com,graph.microsoft.cometkerteransens.sharepoint.com. - Canal interactif (reverse SOCKS5) : tunnel sur TLS/WebSocket direct (
sharepointx.th2ch.com:443) ou via les relais TURN de Microsoft Teams (turns:worldaz-msit.relay.teams.microsoft.com:443) en utilisant des WebRTC DataChannels (via aiortc). Les credentials TURN sont volés dynamiquement depuis les endpoints visiteurs anonymes de Teams.
🧠 Techniques d’évasion notables
- Edge headless comme transport Graph : l’implant lance le navigateur Edge de la victime en mode headless, s’y attache via Chrome DevTools Protocol (CDP), et émet tous les appels Graph API comme des requêtes
fetch()same-origin depuis le contexte du navigateur. Le trafic C2 apparaît commemsedge.execommuniquant avec Microsoft. - PyArmor 9.2.5 Pro (licence leaked 011971) protège ~120 modules ; 115 ont été déchiffrés statiquement via l’outil open-source
Pyarmor-Static-Unpack-1shot. - Configuration AES-256-GCM embarquée avec clé et AAD inline, rechargeable depuis un Azure Blob Storage dead-drop toutes les 300 secondes.
- Module EtherHiding (résolution de config via blockchain Ethereum) présent mais inactif dans ce build.
🔐 Persistance : technique inédite en conditions réelles
Quatre mécanismes de persistance, tous déclenchés par l’opérateur (PERSIST_ENABLED=False dans ce build) :
- TypeLib COM scriptlet hijack (HKCU, sans admin)
- GhostTask-style TaskCache manipulation (nécessite admin)
- Self-update via manifest
reobf.json - NTUSER.MAN mandatory profile hive forging : première utilisation malveillante documentée. L’implant forge un hive de profil Windows offline via
RegLoadAppKeyWetoffreg.dll(ORCreateKey, ORSetValue, ORSaveHive), écrit dans%USERPROFILE%\NTUSER.MAN. Aucun droit admin requis, aucun événement de modification de registre généré.
🔑 Vol de credentials via faux écran de verrouillage
Sur commande credz_waiting, l’implant affiche un faux écran de verrouillage Windows pixel-perfect (Tkinter natif pour W10/W11, variante HTML dérivée de Windows11LockScreenSimulator en fallback). Aucune validation du mot de passe : chaque tentative est packagée en JSON, chiffrée et uploadée sur le drive SharePoint. La fenêtre se ferme après la deuxième tentative, capturant typiquement le mot de passe erroné et le correct.
🏛️ Infrastructure attaquant
| Date | Événement |
|---|---|
| 7 juin 2026 | Re-enregistrement de th2ch.com (NameCheap, privacy shield) |
| 7 juin 2026 | Certificat Let’s Encrypt pour sharepointx.th2ch.com |
| 21 juin 2026 | Drop-catch de lpi-web.com (même registrar, même pattern) |
| 21 juillet 2026 | Certificat joint couvrant les deux domaines (preuve d’opérateur unique) |
| 24 juillet 2026 | Compilation de l’implant (18:13–18:15 UTC) |
L’IP de failover 193.24.211.221 est annoncée par AS215929 (Data Campus Limited), ASN documenté par GreyNoise pour des campagnes d’attaques de credentials contre des portails Palo Alto GlobalProtect fin 2025.
🔗 Corrélations threat intelligence
- DragonForce / Backdoor.Turn (Symantec, juin 2026) : partage l’abus Teams TURN, mais diffère sur tous les autres vecteurs (Go, MSSQL, ransomware).
- STAC4749 (Sophos, juillet 2026, lié à Chaos RaaS) : overlaps significatifs (Teams vishing, PyArmor Python backdoor, reverse SOCKS5, HKCU Run key, timeline adjacente), mais implémentations distinctes.
- msaRAT de Chaos group (Cisco Talos, 23 juillet 2026) : convergence indépendante sur headless browser + CDP + TURN relay.
📋 Type d’article
Publication de recherche technique approfondie par l’équipe Ontinue Cyber Defense Center, visant à documenter un framework d’implant inédit, ses techniques d’évasion, sa persistance et son infrastructure pour permettre la détection et la corrélation CTI.
🧠 TTPs et IOCs détectés
Acteurs de menace
TTP
- T1566.004 — Phishing: Spearphishing via Service (Initial Access)
- T1059.001 — Command and Scripting Interpreter: PowerShell (Execution)
- T1059.006 — Command and Scripting Interpreter: Python (Execution)
- T1071.001 — Application Layer Protocol: Web Protocols (Command and Control)
- T1102.002 — Web Service: Bidirectional Communication (Command and Control)
- T1090.001 — Proxy: Internal Proxy (Command and Control)
- T1090.003 — Proxy: Multi-hop Proxy (Command and Control)
- T1547.001 — Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder (Persistence)
- T1574.011 — Hijack Execution Flow: Services Registry Permissions Weakness (Persistence)
- T1053.005 — Scheduled Task/Job: Scheduled Task (Persistence)
- T1056.002 — Input Capture: GUI Input Capture (Credential Access)
- T1557 — Adversary-in-the-Middle (Credential Access)
- T1027.002 — Obfuscated Files or Information: Software Packing (Defense Evasion)
- T1218 — System Binary Proxy Execution (Defense Evasion)
- T1564.003 — Hide Artifacts: Hidden Window (Defense Evasion)
- T1087.002 — Account Discovery: Domain Account (Discovery)
- T1018 — Remote System Discovery (Discovery)
- T1482 — Domain Trust Discovery (Discovery)
- T1113 — Screen Capture (Collection)
- T1567.002 — Exfiltration Over Web Service: Exfiltration to Cloud Storage (Exfiltration)
- T1021.001 — Remote Services: Remote Desktop Protocol (Lateral Movement)
- T1021.006 — Remote Services: Windows Remote Management (Lateral Movement)
- T1078 — Valid Accounts (Defense Evasion)
IOC
- IPv4 :
193.24.211.221— AbuseIPDB · VT · ThreatFox - Domaines :
th2ch.com— VT · URLhaus · ThreatFox - Domaines :
sharepointx.th2ch.com— VT · URLhaus · ThreatFox - Domaines :
lpi-web.com— VT · URLhaus · ThreatFox - Domaines :
kerteransens.sharepoint.com— VT · URLhaus · ThreatFox - Fichiers :
bootstrap-fat.pyc - Fichiers :
NTUSER.MAN - Fichiers :
offreg.dll - Fichiers :
Config.sct - Fichiers :
reobf.json - Chemins :
C:\Users\Admin\LAUNCHER\ - Chemins :
C:\ProgramData\PackageCache\Config.sct
⚠️ À propos de ces IOC — ils sont extraits automatiquement de l’article original le 22 août 2026 et n’ont pas fait l’objet d’une vérification externe. Un indicateur peut avoir été réattribué depuis : une IP de C2 peut redevenir un service légitime, un domaine sinkholé peut changer de propriétaire. Aucune garantie d’exactitude ni d’actualité — contrôlez leur validité avant tout usage opérationnel, en particulier avant de les injecter dans une blocklist ou un SIEM.
Malware / Outils
- TWINLOOT (framework)
- PyArmor (tool)
- Pyarmor-Static-Unpack-1shot (tool)
- Backdoor.Turn (backdoor)
- msaRAT (rat)
- Swarmer (tool)
- TURNt (tool)
🟢 Indice de vérification factuelle : 67/100 (haute)
- ⬜ ontinue.com — source non référencée (0pts)
- ✅ 33323 chars — texte complet (fulltext extrait) (15pts)
- ✅ 12 IOCs (IPs/domaines/CVEs) (10pts)
- ✅ 2/4 IOCs confirmés (AbuseIPDB, ThreatFox, URLhaus, VirusTotal) (12pts)
- ✅ 23 TTPs MITRE identifiées (15pts)
- ✅ date extraite du HTML source (10pts)
- ✅ acteur(s) identifié(s) : STAC4749, DragonForce (5pts)
- ⬜ pas de CVE à vérifier (0pts)
IOCs confirmés externellement :
sharepointx.th2ch.com(domain) → VT (4/91 détections)lpi-web.com(domain) → VT (3/91 détections)
🔗 Source originale : https://www.ontinue.com/resource/python-implant-hiding-its-entire-c2-inside-microsoft-365-azure/?utm_source=substack&utm_medium=email