Application, Security Risks and Defense Strategies of Large Language Models in Cybersecurity
Abstract
Cybersecurity work is becoming more difficult as cloud services, the Internet of Things, phishing campaigns, malware, and ransomware attacks continue to expand. In this context, large language models have started to attract attention. This paper reviews the use of large language models in cybersecurity and discusses both their practical value and their risks. It first examines four main application areas: vulnerability detection and code security auditing, malware analysis, phishing detection, threat intelligence and log analysis, and penetration testing with incident response support. The review shows that large language models are useful for explaining complex evidence, summarizing scattered information, and helping analysts move from raw data to a clearer investigation path. However, they should not be treated as independent security decision-makers. Their outputs may be affected by prompt injection, jailbreak attacks, data poisoning, backdoors, privacy leakage, hallucinated evidence, and malicious use. These problems become more serious when models are connected to retrieval systems, plugins, or automated tools. For this reason, secure deployment requires more than better prompts. A layered defense is needed, including input separation, source verification, least-privilege tool access, data cleaning, output checking, human review, and continuous monitoring.