Skip to content

Security and governanceGuide

What is a distillation attack? AI model extraction explained

Distillation is a normal way to train a small model from a large one. It becomes an attack when someone harvests another company's model through its API, without permission and at industrial scale, often on accounts and keys that belong to someone else.

By INFRO Editorial

Published

8 min read

Glowing amber lines branching upward from one glass node to many small nodes on a dark ground, one path lit brighter than the rest

In short

A distillation attack is the unauthorized, large-scale harvesting of an AI model's outputs and reasoning through its API in order to train a competing student model. Anthropic, OpenAI and Google have each described campaigns against their models in 2026, and a joint CISA, NSA and FBI advisory followed in September. For an ordinary company the risk is practical: the campaigns run on fraudulent accounts and stolen API keys, so a leaked key can become the vehicle, and its owner pays the bill.

Key takeaways

  • Distillation, training a small model on a larger model's outputs, is a legitimate technique when the model's owner allows it.
  • It becomes an attack when another party harvests a model's outputs and reasoning through its API, without permission, at scale, to train a competitor.
  • Anthropic, OpenAI and Google each published 2026 accounts of campaigns against their models; CISA, NSA and FBI followed with advisory AA26-251A.
  • The campaigns run on fraudulent accounts, proxy services and, in Anthropic's words, stolen API credentials of legitimate companies.
  • For a company that is not an AI lab, the exposure is its own keys: a leaked key can carry someone else's extraction traffic on your bill.

What is a distillation attack? It is the unauthorized, large-scale harvesting of an AI model's outputs, and often its step-by-step reasoning, through the model's API, so that another party can train a "student" model that reproduces its abilities. Distillation itself is an ordinary training method. It becomes an attack when the model's owner has not permitted it, and in 2026 the campaigns that providers described ran on fraudulent accounts, proxy services and stolen API keys.

This guide explains the difference between distillation and a distillation attack, how a campaign works, why model providers treat it as theft and a safety problem, and why it reaches companies that have never trained a model: their keys are part of the supply.

Distillation, and when it becomes an attack

Distillation trains a smaller model on the outputs of a stronger one. Anthropic calls it a widely used and legitimate training method that frontier labs use to produce smaller versions of their own models1. The White House memorandum NSTM-4 makes the same distinction: distillation used to produce lighter models is part of a healthy ecosystem, while industrial campaigns to extract proprietary capabilities are not2.

Legitimate distillationDistillation attack
Whose model is the teacherYour own, or one whose terms allow itAnother company's, against its terms
AccessYour own accounts, within agreed limitsFraudulent accounts, proxy networks, borrowed or stolen keys
Scale and shapePlanned training runsMillions of exchanges, spread across thousands of accounts to avoid detection
What is collectedOutputs you are entitled to useOutputs plus reasoning the provider tries to keep hidden
ResultA smaller model of your ownA competing model built on someone else's capabilities

Google's Threat Intelligence Group uses "model extraction attack" and "distillation attack" as names for the same thing: an adversary uses legitimate access to probe a mature model systematically and collect what it needs to train a new one, which Google calls a form of intellectual property theft3. OpenAI's term is adversarial distillation, the systematic and unauthorized use of one model's outputs or reasoning to train, reproduce or improve another4.

How a distillation attack works

The public accounts from Anthropic, Google, OpenAI and the US agencies describe the same pipeline in different detail.

  1. Get access at scale, and hide who you are. Anthropic's February post describes proxy services running "hydra cluster" networks of fraudulent accounts; one network managed more than 20,000 accounts at once and mixed distillation traffic with unrelated customer requests1. The joint advisory describes routing across native APIs, cloud providers, third-party aggregators, relays and account pools, plus a gray market of proxies called "transfer stations" that resell access5.
  2. Write prompt sets aimed at specific capabilities. Individual prompts look benign. The campaigns Anthropic described targeted agentic reasoning, tool use, coding and computer vision, and the giveaway was the pattern: volume, repetitive structure and concentration on high-value skills1.
  3. Harvest the reasoning, not only the answer. Several campaigns tried to make the model reveal the chain of thought behind an answer. Google describes one campaign of more than 100,000 prompts that tried to coerce Gemini into revealing its full reasoning traces3. OpenAI describes operators copying encrypted reasoning from one conversation and asking the model in another conversation to decrypt and transcribe it4.
  4. Filter and grade the haul. The advisory describes quality evaluation frameworks that check whether outputs have been degraded by a defender, and automated failover to another pathway when one is blocked5.
  5. Fine-tune the student. The collected prompts, answers and reasoning become supervised or reinforcement training data for the attacker's own model.
  6. Retarget when something new ships. Anthropic reports that one lab redirected nearly half its traffic to a newly released Claude model within 24 hours1.

Why model providers treat it as an attack

The providers give three reasons, and the US government adds a fourth.

  • Capability theft. A frontier model costs a great deal to train. Google states that distillation from Gemini without permission violates its terms of service and that violators may face takedowns and legal action3.
  • Safety removal. A distilled copy rarely inherits the safeguards of the original. Anthropic and OpenAI both make this point: extracted capabilities can spread with the protections that prevent misuse stripped out1 4.
  • Export controls. Anthropic argues that distillation lets labs close the gap that chip export controls were meant to keep open, and can make it look as if the controls do not work1.
  • National security. The CISA, NSA and FBI advisory of 8 September 2026 names six China-based companies and says they extracted billions of tokens from US frontier models, likely with Chinese government awareness5. NSTM-4 commits the administration to sharing information about these campaigns with US AI companies2.

Distillation attacks in the OWASP Top 10 for LLMs

If your risk register uses the OWASP Top 10 for LLM applications, distillation sits under LLM10:2025 Unbounded Consumption. Two of its listed vulnerabilities are model extraction via the API, where crafted queries are used to build a shadow model, and functional model replication, where the target model generates synthetic training data for another model6. The same entry covers denial of wallet, the cost side of uncontrolled inference, which is the part an ordinary company feels first. The OWASP unbounded consumption guide covers the whole entry.

Distillation is different from stealing weights. Nobody needs to break into the provider; the attacker only needs a lot of permitted-looking requests. That is why access, meaning accounts and keys, is the contested resource.

Why it matters to a company that is not an AI lab

Google's report says model extraction does not usually threaten ordinary users' confidentiality, integrity or availability; the main risk falls on model developers and service providers3. That is true of the model theft itself. It is not true of the access the campaigns consume.

Your keys can be the vehicle. Anthropic's September 2026 threat report says the proxy services behind these campaigns create accounts with false identities, fake or stolen cards and stolen API keys, and often use stolen API credentials belonging to legitimate companies or individuals7. The same report lists what stolen AI credentials give an operator: resale value, compute at someone else's expense, and cover, because the activity is attributed to the key's owner7. Stolen API keys and distillation campaigns goes into that economy.

Your bill pays for it. Extraction traffic is high-volume and runs around the clock; the advisory lists 24/7 usage with no idle periods among its indicators5. On a key with no spend ceiling, that is the shape of a large invoice.

Your account takes the enforcement. Providers ban accounts that show distillation patterns. After the OpenCode Console breach, which OpenCode said was related to a large-scale distillation attack, BleepingComputer reported that some users said Google had suspended their projects for activity consistent with hijacked resources8. The cause of that breach has not been published; the OpenCode incident write-up keeps to what is confirmed.

Your own model or AI feature can be the teacher. Google advises organizations that offer AI models as a service to monitor API access for extraction patterns, and gives the example of a specialised model targeted by a competitor3. A product that exposes a fine-tuned model, or a free AI feature anyone can call, is a smaller version of the same target.

What to do about it

You cannot stop a lab from distilling a provider's model; that is the provider's fight. You can make sure your keys are a poor vehicle and that you notice quickly if one is used.

  • Give every workload its own key, scoped to one project or workspace and to inference only. See securing LLM API keys.
  • Set spend limits at the provider on every project or workspace that holds a key. Provider spend limits compared lists what each provider offers.
  • Read the provider's own usage report by key, not only your application's logs. Traffic on your key that your systems did not send is the signal that matters.
  • Rotate keys on a schedule and immediately after any tool that stored them reports a breach.
  • Buy model access only from the provider or an authorized channel, never from an unknown proxy. AI API proxy risks explains why.
  • If you expose a model to the public, rate-limit per user, cap per-account consumption and watch for repetitive, reasoning-seeking prompt patterns.

How INFRO handles distillation risk on your keys

INFRO does not detect or block distillation of a provider's model; the providers' classifiers and account controls do that. What INFRO does is limit what your own keys can be used for and tell you when spending departs from normal.

  • Provider keys you connect are encrypted with AES-256-GCM under a key held outside the database, with the organization and connection bound in, and are never shown again after saving.
  • Applications call INFRO with gateway keys that can be limited to chosen providers and IP ranges (403 ip_not_allowed before any provider call), belong to one environment, expire, and rotate with an overlap window.
  • Budgets at organization, project, member and key level are checked before the provider is called and refuse with 402. Spend alerts flag a day that departs from a scope's usual day.
  • On the Business plan, reconciliation compares INFRO's estimates with OpenAI's and Anthropic's own cost reports daily; with usage access on, it reads token counts by provider key and can show traffic on your account that did not go through INFRO. Without usage access it reports "not checked".

The limit is plain. INFRO's controls govern traffic that goes through INFRO. A provider key stolen from anywhere, including from a platform like INFRO that stores customers' keys, can be used directly against the provider and bypasses every INFRO budget and allowlist. The backstops for that case are at the provider: scoped keys, provider spend limits, revocation and the provider's own usage monitoring.

Summary

A distillation attack copies a model by harvesting its outputs and reasoning through the API at scale, without permission. It is the providers' problem first, and they have published how they fight it. It becomes your problem through access: the campaigns need accounts and keys, some of those keys are stolen from ordinary companies, and the owner of a stolen key pays for the traffic. Scope your keys, cap them at the provider, and read usage by key.

Questions readers ask

What is a distillation attack in AI?
The unauthorized, large-scale collection of an AI model's outputs, and often its reasoning, through the model's API, used to train another model that reproduces its abilities. Distillation itself is a normal training method; it is an attack when the model's owner has not allowed it.
Is model distillation illegal?
Distilling your own models, or models whose terms allow it, is routine. Major providers' terms forbid using their outputs to build competing models; Google's threat report calls distillation from Gemini without permission a terms-of-service violation and mentions takedowns and legal action. Whether a specific case is unlawful is a legal question for counsel, not a blog post.
How is a distillation attack different from model extraction?
They overlap. Model extraction is the broader term for recovering a model or its behaviour through queries. Distillation attacks are the form described in 2026: harvesting outputs and reasoning at scale and fine-tuning a student model on them. OWASP lists both model extraction via the API and functional model replication under LLM10:2025 Unbounded Consumption.
Why should a company that does not build models care?
Because the campaigns need API access at scale, and Anthropic reports that proxy services often use stolen API credentials of legitimate companies and individuals. A leaked key can carry extraction traffic, the key's owner pays for it, and the provider may suspend the account.

From the team that builds it

Where this shows up in INFRO

INFRO is a control plane in front of the provider accounts you already hold. The capabilities below are the parts of it this article touches, each with the documentation that defines its behaviour.

  • Provider connections

    Available with a plan

    Connect provider accounts you already hold. Each credential is encrypted when saved, scoped to your organization and never shown again; applications use INFRO gateway keys instead.

    Read the documentation for Provider connections
  • Key limits and rotation

    Available with a plan

    Limit a gateway key to chosen providers or IP ranges, and rotate it with an overlap window so the old key keeps working while you deploy the new one.

    Read the documentation for Key limits and rotation
  • Budgets and spend ceilings

    Available with a plan

    A hard cap per organization, project, member, and key, with alerts at your own thresholds.

    Read the documentation for Budgets and spend ceilings
  • Spend anomaly and drift alerts

    Available with a plan

    Each scope's usual day is learned from its own history; a day that departs from it, a budget forecast to be exceeded, cost estimates drifting from the provider's own figures, unpriced traffic and failing connections become findings in the console. Routed to email on every plan, and to Slack and signed webhooks from the Startup plan.

    Read the documentation for Spend anomaly and drift alerts
  • Provider cost reconciliation

    Available with a plan

    Daily comparison of estimated spend against the cost reported by OpenAI's and Anthropic's own cost APIs, using a separate admin credential, with the likely cause of a persistent gap and a suggested rate you can apply. Included on the Business plan.

    Read the documentation for Provider cost reconciliation

INFRO accounts are self-serve. Provider usage is billed to you by your providers; INFRO charges a software subscription and takes 0% of model spend. See plans.

Sources

Numbered in order of first citation. Each was opened and checked against the claim on the date shown.

  1. 1.Detecting and preventing distillation attacks (opens in a new tab) — Anthropic. Accessed Oct 21, 2026.
  2. 2.NSTM-4: Adversarial Distillation of American AI Models (opens in a new tab) — White House Office of Science and Technology Policy. Accessed Oct 21, 2026.
  3. 3.GTIG AI Threat Tracker: Distillation, Experimentation, and (Continued) Integration of AI for Adversarial Use (opens in a new tab) — Google Threat Intelligence Group. Accessed Oct 21, 2026.
  4. 4.Disrupting a coordinated model-distillation campaign (opens in a new tab) — OpenAI. Accessed Oct 21, 2026.
  5. 5.China-Based Artificial Intelligence Companies Conducting Industrial-Scale Distillation Campaigns Against U.S. AI Companies (AA26-251A) (opens in a new tab) — CISA, NSA and FBI. Accessed Oct 21, 2026.
  6. 6.LLM10:2025 Unbounded Consumption (opens in a new tab) — OWASP GenAI Security Project. Accessed Oct 21, 2026.
  7. 7.Countering misuse of AI: September 2026 (opens in a new tab) — Anthropic. Accessed Oct 21, 2026.
  8. 8.OpenCode hack exposes API keys amid AI distillation attacks (opens in a new tab) — BleepingComputer. Accessed Oct 21, 2026.

About this article

Written on 2026-10-21 from Anthropic's February and September 2026 publications, Google Threat Intelligence Group's February 2026 report, OpenAI's September 2026 post, the CISA, NSA and FBI advisory AA26-251A, the White House memorandum NSTM-4, OWASP's LLM10:2025 entry and BleepingComputer's report on OpenCode, all opened that day. Written by the team that builds INFRO, which stores customers' provider keys; its section states what its controls cannot do.

Last checked against its sources on . The next review is due by . No separate named reviewer is recorded for this article.

How articles are written, sourced and corrected is set out in the editorial standards.