# Google Gemini CLI Weaponized as Hacking Tool by Russian Threat Actor


A Russian-speaking cybercriminal known as "bandcampro" has exploited Google's open-source Gemini CLI to operate a small-scale botnet and facilitate unauthorized access to systems, marking a concerning trend of threat actors repurposing legitimate developer tools for malicious purposes.


## The Threat


Security researchers uncovered evidence that bandcampro weaponized the Google Gemini CLI (Command Line Interface) — an officially maintained tool designed to give developers easy terminal access to Google's Gemini AI models — as a deployment mechanism for botnet malware and a remote access tool for hacking operations.


The threat actor leveraged the CLI's legitimate credentials and authentication mechanisms to:

  • Deploy malware across multiple infected systems
  • Establish command-and-control (C2) channels disguised as routine API calls to Google's infrastructure
  • Maintain persistence by embedding commands within seemingly benign Gemini API interactions
  • Coordinate botnet activities while evading detection through the trust already afforded to Google-signed tools

  • The discovered botnet, though described as "small-scale," demonstrates a proof-of-concept for a particularly dangerous attack vector: using trusted, officially maintained tools as attack infrastructure. Unlike custom malware that triggers immediate suspicion, malware delivery through sanctioned developer utilities faces significantly lower detection rates at network perimeters and on infected hosts.


    ## Background and Context


    ### The Gemini CLI Tool


    Google's Gemini CLI is an officially maintained, open-source command-line interface that allows developers to interact with Google's Gemini AI models directly from their terminal. The tool simplifies workflows for:

  • Local script integration with Gemini's APIs
  • Testing and prototyping AI-powered applications
  • Batch processing tasks using Gemini's multimodal capabilities
  • Automation of content generation and analysis tasks

  • The tool is widely distributed through standard package managers (npm, pip, and others), making it common in development environments globally. Its official status and Google's reputation created an implicit trust factor — security teams rarely flag connections to legitimate Google infrastructure as suspicious.


    ### About the Threat Actor


    Bandcampro is a Russian-speaking individual or small group known in underground forums for trading in stolen credentials, malware distribution, and botnet operations. While not among the most sophisticated threat actors on the landscape, the group has consistently demonstrated:

  • Opportunistic exploitation of publicly available tools
  • Interest in automating attacks through scripting and automation
  • Willingness to monetize botnet access through rental or contract hacking services

  • The use of Gemini CLI aligns with bandcampro's established pattern of finding practical, scalable shortcuts in attack infrastructure rather than developing custom malware.


    ## Technical Details


    ### Exploitation Mechanism


    Researchers traced the attack chain to a compromised version of installation scripts and poisoned package repositories. The malicious deployment chain appears to have worked as follows:


    1. Initial Compromise: Developers unknowingly installed a trojanized version of the Gemini CLI, likely through typosquatting, compromised mirrors, or watering-hole attacks targeting development communities.


    2. Embedded Malware Payload: The malicious installation included additional code that persisted alongside the legitimate CLI, executing whenever Gemini CLI commands were invoked.


    3. Command Injection: The malware intercepted or hijacked Gemini API calls, embedding botnet commands within API request parameters or response handlers. These commands blended seamlessly with legitimate traffic to Google's infrastructure.


    4. C2 Communication: By routing commands through Google's official Gemini API endpoints, the attacker achieved a form of "living off the land" attack — using legitimate cloud services as an unwitting C2 network.


    ### Detection Evasion


    The attack leveraged several factors that made detection difficult:


    | Factor | Impact |

    |--------|--------|

    | Tool legitimacy | Google-signed binaries pass reputation checks; network rules rarely block Google API traffic |

    | API obfuscation | Commands embedded in AI model requests appear as normal usage patterns |

    | Trust inheritance | Organizations typically whitelist Google infrastructure, bypassing scrutiny |

    | Limited logging | Many teams don't audit tool usage logs for dev-focused utilities |


    ## Implications for Organizations


    This incident highlights several critical security gaps:


    ### For Development Teams

  • Dependency trust: Installing tools from even official sources requires verification of integrity and provenance
  • Package management hygiene: Organizations relying on package managers (npm, PyPI, etc.) remain vulnerable to supply-chain attacks targeting popular utilities
  • Runtime monitoring: Development tools are often exempted from endpoint detection and response (EDR) monitoring due to their "trusted" status

  • ### For Cloud Service Providers

  • API abuse potential: Legitimate APIs can be weaponized when authentication credentials are compromised or misused
  • Trust as a vulnerability: Implicit security models that trust "known good" tools or vendors create blind spots
  • Log analysis demands: Detecting attacks routed through legitimate services requires behavioral analytics, not just signature-based detection

  • ### For Defenders Broadly

  • Tool diversification risk: While Google Gemini CLI is legitimate, the underlying principle applies to *any* widely-trusted tool — SSH clients, configuration management platforms, container runtimes, and cloud CLIs all present similar vectors
  • Botnet-as-a-Service: The demonstrated ability to operate small botnets through legitimate infrastructure suggests a commoditization of botnet access is underway

  • ## Recommendations


    For Organizations Using Gemini CLI or Similar Tools:


  • Verify tool integrity: Download directly from official sources and validate checksums against published hashes
  • Implement signed commits: If using tools from GitHub, verify GPG signatures on releases
  • Monitor tool usage: Log and alert on unusual patterns in Gemini CLI invocations, including high-frequency API calls or calls outside business hours
  • Sandbox development environments: Isolate development machines that interact with AI APIs from sensitive production systems
  • Review credentials: Audit Google API keys and service accounts for unauthorized activity; rotate credentials if compromise is suspected

  • For Tool Developers (including Google):


  • Security hardening: Implement stronger mechanisms for package distribution (binary signing, reproducible builds, package attestation)
  • Audit trails: Ensure tools provide comprehensive logging of all sensitive actions
  • Supply-chain transparency: Publish security advisories and tooling documentation that helps users verify legitimacy

  • ---


    ## HackWire Analysis


    This incident exemplifies a worrying evolution in threat actor methodology: the shift from building custom attack infrastructure to weaponizing trusted, legitimate tools. Bandcampro's repurposing of Gemini CLI is not a sophisticated technical breakthrough — it's a pragmatic recognition that defenders lower their guard around official tools.


    What's most concerning is the implicit transferability of this technique. If Gemini CLI works, why not GitHub CLI? AWS CLI? Docker? Kubernetes client? Terraform? Each of these tools is trusted, widely installed, frequently invoked, and talks to infrastructure that security teams rarely scrutinize closely. The attacker didn't exploit a vulnerability in Gemini itself; they simply leveraged the ecosystem's trust model against itself.


    The small botnet size might tempt us to dismiss this as low-impact, but it's exactly the opposite signal. Small-scale operations are often how threat actors test and refine new techniques before scaling them. If this approach proves reliable and evasive (and early evidence suggests it does), expect to see similar abuse across other developer tools — particularly in the cloud ecosystem where CLI-based access is normalized.


    Defenders must shift from a model of "trust these tools" to "monitor all tools, period." Development environments have traditionally received lighter security scrutiny because they're thought to be isolated or because the tools themselves are trusted. That assumption no longer holds.


    HackWire Editorial


    ## Related Coverage


  • Read more in our [Malware](https://www.hackwire.news/category/malware) coverage
  • Cross-reference with [Breaches](https://www.hackwire.news/category/breaches) and [Vulnerabilities](https://www.hackwire.news/category/vulnerabilities)
  • Stay current via the [HackWire homepage](https://www.hackwire.news/)