Google Warns of Hackers Leveraging Gemini AI for All Stages of Cyberattacks
## Cybersecurity: Google Gemini API Exploitation
Cybersecurity: Google Gemini API Exploitation
Google's Gemini API is being used by threat actors to generate C# code for multi-stage malware, circumventing traditional detection systems. The Google Threat Intelligence Group (GTIG) highlighted this in its February 2026 AI Threat Tracker report, particularly focusing on the HONESTCUE framework first detected in September 2025.
HONESTCUE operates as a downloader and launcher, utilizing Gemini's API to retrieve C# source code for subsequent stages. This code, which enables downloading payloads without leaving disk traces, uses URLs from CDNs such as Discord.
The malware employs the .NET CSharpCodeProvider to compile and execute the code in memory, complicating static analysis and behavioral detection.
API Call: Malware sends a prompt to Gemini, receiving compilable C# code. Dynamic Compilation: The response is processed into an executable assembly using CSharpCodeProvider. Payload Delivery: Stage two retrieves data from attacker-controlled URLs, often using Discord CDN. Fileless Persistence: No binaries are written to disk, complicating endpoint forensics.
Google's Gemini API is being used by threat actors to generate C# code for multi-stage malware, circumventing traditional detection systems.
This method mirrors previous techniques like PROMPTFLUX, outsourcing code generation externally. GTIG observed that prompts evade Gemini's safeguards due to their benign appearance.
GTIG tracked various threat groups abusing Gemini, including DPRK, Iranian (APT42), PRC (APT31, UNC795, APT41), and Russian groups, for purposes such as phishing and vulnerability research. HONESTCUE's design avoids detection by traditional antivirus software through code variation in each execution.
GTIG's analysis indicates these actors have limited resources and skills compared to more advanced threats. Google has responded by disabling accounts, hardening models, and employing real-time classifiers to refuse policy-violating requests. Recommendations for defenders include monitoring API anomalies, blocking unusual Gemini traffic, and inspecting in-memory .NET loads.
GTIG also advises leveraging behavioral rules for CSharpCodeProvider usage and Discord CDN fetches. As AI tools proliferate, hybrid defenses combining network telemetry and runtime inspection become increasingly vital.
Based on reporting by Cyber Security News.
