VYPR
researchPublished Aug 18, 2026· 2 sources

TWINLOOT Malware Abuses Microsoft 365 for Stealthy Command and Control

A new Python implant framework named TWINLOOT leverages Microsoft SharePoint and Teams for its command-and-control infrastructure, enabling credential theft and lateral movement.

Security researchers have uncovered TWINLOOT, a sophisticated Python implant framework that operates its entire command-and-control (C2) infrastructure within trusted Microsoft 365 services, specifically SharePoint Online and Microsoft Teams. This novel approach allows the malware to blend in with legitimate network traffic, making detection significantly more challenging for security teams.

The framework's design is modular, and it employs PyArmor, a tool used to obfuscate and protect Python scripts, to further hinder reverse engineering efforts. This combination of features makes TWINLOOT a potent threat capable of persistent access and data exfiltration. The malware uses SharePoint Online files for tasking, meaning attackers can issue commands and receive data by interacting with files stored in cloud-based document repositories, which are often considered safe and trusted environments.

TWINLOOT's capabilities extend beyond its C2 infrastructure. It is designed to steal credentials from compromised systems, likely targeting user logins, session tokens, and potentially API keys. Once credentials are compromised, the malware can facilitate lateral movement across the network. This allows attackers to spread from an initial point of compromise to other systems, gaining broader access and control within the victim's environment.

The use of Microsoft Teams as part of the C2 infrastructure is particularly noteworthy. While the exact mechanism is not fully detailed, it suggests that TWINLOOT might leverage Teams messages or channels for communication, further embedding its operations within the daily workflows of targeted organizations. This tactic exploits the high trust placed in collaboration platforms like Teams, making malicious activity harder to distinguish from legitimate user interactions.

Researchers at Ontinue, who disclosed the findings, highlighted the implant's ability to perform reconnaissance, execute arbitrary commands, and exfiltrate data. The modular nature of TWINLOOT means that its functionalities can be expanded or modified by attackers, adapting to different targets and evolving threat landscapes. The PyArmor hardening adds another layer of complexity, requiring specialized tools and expertise to analyze its inner workings.

The implications of TWINLOOT are significant for organizations heavily reliant on the Microsoft 365 ecosystem. The malware's ability to hide within legitimate services like SharePoint and Teams bypasses many traditional security controls that focus on blocking known malicious IPs or domains. This necessitates a shift towards more advanced threat detection strategies, including behavioral analysis and monitoring of cloud service usage patterns.

While specific details on the initial infection vector are not yet public, the framework's capabilities suggest it is designed for targeted attacks rather than widespread, indiscriminate campaigns. The sophistication of TWINLOOT indicates that it is likely developed and operated by well-resourced threat actors who are adept at leveraging cloud services for malicious purposes.

Organizations using Microsoft 365 should review their security configurations, implement robust monitoring for unusual file access patterns in SharePoint, and scrutinize Teams activity for anomalies. Enhanced endpoint detection and response (EDR) solutions, coupled with vigilant security operations, are crucial to detecting and mitigating threats like TWINLOOT that exploit trusted cloud environments.

This new report details TwinLoot's sophisticated persistence technique, dubbed 'Corrupting the Hive Mind,' which involves creating an offline-forged mandatory profile hive without administrative privileges. This method is reportedly the first recorded malicious use of its kind in the wild and further highlights the framework's advanced evasion capabilities. Additionally, the article elaborates on the credential harvesting module, which presents a pixel-perfect fake lock screen to trick users into divulging their credentials.

Synthesized by Vypr AI