Large Language Model-Driven Security Assistant for Internet of Things via Chain-of-Thought

Mingfei Zeng, Ming Xie, Xixi Zheng, Chunhai Li, Chuan Zhang, Liehuang Zhu

Abstract

Securing the diverse landscape of Internet of Things (IoT) devices is a significant challenge due to hardware heterogeneity and varying user expertise. This paper introduces IoT Chain-of-Thought (ICoT), a two-stage prompting framework that enables Large Language Models (LLMs) to provide personalized, actionable security advice. By first analyzing the user's role and the specific vulnerability before generating a response, ICoT achieves high accuracy and relevance without the need for model fine-tuning.

Introduction: The IoT Security Bottleneck

The proliferation of IoT devices in smart homes, healthcare, and industry has created a complex security environment. Traditional security tools often fail to adapt to dynamic threats across diverse hardware architectures and protocols. Furthermore, existing automated advice is typically generic—a "one-size-fits-all" technical dump that may be too complex for a home user or too simple for a network administrator. There is a critical need for security assistants that can provide context-aware guidance tailored to the specific needs and knowledge levels of different users.

The ICoT Framework

The authors propose the IoT Chain-of-Thought (ICoT) framework, which leverages the reasoning capabilities of off-the-shelf LLMs through a structured two-stage prompting process.

The two-stage ICoT framework: Role and Vulnerability Analysis followed by Response Generation.

Stage 1: Role and Vulnerability Analysis

Instead of generating a direct answer, the system first prompts the LLM to perform a deep analysis of the context. This includes:

  • Role Settings: Identifying the user's background, knowledge level, goals, and specific requirements.
  • Vulnerability Details: Analyzing the vulnerability's type, location, and potential impact.

The LLM outputs this analysis as a structured JSON object, ensuring the subsequent response is grounded in technical and situational facts.

Stage 2: Response Generation

The structured analysis from Stage 1 is combined with the original user query and a task-specific prompt. The LLM then generates a final response that is specifically calibrated for the identified user role.

Detailed prompt structure and task definition used in the ICoT process.

Key Insights

  • Contextual Grounding: By forcing an intermediate analysis step, ICoT prevents the generic responses common in standard LLM interactions.
  • Zero-Shot Personalization: The framework achieves high-quality, personalized output without requiring expensive fine-tuning on specialized cybersecurity datasets.
  • Role-Based Adaptability: The system can translate the same raw vulnerability data into simple instructions for a general user or complex mitigation code for a developer.

Evaluation and Results

The framework was evaluated using the VARIoT Vulnerabilities and VARIoT Exploits datasets across four LLMs: GPT-4o, GPT-4o-mini, DeepSeek-R1, and DeepSeek-V3. Performance was measured across five metrics: Reliability, Relevance, Detail, Technicality, and Friendliness.

Results showed that ICoT consistently outperformed standard prompting. For instance, using DeepSeek-V3 for a "General User" persona, ICoT improved the Relevance score from 3.99 to 4.98 and the Friendliness score from 4.38 to 4.93. These gains were consistent across different model architectures, demonstrating the robustness of the prompting strategy.

Limitations and Future Outlook

While effective, the ICoT approach has some limitations. The multi-step process can lead to increased verbosity and higher computational overhead, which may be a bottleneck for real-time edge applications. Additionally, like all LLM-based systems, it remains susceptible to hallucinations.

Future work aims to extend the framework to Industrial IoT (IIoT) and Low Power Wide Area Networks (LPWAN). The authors also plan to integrate multimodal inputs, such as network logs and sensor data, and implement privacy-preserving mechanisms for sensitive user data.

Summary updated

BibTeX
@article{zeng2025large,
  author = {Mingfei Zeng and Ming Xie and Xixi Zheng and Chunhai Li and Chuan Zhang and Liehuang Zhu},
  title = {{Large Language Model-Driven Security Assistant for Internet of Things via Chain-of-Thought}},
  journal = {IEEE Internet of Things Journal},
  year = {2025},
  doi = {10.1109/jiot.2025.3577675},
}
Figure