SecurityMalware

SesameOp: Novel Backdoor Uses OpenAI Assistants API for Command and Control

7 months agoUS
SesameOp: Novel Backdoor Uses OpenAI Assistants API for Command and ControlSource: microsoft.com
Microsoft researchers have uncovered a new backdoor, dubbed SesameOp, that leverages the OpenAI Assistants API for command-and-control (C2) communications. This innovative approach allows threat actors to stealthily communicate and orchestrate malicious activities within compromised environments, bypassing traditional detection methods.

Key Insights

Novel C2 Mechanism:: SesameOp abuses the OpenAI Assistants API as a covert channel for fetching commands, which the malware then executes.

Discovery:: The backdoor was discovered during an investigation of a sophisticated security incident in July 2025, where threat actors maintained persistence for several months.

Technical Details:: The malware uses a loader (Netapi64.dll) and a .NET-based backdoor (OpenAIAgent.Netapi64), employing payload compression and layered encryption to hide its activities.

Mitigation:: Microsoft recommends auditing firewalls, enabling tamper protection, and using endpoint detection in block mode to mitigate the impact of SesameOp.

Collaboration:: Microsoft and OpenAI jointly investigated the threat, leading to the identification and disabling of a malicious API key and associated account.

Why this matters: This novel technique demonstrates how threat actors are adapting to leverage emerging technologies like AI APIs for malicious purposes, making detection and mitigation more challenging. The use of legitimate services for C2 communications allows malware to blend in with normal network activity, evading traditional security measures.

In-Depth Analysis

SesameOp represents a sophisticated evolution in backdoor tactics. The malware's infection chain involves a loader (Netapi64.dll) and a .NET-based backdoor (OpenAIAgent.Netapi64). The loader is heavily obfuscated using Eazfuscator.NET and is designed for stealth and persistence. It leverages .NET AppDomainManager injection to load at runtime.

The backdoor component, OpenAIAgent.Netapi64, uses the OpenAI Assistants API to fetch commands, decrypt them, and execute them locally. It then sends the results back to OpenAI as a message, using compression and encryption to stay hidden. The malware checks for specific instructions such as `SLEEP`, `Payload`, and `Result` to manage its operations.

This approach allows the threat actor to maintain long-term persistence for espionage-type purposes. The stealthy nature of SesameOp makes it difficult to detect, as it blends in with legitimate OpenAI API traffic. Microsoft has provided detailed mitigation guidance, including auditing firewalls and enabling tamper protection.

How to Prepare:

Implement robust monitoring of network traffic to detect unusual API calls.

Ensure endpoint detection and response (EDR) solutions are configured in block mode.

Regularly audit firewall and web server logs.

Who This Affects Most:

Organizations that heavily rely on cloud services and APIs.

Companies in sectors targeted for espionage, such as government and technology.

FAQs

What is SesameOp?

SesameOp is a novel backdoor malware that uses the OpenAI Assistants API for command-and-control communications.

How does SesameOp work?

It uses the OpenAI Assistants API to fetch encrypted commands, which it decrypts and executes. The results are then sent back through the same API.

How was SesameOp discovered?

Microsoft's Detection and Response Team (DART) discovered it during an investigation into a cyberattack in July 2025.

What steps can be taken to mitigate the impact of SesameOp?

Microsoft recommends auditing firewall logs, enabling tamper protection, and configuring endpoint detection in block mode.

Key Takeaways

SesameOp highlights the evolving tactics of threat actors who are increasingly leveraging legitimate cloud services for malicious purposes. By using the OpenAI Assistants API for command and control, the malware can effectively hide its activities and maintain persistence within compromised environments. Key actions for readers include:

Implementing robust monitoring of network traffic.

Ensuring endpoint detection and response solutions are properly configured.

Regularly auditing firewall and web server logs.

The collaboration between Microsoft and OpenAI to address this threat underscores the importance of industry cooperation in combating emerging cyber threats.

Discussion

Do you think this trend of abusing legitimate APIs for malicious purposes will continue? Let us know in the comments!

Share this article with others who need to stay ahead of this trend!

Related Articles

⚠ Disclaimer: Yanuki provides article summaries and links for reference only. Yanuki does not endorse, verify, or guarantee the accuracy of third-party sources. Please review original sources and verify information independently. Managed by the Yanuki Data Engine. Full Disclaimer