Submitted:
01 October 2025
Posted:
02 October 2025
You are already at the latest version
Abstract
Keywords:
1. Introduction
- (1)
- Invoking EMBA to identify candidate binaries.
- (2)
- Running Ghidra in headless mode to decompile selected firmware into C/C++ pseudo-code.
- (3)
- Segmenting the pseudo-code using regex heuristics into analyzable chunks.
- (4)
- Feeding each chunk to a custom GPT-4o-based agent that flags potential vulnerabilities and maps them to CWE identifiers.
A. Key Contributions
- LLM-Augmented Analysis: Integration of a GPT-4obased LLM with the OWASP IoT Security Testing Guide to create a firmware analysis agent with enhanced vulnerability detection capabilities [14].
- End-to-End Automated Pipeline: Development of a structured pipeline that combines EMBA, Ghidra, regex-based segmentation, and a prompt-driven LLM agent for scalable and automated firmware vulnerability detection across diverse IoT devices.
- Empirical Validation: Technical evaluation of the pipeline using (a) a custom vulnerable binary, (b) the Damn Vulnerable Router Firmware (DVRF) suite, and (c) multiple real-world CVEs, achieving rediscovery of known vulnerabilities with correct CWE mapping.
2. Literature Survey
- EMBA: EMBA is an open-source firmware security analyzer designed for embedded devices. It automates the extraction, static analysis, and dynamic analysis of firmware, generating comprehensive security reports. EMBA supports various architectures and file systems, making it versatile for different embedded system [15].
- Firmwalker: Firmwalker is a command-line application that looks for common vulnerabilities in firmware file systems that have been extracted. It looks for private keys, passwords, and configuration files, among other sensitive data. Firmwalker focuses mostly on static analysis and might not be able to identify more complex vulnerabilities, despite being helpful for preliminary assessments [16].
- Ghidra: Developed by the National Security Agency (NSA), Ghidra is a free and open-source reverse engineering tool. It provides capabilities for disassembling, decompiling, and analyzing binary code across various platforms. Ghidra’s extensibility allows users to develop custom scripts and plugins, enhancing its functionality for specific analysis tasks [17].
A. OWASP IOT Security Testing Guide
B. Applications of Llms for Cybersecurity
3. Methodology
A. EMBA for Binary Identification
B. Decompilation with Ghidra
C. LLM Based Vulnerability Detection
- (a)
- token-budget constraints by dividing the code into coherent chunks
- (b)
- context retention by thus ensuring that function and control-flow boundaries are not violated and
- (c)
- parallel processing, since multiple chunks can be analyzed at the same time.
D. Architecture Design
E. LLM Development
- (1)
- You are a FIRMWARE SECURITY ANALYST specializing in embedded systems vulnerability detection through static analysis of decompiled IoT binaries across ARM, MIPS, and x86 architectures.
- (2)
- Apply systematic vulnerability assessment to the provided DECOMPILED CODE SEGMENT. Output format: STATUS: [VULNERABLE/SECURE] | CONFIDENCE: [High/Medium/Low]
- (3)
- For identified vulnerabilities, assign the most specific CWE IDENTIFIER from MITRE taxonomy.
- (4)
- Map findings to OWASP IoT Top 10 categories when applicable like: I1 (Weak Passwords), I2 (Insecure Network Services), I3 (Insecure Ecosystem Interfaces), I4 (Insecure Update Mechanisms), I5 (Insecure Data Protection).
- (5)
- Provide ROOT CAUSE analysis in format: “VULNERABILITY TYPE | TRIGGER CONDITION | EXPLOITATION VECTOR” (e.g., “BUFFER OVERFLOW | UNCHECKED INPUT LENGTH | STACK CORRUPTION”).
- (6)
- Generate MITIGATION recommendations appropriate for them, focusing on: input validation, bounds checking, secure memory management, and best coding practices.
- (7)
- Consider DECOMPILATION ARTIFACTS: Acknowledge when analysis is limited by Ghidra decompilation quality, variable naming, or control flow reconstruction issues.


F. Tool Integration
4. Results
A. Future Scope and Discussions
5. Conclusions
References
- Arias, J. Wurm, K. Hoang. Privacy and security in internet of things and wearable devices. IEEE Trans. Multi-Scale Comput. Syst. 2015, 1, 99–109. [Google Scholar] [CrossRef]
- M. Hung. Leading the IoT: Gartner insights on how to lead in a connected world. Gartner Research 2017, 1–29.
- CISCO. Internet of things at a glance. 2016.
- Statista. IoT connected devices worldwide. 2024. [Online]. Available online: https://www.statista.com/statistics/471264/iot-number-of-connected-devices-worldwide/.
- Nadir, H. Mahmood, and G. Asadullah. A taxonomy of IoT firmware security and principal firmware analysis techniques. Int. J. Crit. Infrastruct. Prot. 2022, 38. [Google Scholar] [CrossRef]
- P. C. van Oorschot and S. W., Smith. The Internet of Things: Security challenges. IEEE Secur. Priv. 2019, 17, 7–9. [Google Scholar] [CrossRef]
- N. S. Abouzakhar, A. N. S. Abouzakhar, A. Jones, and O. Angelopoulou. Internet of Things security: A review of risks and threats to healthcare sector. in Proc. 2017 IEEE Int. Conf. Internet of Things, Jan. 2018, pp. 373–378. [Online]. Available. [CrossRef]
- M. Frustaci, P. Pace, G. Aloi, and G. Fortino. Evaluating critical security issues of the IoT world: Present and future challenges. IEEE Internet Things J. 2018, 5, 2483–2495. [CrossRef]
- Palo Alto Networks. The 2023 benchmark report on IoT security.” [Online]. Available: https://tinyurl.com/42m6b469.
- X., Feng; et al. Detecting vulnerability on IoT device firmware: A survey. IEEE/CAA J. Autom. Sinica 2023, 10, 25–41. [Google Scholar] [CrossRef]
- GitHub. EMBA: IoT firmware security analyzer.” [Online]. Available: https://github.com/emba/emba.
- GitHub. Firmwalker: Firmware analysis tool.” [Online]. Available: https://github.com/craigz28/firmwalker.
- Z. Sheng, Z. Chen, S. Gu. LLMs in Software Security: A Survey of Vulnerability Detection Techniques and Insights. arXiv 2025, arXiv:2502.07049. [Google Scholar] [CrossRef]
- OWASP. Firmware security testing guidelines. [Online]. Available: https://owasp.org/owasp-istg/03_test_cases/firmware/index.html.
- Gupta. Firmware reverse engineering and exploitation. in The IoT Hacker’s Handbook. Apress, 2019. [Online]. Available. [CrossRef]
- J. Ye et al.. Detecting command injection vulnerabilities in Linux-based embedded firmware with LLM-based taint analysis. Comput. Secur., vol. 144, 2024. [Online]. Available. [CrossRef]
- National Security Agency. Ghidra. [Online]. Available: https://github.com/NationalSecurityAgency/ghidra.
- H. Li and L. Shan. LLM-based vulnerability detection. in 2023 Int. Conf. Human-Centered Cogn. Syst. (HCCS), IEEE, 2023.
- D., Manuel; et al. Enhancing reverse engineering: Investigating and benchmarking large language models for vulnerability analysis in decompiled binaries. arXiv 2024, arXiv:2411.04981. [Google Scholar] [CrossRef]
- M. A., Ferrag. Generative AI in Cybersecurity: A Comprehensive Review of LLM Applications and Vulnerabilities. arXiv 2024, arXiv:2405.12750. [Google Scholar]
- GitHub. Praetorian DVRF.” [Online]. Available: https://github.com/ praetorian-inc/DVRF.
- P. Wang, S. P. Wang, S. Huang, and Y. Wu. Comprehensive survey on firmware security for IoT devices. ACM Comput. Surv., 2022.
- National Vulnerability Database (NVD). [Online]. Available: https://nvd.nist.gov.
- S. Greenberg et al.. Automated firmware security assessment using generative AI. Comput. Secur., 2024.
- Vaswani, *!!! REPLACE !!!*; et al. . Attention is all you need. in Adv. Neural Inf. Process. Syst. (NeurIPS), 2017.
- OpenAI, *!!! REPLACE !!!*. GPT-4 technical report. arXiv arXiv:2303.08774, 2023. [CrossRef]
- Goodfellow, Y. Bengio, and A. Courville, Deep Learning. MIT Press, 2016.
- National Vulnerability Database. CVE-2024-51186.” [Online]. Available: https://nvd.nist.gov/vuln/detail/CVE-2024-51186. 2024.
- K. Zetter. Inside the cunning, unprecedented hack of Ukraine’s power grid. WIRED, 2016. [Online]. Available: https://www.wired.com/2016/ 03/inside-cunning-unprecedented-hack-ukraines-power-grid/. 2016.
- M. Costin et al. Automated dynamic firmware analysis at scale. in Proc. AsiaCCS, 2014, pp. 437–448. [Online]. Available. [CrossRef]
- M. Antonakakis et al. Understanding the Mirai Botnet. in Proc. USENIX Secur. Symp., 2017, pp. 1093–1110. [Online]. Available: https://www.usenix.org/conference/usenixsecurity17/technical-sessions/ presentation/antonakakis.
- D. Liu et al. AI-based firmware analysis and vulnerability detection: Challenges and future trends. IEEE Access 2023, 11, 50977–50991. [CrossRef]
- H. Kim et al. Binary code similarity detection using neural networks: A survey. ACM Comput. Surv. 2023, 55, 1–36. [CrossRef]
- MITRE Corporation. Common Vulnerabilities and Exposures (CVE). Available online: https://cve.mitre.org/ (accessed on 20 September 2025).
Short Biography of Authors
![]() |
Sushant Mane received his B.E. degree in Electronics Engineering from RAIT, Nerul, India, in 2019, followed by an M.Tech. degree in Electronics Engineering from Veermata Jijabai Technological Institute (VJTI), Mumbai, India, in 2022. He is currently pursuing a Ph.D. in Electronics Engineering at VJTI, Mumbai. He has worked on several research and development projects related to embedded systems and cybersecurity. His research focuses on vulnerability analysis, reverse engineering, exploit development, IoT security, and malware analysis. Mr. Mane has found 30+ CVE. He actively participates in cybersecurity workshops and talks. |
![]() |
Jai Bhortake is pursuing a B.Tech. Degree in Electronics and Telecommunication Engineering from Veermata Jijabai Technological Institute (VJTI), Mumbai, India. He has worked on research projects in the areas of artificial intelligence and cybersecurity. His recent work includes intrusion detection in UAVs and the discovery and reporting of CVE registered in the National Vulnerability Database (NVD). His research interests also include machine learning, data science and embedded systems. Mr. Bhortake is also passionate about entrepreneurship and is actively involved in those activities. He has also been recognized with the Best Research Paper Award for his contributions to deep learning. |
![]() |
Vidhi Wankhade received her B.E. degree in Information Technology from Usha Mittal Institute of Technology (SNDTWU), Mumbai, India, and is currently associated with Deloitte. She has worked on various research projects, including a CNN-based Intrusion Detection System for drone security, where she applied machine learning techniques to detect security breaches in UAV systems. Her research work also includes contributions in the areas of network security, secure programming practices, and vulnerability detection. Her research interests include cybersecurity, machine learning for security, programming, and reverse engineering. Ms. Wankhade is actively involved in research activities and continues to explore innovative approaches in the domain of intelligent and secure systems. |
![]() |
Faruk Kazi (Senior Member, IEEE) received the Ph.D. degree in Systems and Control Engineering from the Indian Institute of Technology (IIT), Bombay, India, in 2009. He is currently a Professor of Electronics Engineering with the Department of Electrical Engineering at Veermata Jijabai Technological Institute (VJTI), Mumbai, India, and also serves as the Director of the Research and Development Cell (RDC) at the University of Mumbai, India. His research interests include modeling and control of complex and nonlinear dynamical systems, multi-agent systems, and cyber-physical systems. Dr. Kazi is a Senior Member of the IEEE. He serves as the Chair of the Working Group on Digital Architecture and Cyber Security under the India Smart Grid Forum (ISGF). He is also actively involved in various national and institutional initiatives to promote secure and intelligent infrastructure development. |

| Test Case | Binary Type | Vulnerability Detected | Description | CWE ID | F1-Score | Error Sources |
|---|---|---|---|---|---|---|
| Custom Made Vulnerable Binary | User-Created for testing | Stack-based Buffer Overflow | Detected stack based buffer overflow in custom code. | CWE-121 | 0.95 | Decompiler artifacts (10%), CWE mapping errors (5%) |
| Case 1 | DVRF Binary | Stack-based Buffer Overflow | Identified stack buffer overflow in DVRF test case. | CWE-121 | 0.96 | Semantic ambiguity (3%),Model hallucinations (2%) |
| Case 2 | DVRF Binary | Heap-based Buffer Overflow | Heap-based overflow detected in memory allocation logic. | CWE-122 | 0.94 | Decompiler artifacts (12%), CWE mapping errors (4%) |
| Case 3 | DVRF Binary | Use After Free | Detected dereferencing of freed memory. | CWE-416 | 0.98 | Semantic ambiguity (1%), Model hallucinations (1%) |
| Real-World CVE | DVRF Binary | OS Command Injection | Identified improper input validation leading to injection. | CWE-78 | 0.93 | Decompiler artifacts (14%), CWE mapping errors (7%) |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).



