A Secure IoT-Based Smart Irrigation System Using NodeMCU and Raspberry Pi against Replay and SQL Injection Attacks

  • Unique Paper ID: 184370
  • PageNo: 1244-1248
  • Abstract:
  • The rapid expansion of the Internet of Things (IoT) has introduced significant cybersecurity challenges, especially as more low-cost embedded devices connect to sensitive networks. This paper presents a practical IoT implementation that uses NodeMCU and Raspberry Pi to collect temperature and humidity data via a DHT11 sensor. The sensor readings are transmitted over the HTTP protocol and stored in a MariaDB database hosted on the Raspberry Pi. To evaluate the system’s resilience, penetration testing was performed using Kali Linux, targeting two major threats: SQL Injection and Replay Attacks. These threats were executed individually on the Raspberry Pi server to expose and analyse real-world vulnerabilities. Following this, various security measures—such as SHA1-based signature validation, timestamp verification, and the use of prepared SQL statements—were applied to both the Arduino and server-side Python programs. The results clearly demonstrated that the applied security mechanisms effectively mitigated the identified vulnerabilities. This study highlights the importance of securing communication and data integrity in real-time IoT applications, and provides a reference model for developers and researchers aiming to deploy secure IoT systems using affordable, open-source tools.

Copyright & License

Copyright © 2026 Authors retain the copyright of this article. This article is an open access article distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

BibTeX

@article{184370,
        author = {Bheemarasetti Amrutha},
        title = {A Secure IoT-Based Smart Irrigation System Using NodeMCU and Raspberry Pi against Replay and SQL Injection Attacks},
        journal = {International Journal of Innovative Research in Technology},
        year = {2025},
        volume = {12},
        number = {4},
        pages = {1244-1248},
        issn = {2349-6002},
        url = {https://ijirt.org/article?manuscript=184370},
        abstract = {The rapid expansion of the Internet of Things (IoT) has introduced significant cybersecurity challenges, especially as more low-cost embedded devices connect to sensitive networks. This paper presents a practical IoT implementation that uses NodeMCU and Raspberry Pi to collect temperature and humidity data via a DHT11 sensor. The sensor readings are transmitted over the HTTP protocol and stored in a MariaDB database hosted on the Raspberry Pi. To evaluate the system’s resilience, penetration testing was performed using Kali Linux, targeting two major threats: SQL Injection and Replay Attacks. These threats were executed individually on the Raspberry Pi server to expose and analyse real-world vulnerabilities. Following this, various security measures—such as SHA1-based signature validation, timestamp verification, and the use of prepared SQL statements—were applied to both the Arduino and server-side Python programs. The results clearly demonstrated that the applied security mechanisms effectively mitigated the identified vulnerabilities. This study highlights the importance of securing communication and data integrity in real-time IoT applications, and provides a reference model for developers and researchers aiming to deploy secure IoT systems using affordable, open-source tools.},
        keywords = {DHT11, HTTP Protocol, Kali Linux MariaDB, NodeMCU, Raspberry Pi.},
        month = {September},
        }

Cite This Article

Amrutha, B. (2025). A Secure IoT-Based Smart Irrigation System Using NodeMCU and Raspberry Pi against Replay and SQL Injection Attacks. International Journal of Innovative Research in Technology (IJIRT), 12(4), 1244–1248.

Related Articles