AI Security

The Problem With Using AI for Security: False Positives, Bias and Adversarial Attacks

AI promises to help overwhelmed security teams, but it brings problems of its own: alert floods, models that learn the wrong lessons from biased data, and attackers who deliberately fool them. Last week Microsoft and MITRE published a framework for attacks on ML systems. We look at the three biggest problems and how to manage them.

By EthicalHat Research · · 4 min read
Infographic: Why 99% accurate isn't good enough in security

Machine learning is now embedded in email filters, endpoint protection, network detection and SIEM products. It genuinely helps. But security is an unusually hostile environment for ML, and teams that deploy it without understanding its failure modes can end up worse off: buried in alerts, trusting a model that has learned the wrong thing, or relying on a defence an attacker has already learned to evade.

Last week, Microsoft and MITRE, with a dozen other organisations, published the Adversarial ML Threat Matrix, a framework describing how attackers target machine learning systems. It is a good moment to look at the three biggest problems with AI in security.

Problem 1: false positives at scale

Security data is dominated by benign activity. Real attacks are rare. That makes the maths of false positives brutal.

Suppose a detection model scores one million events a day with a false-positive rate of 1%. That sounds like an excellent model. It also produces 10,000 false alarms a day, and the handful of real attacks are buried among them. This is the base rate problem, and it is why a model that looks great in a vendor's test can be unusable in a SOC.

The consequences are familiar: alert fatigue, analysts ignoring whole categories of alerts, and real incidents missed.

What helps:

  • Measure precision in your environment, not just overall accuracy. What fraction of alerts are actually worth investigating?
  • Combine signals. An anomaly on its own is weak; an anomaly plus a threat-intel match plus a sensitive asset is strong.
  • Tune thresholds to capacity. Alert on the highest-risk combinations first, and use lower-confidence detections for hunting rather than paging.
  • Close the loop. Feed analyst verdicts back into models and rules.

Problem 2: bias and shortcuts in training data

A model learns whatever patterns separate "malicious" from "benign" in its training data, whether or not those patterns are meaningful.

  • If most malware in the training set is packed, the model may learn "packed means malicious", and flag legitimate packed software while missing unpacked malware.
  • If benign samples come mostly from one kind of environment, the model may treat anything unusual for that environment as suspicious.
  • If labels come from existing tools, the model inherits their blind spots.
  • Behavioural baselines learned during an unusual period (such as the sudden move to remote work this year) can be wrong for normal operations, and vice versa.

These shortcuts pass testing on similar data and fail in production.

What helps:

  • Ask how training data was collected and labelled, and how representative it is of your environment.
  • Evaluate on recent, realistic data, including your own legitimate software and workflows.
  • Monitor for drift and re-baseline after significant business changes.
  • Prefer models whose alerts include explanations, so shortcuts are easier to spot.

Problem 3: adversarial attacks

Unlike most ML applications, security models face an adversary who is actively trying to defeat them. The Adversarial ML Threat Matrix, modelled on MITRE ATT&CK, catalogues how.

flowchart TB
  A[Attacker] --> E[Evasion<br/>modify input so the model<br/>misclassifies it]
  A --> P[Poisoning<br/>corrupt training data<br/>or feedback loops]
  A --> X[Model extraction<br/>query the model to<br/>copy or map it]
  A --> I[Inference attacks<br/>learn about the<br/>training data]
  E --> Ex1[Malware with benign<br/>strings appended]
  P --> Ex2[Mislabelled samples<br/>submitted to shared feeds]
  X --> Ex3[Probe a detector to<br/>find what passes]

Evasion is the most common. Attackers modify malware, phishing emails or traffic just enough to cross the model's decision boundary. A widely reported 2019 case showed an ML-based endpoint product could be bypassed by appending strings from a legitimate game to malicious files.

Poisoning targets systems that learn continuously, for example spam filters trained on user reports or detectors that retrain on submitted samples. Attackers feed in crafted data to shift the model.

Model extraction and probing: if attackers can query a model (for example through a public scanning service or by testing against a product they own), they can learn what it allows.

What helps:

  • Layer defences so that evading one model is not enough: signatures, behavioural rules, ML and human review.
  • Protect training pipelines and validate data sources, especially crowd-sourced labels.
  • Limit and monitor model access, and avoid giving detailed scores to untrusted parties.
  • Red-team your models: include adversarial ML techniques in security testing of AI-based controls.
  • Retrain regularly with recent adversarial examples.

Keeping humans in the loop

None of these problems means AI is the wrong tool for security. They mean it is the wrong tool to use alone. The strongest security operations use ML to prioritise, enrich and scale, and rely on analysts for context, judgement and the ability to notice when the model itself is being attacked.

The bottom line

AI in security fails in three predictable ways: it cries wolf at scale, it learns the wrong lessons from imperfect data, and it can be deliberately fooled. Organisations that measure models in their own environment, combine them with other signals and keep skilled people in the loop get the benefits without the blind spots.

Our managed detection and response team tunes detection to each client's environment, and our red teaming tests whether AI-based controls hold up against a determined adversary.

EthicalHat Research

The EthicalHat research team: penetration testers, SOC analysts and engineers writing about security, software engineering and AI.

Want an expert opinion on your own systems?

Email info@ethicalhat.com or call +1-844-838-4422. Our security engineers are happy to talk it through.