Best LLM for cybersecurity: security LLMs compared by job

Security LLMs compared: Cisco Foundation-Sec, Trend Micro Primus, DeepHat (WhiteRabbitNeo), GPT, Claude and Gemini on scores, licenses, policies and refusals.

Published SecurityBenchmarksEvaluationDetection Engineering

Quick answer

The best LLM for cybersecurity is the one that fits the job, because no model leads every security test. In Cisco's January 2026 report, GPT-5 scored 0.941 on CyberMetric-2000 to 0.843 for Cisco's own security-tuned 8B model, which in turn led CVE-to-CWE mapping, 0.753 to 0.728. Choose by task, by where client data may go and by how often the model refuses authorized work.

Pick a model by job

Pick the model by the job, because the scores split by task: large general models lead on security knowledge tests, an 8B security model leads on CVE-to-CWE mapping, and the right choice for client work often depends on where the data is allowed to go. Every model and number below is sourced further down the page. Whatever you choose, use it only for systems you own or have written permission to test.

Job What matters Start with Watch for
Pentest report writing Long context for scanner output and notes; clear prose; client data rules Kimi K3.1 Pro Abliterated, or a frontier model your contract allows Foundation-Sec-8B was trained at 4,096 tokens; Foundation-Sec-1.1 extends that to 65,536
Log triage and detection rules (Sigma, YARA, KQL, SPL) Volume, price, rules you can test DeepSeek V4.1 Flash Abliterated for volume; a local 8B model for data that cannot leave Test every rule against known-good logs before it ships
CVE triage and CWE mapping Mapping accuracy, current data Foundation-Sec-8B-Reasoning (highest CTIBench-RCM score in Cisco's table); a large model for root-cause write-ups Foundation-Sec training data stops at April 10, 2025: paste the advisory
Secure code review Coding skill, long diffs A frontier model or Kimi K3.1 Pro Abliterated Kimi's Terminal-Bench 4.0 score fell after abliteration; test agent workflows first
Suspicious script analysis Answers about hostile code instead of refusals An abliterated model; see malware analysis OpenAI reduces refusals for malware analysis only for approved Daybreak users
CTF practice Explanations of the technique a challenge teaches DeepSeek V4.1 Flash Abliterated (InterCode-CTF 95.5 after abliteration, 94.2 before), or DeepHat-V1-7B run locally Stay on the event's lab targets and rules

The use-case pitch for security teams, with a worked advisory-to-detection example, is on the cybersecurity use case page. This page compares the models; for the agents that drive them through a pentest, see AI pentesting tools.

Security-specialized open models

Four groups publish the open-weight security models below on Hugging Face, all at 7B or 8B parameters. Every fact in this table comes from the model's own card or its maker's site, checked 2026-12-02.

Model Maker, release Params License Context Security scores the maker publishes Refusal behavior documented
Foundation-Sec-8B (base) Foundation AI at Cisco, 2025-04-28 8B Apache 2.0 Trained at 4,096 tokens CTI-MCQA 67.39, CTI-RCM 75.26 (5-shot) Base model, not chat-tuned
Foundation-Sec-8B-Instruct Cisco, 2025-08-01 8B Llama 3.1 Community License; Cisco's changes Apache 2.0 Trained at 4,096 tokens CTI-MCQA 0.644, CTI-RCM 0.692 Safety-aligned; Cisco recommends Llama Guard and human review
Foundation-Sec-1.1-8B-Instruct Cisco, 2025-11-20 8B Same as Instruct Trained at 65,536 tokens CTI-MCQA 0.644, CTI-RCM 0.694 Same as Instruct
Foundation-Sec-8B-Reasoning Cisco, 2026-01-28 8B Same as Instruct Trained at 32,768 tokens CTI-MCQA 0.691, CTI-RCM 0.753 Same as Instruct
Llama-Primus-Merged Trend Micro AI Lab, 2025-02 8B MIT, plus the Llama 3.1 Community License Config allows 131,072 CTI-Bench MCQ 0.6656, CyberMetric-500 0.8660, SecEval 0.5062 (5-shot) Card reports garak probe results; no refusal summary
Llama-Primus-Reasoning Trend Micro AI Lab, 2025-02 (updated 2025-06) 8B Same as Merged Config allows 131,072 CISSP questions 0.8193 Not documented
DeepHat-V1-7B, formerly WhiteRabbitNeo Kindo, 2025-04 7.61B Apache 2.0 with added usage restrictions 32,768; 131,072 with YaRN None Maker's site calls it uncensored
ZySec SecurityLLM (ZySec-7B) ZySec AI, 2024-01 7B Apache 2.0 Config allows 32,768 None Not documented

The scores in this table come from each maker's own setup, so don't compare them across rows. The next section compares models on a single harness.

Cisco Foundation-Sec

Foundation-Sec-8B is Llama 3.1 8B with continued pretraining on about 5.1 billion tokens of security text: threat intelligence reports, vulnerability databases, incident response documentation and security standards. Its data cutoff is April 10, 2025 (Kassianik et al., 2025). Cisco then released a chat model (Weerawardhena et al., 2025), a 1.1 version that extends context "from 4k to 64k tokens", and a reasoning model trained with supervised fine-tuning and reinforcement learning (Yang et al., 2026). The cards list SOC triage, ATT&CK mapping and vulnerability prioritization as intended uses. They also say "safe out-of-the-box performance cannot be guaranteed" and recommend deploying the chat models behind Llama Guard with human oversight. Cisco publishes Q4_K_M and Q8_0 GGUF builds of several variants.

Cisco also lists antares-1b, built on IBM Granite 4.0 1B, and antares-350m (July 2026). Both are gated behind a manual access review, and we could not read their cards.

Trend Micro Llama-Primus

Trend Micro's AI lab released three Llama 3.1 8B models in February 2025 together with the datasets used to train them: Primus-Seed, Primus-FineWeb, Primus-Instruct and Primus-Reasoning (Yu et al., 2025). Llama-Primus-Merged was pretrained on 2.77 billion tokens of security text, tuned on about 1,000 security QA tasks and merged back with Llama-3.1-8B-Instruct. Its card reports a 14.84% gain in aggregate security score over Llama-3.1-8B-Instruct. Llama-Primus-Reasoning was distilled from o1-preview and DeepSeek-R1 reasoning traces; on CISSP practice questions it scores 0.8193, against 0.8212 for DeepSeek-R1 on the same card. The open datasets set Primus apart: you can continue training your own model on them.

DeepHat, formerly WhiteRabbitNeo

whiterabbitneo.com now redirects to deephat.ai, which describes Deep Hat as "formerly Whiterabbitneo" and "Kindo's uncensored cybersecurity model" (checked 2026-12-02). The newest open weights are DeepHat-V1-7B, a fine-tune of Qwen2.5-Coder-7B. The older WhiteRabbitNeo checkpoints, from 7B to 70B, are still on Hugging Face. The WhiteRabbitNeo 2.5 card shows how to prefix the model's reply "If you run into any refusals", so the earlier models did refuse some prompts. The current hosted model, which the site calls Deep Hat Attack v3 at 30B parameters, runs inside Kindo; we found no weights for it on Hugging Face. The site says v3 beats larger models, GPT-OSS-120B among them, on CTF and threat-intelligence tasks, but we found no published scores to check.

ZySec SecurityLLM

ZySec-7B is a DPO fine-tune of Hugging Face's Zephyr, a Mistral-7B model, on more than 30 security domains, from compliance frameworks to incident handling. It ranks in the top five Google results for "best llm for cybersecurity" (checked 2026-12-02), but its card publishes no benchmark scores.

Specialist and general models on one harness

On a single harness, large general models beat the security-tuned 8B models on most security knowledge tests. Cisco's report on Foundation-Sec-8B-Reasoning (Yang et al., 2026, tables 2 and 3) ran 17 models through the same evaluation: five runs each, answers extracted the same way. The five public benchmarks are below. Cisco's two in-house benchmarks are left out because nobody else can run them.

Model CTIBench-MCQA CTIBench-RCM CyberMetric-2000 SecBench SecEval
DeepHat-V1-7B 0.493 0.434 0.730 0.615 0.790
Llama-Primus-Merged 0.604 0.665 0.862 0.749 0.811
Foundation-Sec-8B-Instruct 0.650 0.704 0.847 0.744 0.829
Foundation-Sec-8B-Reasoning 0.691 0.753 0.843 0.725 0.848
Llama-3.3-70B-Instruct 0.692 0.684 0.930 0.842 0.906
GPT-OSS-120B 0.714 0.712 0.926 0.853 0.904
GPT-4.1 0.760 0.730 0.937 0.872 0.919
GPT-5 0.819 0.728 0.941 0.888 0.923

How to read it:

  • GPT-5 leads four of five columns. The security-tuned 8B models trail the 70B and larger general models on every broad knowledge test.
  • The 8B specialist wins CVE-to-CWE mapping. Foundation-Sec-8B-Reasoning scored 0.753 on CTIBench-RCM against 0.728 for GPT-5, at a size you can run on a single GPU.
  • DeepHat-V1-7B scored lowest of the 17 models on every security benchmark in the report. It is an April 2025 7B model; the hosted v3 was not tested.
  • The harness belongs to a vendor. Cisco builds Foundation-Sec and ran this table. That its own model loses most columns to GPT-5 suggests it is not tilted in Cisco's favor, but it is still vendor data.

Claude, Gemini, Kimi and DeepSeek models were not in Cisco's table, and we found no run of these five benchmarks on them from a primary source.

What the security benchmarks measure

Most security benchmarks are multiple-choice knowledge tests. They tell you whether a model knows security material. They don't tell you whether it writes a usable report, drives tools well or refuses your requests.

Benchmark What it is Size Source
CTIBench Cyber threat intelligence tasks: multiple choice (MCQA), CVE-to-CWE root-cause mapping (RCM), CVSS severity prediction (VSP), ATT&CK technique extraction (ATE) 2,500 MCQA, 1,000 RCM, 1,000 VSP, 60 ATE (counts from Cisco's table 1) Alam et al., 2024
CyberMetric Four-choice questions generated with GPT-3.5 from NIST standards, RFCs, papers and books, then checked by human experts for over 200 hours 80, 500, 2,000 and 10,000-question sets Tihanyi et al., 2024
SecBench Multiple-choice and short-answer questions in Chinese and English, at two levels: knowledge retention and logical reasoning 44,823 MCQs and 3,087 short answers (Cisco used 595) Jing et al., 2024
SecEval Multiple-choice questions generated with GPT-4 across 9 domains, from software security to network security Over 2,000 XuanwuAI
CyberSecEval Meta's Purple Llama suite: how often a coding assistant suggests insecure code, and how often it complies with requests to assist in cyberattacks Generated test cases Bhatt et al., 2023

Two cautions. CyberMetric and SecEval questions were written with OpenAI models, which may favor models trained on similar text. And a high score on a multiple-choice test says little about a 40-page report or a long agent run, so test on your own tasks before you choose (method below).

General frontier models and their security policies

The large API models score highest on knowledge tests. Anthropic's policy explicitly permits authorized testing, OpenAI's and Google's prohibit compromising others' systems, and standard accounts still refuse some legitimate work. OpenAI and Anthropic both run programs that relax safeguards for verified defenders; Google's security model is limited to trusted testers. All quotes were checked on 2026-12-02.

Provider What the policy says Program for security teams
OpenAI Usage Policies, effective November 20, 2026: you cannot use the services for "destruction, compromise, or breach of another's system or property, including malicious or abusive cyber activity", or for "unsolicited safety testing". Daybreak, OpenAI's Trusted Access for Cyber. Blue gives "Reduced refusals" on some mainline models for "Vulnerability triage, secure code review, malware analysis, detection engineering, incident response". "Daybreak Red is currently available only to approved business and enterprise organizations." "Approval is not automatic."
Anthropic Usage Policy, effective November 12, 2026, section "Do Not Compromise Computer or Network Systems Without Authorization": "This section does not prohibit security research, testing, or tool development conducted on systems you own or operate, with the authorization of the system owner, or within the scope of an authorized bug bounty program or vulnerability disclosure policy, provided the activity complies with applicable law." The same section: "users may apply for adjusted access through our Cyber Verification Program".
Google Generative AI Prohibited Use Policy, last modified December 17, 2024: "Do not compromise the security of others' or Google's services." It adds: "We may make exceptions to these policies based on educational, documentary, scientific, or artistic considerations, or where harms are outweighed by substantial benefits to the public." Sec-Gemini. A Google maintainer replied on 2026-11-17: "Sec-Gemini is currently in a Trusted Tester phase and isn't open for individual access at the moment."

OpenAI says why these programs exist in its launch post of February 5, 2026: "restrictions intended to prevent harm have historically created friction for good-faith work." Even with approval, its help center says "Some safeguards can still apply after approval, even with Daybreak Red." If you hit refusals on a specific provider, see ChatGPT refused and Claude refused.

What we measured on Abliterator's two models

Abliterator serves two abliterated models through an OpenAI- and Anthropic-compatible API. Both refuse far less than the originals. DeepSeek V4.1 Flash Abliterated also ran five security suites before and after abliteration and stayed within noise on each; Kimi K3.1 Pro Abliterated has no security results yet.

Kimi K3.1 Pro Abliterated DeepSeek V4.1 Flash Abliterated
Model ID kimi-k3.1-pro-abliterated deepseek-v4.1-flash-abliterated
Base model Moonshot AI Kimi K3.1 Pro DeepSeek V4.1 Flash
Context / max output 1,048,576 / 262,144 tokens 1,048,576 / 393,216 tokens
Access API only; weights not released API only; weights not released
Refusals, original → abliterated 94% → 3% (model card) 94% → 1% (benchmarks)
Price per 1M tokens, input / output $4.00 / $15.00 $1.00 / $2.00
Security suites, original → abliterated Not run CyberMetric-2000 94.2 → 93.8, InterCode-CTF 94.2 → 95.5, Cybench (strict) 98.3 → 96.6; all within noise (benchmarks)

What the measurements show: on DeepSeek V4.1 Flash, refusals fell from 94% to 1% while reasoning, math and vision scores stayed within noise; MMLU-Pro dropped 0.8 points, the one statistically clear loss. On Kimi K3.1 Pro, Terminal-Bench 4.0 fell from 66.6 to 62.3, a drop on agentic coding that is plausible but not statistically shown. The full data is on benchmarks and does abliteration hurt performance.

What we measured on security work: on DeepSeek V4.1 Flash, CyberMetric-2000, InterCode-CTF, Cybench and CyberGym ran in our own harness before and after abliteration, paired on the same items (benchmarks). CyberMetric-2000 went from 94.2 to 93.8 (−0.5, 95% interval −1.3 to +0.3), InterCode-CTF from 94.2 to 95.5 and Cybench (strict) from 98.3 to 96.6, all within noise. CyberGym's 29 tasks are too few to separate the two models. A CyberMetric-2000 score of 93.8 sits next to GPT-5's 0.941 in Cisco's table, but the harnesses differ, so it is not in that table and you should not rank across the two. What we have not measured: CTIBench, SecBench, SecEval or CyberSecEval on either model, and any security suite on Kimi K3.1 Pro Abliterated. Moonshot's card reports cyber results for the original Kimi K3.1 Pro; we have not rerun them on the abliterated build, and given the Terminal-Bench drop, don't assume the original's numbers hold. Answers also use 2% to 16% more output tokens than the original model, depending on the benchmark, and you pay for those tokens.

For how these models compare with community abliterated and "uncensored" builds, see the uncensored LLM leaderboard guide.

Where refusals get in the way of authorized work

General models refuse by topic, and defensive work is written in the vocabulary of attack. The requests that trip refusals in practice are ordinary parts of a security job:

  • explaining the root cause of a public CVE so you can confirm a patched build is fixed;
  • describing what a suspicious script found on your own host does, line by line;
  • writing a detection for a named technique, which needs the technique's behavior;
  • drafting the attack-path narrative in a pentest report for a client who signed the scope;
  • working through a CTF challenge on the event's lab target.

Security-tuned models refuse too. Cisco's chat models are safety-aligned and Cisco recommends a guard model in front of them; the WhiteRabbitNeo 2.5 card shows how to prefix replies when the model refuses. A verification program is the provider's answer to the problem, and it works if you qualify and can wait for approval.

An abliterated model is the other route: the refusal behavior is removed from the weights, so refusals fell from 94% to 1% on DeepSeek V4.1 Flash Abliterated (benchmarks). One setup keeps your main provider and sends only the refused requests to an abliterated model. Fewer refusals do not change what is authorized: only for systems you own or have written permission to test. Some uses are always prohibited; see the acceptable use policy.

Self-hosted or API for client data

Read the engagement contract before you pick a model, because it may decide for you. Some rules of engagement forbid sending client data to any third-party service; then you need a model on your own hardware, whatever its scores.

Self-hosted 8B security model Hosted API (Abliterator or a frontier provider)
Where prompts go Your hardware The provider's servers
Hardware One GPU for an 8B model; Cisco publishes 4-bit and 8-bit GGUF builds None
Scores (Cisco's table) Lower on knowledge tests; highest on CVE-to-CWE mapping GPT-5 highest on knowledge tests; Abliterator's models not tested
Context 4,096 to 131,072 tokens, depending on model Up to 1,048,576 tokens on Abliterator's models
Refusals Varies; Cisco's models are safety-aligned Standard frontier accounts refuse some security work; Abliterator's models refuse far less

If you use an API:

  • Know what is stored. Abliterator does not store prompt or completion text. It keeps request metadata for billing and abuse prevention: time, model, API key ID, token counts, cost, latency and status. The inference provider keeps no inference content (privacy policy), and Abliterator does not train on customer data. Read each frontier provider's own data terms.
  • Redact before you send. Replace client names, hostnames, IP ranges and credentials with placeholders, and keep the mapping on your machine.
  • Keep your own audit trail. Log prompts, outputs and the X-Abl-Generation-Id response header in your own system if your engagement requires one.

Abliterator's weights are not released, so its models cannot be self-hosted. To run other open abliterated models or the base checkpoints yourself, see run abliterated models locally and self-hosting vs the API.

Test candidates on your own tasks

Your own work is the benchmark that matters. Collect 20 to 50 real tasks from recent engagements, with client details redacted, and run each candidate on the same set. Score every answer for accuracy, completeness and whether the model refused. Many local inference servers expose an OpenAI-compatible endpoint, so one script covers a self-hosted 8B model and a hosted API.

Save your tasks as tasks.jsonl, one per line:

{"id": "cwe-1", "prompt": "Map this CVE description from our scanner export to the most likely CWE ID and give a one-line reason: Apache Log4j2 JNDI features used in configuration, log messages, and parameters do not protect against attacker controlled LDAP and other JNDI related endpoints."}
{"id": "sigma-1", "prompt": "Write a Sigma rule for Windows process creation logs that flags certutil.exe downloading a file over HTTP or HTTPS. List the false positives you expect."}
{"id": "report-1", "prompt": "Rewrite this finding for an executive summary in three sentences: the staging web server on our network accepts TLS 1.0 and serves a default admin page."}

Then run them against each endpoint:

import json
import os

from openai import OpenAI

endpoints = {
    "abliterator-flash": (
        OpenAI(base_url="https://abliterator.ai/v1", api_key=os.environ["ABL_API_KEY"]),
        "deepseek-v4.1-flash-abliterated",
    ),
}
# Optional: any OpenAI-compatible server you run, such as one serving Foundation-Sec-8B-Instruct.
if os.environ.get("LOCAL_BASE_URL"):
    endpoints["local"] = (
        OpenAI(base_url=os.environ["LOCAL_BASE_URL"], api_key=os.environ.get("LOCAL_API_KEY", "none")),
        os.environ["LOCAL_MODEL"],
    )

SYSTEM = (
    "You support an internal security team. All work concerns systems we own or "
    "have written permission to test. Be precise and say when you are unsure."
)

with open("tasks.jsonl") as tasks, open("results.jsonl", "w") as out:
    for line in tasks:
        task = json.loads(line)
        for name, (client, model) in endpoints.items():
            resp = client.chat.completions.create(
                model=model,
                messages=[
                    {"role": "system", "content": SYSTEM},
                    {"role": "user", "content": task["prompt"]},
                ],
            )
            out.write(json.dumps({
                "task": task["id"],
                "endpoint": name,
                "answer": resp.choices[0].message.content,
                "cost_usd": getattr(resp.usage, "cost", None),
            }) + "\n")

Grade results.jsonl by hand, or with a second model and spot checks. Abliterator responses include usage.cost, so the file also gives you cost per task. If you rely on a system prompt to keep a model on topic, test that too: on DeepSeek V4.1 Flash Abliterated, off-topic requests declined under a restrictive system prompt fell from 95% to 75%. The free playground runs single prompts without a key; get a key to run the script.

Security LLM or LLM security?

"Security LLM" in this page means a model you use for security work. Most of Google's results for "security llm" cover a different topic: LLM security, which means protecting your own LLM application from prompt injection and similar attacks. For that work, see AI red teaming and AI red teaming tools.

Frequently asked questions

What is a security LLM?

A security LLM is a language model trained or tuned on security text, such as Cisco's Foundation-Sec-8B, Trend Micro's Llama-Primus or DeepHat, formerly WhiteRabbitNeo. The phrase is also used for LLM security, the work of protecting LLM applications, which is a different topic.

What is Foundation-Sec-8B?

Foundation-Sec-8B is an 8-billion-parameter model from Foundation AI at Cisco, released April 28, 2025. It is Llama 3.1 8B with continued pretraining on about 5.1 billion tokens of security text, and it has Instruct, 1.1 Instruct and Reasoning variants you can download from Hugging Face.

What happened to WhiteRabbitNeo?

It is now DeepHat. whiterabbitneo.com redirects to deephat.ai, which calls Deep Hat "formerly Whiterabbitneo". The latest open weights are DeepHat-V1-7B on Hugging Face, under Apache 2.0 with added usage restrictions (checked 2026-12-02).

Is a cybersecurity-specific LLM better than GPT or Claude?

Not on most knowledge tests. In Cisco's own harness, GPT-5 beat every security-tuned 8B model on four of five public benchmarks. The 8B models led on CVE-to-CWE mapping, and you can run them on your own hardware.

Can I use ChatGPT or Claude for penetration testing?

Anthropic's usage policy explicitly permits security testing on systems you own or are authorized to test, and OpenAI's forbids compromising another's system and unsolicited safety testing. Both run programs that relax safeguards for verified defenders, and ordinary accounts still refuse some legitimate security requests.

Which security LLM can I run locally?

The 8B models: Foundation-Sec-8B and its variants, Llama-Primus and DeepHat-V1-7B are open-weight on Hugging Face, and Cisco publishes GGUF builds. Abliterator's two models are API-only; their weights are not released.

Try it in your browser.

Ask it something your usual model refuses.

Start a chat

No sign-up to try. $10 free when you verify your email.