Back to Intelligence

Distillation Attacks on Frontier AI Models: Detecting and Defending Against Industrial-Scale LLM Capability Theft

SA
Security Arsenal Team
September 10, 2026
12 min read

U.S. cybersecurity and intelligence agencies have publicly accused China-based artificial intelligence companies of conducting what officials describe as the "systematic extraction" of proprietary capabilities from American frontier models — specifically Claude (Anthropic), GPT (OpenAI), Gemini (Google), and Grok (xAI) — through distillation attacks. According to the reporting, this activity is occurring at industrial scale and forms the "core" of these firms' AI development strategy. In plain terms: adversarial organizations are allegedly mass-querying U.S. frontier models through their public APIs, harvesting millions of high-quality outputs, and using those outputs as synthetic training data to build competing models — bypassing the enormous compute, data curation, and R&D investment the original developers made.

This is not a vulnerability in the classic CVE sense. There is no patch, no misconfiguration to close, no endpoint malware signature to deploy. This is authorized-channel abuse: the attackers use the same API access any legitimate customer uses, which makes this one of the harder detection problems in modern security operations. The blast radius extends beyond the AI vendors themselves — any organization that operates an LLM-backed SaaS product, an internal copilot, or a proprietary model endpoint is a potential extraction target, and any enterprise whose employees route sensitive data through abused accounts becomes collateral exposure.

Defenders need to act on two fronts: (1) if you operate model endpoints, you need behavioral analytics that distinguish legitimate usage from systematic capability mapping; and (2) if you are an enterprise customer of these platforms, you need egress visibility and governance so that your own credentials and data are not conduits or victims of extraction campaigns.

Technical Analysis

What a Distillation Attack Actually Looks Like

Knowledge distillation is a legitimate ML technique — a smaller "student" model is trained on the outputs of a larger "teacher" model. The attack variant weaponizes it:

  1. Access acquisition at scale. Operators provision thousands of API accounts, typically using synthetic identities, stolen payment instruments, compromised reseller accounts, or layered corporate shells. Access is distributed across many API keys to stay under per-account rate limits. In several documented abuse patterns across the industry, operators route traffic through rotating residential proxy networks and cloud egress points to defeat ASN- and geography-based blocking.
  2. Systematic capability mapping. Rather than organic, task-driven queries, extraction campaigns issue prompts that methodically sweep a model's capability surface: long-chain reasoning problems, code generation across dozens of languages, domain-specific knowledge probes (legal, medical, financial), multilingual coverage, safety/refusal boundary mapping, and chain-of-thought elicitation. Prompt diversity is synthetic and programmatic — generated by templates or other LLMs — which leaves statistical fingerprints.
  3. Output harvesting and dataset construction. Responses are logged to structured datasets (JSONL corpora), often with instruction/response pairs formatted directly for supervised fine-tuning. The harvest volume is measured in millions to billions of tokens.
  4. Student model training. The harvested corpus is used to fine-tune or train a competing model, transferring capability without transferring weights.

Affected Platforms

Per the U.S. government accusation, the targets named are the flagship frontier-model APIs:

  • Anthropic Claude (api.anthropic.com)
  • OpenAI GPT (api.openai.com, including Azure OpenAI endpoints *.openai.azure.com)
  • Google Gemini (generativelanguage.googleapis.com, Vertex AI *-aiplatform.googleapis.com)
  • xAI Grok (api.x.ai)

No CVE identifiers are associated with this activity — the abuse operates entirely within intended API functionality. MITRE ATT&CK mapping for the adversary behavior sits most naturally under the ATLAS framework: AML.T0040 (ML Model Inference API Access), AML.T0024 (Exfiltration via ML Inference API), and AML.T0044 (Full ML Model Access) in its abuse-of-legitimate-access form. For enterprise-side TTPs, T1552.001 (Credentials in Files) applies where API keys are harvested from developer environments, and T1102 (Web Service) / T1071.001 (Application Layer Protocol: Web) describe the C2/exfil-adjacent traffic patterns.

Exploitation Status

Confirmed and ongoing at scale per the U.S. government assessment. This is not theoretical: multiple frontier-model providers have publicly described banning coordinated account clusters engaged in distillation-style abuse over the past 18 months, and the intelligence-community attribution elevates this from a terms-of-service violation to a nation-state-adjacent economic espionage concern. Organizations should treat their own LLM API endpoints — internal or customer-facing — as actively probed targets.

Why Traditional Controls Fail

  • Rate limits alone are insufficient. Distributed campaigns run low-and-slow across thousands of keys; no single key trips a threshold.
  • Authentication does not equal authorization of intent. A valid API key with valid billing is indistinguishable from an abusive key until behavioral analytics are applied.
  • Perimeter blocking is porous. Residential proxies and compromised cloud egress make IP reputation unreliable as a primary control.

The detection surface that matters is behavioral and aggregate: prompt distributions, session cadence, cross-key clustering, and output-collection patterns.

Detection & Response

Sigma Rules

The following rules target the enterprise-side observables: scripted LLM API clients running from unexpected processes/hosts, API key material appearing in command lines (a hallmark of automation frameworks and a key-exposure risk), and non-browser processes holding long-lived connections to model API endpoints. Tune the endpoint lists to the providers you actually use.

YAML
---
title: Scripted LLM API Client Execution with Proxy or Bulk Collection Indicators
id: 3f9c2b71-4a6d-4e58-9b31-7c2d8a5f1042
status: experimental
description: Detects Python/Node processes invoking LLM API SDKs (openai, anthropic, google.generativeai) combined with proxy flags, dataset output arguments, or batch collection patterns consistent with automated model harvesting rather than interactive developer use.
references:
  - https://atlas.mitre.org/techniques/AML.T0040
  - https://atlas.mitre.org/techniques/AML.T0024
author: Security Arsenal
date: 2026/09/15
tags:
  - attack.collection
  - attack.t1102
logsource:
  category: process_creation
  product: windows
detection:
  selection_sdk:
    CommandLine|contains:
      - 'openai'
      - 'anthropic'
      - 'generativeai'
      - 'xai'
      - 'api.anthropic.com'
      - 'api.openai.com'
      - 'generativelanguage.googleapis.com'
      - 'api.x.ai'
  selection_bulk:
    CommandLine|contains:
      - '--proxy'
      - 'proxy_list'
      - 'rotating'
      - 'residential'
      - '--output jsonl'
      - 'jsonl'
      - '--concurrency'
      - '--num-prompts'
      - 'prompts.csv'
  condition: selection_sdk and selection_bulk
falsepositives:
  - Legitimate ML engineering teams running batch evaluation harnesses; whitelist known build/agent hosts
level: high
---
title: LLM API Key Material Exposed in Process Command Line
id: 8b1e4d06-2c5f-4a97-b3e0-6d9c1f8a2753
status: experimental
description: Detects API key patterns for major frontier-model providers (OpenAI sk-proj-/sk-, Anthropic sk-ant-, xAI xai-, Google AIza) present in process command lines, indicating automation frameworks embedding credentials directly or potential key theft staging.
references:
  - https://attack.mitre.org/techniques/T1552/001/
author: Security Arsenal
date: 2026/09/15
tags:
  - attack.credential_access
  - attack.t1552.001
logsource:
  category: process_creation
  product: windows
detection:
  selection:
    CommandLine|contains:
      - 'sk-ant-'
      - 'sk-proj-'
      - 'sk-svcacct-'
      - 'xai-'
      - 'AIzaSy'
  filter_known_tools:
    Image|endswith:
      - '\Code.exe'
      - '\cursor.exe'
  condition: selection and not filter_known_tools
falsepositives:
  - IDE-integrated assistants launching helper processes; developers testing SDKs interactively — investigate source host and user context
level: medium
---
title: Non-Browser Process Network Connection to Frontier LLM API Endpoints
id: c27a9f45-1d83-4e6a-92b7-5e0d3c8b9164
status: experimental
description: Detects network connections to major LLM API endpoints from processes other than approved browsers or sanctioned AI client applications, which may indicate automated harvesting scripts, unauthorized tooling, or shadow AI usage.
references:
  - https://atlas.mitre.org/techniques/AML.T0040
author: Security Arsenal
date: 2026/09/15
tags:
  - attack.collection
  - attack.t1071.001
logsource:
  category: network_connection
  product: windows
detection:
  selection:
    DestinationHostname|contains:
      - 'api.openai.com'
      - 'api.anthropic.com'
      - 'generativelanguage.googleapis.com'
      - 'api.x.ai'
      - '.openai.azure.com'
  filter_browsers:
    Image|endswith:
      - '\chrome.exe'
      - '\msedge.exe'
      - '\firefox.exe'
      - '\brave.exe'
  condition: selection and not filter_browsers
falsepositives:
  - Sanctioned copilot integrations, Slack/Teams AI features, approved developer SDK usage — maintain an allowlist of approved AI client binaries per host
level: low

KQL (Microsoft Sentinel / Defender)

This hunt identifies endpoints generating sustained, high-volume connection patterns to frontier-model API hosts — the aggregate-behavior signal that distinguishes scripted harvesting from interactive use. It buckets connections per device per hour and flags outliers against a baseline threshold. Run it over 7–14 days and tune HarvestThreshold to your environment (a developer workstation doing legitimate batch work can hit 300 connections/hour; a finance workstation hitting 2,000 is a finding).

KQL — Microsoft Sentinel / Defender
let HarvestThreshold = 500;
let LLMEndpoints = dynamic(["api.openai.com","api.anthropic.com","generativelanguage.googleapis.com","api.x.ai","openai.azure.com","aiplatform.googleapis.com"]);
DeviceNetworkEvents
| where TimeGenerated > ago(7d)
| where RemoteUrl has_any (LLMEndpoints)
| where InitiatingProcessFileName !in~ ("chrome.exe","msedge.exe","firefox.exe","brave.exe")
| summarize ConnCount = count(),
            Processes = make_set(InitiatingProcessFileName, 10),
            DistinctRemoteIPs = dcount(RemoteIP),
            FirstSeen = min(TimeGenerated),
            LastSeen = max(TimeGenerated)
    by DeviceName, InitiatingProcessAccountName, bin(TimeGenerated, 1h)
| where ConnCount > HarvestThreshold
| project TimeGenerated, DeviceName, InitiatingProcessAccountName, ConnCount, DistinctRemoteIPs, Processes, FirstSeen, LastSeen
| order by ConnCount desc;
// Pivot: for flagged devices, examine the initiating process tree and command lines
// DeviceProcessEvents | where DeviceName == "<flagged-host>" | where TimeGenerated between (datetime(...) .. datetime(...)) | project ProcessCommandLine, FileName, FolderPath

Velociraptor VQL

For IR scoping on a suspect host — for example, a workstation or build server flagged by the KQL hunt — this artifact pulls running processes whose command lines reference LLM SDKs, harvesting output formats (JSONL corpora), or proxy-rotation infrastructure, and joins against established network connections to model API infrastructure.

VQL — Velociraptor
-- Scope suspected LLM harvesting automation on an endpoint:
-- processes referencing LLM SDKs, JSONL dataset output, or proxy rotation,
-- joined with live connections to frontier-model API infrastructure
LET procs = SELECT Pid, Name, CommandLine, Exe, Username, CreateTime
FROM pslist()
WHERE CommandLine =~ '(openai|anthropic|generativeai|api\\.x\\.ai)'
   OR CommandLine =~ '(jsonl|prompts\\.csv|proxy_list|--concurrency|--num-prompts)'

SELECT Pid, Name, CommandLine, Exe, Username, CreateTime,
       (SELECT Laddr, Raddr, Status FROM netstat(pid=Pid)) AS Connections
FROM procs

Remediation / Audit Script

The following Bash script audits egress proxy (Squid-style) or Zeek http.log/ssl.log exports for source hosts generating abnormal volumes of requests to frontier-model API endpoints, then flags candidates for API-key rotation and account investigation. Run it against your centralized egress logs (or point Sentinel's CommonSecurityLog export at the same logic). Adjust THRESHOLD to your baseline.

Bash / Shell
#!/usr/bin/env bash
# llm-egress-audit.sh — Flag hosts with anomalous request volume to frontier LLM APIs
# Usage: ./llm-egress-audit.sh /var/log/squid/access.log [THRESHOLD]

LOGFILE="${1:?Usage: $0 <egress_log> [threshold]}"
THRESHOLD="${2:-1000}"
REPORT="llm_egress_audit_$(date +%Y%m%d_%H%M%S).txt"

# Frontier-model API host patterns (extend to your sanctioned providers)
API_PATTERN='api\.openai\.com|api\.anthropic\.com|generativelanguage\.googleapis\.com|api\.x\.ai|openai\.azure\.com|aiplatform\.googleapis\.com'

{
  echo "=== LLM Egress Audit — $(date -u) ==="
  echo "Log: $LOGFILE | Threshold: $THRESHOLD requests/source"
  echo
  echo "--- Per-source request counts to LLM API endpoints ---"
  # Works for Squid access.log (field 3 = src, field 7 = URL) and generic proxy logs
  grep -Ei "$API_PATTERN" "$LOGFILE" \
    | awk '{print $3}' \
    | sort | uniq -c | sort -rn \
    | awk -v t="$THRESHOLD" '$1 > t {print $1"\t"$2"  <-- EXCEEDS THRESHOLD"} $1 <= t {print $1"\t"$2}'
  echo
  echo "--- Hourly distribution for top offender (cadence analysis: flat cadence = scripted) ---"
  TOP_SRC=$(grep -Ei "$API_PATTERN" "$LOGFILE" | awk '{print $3}' | sort | uniq -c | sort -rn | head -1 | awk '{print $2}')
  if [ -n "$TOP_SRC" ]; then
    grep -Ei "$API_PATTERN" "$LOGFILE" | grep -F "$TOP_SRC" \
      | awk '{print substr($1,1,13)}' | sort | uniq -c
  fi
  echo
  echo "--- ACTION ITEMS ---"
  echo "1. For sources exceeding threshold: identify owning team; sanctioned or not?"
  echo "2. If unsanctioned: isolate host, collect process listing + crontab/systemd units"
  echo "3. Rotate any LLM API keys present on flagged hosts (check ~/.config, .env, env vars)"
  echo "4. Report volume metrics to your LLM provider's abuse team for cross-key correlation"
} | tee "$REPORT"

echo "[+] Report written to $REPORT"

# Scan a flagged host's home dirs for exposed key material (run on the suspect host)
# grep -rEno '(sk-ant-[A-Za-z0-9_-]{20,}|sk-proj-[A-Za-z0-9_-]{20,}|AIzaSy[A-Za-z0-9_-]{30,}|xai-[A-Za-z0-9_-]{20,})' /home /root /opt 2>/dev/null

Remediation

Because this is abuse of legitimate access rather than a patchable flaw, remediation is architectural and procedural. Prioritize by role.

If you operate LLM API endpoints (AI vendors, SaaS providers, enterprises with internal copilots):

  1. Deploy aggregate behavioral analytics, not just rate limits. Build cross-key clustering: group accounts by shared payment instruments, device fingerprints, egress IP overlap, prompt-template similarity, and synchronized request cadence. Distillation farms betray themselves through coordination more than through volume.
  2. Instrument prompt-distribution analysis. Legitimate users have organic, task-driven prompt distributions. Extraction campaigns show statistically anomalous coverage: uniform sweeps across capability dimensions, templated prompt structures, near-zero follow-up/conversational branching, and prompt entropy signatures consistent with LLM-generated prompts.
  3. Enforce identity assurance proportional to access tier. High-throughput API tiers should require verified organizational identity, KYB checks, and payment-instrument vetting. Flag and restrict accounts that fail provenance checks, and apply graduated output fidelity (e.g., constrained logprobs, truncated chain-of-thought) to low-assurance tiers.
  4. Deploy canary prompts and output watermarking. Seed honey-token prompts — queries whose responses would only appear in a harvested dataset — and monitor the public model ecosystem for their fingerprints. Statistical watermarking of outputs (where feasible) gives you evidentiary standing to prove extraction, which matters for enforcement and, increasingly, for government reporting channels.
  5. Coordinate abuse telemetry with peers and government. The U.S. government attribution means sector ISACs and CISA channels are receptive to structured abuse reporting. Cross-provider correlation is how distributed campaigns get unmasked — a campaign that looks like 400 independent users at Anthropic looks like one coordinated farm when correlated across four providers.

If you are an enterprise customer of these platforms:

  1. Inventory and govern LLM API usage. You cannot detect abuse of credentials you don't know exist. Enumerate every API key in your environment (secrets scanners against repos, CI/CD, .env files, and developer workstations), assign each an owner, and kill orphaned keys. Enforce keys via a managed egress gateway — never embedded in scripts.
  2. Establish egress baselines now. Deploy the KQL hunt and egress-audit script above to build your per-host baseline before you need it. The detection gap on API-abuse threats is almost always "we never logged it," not "we logged it and missed it."
  3. Restrict LLM API egress to sanctioned proxies and service principals. Network-allowlist the API endpoints your organization actually uses; alert on all others. An employee workstation talking to api.anthropic.com with a personal key is both a shadow-IT problem and a potential extraction-conduit problem.
  4. Review data classification against LLM egress. Any prompt leaving your boundary may carry regulated data. For HIPAA- and PCI-scoped organizations, an unmanaged LLM API channel is an unmonitored exfiltration channel — treat it as such in your DLP policy.
  5. Vendor risk follow-through. If your vendors consume frontier-model APIs, ask how their keys are protected and how they detect account-takeover-driven extraction abuse. Compromised reseller and integrator accounts are a documented access vector for these campaigns.

Strategic note for CISOs: The government's framing — that distillation extraction is "industrial-scale" and "core" to adversary development strategy — means this activity will persist and professionalize. Treat LLM endpoint protection as a standing detection-engineering workstream with quarterly tuning, not a one-time control deployment. If your organization ships any ML-backed product, assume your model's capability surface is being systematically mapped today and build the telemetry to prove or disprove that assumption.

Related Resources

Security Arsenal Alert Triage Automation AlertMonitor Platform Book a SOC Assessment platform Intel Hub

Is your security operations ready?

Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.