The Dual Role of Artificial Intelligence and LLM in Cybersecurity
Artificial Intelligence (AI) and Large Language Models (LLMs) are transforming the cybersecurity landscape, taking a dual role as both enablers of defense. This paper explores this duality by distinguishing between AI for Security, where intelligent models enhance threat analysis, intrusion detection, and automated mitigation, and Security for AI, which focuses on securing models themselves against adversarial manipulation, data leakage, and prompt-based exploitation. To empirically evaluate the capabilities of modern LLMs in cybersecurity, we conducted extensive experiments using the newly developed CyberMetric dataset, which assesses cybersecurity knowledge across multiple domains such as cryptography, network defense, and software vulnerabilities. Our evaluation of twenty state-of-the-art LLMs-including GPT-5 Chat, Grok 4 Fast, Qwen3 235B, Gemini 2.5 Flash, and DeepSeek V3.2-demonstrates that the 2025 generation of models achieves near-human performance, with GPT-5 Chat reaching 98.75% accuracy and several open-source models performing within a 2-3% margin. These results highlight the growing maturity of open LLM ecosystems for cybersecurity applications and confirm that modern LLMs are becoming reliable instruments for cyber defense, capable of supporting automated threat analysis, vulnerability assessment, and compliance verification, while also emphasizing the need to ensure their safety, transparency, and resilience against misuse.
Publication Details
- Journal
- Edinburgh Napier Research Repository (Edinburgh Napier University)
- Published
- 2025-11-27
- Primary Topic
- Network Security and Intrusion Detection
- Type
- article
- Field-Weighted Citation Impact
- 0.00