When the Hackers and the Defenders Are Both AI
For a long time, the story we told ourselves about AI and cybersecurity was a comforting one. Artificial intelligence was going to help us defend. It would watch network traffic for anything that looked off, flag malware before it spread, and give an overworked security team a fighting chance to piece together what happened after someone broke in. That was the pitch, and it was a good one, because for the most part it was true.
But we have crossed into different territory, and I don’t think most people have caught up to what it means. AI is no longer just helping people defend their systems. It has started to take part in the attacks themselves, while a separate set of AI systems is being trained to hunt down those same weaknesses and close them before anyone can walk through. Put those two developments next to each other and you get a picture that would have sounded like science fiction a few years ago: cybersecurity turning into AI fighting AI. That is a genuinely different game than the one we have been playing, and it is worth understanding why.
The hacker doesn’t have to do the hacking anymore
Here is something people forget about criminals. They run into the same wall the rest of us do, which is that there are only so many hours in a day. A serious cyberattack has never been a single dramatic keystroke. Somebody has to research the target, figure out what software it runs, probe for the weak spots, write or tweak the code, sift through whatever gets pulled out, and then decide what to do with all of it. Every one of those steps costs a human being time, and time is the one thing even a talented attacker can’t manufacture more of.
That is the wall AI agents are starting to knock down. (An “agent,” in this context, is an AI that doesn’t just answer a question but carries out a whole sequence of tasks on its own, deciding what to do next as it goes.)
In 2025, Anthropic disclosed a cyber-espionage campaign in which attackers wired its Claude Code tool into an agentic attack system and pointed it at roughly thirty organizations. The people behind it weren’t cut out of the loop. They still chose the targets and made the calls that mattered. But according to Anthropic, the AI did the bulk of the grunt work: mapping out infrastructure, hunting for vulnerable systems, generating the commands and code, poking at credentials, analyzing what came back, and reporting up to the humans running the operation. Anthropic’s estimate was that the AI handled somewhere in the neighborhood of eighty to ninety percent of the tactical workload.
Sit with that number for a second, because it changes the shape of the threat. The attacker stops being the person who performs every task and becomes something closer to a manager, directing a workforce that happens to be made of software. You don’t have to be the best hacker in the world if you can supervise a tireless one.
An AI doesn’t sleep, and it doesn’t get bored
Scale is the other half of this. A human security researcher can only look at so many systems before the day runs out and the coffee stops working. An AI can look at thousands, and it can keep going around the clock. During parts of that same campaign, Anthropic observed thousands of AI requests, sometimes several of them every second.
Now, before anyone panics, this does not mean the machine was some criminal mastermind. It wasn’t. Anthropic reported that Claude occasionally invented credentials that didn’t exist and sometimes flagged perfectly public information as though it were a state secret. Humans still had to check its work. But here is the uncomfortable part: it didn’t need to be brilliant to be dangerous. Imagine hiring a thousand junior researchers who work twenty-four hours a day, never take a vacation, and cost almost nothing compared to a thousand actual people. Even if a fair number of them are wrong on any given task, a thousand of them grinding away nonstop will still get an enormous amount done. That is the real story of AI-powered attacks. It isn’t that AI suddenly out-thinks the best humans in the field. It’s that an attack can now scale in a way it simply never could before.
But attackers don’t have this technology to themselves
The camp that only talks about the offensive side is telling you half the story. Defenders are building exactly the same muscles. OpenAI has been developing systems meant to find software vulnerabilities, recreate them safely in a controlled environment, and help produce the fixes. Google is working the same problem from its own direction. Its DeepMind team has a project called Big Sleep that has already turned up previously unknown vulnerabilities, and Google has built another system, CodeMender, designed not just to spot vulnerable code but to write and validate the patch for it.
At first glance that sounds backwards. We are teaching AI to break into software so that software can be safer? But that is not new at all. It is how good security has worked for decades. The people we call penetration testers make a living breaking into systems on purpose, with permission, precisely so an organization can find its own weak spots before a criminal does. AI just does that job faster and with a lot less sleep.
This is the thing about a vulnerability that most people never quite absorb: finding one is neither good nor bad on its own. It is what happens in the next thirty seconds that matters. One AI looks at a flaw in a popular piece of software and says, here is how you exploit this. Another AI looks at the exact same flaw and says, here is how you close it. Both of them had to understand the vulnerability equally well. The capability is identical. The only variable is intent, which is about as clean an example as you will find of AI being a tool rather than something inherently good or evil. The knife doesn’t decide whether it cuts bread or cuts a person.
What actually changed is speed
If I had to point to the single most important shift here, it wouldn’t be intelligence. It would be the clock.
Security has always run on a fairly predictable, and fairly slow, sequence. Somebody discovers a vulnerability. Somebody works out how to exploit it. Researchers eventually catch on. Developers build a patch. Companies get around to installing it. And in the gap between “patch exists” and “patch installed,” attackers go hunting for everyone who hasn’t gotten to it yet. That gap has historically been measured in months, sometimes in years.
AI can crush that timeline. One AI finds the hole. Another tries to exploit it. A third notices the attempt. A fourth writes the patch. A fifth tests it. And the humans supervise the whole chain without personally doing most of the hands-on work. Security starts moving at machine speed instead of human speed, which is the opportunity and the danger both, depending on which side gets there first.
That is where this gets genuinely uncomfortable. If attackers can use AI to find holes faster than companies can patch them, attacking gets easier. If defenders can use AI to find and seal those holes first, software gets safer. Both of those things are happening at the same time, which means the whole contest increasingly comes down to a race. The question stops being whether AI can find a vulnerability, because we already know it can. The question becomes who finds it first, who understands it first, who acts on it first, and who has automated their side of that race most effectively.
So, are we better off, or worse?
Most conversations about AI collapse into one of two lazy positions. Either it is going to fix everything, or it is going to end everything. Reality, as usual, refuses to be that tidy. The same technology that lets an attacker scale up an assault lets a company scale up its defense. The same AI that learns how software breaks can teach a developer how to keep it from breaking. The same automation that widens the attack surface can also shrink the window a vulnerability stays open.
None of that means there is nothing to worry about. There is plenty. But if you only look at what AI can do in the hands of an attacker, you are reading half the page. AI isn’t just becoming the hacker. It is also becoming the penetration tester, the analyst, and eventually the developer writing the fix. We are heading toward a world where a good number of these fights play out between machines, at machine speed, and get resolved before any human being even realizes a shot was fired.
For decades, computer security came down to humans defending against humans. That era is ending. What replaces it is AI on the attack, AI on defense, AI doing the repairs, and the rest of us working hard to stay a step ahead of all of it. Whether that leaves us better off is still an open question. But it is no longer a hypothetical one, and that by itself is reason enough to pay attention.









