AI in Cybersecurity: How Attackers and Defenders Are Both Using LLMs in 2026

AI in Cybersecurity: How Attackers and Defenders Are Both Using LLMs in 2026
On this page

    Prem AI

    AI in cybersecurity is changing how both attackers and defenders work. Attackers are using LLMs for reconnaissance and phishing as well as vulnerability research and post-compromise analysis. Your security team can use the same technology to review code and investigate threats faster.

    Across your enterprise, LLMs are changing cybersecurity in a few key areas:

    • Attackers can research targets and scale phishing faster.
    • Defenders can find vulnerabilities and investigate alerts sooner.
    • AI agents introduce risks around prompt injection and excessive permissions.
    • Sensitive data needs stronger controls and verifiable security findings.

    Prem CyberScan by Prem AI helps you find critical vulnerabilities across your codebase before attackers can take advantage of them. It continuously analyses your repositories and returns prioritised findings with supporting evidence. This gives your team a clearer way to review vulnerabilities and strengthen your code security as your software continues to change.

    In November 2025, Anthropic said a Chinese state-sponsored group had used Claude Code to attack around 30 targets. These included large technology companies and government agencies. The claim was questioned within a day and BleepingComputer skeptic coverage showed that several security experts felt the report was overstated because Anthropic shared no indicators of compromise.

    According to the Anthropic espionage disclosure, the AI scanned networks and collected login credentials from system settings. It also searched internal databases and created backdoors to keep access. Some intrusions succeeded while humans mainly stepped in to approve key actions and the final data theft.

    Anthropic announcement on the first reported AI-orchestrated cyber espionage campaign
    Anthropic announcement on the first reported AI-orchestrated cyber espionage campaign.

    The bigger point for your enterprise is how much of this work can now be automated. Attackers no longer need a large team to search for weaknesses or move through a network. 

    AI agents can handle many of these steps with limited human input. That makes it more important to protect your code and infrastructure across the full attack process.

    How are LLMs changing cybersecurity in 2026

    The table below shows how LLMs are changing cybersecurity for both attackers and defenders and what that means for your enterprise.

    What changed Earlier In 2026
    Finding and weaponizing flaws Needed skilled human experts Often starts with a prompt, and new flaws get weaponized in under 24 hours
    Role of AI Answered questions and drafted scripts Plans multi-step tasks and calls tools while people approve the risky steps
    Phishing The way in for 7% of intrusions Microsoft investigated The way in for 23% of intrusions as AI makes messages more convincing
    Attack techniques Familiar methods run mostly by hand The same methods run faster and at a much larger scale
    Human control People handled every stage of an attack People still drive the hardest intrusions while AI takes on routine steps
    Known vulnerabilities Fewer CVEs (Common Vulnerabilities and Exposures) to track each year Around 72,000 CVEs expected in 2026, which would be a record
    Find Code Risks Before Attackers Reach Them

    Use Prem Cyberscan to check your repository for vulnerabilities and review the evidence behind every finding.

    Sign in with GitHub

    How are attackers using LLMs in cyberattacks

    How attackers use LLMs in cyberattacks for reconnaissance, phishing, malware and exploits, and data theft.
    LLMs help attackers accelerate reconnaissance, phishing, malware and exploit development, and data theft during cyberattacks.

    Each stage below shows how attackers can use LLMs to move faster through the cyberattack lifecycle and create new risks for your enterprise.

    Reconnaissance and target research

    Before targeting your enterprise, an attacker can use LLMs to process public information much faster. Your job posts or public repositories may reveal details about your technology stack and internal roles.

    That makes seemingly harmless information more useful when it is combined with other public data. Your external footprint now gives attackers more material to analyse before they ever touch your network.

    AI-powered phishing and social engineering

    Your employees are also facing phishing messages that are easier to personalise and harder to dismiss based on writing quality alone. LLMs help attackers adapt messages to specific roles and regions while producing many variations quickly.

    A 2026 Europol report notes that criminal networks are increasingly using AI to scale their operations while reducing the effort involved. That makes stronger identity controls important when a convincing message reaches someone inside your organisation.

    Malware and exploit development

    Attackers can use LLMs to understand unfamiliar code and troubleshoot scripts more quickly. More capable models can also support vulnerability research and help operators work through parts of an exploit chain.

    The UK's AI Security Institute research found that newer AI agents completed more steps across simulated corporate cyberattacks than earlier models. This puts more pressure on your team to close known vulnerabilities before attackers can work through them.

    Post-compromise analysis and data theft

    Once an attacker enters your environment, they still need to understand the systems and information available to them. LLMs can help them analyse large amounts of data and identify the files or credentials that appear most valuable.

    That gives your security team less time to react after the first compromise. Segmentation and least-privilege access matter more when one exposed account could otherwise open the path to a much larger part of your environment.

    Add Continuous AI Code Security to Your Stack

    Use Prem Cyberscan to analyse your repository and get prioritised findings with evidence your team can verify.

    Start With Free Credits

    How are defenders using LLMs in cybersecurity

    How cybersecurity defenders use LLMs for vulnerability discovery, threat detection, and incident response.
    How cybersecurity defenders use LLMs for vulnerability discovery, threat detection, and incident response.

    Vulnerability discovery and code security

    Your team cannot manually review every change across a large codebase. LLM-based security tools can help analyse repositories and trace how weaknesses connect across different parts of your software.

    DARPA's AI Cyber Challenge results showed how far this has progressed. Competing AI systems analysed more than 54 million lines of code and identified 86% of the synthetic vulnerabilities used in the final competition, and they also generated patches for many of the issues they found.

    AI threat detection and investigation

    Your SOC may receive more alerts than analysts can investigate in depth. LLM-based tools can help organise related events and give your team a clearer starting point for understanding what happened.

    A Cloud Security Alliance benchmark found that AI-assisted analysts completed investigations 45-61% faster and achieved higher accuracy than analysts working manually. This gives your team more time to focus on incidents that need human judgement.

    Incident response and remediation

    Once your team confirms an incident, LLMs can help reconstruct the attack path and bring together evidence from different security tools. This makes it easier to understand which systems were affected and where your response should start.

    AI agents can also support actions such as opening tickets or suggesting remediation steps. You still need human approval for higher-impact changes because an incorrect action inside a live environment can create another operational problem.

    Protect Your Code With Continuous AI Security

    Connect your GitHub repository and use Prem Cyberscan to find vulnerabilities with evidence your team can review directly.

    Sign in With GitHub

    What new cybersecurity risks do LLMs introduce

    Here are some of the main cybersecurity risks LLMs can introduce across your enterprise.

    Key cybersecurity risks LLMs introduce for your enterprise, from prompt injection and data exposure to excessive permissions and unreliable findings.
    Key cybersecurity risks LLMs introduce for your enterprise, from prompt injection and data exposure to excessive permissions and unreliable findings.

    Prompt injection and manipulation

    Your LLM may process instructions and untrusted data in the same context. That gives attackers a chance to hide malicious instructions inside emails or web pages that your security agent reads.

    OWASP's LLM Top 10 lists prompt injection as a major LLM security risk and notes that techniques such as RAG or fine-tuning do not remove it completely. You should therefore treat external inputs as untrusted and limit what your agents are allowed to do after processing them.

    Sensitive data exposure

    Your security AI may handle source code and vulnerability details as part of its normal work. It may also process logs or incident information that exposes sensitive parts of your infrastructure.

    When this data moves through a third-party model API, your security also depends on where the data is processed and who can access it. This becomes especially important when your organisation has privacy or governance requirements under frameworks such as GDPR or the EU AI Act.

    Excessive permissions in AI agents

    The risk changes once your AI agent can do more than suggest an action. If it can run commands or access secrets, a bad decision can directly affect your environment.

    That is why you should give every agent only the permissions required for its task. Higher-impact actions should still require human approval so one manipulated or incorrect response cannot create a larger security issue.

    Hallucinations and unreliable security findings

    An LLM can present an incorrect vulnerability finding with enough technical detail to make it look convincing. Your team can lose time investigating issues that do not exist or overlook a real flaw because the model reached the wrong conclusion.

    The Register's curl coverage reported that the project ended its bug bounty program after maintainers faced growing volumes of low-quality AI-generated submissions. Your own AI security findings should therefore include evidence your team can check before acting on them.

    The same principle also aligns with the EU AI Act's wider focus on accuracy and system robustness. For your enterprise, verifiable findings are more useful than confident outputs that your team cannot independently confirm.

    Prem Cyberscan: protect your enterprise code and sensitive data with continuous AI security 

    Attackers can now use AI to find weaknesses faster while your codebase continues to change between formal security audits. Prem Cyberscan by Prem AI is built for enterprises that need continuous code security they can verify and trust.

    Prem Cyberscan is publicly available now, with $25 in free credits for new users to get started.

    Prem CyberScan helps identify vulnerabilities in your codebase with an AI-powered security agent built for vulnerability detection.
    Prem CyberScan helps identify vulnerabilities in your codebase with an AI-powered security agent built for vulnerability detection.

    Sign in with your GitHub account, connect a repository, and let Prem Cyberscan run. If you want to see how it performs on your own codebase, you can use the available credits to scan a real repository and review the findings for yourself. 

    FAQs about AI in cybersecurity

    How are LLMs being used in cybersecurity?

    LLMs are used across both offensive and defensive security workflows. Attackers use them for reconnaissance, phishing, vulnerability research and post-compromise analysis. Your security team can use the same capabilities for code review, threat investigation and incident response. Their biggest impact is the speed at which both sides can process information and act on it.

    What are the main risks of AI in cybersecurity?

    The main risks include prompt injection, sensitive data exposure, excessive agent permissions and unreliable security findings. Your enterprise also needs to consider where inference happens and who can access the data your models process. As AI systems gain more access to internal tools, their permissions become part of your overall security model.

    Can LLMs help detect cybersecurity threats?

    Yes. LLMs can help your security team analyse alerts, connect related events and summarise what may have happened during an incident. They are especially useful when your SOC has more data than analysts can review manually. The value comes from helping your team understand important signals faster rather than simply generating more alerts.

    How can LLMs help with vulnerability detection?

    LLMs can review large codebases and identify patterns that may indicate security weaknesses. They can also help trace how different files or services interact and highlight potential attack paths. Your team still needs evidence behind each finding so developers can confirm whether the vulnerability is real before making changes to production code.

    How does the EU AI Act affect AI cybersecurity?

    The EU AI Act introduces requirements around areas such as cybersecurity, risk management and system robustness for certain AI systems. The exact obligations depend on how your enterprise uses or provides AI. Even when a system falls outside specific high-risk requirements, the Act reinforces the need for stronger controls around AI security and accountability.

    How does Prem Cyberscan help with AI-powered code security?

    Prem Cyberscan gives your team an AI-assisted layer for continuously reviewing code between formal security audits. It analyses your selected repositories and returns prioritized findings with supporting evidence. This helps your developers verify vulnerabilities before acting on them while adding another security layer as your codebase continues to change.

    Prem AI logo, representing sovereign AI infrastructure built to be private, verifiable, and compounding.
    Share this article

    Get the next article in your inbox

    Research, engineering notes and product updates from Prem Blog.