Machine Learning for Zero-Day Detection: What Works and Its Limits

Machine learning helps with zero-days in two ways. It can find unknown vulnerabilities before attackers do, and it can flag attacks that match no known signature by spotting unusual behaviour. There is real evidence for the first: Google’s Big Sleep agent found a previously unknown memory-safety bug in a development version of SQLite in 2024.

Mar 07, 2025 - 09:42
Updated: 
105.9k

AI in Cybersecurity in Cybersecurity & Ethical Hacking · Explainer

Cyber Threats, Scams & Online Safety, SOC & Blue Team, Machine Learning

Machine Learning for Zero-Day Detection: What Works and Its Limits

Quick answer: Machine learning helps with zero-days in two ways. It can find unknown vulnerabilities before attackers do, and it can flag attacks that match no known signature by spotting unusual behaviour. There is real evidence for the first: Google’s Big Sleep agent found a previously unknown memory-safety bug in a development version of SQLite in 2024. For detection, anomaly models surface odd process, network and user activity, but they also flag a lot of harmless change. They work best combined with patching, hardening, signatures and human triage, not as a standalone answer to unknown attacks.

Key takeaways

  • A zero-day is a flaw with no fix available when it is first exploited or disclosed.
  • ML can help find bugs earlier and spot unusual behaviour during an attack.
  • Google Big Sleep is a documented example of AI finding a real SQLite bug.
  • Anomaly detection produces false positives because normal systems change constantly.
  • Exploits still need follow-on actions, which behaviour monitoring can catch.

Table of Contents

What Is a Zero-Day Attack?

A zero-day attack exploits a vulnerability the vendor has not fixed, often before it is publicly known. Signature tools cannot match what they have never seen. Exploits frequently arrive through documents, browsers or exposed services, as in ATT&CK T1203. Once a flaw is confirmed exploited, it may appear in the CISA KEV catalog.

What Are the Two Ways ML Helps With Zero-Days?

ApproachGoalExample methodsMain limit
Vulnerability discoveryFind bugs before release or exploitationML-guided fuzzing, LLM code review agentsNeeds triage; many false leads
Attack detectionSpot unknown attacks in progressAnomaly detection, behaviour modelsFalse positives, drift

Our post on AI for zero-day vulnerability discovery covers the first approach in more depth. This article focuses on detection and its evidence.

What Does the Big Sleep Case Show?

In late 2024 Google Project Zero and Google DeepMind reported that their Big Sleep agent found a stack buffer underflow in a development version of SQLite. The agent was given a previous bug and asked to look for similar ones. SQLite developers fixed it before it reached an official release, so users were not affected. The team called the work experimental.

In 2025 Google reported that Big Sleep also identified CVE-2025-6965, a SQLite memory corruption flaw fixed in version 3.50.2. The lesson is narrow but real: AI can find bugs humans and fuzzers missed. It does not show that AI can detect every unknown attack.

How Does Anomaly Detection Spot Unknown Attacks?

Anomaly models learn a baseline of normal behaviour and flag deviations. Examples include an office application starting a command shell, a server making outbound connections it never made before, or a user logging in at odd hours from a new country. NIST SP 800-94 describes anomaly-based detection alongside signature and stateful protocol analysis. Even when the exploit is new, what follows it, such as persistence, credential theft and lateral movement, often looks unusual.

Why Does Anomaly Detection Struggle?

ProblemEffect
Base rateAttacks are rare, so even a small false positive rate floods analysts
DriftSoftware updates and new staff change the baseline
Poisoned baselinesAn attacker already inside becomes part of normal
MimicryAttackers use legitimate tools to blend in
ExplainabilityAnalysts may not see why an event was flagged

NIST AI 100-2 describes poisoning and evasion attacks against such models.

How Should Teams Combine ML With Other Defences?

  • Patch fast and reduce exposed services, since that limits zero-day impact.
  • Use exploit protections, application control and least privilege.
  • Feed anomaly alerts into triage with context, not straight into blocking.
  • Retrain baselines and review alert quality regularly.
  • Hunt for follow-on behaviour, as described in our post on AI-powered malware analysis.

What Should Indian Organisations Do When a Zero-Day Hits?

Apply vendor mitigations, check logs for signs of exploitation and report qualifying incidents to CERT-In within six hours under its 2022 directions, which also require 180 days of log retention. Any testing of exploits must have written authorisation under the IT Act 2000, Sections 43 and 66. To build detection skills, ask about our threat detection training.

References

Frequently Asked Questions

Sometimes. Behaviour and anomaly models can flag unusual activity after an unknown exploit runs, but they miss quiet attacks and raise false positives, so they need human triage.

It is a security flaw that attackers can exploit before the vendor has released a fix, often before the flaw is publicly known at all.

Big Sleep is an experimental AI agent from Google Project Zero and Google DeepMind that searches code for vulnerabilities. It found a real memory-safety bug in SQLite.

The 2024 bug was in a development version and was fixed before an official release, so Google reported that users were not affected.

It learns what normal system, network or user behaviour looks like and flags deviations that might indicate an attack, including attacks with no known signature.

Normal environments change all the time and real attacks are rare, so harmless changes such as updates or new staff often look unusual to the model.

No single control works alone. Fast patching, reduced attack surface, exploit protection, least privilege, behaviour monitoring and tested incident response work together.

Qualifying cyber incidents must be reported to CERT-In within six hours under its 2022 directions, regardless of whether the flaw used was known.

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Wow Wow 0
Sad Sad 0
Angry Angry 0
Vaishnavi

Vaishnavi is a skilled tech professional at the Ethical Hacking Training Institute in Pune, responsible for managing and optimizing the technical infrastructure that supports advanced cybersecurity education. With deep expertise in network security, backend operations, and system performance, she ensures that practical labs, online modules, and assessments run smoothly and securely. Her behind-the-scenes contributions play a vital role in delivering a seamless and secure learning experience for aspiring ethical hackers.