मुख्य सामग्री पर जाएँ
Skillpedia
एजेंट35k · #7852

detecting-model-extraction-attacks

यह क्या करती है

यह टूल आपके AI मॉडल को उन हमलों से बचाता है जो मॉडल को चुराने या उसकी नकल बनाने की कोशिश करते हैं। यह देखता है कि आपके मॉडल को कौन इस्तेमाल कर रहा है और कैसे, ताकि संदिग्ध गतिविधि पकड़ी जा सके।

कब इस्तेमाल करें

  • ✓जब आप अपने मॉडल को API के ज़रिए एक्सेस देते हैं।
  • ✓मॉडल को लॉन्च करने से पहले उसकी सुरक्षा जाँचने के लिए।
  • ✓जब आपके मॉडल पर असामान्य इस्तेमाल या गतिविधि में अचानक बढ़ोतरी की जाँच करनी हो।

Skill का लिंक

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-model-extraction-attacks/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-model-extraction-attacks/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरे AI मॉडल को चुराने की कोशिशों की जाँच करो।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह देखता है कि हर यूज़र ने मॉडल को कितनी बार एक्सेस किया और उसने किस तरह की जानकारी माँगी। अगर कोई बहुत ज़्यादा सवाल पूछता है या बहुत खास डेटा माँगता है, तो टूल संभावित हमले की चेतावनी दे सकता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Detecting Model Extraction Attacks

Authorized Use Only: The extraction, inversion, and membership-inference techniques described here are intended for defenders testing their own models and for red teams operating under written authorization. Querying a third-party model to clone it, reconstruct its training data, or infer membership without permission may violate terms of service, copyright, and privacy law.

Overview

Model extraction is the family of attacks in which an adversary abuses a model's inference API to steal value that the model owner intended to keep private. MITRE ATLAS catalogs these under AML.T0024 — Exfiltration via AI Inference API, in the Exfiltration tactic, with three sub-techniques:

  • AML.T0024.000 — Infer Training Data Membership (membership inference): the adversary determines whether a specific record was part of the training set, a privacy violation that can expose, for example, whether a patient's record trained a medical model.
  • AML.T0024.001 — Invert AI Model (model inversion): the adversary reconstructs representative training inputs (e.g., faces, text) by exploiting confidence scores returned by the API.
  • AML.T0024.002 — Extract ML Model (model stealing): the adversary repeatedly queries the victim model, collects (input, prediction) pairs, and trains a surrogate model offline that mimics the victim's decision boundary — avoiding the per-query cost of a Machine-Learning-as-a-Service offering and stealing the owner's intellectual property.

All three share a common signal: an attacker must send many queries, often crafted to probe the decision boundary (high-entropy, near-boundary, synthetic, or systematically grid-sampled inputs), and frequently requests full confidence vectors / logits rather than just the top label. Detection therefore centers on per-principal query monitoring, input-distribution analysis, and confidence-exposure controls, while defense centers on rate limiting, output perturbation, and reducing the information returned per query. This skill follows the MITRE ATLAS technique definition for AML.T0024 (https://atlas.mitre.org/techniques/AML.T0024) and the NIST AI RMF MEASURE function (MEASURE-2.6, security and resilience of the AI system).

When to Use

  • When you operate a model behind a public or partner inference API and need to detect cloning, inversion, or membership inference.
  • When performing a pre-deployment AI red-team exercise to measure how many queries are needed to extract your own model.
  • When validating that rate limiting, output perturbation, and confidence-suppression controls actually reduce extractability.
  • When investigating anomalous billing/usage spikes that may indicate surrogate-model harvesting.
  • When responding to a privacy incident where membership inference against a model is suspected.

Prerequisites

  • Python 3.9+ environment.
  • Access to inference-API access logs (per-API-key/per-principal query counts, timestamps, input features or hashes, returned confidence vectors).
  • For self-assessment red-teaming, install the Adversarial Robustness Toolbox (ART), the reference framework for extraction/inference attacks and defenses:
    pip install adversarial-robustness-toolbox scikit-learn numpy
    
  • Optional: access to the target model object (white/grey-box) or only its API (black-box).
  • Authorization to test the target model.

Objectives

  • Instrument the inference API to record per-principal query volume, input diversity, and confidence-exposure.
  • Build a detector that scores principals for extraction-like behavior (volume, near-boundary sampling, full-vector requests).
  • Run an ART-based extraction attack against your own model to measure fidelity vs. query budget.
  • Run a membership-inference attack to quantify training-data leakage.
  • Apply and validate defenses: rate limiting, label-only responses, confidence rounding/perturbation, and prediction poisoning.

MITRE ATT&CK Mapping

ID Name (MITRE ATLAS) Tactic
AML.T0024 Exfiltration via AI Inference API Exfiltration
AML.T0024.000 Infer Training Data Membership Exfiltration
AML.T0024.001 Invert AI Model Exfiltration
AML.T0024.002 Extract ML Model Exfiltration

Workflow

1. Instrument the inference API for detection signals

…

अक्सर पूछे जाने वाले सवाल

'model extraction' क्या है?

यह एक ऐसा हमला है जिसमें कोई मॉडल से बहुत सारे सवाल पूछकर उसकी नकल बनाने या उसे दोबारा बनाने की कोशिश करता है, ताकि इस्तेमाल का पैसा न देना पड़े या आपकी तकनीक चुराई जा सके।

'membership inference' क्या है?

यह एक ऐसा हमला है जो पता लगाने की कोशिश करता है कि कोई खास डेटा मॉडल को ट्रेन करने में इस्तेमाल हुआ था या नहीं। इससे निजता का उल्लंघन हो सकता है।

'model inversion' क्या है?

यह एक ऐसा हमला है जो मॉडल के दिए जवाबों से, उसकी ट्रेनिंग में इस्तेमाल हुए डेटा के उदाहरण, जैसे तस्वीरें या टेक्स्ट, दोबारा बनाने की कोशिश करता है।

जानकारी

लेखक का मूल विवरण

Detect MITRE ATLAS AML.T0024 attacks (model stealing, inversion, membership inference) performed via inference-API abuse, by monitoring per-principal query volume/distribution, rate-limiting and perturbing outputs, and red-teaming your model's extractability. Use for a public or partner inference API needing cloning/inversion/membership-inference detection, or a pre-deployment red-team exercise to

repo: mukul975/Anthropic-Cybersecurity-Skills

लोकप्रियता

GitHub स्टार
35k
रैंकिंग में स्थान
#7852
लाइसेंस
Apache-2.0
अपडेट की गई
31/8/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills