The machines are watching: Exploring the potential of Large Language Models for detecting Algorithmically Generated Domains

Algorithmically Generated Domains (AGDs) are integral to many modern malware campaigns, allowing adversaries to establish resilient command and control channels. While machine learning techniques are increasingly employed to detect AGDs, the potential of Large Language Models (LLMs) in this domain remains largely underexplored. In this paper, we examine the ability of nine commercial LLMs to identify malicious AGDs, without parameter tuning or domain-specific training. We evaluate zero-shot approaches and few-shot learning approaches, using minimal labeled examples and diverse datasets with multiple prompt strategies. Our results show that certain LLMs can achieve detection accuracy between 77.3% and 89.3%. In a 10-shot classification setting, the largest models excel at distinguishing between malware families, particularly those employing hash-based generation schemes, underscoring the promise of LLMs for advanced threat detection. However, significant limitations arise when these models encounter real-world DNS traffic. Performance degradation on benign but structurally suspect domains highlights the risk of false positives in operational environments. This shortcoming has real-world consequences for security practitioners, given the need to avoid erroneous domain blocking that disrupt legitimate services. Our findings underscore the practicality of LLM-driven AGD detection, while emphasizing key areas where future research is needed (such as more robust warning design and model refinement) to ensure reliability in production environments. • LLMs can detect AGDs with an accuracy of up to 89.3%, facilitating AI-based malware defense. • Creating effective detection is crucial; false positives remain a significant obstacle. • LLMs can classify hash-based DGAs, but they struggle with dictionary-based ones. • LLMs degrade in real-world DNS traffic, requiring deployment improvements.

Authors

Institutions

Publication Details

Journal
Journal of Information Security and Applications
Published
2025-08-11
DOI
https://doi.org/10.1016/j.jisa.2025.104176
Primary Topic
Topic Modeling
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

The machines are watching: Exploring the potential of Large Language Models for detecting Algorithmically Generated Domains

Carlos Gañán, Ricardo J. Rodríguez, Tomás Pelayo-Benedet
Journal of Information Security and Applications
Topic Modeling
article

The machines are watching: Exploring the potential of Large Language Models for detecting Algorithmically Generated Domains

Carlos Gañán, Ricardo J. Rodríguez, Tomás Pelayo-Benedet
article en

Abstract

Algorithmically Generated Domains (AGDs) are integral to many modern malware campaigns, allowing adversaries to establish resilient command and control channels. While machine learning techniques are increasingly employed to detect AGDs, the potential of Large Language Models (LLMs) in this domain remains largely underexplored. In this paper, we examine the ability of nine commercial LLMs to identify malicious AGDs, without parameter tuning or domain-specific training. We evaluate zero-shot approaches and few-shot learning approaches, using minimal labeled examples and diverse datasets with multiple prompt strategies. Our results show that certain LLMs can achieve detection accuracy between 77.3% and 89.3%. In a 10-shot classification setting, the largest models excel at distinguishing between malware families, particularly those employing hash-based generation schemes, underscoring the promise of LLMs for advanced threat detection. However, significant limitations arise when these models encounter real-world DNS traffic. Performance degradation on benign but structurally suspect domains highlights the risk of false positives in operational environments. This shortcoming has real-world consequences for security practitioners, given the need to avoid erroneous domain blocking that disrupt legitimate services. Our findings underscore the practicality of LLM-driven AGD detection, while emphasizing key areas where future research is needed (such as more robust warning design and model refinement) to ensure reliability in production environments. • LLMs can detect AGDs with an accuracy of up to 89.3%, facilitating AI-based malware defense. • Creating effective detection is crucial; false positives remain a significant obstacle. • LLMs can classify hash-based DGAs, but they struggle with dictionary-based ones. • LLMs degrade in real-world DNS traffic, requiring deployment improvements.

Journal of Information Security and ApplicationsVol. 93
Universidad de Zaragoza (ES), Delft University of Technology (NL)
European Commission, Nederlandse Organisatie voor Wetenschappelijk Onderzoek, Instituto Nacional de Ciberseguridad, European Regional Development Fund, Agencia Estatal de Investigación
Openalex Percentile: Top 90%
Topic Modeling
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.