Back

ML01: Input Manipulation Attack - Overview

What is an Input Manipulation Attack?

Input Manipulation Attack (ML01 in the OWASP Machine Learning Security Top 10) is the deliberate crafting of model inputs—most often through small, carefully chosen perturbations—so that a trained model produces a wrong output at inference time. These crafted inputs are called adversarial examples, and using them to slip past a model is called an evasion attack.

The defining property is that the perturbation is optimised against the model, not random noise. A spam email rewritten to keep its meaning but flip the classifier's decision, a stop sign with a few stickers that a vision model reads as "speed limit," an audio clip that sounds normal to a human but transcribes to an attacker's command—all are the same underlying attack: exploit the gap between the function the model actually learned and the function a human would apply.

Scope note: ML01 is a classic machine-learning vulnerability—it applies to image classifiers, audio models, tabular fraud detectors, malware classifiers, and traditional NLP models. It is distinct from the LLM-specific "prompt injection" category in the OWASP Top 10 for Large Language Model Applications. Prompt injection manipulates instructions in natural-language context; ML01 manipulates the numeric feature space a model scores.

Core Concept

A classifier f maps an input x to a label. An attacker searches for a small perturbation δ such that x + δ looks essentially unchanged to a human (or to a downstream check) but is classified differently by the model:

Goal (untargeted):   find small δ   s.t.  f(x + δ) ≠ f(x)
Goal (targeted):     find small δ   s.t.  f(x + δ) = t   (attacker-chosen t)

Constraint:          ||δ||  ≤  ε        # perturbation budget
                     x + δ   stays valid       # e.g. pixels in [0,1]

Legend:
  x   -> the original, correctly-classified input
  δ   -> the adversarial perturbation being optimised
  ε   -> how much change is "allowed" (often imperceptible)
  t   -> the label the attacker wants the model to output

The perturbation budget is usually measured with an Lp norm: L∞ (no single feature moves more than ε), L2 (total Euclidean change is small), or L0 (only a few features change at all). Different attacks optimise different norms, and a defense tuned for one norm rarely covers the others.

Why Models Are Vulnerable

Adversarial examples are not a bug in one library—they arise from how high-dimensional models learn:

Why Does This Matter?

ML models increasingly sit on the security- and safety-critical path: they decide what is spam, what is malware, whose transaction is fraud, what a self-driving car sees, and who is who at a biometric gate. An input-manipulation attack turns each of those decisions into something an adversary can steer.

Business Impact

Technical Impact

Technical Context

The Attack Surface: Where Manipulation Happens

ML01 targets the inference-time input path. It does not require access to training data or model weights to be dangerous (though such access makes it easier). The adversary controls, wholly or partly, the input the model will score:

[ attacker-influenced input ]
        |
        v
  feature extraction / preprocessing   <- resize, normalise, tokenise, decode
        |
        v
       model f(.)                       <- the function under attack
        |
        v
  decision + confidence                 <- what a downstream system trusts
        |
        v
  action (allow / block / label / steer)

Two things matter here. First, preprocessing is part of the model from the attacker's view—an attack must survive resizing, JPEG compression, or tokenisation to work end-to-end. Second, the decision and its confidence feed a downstream action, so flipping the decision (or just inflating confidence) is enough to cause harm.

Adversarial Examples vs. Ordinary Errors

AspectOrdinary misclassificationAdversarial example (ML01)
CauseHard/ambiguous input, distribution shiftInput optimised to defeat the model
Human perceptionOften also hard for a humanLooks correct/benign to a human
FrequencyFollows the natural error rateProduced on demand by an adversary
ConfidenceUsually lower near the boundaryFrequently high, by construction
FixMore/better data, better modelRequires robustness, not just accuracy

The last row is the key insight: accuracy and robustness are different goals. A model can be 99% accurate on clean data and still be trivially evadable, because standard training optimises average-case performance, not worst-case performance under an adversary.

The Perturbation Budget and Threat Assumptions

Every meaningful claim about adversarial robustness is stated relative to a threat model: what the attacker can change, by how much, and with what knowledge. Common budgets:

Threat Models: White-Box, Black-Box, Physical

White-Box (Gradient) Access

The attacker knows the model architecture and weights and can compute gradients of the loss with respect to the input. This is the strongest attacker and the setting in which the canonical attacks—FGSM, PGD, C&W, DeepFool—are defined. White-box results set the worst case and are the honest way to evaluate a defense.

Black-Box (Transfer and Query) Access

The attacker cannot see the weights but can either (a) craft examples on a substitute model and rely on transferability, or (b) query the target and use the returned labels/scores to estimate gradients or run a search. Black-box attacks are the realistic setting for a hosted API and are the reason "we don't expose our model" is not, by itself, a defense.

Physical / Real-World

The perturbation is applied to a physical object—a printed adversarial patch, a sticker, an eyeglass frame, a T-shirt pattern—and must survive being photographed under varying angle, lighting, and distance. Physical attacks are less precise than digital ones but far more alarming because they attack deployed perception systems from the outside.

Cross-Domain Reach

DomainWhat is perturbedIllustrative effect
ImagesPixel values, printed patchesObject misread; classifier bypassed
Audio / speechWaveform samplesHuman hears X, model transcribes Y
Text / NLPSynonyms, typos, homoglyphs, spacingSentiment/toxicity/spam label flipped
MalwarePadding bytes, benign sections/importsMalicious binary scored as benign
Tabular / fraudFeature values within valid rangesFraudulent record scored as normal
Network IDSPacket timing, sizes, flagsIntrusion traffic evades detection

Real-World Impact

The examples below describe well-established classes of demonstrated attack from the security and ML research literature. They are stated as categories rather than as specific vendor incidents, and no numeric breach statistics are invented.

Case Study Class 1: Road-Sign and Perception Evasion

Setup: Vision classifiers used for traffic-sign recognition are trained on clean sign images.

Case Study Class 2: Malware and Spam/Phishing Filter Evasion

Setup: A classifier decides whether a file is malware or an email is spam/phishing.

Case Study Class 3: Audio and Speech Command Injection

Setup: A speech-to-text or voice-command model transcribes audio into actions.

Case Study Class 4: Face and Biometric Spoofing

Setup: A face-recognition or liveness model gates access or identity.

Prevalence and Research Landscape

Adversarial examples are one of the most heavily studied problems in ML security. Rather than cite a single headline number (which varies by benchmark and year), the durable, defensible picture is:

Treat any single "attack success rate" or "robust accuracy" figure as illustrative and tied to a specific model, dataset, and budget. The stable takeaways are: undefended models are easy to evade, robustness is a real and separate engineering goal, and any defense claim is only meaningful against a stated, adaptive threat model.

Common Misunderstandings

Myth 1: "Our model is 99% accurate, so it's safe."

Reality: Accuracy measures average-case performance on natural data. Adversarial robustness measures worst-case performance under an attacker. A model can be highly accurate and still be flipped by a perturbation you cannot see.

Myth 2: "We don't expose the model, so attackers can't craft adversarial examples."

Reality: Black-box transfer and query attacks routinely defeat models the attacker never sees the weights of. Secrecy raises the cost of an attack; it does not remove the vulnerability.

Myth 3: "We hide gradients / add randomness, so gradient attacks fail."

Reality: Gradient masking is false security. Obfuscated or shattered gradients are repeatedly bypassed by adaptive attacks (gradient approximation, expectation-over-transformation, transfer). A defense that only makes gradients hard to read has usually not made the model robust.

Myth 4: "The perturbation is tiny, so the impact is tiny."

Reality: The size of the perturbation and the size of the consequence are unrelated. An imperceptible change can flip a fraud decision, a malware verdict, or a stop-sign reading.

Myth 5: "Input validation for injection/XSS also stops this."

Reality: Classic input validation checks for malformed or dangerous syntax. Adversarial inputs are perfectly well-formed and valid—a normal image, a normal email, a normal transaction. They defeat the model's semantics, not its parser.

Myth 6: "One defense will fix it."

Reality: There is no single silver bullet. Robustness comes from layering—adversarial training, input transformations and detection, ensembling, limiting exposed confidence/gradients, monitoring, and human review for high-stakes decisions.

How ML01 Differs from Related ML Risks

AspectML01 Input ManipulationData PoisoningModel/Extraction & Inversion
WhenInference timeTraining timeInference-time querying
GoalForce a wrong output nowCorrupt what the model learnsSteal the model or its data
Attacker touchesThe input being scoredThe training setThe prediction API
Primary defenseRobustness + detectionData provenance/sanitisationRate limits, output minimisation

Key Takeaways

  1. Adversarial examples exploit the gap between what the model learned and what a human means—small, optimised, often invisible perturbations flip predictions.
  2. Accuracy is not robustness. Worst-case behaviour under an adversary is a separate goal that standard training does not deliver.
  3. Secrecy is not a defense. Black-box transfer and query attacks work without the weights.
  4. Gradient masking is false security. Evaluate against adaptive attackers or you are measuring nothing.
  5. It is cross-domain and can be physical. Images, audio, text, malware, and tabular data are all in scope, and printed patches attack real perception systems.

How to Identify if You're Exposed

If you answered "no" or "not sure" to several of these—especially the first three—you likely have exploitable exposure to input-manipulation attacks today.

Next Steps