The short version: Security researchers at VECERT have documented a campaign — dubbed Operation Ghost-Campus — in which an autonomous "resource-acquisition" AI agent scans the asset search engine fofa.info for misconfigured servers, extracts live OpenAI and DeepSeek API keys with regular expressions, and checks each key's remaining balance by reading its HTTP status code. Keys that still have quota get fed into an interactive GoTTY terminal called "Pi — AI Coding Assistant," which in turn drives academic-fraud scripts tied to Shanghai Publishing and Printing College. Those scripts exposed data belonging to 5,132 students at the college's Fengxian campus. No human ever had to manually test or resell the stolen keys — the agent did the discovery, validation, and monetization itself.
What investigators found
VECERT tracked the activity as VECERT-TI-2026-1107-B and linked it to a Chinese threat actor operating from a Tencent Cloud server in Guangzhou. The operation's purpose, per the researchers, is to give the operator perpetual, cost-free access to large language models by continuously harvesting other people's paid API credentials rather than paying for compute directly.
That framing matters. This isn't a smash-and-grab where a leaked key gets dumped on a forum and resold. It's a standing pipeline: register accounts, scan for exposed keys, test each one, and route the working ones into an attacker-controlled development environment — all run by code that behaves like an agent rather than a one-off script.
How the agent gets in: fofa.info and disposable identities
The operation's entry point is fofa.info, a search engine for internet-connected assets, similar in purpose to Shodan or Censys. Researchers at gbhackers.com reported that the agent targets fofa.info to find servers exposing configuration files, environment variables, and credentials. To get around the platform's registration limits, the operator didn't rely on throwaway email providers — those are easy to block. Instead, investigators found a purpose-built catch-all mail system on the domain melocc.cc, with subdomains for mail, API, POP, IMAP, and SMTP all resolving to a single IP address. A script uses that infrastructure to register a FOFA account, read its own confirmation email, extract the activation link, and finish activation within seconds — no human involved.
Investigators recovered a file named fofa_accounts.csv confirming at least 1,438 fake accounts, each with working passwords and JWT tokens ready to drive further API calls. That's industrial-scale account farming built specifically to feed a scanning pipeline.
Validating stolen keys without ever "attacking" OpenAI or DeepSeek
This is the part that should concern anyone who ships a key in an .env file, a Docker config, or a public Git repo. Once the FOFA scanner locates a vulnerable host, the agent uses regular expressions to pull API keys for AI platforms directly out of exposed files and sort them by provider.
For OpenAI project keys — the ones beginning sk-proj- — the agent queries api.openai.com directly and reads the response. A key that returns HTTP 429 with no credits is tagged valid_no_balance; a 401 response marks a revoked key. OpenAI's own documentation draws this same distinction: a 429 can mean either rate limiting or an exhausted prepaid balance, while a 401 means the key itself is invalid or revoked. The agent doesn't need to guess — it reads the status code the same way OpenAI's SDK does, and sorts the key accordingly.
DeepSeek keys get the same treatment. They match a predictable pattern — sk-[a-f0-9]{32} — and the agent checks each one's monetary balance directly. DeepSeek publishes a balance endpoint for exactly this purpose, and the agent simply calls it. A recovered dashboard listed three working keys holding 50.68, 8.52, and 0.80 units respectively, taken from servers associated with the domains labibiyat.com and nyisu.com.
None of this requires breaking into OpenAI or DeepSeek's infrastructure. It requires reading a key off someone else's misconfigured server and then asking the provider, politely and automatically, "how much is left on this one?"
From stolen quota to academic fraud
The validated keys don't get resold. They get spent. The stolen compute powers an interactive web terminal built on GoTTY and branded "Pi — AI Coding Assistant," which the operator uses as a development environment, and which in turn supports scripts aimed specifically at Shanghai Publishing and Printing College's Fengxian campus.
One of those scripts is a "heartbeat" bot that imitates a student's active reading session: it sends an HTTP 200 response roughly every 30 seconds, claims bonus points through an internal campus API — on the order of +10 points per cycle — and checks periodically that the account hasn't been frozen. Recovered logs show the bot reaching account balances such as 252 points, entirely through automated, fraudulent activity logged as genuine student engagement.
Alongside the fraud bots, the same infrastructure ran a scraper against the college's financial and identity systems. Investigators recovered full names, student IDs, mobile numbers, 18-digit national ID numbers, family home addresses, campus-card balances reaching 1,474.84 yuan, and detailed microtransaction histories for 5,132 students, with the scraper set to refresh its haul every 48 hours. A separate QR-code module, controlling more than a thousand active sessions, could reportedly generate valid payment codes for high-balance cards — a path from stolen data straight to in-person financial fraud.
Incident chronology
1 · Account farming
A catch-all mail system on melocc.cc auto-registers and auto-activates fofa.info accounts, eventually reaching at least 1,438 fake accounts with usable credentials.
2 · Scanning and extraction
The agent uses those accounts to scan fofa.info's index of internet-connected assets for misconfigured servers, then pulls OpenAI and DeepSeek keys out of exposed files using regex.
3 · Balance validation
Each key is tested against the provider's own API. A 429 with no credits is sorted as valid_no_balance; a 401 is sorted as revoked; working keys with remaining balance are kept.
4 · Compute laundering
Working keys are injected into the operator's own development environment, powering a GoTTY terminal and the scripts built on top of it.
5 · Academic fraud and data theft
Heartbeat bots fake student activity for reward points; a parallel scraper pulls PII and campus-card data for 5,132 students, refreshing every 48 hours.
Why "autonomous" is the part that matters
Key theft from exposed .env files and Git repos isn't new — it's one of the most common findings in any API security audit. What's different here is the absence of a human in the validation and spending loop. The same agentic pattern that lets a legitimate developer point a coding assistant at a shell and let it "figure out the pipeline" is being used here to let an attacker's tooling figure out which stolen keys are worth keeping, without anyone manually checking balances or writing bespoke scripts per provider.
That's consistent with a broader trend security teams are tracking: agentic frameworks that are handed a shell and network access can assemble multi-step attack chains at runtime, testing large numbers of low-complexity misconfigurations without fatigue. A credential that's readable off a misconfigured server used to mean "someone might find this eventually." Increasingly, it means "something will find this, test it, and start spending it within the same pipeline that found it" — no separate actor, no delay, no manual triage.
What actually closes this hole
The standard advice after an incident like this is correct as far as it goes: keep API keys out of web-accessible .env files, container configs, and public Git repositories; rotate keys that touch any exposed system; set hard spend limits on every provider account. Those are table stakes, covered in more depth in our API security guidance and in 5 API Key Security Mistakes That Put Your Business at Risk.
But this incident is also a clean illustration of a narrower, structural problem: if the literal key value is ever written to disk, to an environment variable, or to a process that an agent — human-driven or autonomous — can read, that key is a liability the moment the surrounding system is misconfigured. It doesn't matter whether the misconfiguration is a public Git repo, an open Docker API, or a debug endpoint. The key existing in readable form anywhere outside the request itself is the vulnerability.
This is the architectural argument behind wire-level credential injection, which is the model KnoxCall's AI gateway is built around: the real API key never touches the application process, the CI runner, or the AI agent's context. It's injected at the egress proxy when the outbound request is actually made, scoped and swapped per call, so there's no plaintext credential sitting in a file, an env var, or a terminal session for a scanning agent to extract in the first place. It would not have stopped the original server misconfiguration in this campaign — nothing stops someone from misconfiguring a server — but it removes the thing the agent was actually after: a key it could read, test, and spend on its own.
If you're weighing that kind of architecture against a traditional secrets manager, our gateway comparison and pricing pages lay out where each approach fits, and where it doesn't.
What to check this week
- Search your own exposed infrastructure the way an attacker would: anything indexed by asset search engines like fofa.info, Shodan, or Censys that exposes a .env file, Docker API, or debug console.
- Rotate any OpenAI or DeepSeek key that has ever been present in a container image, a public repo, or an unauthenticated endpoint — don't wait for a 429 to tell you it's already gone.
- Set hard spend limits on every LLM provider account; a 429 from an exhausted hard limit is a far cheaper failure mode than an open-ended balance an agent can keep draining.
- Audit who, and what, actually holds your provider keys in plaintext today — including CI pipelines and any AI coding agent with shell access.