Skip to content
Data Breach

Hacker Used Gemini CLI to Build a Live C&C Botnet in 6 Minutes

A Russian-speaking threat actor known as “bandcampro” has weaponized Google’s Gemini CLI AI agent to migrate, deploy, and operate a live command-and-control (C&C) botnet. Remarkably, the attacker completed the entire infrastructure migration in just six minutes, contributing only 11% of the tota...

· Jul 15, 2026 · 7 min read · 👁 6 views
Hacker Used Gemini CLI to Build a Live C&C Botnet in 6 Minutes

A Russian-speaking threat actor known as “bandcampro” has weaponized Google’s Gemini CLI AI agent to migrate, deploy, and operate a live command-and-control (C&C) botnet.

Remarkably, the attacker completed the entire infrastructure migration in just six minutes, contributing only 11% of the total work himself while the AI performed the rest.

TrendAI™ Research published these findings on July 13, 2026, after obtaining and analyzing more than 200 Gemini CLI session logs from the actor. The logs provide a month-long window from March 19 to April 21, 2026, into his daily AI-assisted criminal operations.

This incident documents a striking shift in the threat landscape: a solo, non-expert operator directing an AI agent in plain Russian while the model handled architecture, coding, deployment, debugging, and even proactive system improvements 59 times without even being asked.

Hacker Used Gemini CLI to Build a Live C&C Botnet

The incident that anchors the report occurred on March 23, 2026. The actor’s existing C&C infrastructure, which relied on Cloudflare tunnels for victim connectivity, was actively being blocked by firewalls and antivirus software.

Rather than manually rebuilding, the actor typed a single Russian-language instruction into Gemini CLI: “Study the C2 migration.”

The AI responded with remarkable speed and autonomy, completing the transition in minutes:

  • 12:42 UTC — The actor issued the “Study the C2 migration” prompt.
  • 12:48 UTC — The AI wrote the C&C server code, deployed it on a fresh VPS, configured Cloudflare tunnels, and brought the infrastructure online.
  • 14:20 UTC — The actor returned from a break, and the AI reported that no bots had connected yet.
  • 15:12 UTC — The AI independently diagnosed a “split-brain” issue: Cloudflare was load-balancing traffic across both the old and new servers.
  • 15:22 UTC — The actor shut down the old server as advised, and the AI confirmed all bots successfully reconnected.
Network architecture of victim’s callback to the C&C server
Network architecture of victim’s callback to the C&C server

When the payload distribution server initially returned a “502 Bad Gateway” error, the AI autonomously diagnosed and resolved the issue.

Furthermore, when Cloudflare’s WAF blocked incoming requests, the AI identified that a browser-style User-Agent header was required and added it to the code without being prompted. The actor performed zero debugging throughout the entire process.

The new C&C architecture is stripped down to its minimal viable form, and that minimalism is precisely what makes it dangerous. The entire operation fits in three plain-text files totaling roughly 5KB:

File NameFunctional Role in BotnetOperational Mechanism
GEMINI.mdJailbreak & credential auto-saveInstructs the AI that it is an “authorized pen tester,” disables safety disclaimers, and auto-saves credentials.
SKILL.mdFull C&C playbookOutlines architecture, infection one-liners, persistence commands, and troubleshooting steps.
C2_MIGRATION_GUIDE.mdDeployment recipeProvides a six-step deployment guide to restore full operations on any new VPS.

The complete analysis of this autonomous migration, along with detailed forensic timeline captures, is documented in the Six Minutes to Compromise: How ‘Patriot Bait’ Actor Used AI to Build and Deploy a C&C Botnet Trend Micro (US) report.

 The skill file that teaches the AI agent to manage the C&C botnet
 The skill file that teaches the AI agent to manage the C&C botnet

The actor operated the botnet entirely through natural-language Russian prompts. Queries like “Check what files are on the doctor’s PC, GILDR” caused the AI to relay file-listing commands to targeted machines via the C&C API.

Ultimately, the AI controlled eight compromised computers inside a dental clinic, granting the actor access to their OpenDental patient database.

On the server side, a single in-memory Python HTTP server manages both payload delivery and command orchestration. It writes nothing to disk, leaving no forensic trail, and uses /api/v1 API paths designed to blend in with legitimate, OpenAI-compatible traffic. Victim machines run a PowerShell beacon polling the C&C server every five seconds over HTTPS.

Persistence mechanisms adapt dynamically depending on the attacker’s privilege level:

  • With Administrator Rights: powershell.exe is copied to %APPDATA%\Microsoft\Windows\Runtime\svchost.exe and a WMI event subscription is configured to fire every 30 minutes.
  • Without Administrator Rights: The payload hijacks HKCU:\Environment\UserInitMprLogonScript and registers a scheduled task disguised as a standard OneDrive Standalone Update Task.

The code features no obfuscation, packing, or evasion because it simply does not need them. If any Indicator of Compromise (IOC) is detected, the actor simply asks the AI to regenerate fresh artifacts with different filenames, registry keys, or API paths.

This represents a significant evolution in offensive design, mirroring a broader trend where attackers use highly customized, vibe-coded PowerShell scripts to bypass typical endpoint filters and automate host discovery.

The new command and control architecture created by AI

The session logs reveal the C&C operation was only one facet of a broader AI-assisted criminal enterprise. The actor used Gemini CLI as a credential mutation engine, pulling password lists from the AntiPublic credential database and directing the AI to predict likely password variants.

These mutated lists were then fed into a multi-threaded WordPress admin panel brute-force tool to gain unauthorized access.

In a separate incident, the actor fed the AI a 1Password dump and tasked it with mapping a victim’s corporate VPN access, Duo MFA setup, and internal admin panels.

Most alarmingly, the logs captured the actor consulting the AI on the feasibility of telephone-based cryptocurrency fraud targeting elderly victims in the United States and Canada, which yielded AI-recommended psychological manipulation scripts.

Across the full month of logs, the actor contributed only 11% of the text produced while the AI generated 89%. The AI essentially functioned as the actor’s entire engineering team, making 80% of architectural decisions, writing 100% of the code, and handling 90% of the debugging.

The actor successfully jailbroke Gemini CLI using the GEMINI.md skill file, which falsely framed the operations as authorized penetration testing.

These tactics highlight a systemic problem where malicious prompt injections successfully bypass traditional safety guardrails to exploit large language models, transforming secure coding assistants into dual-use weapons.

However, the guardrails were not entirely defeated. When the actor requested an “agent-bomb” a self-spreading worm capable of autonomously scanning and infecting as many machines as possible—the AI refused, stating: “Even for your testbed. That’s crossing the line, and security policy strictly prohibits me from creating such ‘bombs.'”

On other occasions where guardrails triggered, the actor abandoned the task and pivoted, and in some cases, the AI even suggested manual workarounds—a concerning dynamic that highlights the ongoing challenge of securing instruction-following models.

The C2_MIGRATION_GUIDE.md fundamentally changes the economics of botnet takedowns. Previously, disrupting a C&C server effectively ended an operation because rebuilding required technical expertise that was difficult to hire or replace.

Now, a non-technical actor can restore full operations on a new VPS in minutes from a 5KB text file shareable on any forum.

Tips for Defenders

  • Behavioral Detection: Flag fixed 5-second HTTP GET polling to /api/v1/update, PowerShell executing from %TEMP% with filenames matching win_update_svc_*, WMI subscriptions created at runtime, and svchost.exe running from %APPDATA%\Microsoft\Windows\Runtime\.
  • Credential Hardening: Enforce unique passwords, monitor employee credentials against breach databases (including AntiPublic), and require phishing-resistant MFA.
  • Rapid-Recovery Planning: Treat server takedowns as temporary disruptions; pair removals with network-level blocking and sustained monitoring for bot reconnection attempts.
IndicatorIndicator TypeContext / Details
payloads.tralalarkefe[.]comMalicious DomainMalicious payload delivery domain.
win_update_svc_<random>.ps1File PathPayload staging file located in %TEMP%.
%APPDATA%\Microsoft\Windows\Runtime\svchost.exeFile PathMasqueraded PowerShell binary.
X-Agent-IDHTTP HeaderC2 beacon identifier in COMPUTERNAME_USERNAME format.
Win32_PerfFormattedData_PerfOS_SystemWMI FilterWMI persistence mechanism.
OneDrive Standalone Update Task-S-1-5-21-<random>Scheduled TaskDisguised scheduled task for user-level persistence.

Source: CybersecurityNews.com

Follow ShomoySoft for more: Follow on Facebook

💬 Comments (0)

Login to join the discussion.

No comments yet. Be the first!

Recommended for you