AI Security Threat Modeling: Build a Defense Map with NIST, MITRE ATLAS, and OWASP
AI Security Threat Modeling: Build a Defense Map with NIST, MITRE ATLAS, and OWASP
Search
Ask the AI

AI Security Threat Modeling: Build a Defense Map with NIST, MITRE ATLAS, and OWASP

Threat modelling a machine learning system requires checking its specific attack surface alongside dependency scans, endpoint authentication, and server hardening: training data can be poisoned, the model weights are themselves an asset to protect, and model outputs can expose information about training data.

The framework below draws on three public sources: the NIST Adversarial Machine Learning taxonomy (NIST.AI.100-2e2025), MITRE ATLAS, and the OWASP LLM Top 10. The sections below connect them to an asset inventory and verification evidence, with test methods and pass criteria to be specified for the relevant system.

1. Beyond the Weights: An Expanded Asset Taxonomy

A machine-learning asset inventory also covers data, model artifacts, inference outputs, retrieved context and feedback data. Each has its own modification permissions and trust boundaries:

  • Training Data & Pipeline: Raw samples, labels, annotation functions, source records and signatures, and filtering rules. Check where data poisoning or backdoor (BadNets) injection could enter.
  • Model Artifacts: Learned parameter matrices \( \theta \in \mathbb{R}^d \), tokenizers, embedding spaces, calibration hyperparameters, and evaluation set distributions.
  • Prediction Interfaces (Inference): Inputs \( x \), logits, softmax probabilities \( f(x) \), confidence scores, and local/global explanations. Vulnerable to Model Extraction and Membership Inference Attacks (MIA).
  • Context & Orchestration Systems: RAG document corpora, vector database index structures (e.g., HNSW), reranker weights, and ReAct agent tool permission schemas.
  • Feedback Loops: RLHF reward models, preference datasets, and active learning retraining queues.

2. The Mathematical Threat Landscape: A Three-Layer Architecture

We organise the threat model into three operational layers:

Layer 1: The Optimization Risk (NIST taxonomy). Categorizes attacks by their mathematical objectives. Evasion computes perturbations \( \delta \) such that \( \arg\max f(x+\delta) \neq y \). Poisoning injects \( (x_p, y_p) \) into the training distribution \( \mathcal{D} \) to shift the empirical risk minimizer \( \hat{\theta} \). Membership inference is one privacy attack; its target can be expressed as the conditional membership probability \( P(x \in \mathcal{D}_{train} \mid f(x, \theta)) \).

Layer 2: The Tactical Execution (MITRE ATLAS). Maps adversarial objectives to execution chains, such as ML Supply Chain Compromise (e.g., malicious pickle serialization leading to RCE) or Discovering ML Artifacts.

Layer 3: Application Failure Modes (OWASP LLM Top 10). Translates these to runtime exploits: Prompt Injection (modifying the LLM’s conditioning context), Sensitive Information Disclosure, and Excessive Agency in automated reasoning pipelines.

3. Red/Blue Team Post-Mortem: Production Threat Records

A threat record should specify the attacker’s objective, available information, success metric and acceptance criteria. The original example below is retained for comparison with the corrections that follow:

Asset: Inference API (Softmax Output)
Attacker Goal: Membership Inference Attack (MIA)
Mathematical Vector: Exploit the divergence in prediction entropy between training and holdout sets. Attacker trains a shadow model to classify H(f(x)).
Red Team Validation: Shadow model achieves MIA AUC-ROC > 0.7.
Blue Team Control: Temperature scaling, logit suppression (Top-k only), and differential privacy (DP-SGD) during training with (ε, δ)-bounds.
Residual Risk: Complete defense via DP-SGD severely degrades primary task accuracy. Boundary leakage remains possible via timing side-channels.

Corrections to the example: AUC-ROC > 0.7 is the box’s hypothetical criterion, not a universal threshold or a measurement on this page. Shadow models usually generate outputs for known members and nonmembers, which then train an attack classifier; entropy can also serve as a direct score. Temperature scaling and Top-k output require their own membership-risk evaluation. They do not replace a privacy guarantee. DP-SGD’s ε,δ guarantee depends on clipping, noise, sampling and privacy accounting; it bounds how neighboring datasets affect the distribution of released results. This is neither complete prevention nor an inevitable severe accuracy loss. Timing channels outside that training mechanism require separate analysis.

4. Mathematical Formalization of Evasion (Threat Modeling Entry Point)

Local linearization provides one way to construct evasion attacks. An attacker seeks a perturbation \( \delta \) subject to an \( L_p \) norm constraint \( \|\delta\|_p \le \epsilon \).

The objective is to maximize the loss function \( J(\theta, x + \delta, y) \):

\[ \delta^* = \arg\max_{\|\delta\|_p \le \epsilon} J(\theta, x + \delta, y) \]

The Jacobian \( \nabla_x f(x) \) describes local output sensitivity. A large spectral norm permits a large first-order change in some direction; misclassification also depends on class margins, allowed directions for \( \delta \), perturbation budget and nonlinear behavior nearby. The norm alone is not a sufficient vulnerability criterion. The objective above describes untargeted loss maximization under a norm budget; an applicable input-domain constraint, such as pixel bounds, must also be included.

5. Engineering Controls and Evidence

Where applicable, retain the following records in CI/CD/CT (Continuous Training) workflows:

  • Data Provenance Cryptography: Hash datasets and validate trusted-source signatures to detect replacement and source changes. Signed data still require content and label review.
  • Robustness Certificates: When a certification method applies, record its Lipschitz bounds or randomized smoothing guarantees with the norm, radius, confidence level and model version.
  • Inference Telemetry: For KL-divergence monitoring, define comparable feature or output distributions, estimators and alert thresholds, then measure false alarms. Drift alone does not identify an OOD (Out-of-Distribution) attack, and evasion need not cause detectable drift.

6. Threat Model Evidence Matrix

The table below connects each risk to a measurable artifact for design review, release approval, and incident response.

Risk surface Attacker objective Evidence to collect Control boundary
Training data Shift the learned decision boundary or implant a trigger Dataset hash, source signature, label audit sample, duplicate rate, poison scan result Quarantine untrusted sources and require provenance before retraining
Model artifact Replace weights, tokenizer, or calibration metadata Signed checkpoint, dependency SBOM, evaluation hash, model card version Only signed artifacts enter the registry and deployment pipeline
Inference API Extract the model, infer membership, or probe decision boundaries Query entropy, rate-limit events, confidence distribution, repeated boundary queries Limit logits, bucket confidence, and alert on active-learning-like traffic
RAG and agents Inject instructions through retrieved data or abuse tool permissions Retrieved document trust tier, tool call policy decision, denied action logs Separate data context from instructions and enforce tool RBAC outside the LLM

7. Conclusion

Threat modeling for AI continually defines the scope of adversarial optimization and measures risk. Qualitative checklists should also identify measurable controls and outcomes.

A threat model that changes no specific decision is just a document

A threat model should inform specific decisions. An entry with no owner, action or acceptance criteria still needs to be turned into a control.

A direct test for whether a threat model is useful: point at any line and ask “what specifically did we change because of this line.” If the answer is “raised awareness” or “increased monitoring vigilance,” that line produced no control. Useful answers look like: because of this, a tool moved from enabled-by-default to requiring explicit authorisation; because of this, an endpoint gained rate limiting; because of this, a dataset moved off shared storage.

The corresponding practice: every threat must resolve to an owner, a specific action, and a completion criterion. An entry without all three is an observation, not a control. Observations have value, but they belong on a separate list — mixed in with implemented controls, they make the document read as far stronger protection than actually exists.

The asset inventory’s most common gap: multiple paths to the same data

Add access paths to the asset taxonomy: the same data may be reachable through several entry points, each requiring its own authentication, permission and logging record.

In the recorded self-hosted file-manager check, one directory was reachable through both the file-manager interface and a blog hostname. The file-manager side had a login interface, while the blog’s static path served files directly. A later check also found that public forwarding targeted the file manager’s port rather than the new two-factor gateway. The two URLs and the gateway’s presence on the request path therefore required separate verification.

The full account is in Authenticated Is Not Protected. The reusable parts:

  • The unit of modelling is “data plus a path to it,” not “data.” Two paths to the same data are two entries to be assessed separately, because their authentication, logging and rate limiting are quite likely different.
  • Verify each access path with a test request. Take an object you are certain should be private and try every entry point you can think of. Familiarity with the configuration is no substitute, precisely because the hole grows where every individual configuration is correct.
  • Prove the control is in the request path first. Configuration that real traffic has never passed through is a document, not a control, however complete it reads. My gate was exactly that — the port it listened on was not the ingress forwarding target, and its access log contained nothing but loopback requests I had made myself.

How to tell whether a threat is real

Label candidate threats by evidence status: reproduced paths, paths awaiting verification, and paths excluded by evidence.

During that adversarial review, three accusations were ultimately rejected, each exposing a characteristic reasoning error worth keeping as a checklist:

  • Inferring from types rather than verifying along the data path. “Citation links can carry a javascript: pseudo-protocol” sounds reasonable and was unreachable — the parsing regex already required https?://. Test: every step of the attack path must point at a specific location in code.
  • Locating the boundary at the wrong layer. “The prompt has no anti-injection language” does not by itself establish unauthorized tool execution. In the reviewed scope, lack of tool access limited that execution path; output leakage and content manipulation still need separate assessment. Test: ask what happens if this control does not exist. If the answer is “nothing much,” it was not the defence.
  • Looking for evidence in only one file type. The original review conflated “fetching has no concurrency limit” with a rate limit found in nginx. Request rate and concurrent in-flight requests are different controls. Finding a rate limit establishes that specific rate control; a concurrency bound requires checking the actual configuration and enforcement path. Test: a conclusion’s scope cannot exceed the scope of the search.

So before a threat enters the final list, run it past: can every step of the attack path be located concretely? If this control were removed, what specifically follows? Did my search cover every component the conclusion depends on?

8. References

For what a threat model looks like once it lands on a concrete mechanism, see this site’s own: the IP reputation scorer publishes the full scoring rules – which local signals are used, what each is worth, why country weighting is deliberately excluded, and why the score only sets a price rather than a verdict.

Leave a Reply

Scroll down