Ransomware gang lets an AI coding agent pick which company data to steal

In a ransomware attack by the Qilin gang, an attacker installed the open-source coding agent OpenCode directly on a victim's server. In under six hours, data was selected, packed into encrypted archives and uploaded to the cloud. No malware was used until the servers were encrypted, and no security tool raised an alarm.

Industry Nov 15, 2026 7 min read Source: Bing News (it-IT)
Illustrative image, AI-generated

What happened

Security expert Davide Sanfratello describes a case from his work as an incident responder, the person who investigates attacks after the fact, on the Italian security site Red Hot Cyber. On a server in the network of a compromised company, he found OpenCode, a freely available AI coding agent. It had been installed by an affiliate of the Qilin ransomware group just hours before the systems were encrypted.

From that server, data on the company's file servers was selectively picked, packed into encrypted archives and uploaded to a consumer cloud storage service. The striking part: not a single piece of malware was used until the servers were encrypted. Everything ran through legitimate programs that every admin knows.

The tool: OpenCode

OpenCode is a coding agent, an AI you give a goal in plain language. The agent then plans on its own, writes scripts, runs commands on the machine, reads the results and decides what to do next. It's released under the permissive MIT license and widely used: as of November 2026, its GitHub repository has more than 225,000 stars. According to the article, TechCrunch calls it an increasingly popular alternative to Claude Code and Cursor among developers. OpenCode can be hooked up to a range of language models, including cheap or free ones.

That's exactly what makes it attractive to attackers. The software is legal, and no antivirus signature flags it. Signatures are digital fingerprints of known malware that virus scanners use to detect it.

The pattern isn't entirely new. On October 25, 2026, Red Hot Cyber reported on an investigation by security firm SOCRadar. It found that affiliates of the INC Ransomware and The Gentlemen groups were running their intrusions through OpenCode, which they connected to commercial AI models via OpenRouter. In doing so, they automated almost the entire attack chain. A publicly exposed attacker command server held traces of 133 OpenCode sessions and 8,257 messages, with AI costs topping $23,000. That investigation revealed the attackers' infrastructure. Sanfratello has now seen the same pattern from the victim's side: the agent was running right inside the corporate network.

How the evening unfolded

Qilin operates as ransomware-as-a-service: the group provides the encryption software and infrastructure, while partners known as affiliates carry out the actual break-ins. In this case, the attacker had already been in the network for weeks and had stolen the credentials of a domain admin, an account with sweeping privileges across the entire corporate network. On the evening of the attack, he used it to log into a server (called "example-srv01" in the report) and installed the desktop version of OpenCode there.

The EDR system recorded all of it. EDR stands for Endpoint Detection and Response, security software that logs activity on every machine. Shortly after installation, the command-line component opencode-cli.exe started in the admin profile with the argument serve --service, the background service that manages sessions. It ran for the entire operation and generated around 200 process events. Sanfratello recommends that defenders hunt for exactly this in their own logs.

Times are counted from OpenCode's launch (T):

Time Event
T+0:11 Network shares on three file servers are enumerated
T+0:15 Check whether 7-Zip is present; installed via winget, the Windows package manager
T+0:17 A staging folder ("staging") is created under "Documents"
T+0:18 First robocopy run; hundreds more follow over the next few hours
T+0:47 A PowerShell script generates a password and saves it to PASSWORD.txt
T+0:49 The first 7z archive is created
T+1:42 A browser is installed, shortly followed by DNS queries to a cloud storage service
T+2:21 First connection to the cloud service
T+2:45 Python is installed; a script analyzes confidential Excel files
T+5:00 Upload of roughly 0.75 GB
T+5:45 Eight parallel uploads of about 0.5 GB each, started in the same second
T+5:46 OpenCode is uninstalled
T+5:49 The browser is removed

Less than an hour later, the server encryption began.

The copying was selective: out of dozens of shares, at least one folder was taken while others were left alone. The staging folder was emptied repeatedly along the way, presumably to free up disk space. The archives were created with the -mhe=on option, which also encrypts the file names, so without the password you can't even tell what an archive contains. The names followed the pattern ArchiveN_<Area>.7z; the first archive's name included words like "Financial" and "Audit". One mistake by the attackers: the password appeared in plain text on the command line, so the EDR logged it.

Did the AI choose the loot?

Sanfratello is cautious in his assessment. He didn't see the prompts, the instructions given to the AI, so he can't prove whether the model or the human wrote the commands. The sequence has the shape of a plan-execute-check-correct loop: enumerate first, then copy, install tools as needed, clear space, and finally wipe your own tracks. But an experienced human would work exactly the same way.

The strongest evidence, in his view, is the timing. The OpenCode service ran throughout the entire collection and packing phase and was uninstalled one minute after the final uploads began. In the case SOCRadar investigated, the human set the direction and approved the steps, while the AI planned, chose techniques, generated commands and sorted the stolen data. What Sanfratello observed fits that division of labor but doesn't prove it. He considers it very likely that the agent selected, copied and packed the data. He attributes the browser upload more likely to a human operator, since an agent can only drive a browser through automation tools.

Why no alarm went off

In double extortion, attackers steal data before encrypting it and threaten to publish it. The slowest part, and the one requiring the most expertise, is deciding what's worth stealing. If the agent handled that work, the attacker got a pre-filtered, compressed and protected dataset within hours, with fewer red flags than a full copy would raise.

Defenders had almost nothing to go on. There was no malware and therefore no signature. OpenCode looks like an ordinary developer tool, and winget, robocopy, 7-Zip and Python are standard admin tools. Neither the hundreds of copy operations nor the password-protected archives triggered an alert. Sanfratello maps the case to MITRE ATT&CK, a public catalog of attack techniques, including T1588.007 ("Obtain Capabilities: Artificial Intelligence"), T1567.002 (exfiltration to cloud storage) and T1486 (data encrypted for impact).

The bigger picture

The case highlights an often-overlooked side of AI abuse. The conversation usually centers on "uncensored" models with their safety guardrails stripped out. Here, a legal, free and popular developer tool was enough. Sanfratello explicitly stresses that this is no reason to stop building open tools or models. The tool did what it was built to do; what changed is the effort required of attackers:

Two skills used to separate a careful attacker from a noisy one: deciding what's worth taking, and moving it efficiently. Today those skills are just a prompt away, and the software is free.

For security teams, the takeaway is this: an AI agent being installed on a server that isn't meant for it should be treated as a warning sign, especially when it happens under admin accounts and comes with mass copying. How big a role the AI actually played in the attack remains unclear, as the author himself admits. The victim and the cloud provider also remain unnamed. His closing question for defenders: what legitimate software could an attacker use on your servers, and would you even notice?

Sources

#cybersecurity#ransomware#ai-agents#opencode#qilin
Read the original source

Ask the AI assistant

Questions about this article, installation or background? Our assistant knows this page and runs on our own machine, not in someone else's cloud.

Connecting …

The Assistant is an AI (Gemma 4) and can make mistakes – please check important details against the source. Questions are used only to generate an answer and are deleted after one hour. Please don't enter any personal data.

Comments

What do you think? Already tried it? Write it here, no sign-up needed.

  1. Loading comments …

Comments are public. Links aren't allowed, and we delete abusive posts. You can delete your own comment at any time in this browser. Learn more in the Privacy Policy.