Dual-Role Evaluation of Large Language Models in Cybersecurity: A Unified Framework for Offensive Generation and Defensive Intelligence
The rapid advancement of large language models (LLMs) is reshaping cybersecurity by strengthening defensive capabilities while simultaneously enabling increasingly sophisticated offensive threats. Despite this dual-use nature, existing evaluation methodologies remain fragmented and commonly assess LLMs in isolation as either offensive or defensive systems. This work presents a unified dual-role evaluation framework that characterizes LLM behavior within a shared cybersecurity context through a multi-dimensional taxonomy encompassing role, capability, intent, and contextual use. The framework is empirically evaluated under a strictly single-turn setting (T = 1), in which each offensive input is independently assessed through one corresponding defensive response. The evaluation covers phishing detection, prompt injection, log analysis, malware reasoning, vulnerability exploitation, and incident response using malicious, benign, and ambiguous scenarios. Experimental results demonstrate strong overall detection performance, low error rates, and effective handling of dual-use and borderline cases through ambiguity-aware classification. The findings further reveal the difficulty of distinguishing malicious intent from structurally similar benign inputs, underscoring the importance of context-sensitive evaluation and uncertainty-aware decision making in cybersecurity applications. Overall, the study establishes a controlled and reproducible single-turn baseline for evaluating offensive inputs and defensive LLM responses across diverse cybersecurity tasks.
- Link
- https://doi.org/10.55708/js0511007
- Found by
- Crossref
- Authors
- Vaibhavi Tiwari, Ola Suaifan, Ramy Othman
- Organizations
- School of Computing, Montclair State University, Montclair, NJ 07043, USA, Montclair State University
- Categories
- evaluation
- Published
- 2026-11-21
- Last seen by the radar
- 2026-11-23
- Citations
- 0
- Radar score
- 26.75 / 100 (how it is scored)
- Why it scored so
- Also found via OpenAlex; Matched: evaluat; Primary record: Crossref