Skip to content

Commit c2da3c6

Browse files
update readme file.
1 parent b23d335 commit c2da3c6

3 files changed

Lines changed: 288 additions & 0 deletions

File tree

IoT_IDS/IoT_IDS-Proposal.pdf

307 KB
Binary file not shown.

IoT_IDS/README.md

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# IoT Intrusion Detection System (Information Security Project)
2+
3+
**Course:** Information Security / Network Security
4+
**Semester:** 3rd
5+
**Submitted To:** Prof. Khalid Mehmood Khan
6+
**Submitted By:**
7+
8+
- 🧠 _Moavia Amir_ (2k24_BSAI_72) — [📧 contactmuawia@gmail.com](mailto:contactmuawia@gmail.com)
9+
- ⚙️ _Muhammad Ramzam_ (2k24_BSAI_31) — [📧 Ramzam@gmail.com](mailto:Ramzam@gmail.com)
10+
11+
---
12+
13+
## 📘 Project Overview
14+
15+
**IoT Intrusion Detection System** is a lightweight, classroom‑safe IDS that monitors MQTT traffic from ESP8266/NodeMCU sensors, detects anomalous behaviours (message‑rate floods, large‑payload floods, and tampering), and displays real‑time alerts on a local dashboard. The project demonstrates practical information security techniques for protecting IoT deployments and is intended for educational demonstration on owned devices and isolated networks.
16+
17+
---
18+
19+
## 🔍 Problem Statement
20+
21+
IoT devices are often resource‑constrained and poorly secured, making them vulnerable to message floods, tampering, and spoofing. These attacks can degrade service availability, corrupt telemetry, and open attack surfaces in smart systems. This project demonstrates how a simple IDS can detect such conditions and help preserve **integrity** and **availability** of IoT systems.
22+
23+
---
24+
25+
## 🎯 Objectives
26+
27+
- Build a reproducible IDS that monitors MQTT topics from ESP sensors.
28+
- Detect two core attack types:
29+
1. **Message‑rate flood** — many small messages per second.
30+
2. **Byte‑rate flood** — large payloads causing bandwidth spikes.
31+
- Demonstrate tampering/spoofing and an optional proxy (MITM) simulation.
32+
- Provide a minimal web UI showing live sensor data and alert status.
33+
- Ensure the demo is safe and limited to owned/isolated networks.
34+
35+
---
36+
37+
## 🧠 System Overview
38+
39+
| Component | Purpose |
40+
| --------------------- | ----------------------------------------------------------- |
41+
| **ESP8266 / NodeMCU** | Sensor (publishes temperature) and optional attacker device |
42+
| **Laptop** | Runs Mosquitto MQTT broker, IDS (Python), and Flask web UI |
43+
| **Phone** | Optional attacker (MQTT app or Termux) to simulate attacks |
44+
| **Software stack** | Mosquitto, Python (paho-mqtt, Flask), Arduino IDE |
45+
46+
---
47+
48+
## 🔬 Working Principle (Simple)
49+
50+
1. ESP sensor publishes JSON messages to `home/sensor/temp` at 1 msg/sec.
51+
2. Laptop (broker + IDS) subscribes to `home/sensor/#` and measures:
52+
- messages/sec per topic (msg_rate)
53+
- bytes/sec per topic (byte_rate)
54+
3. If `msg_rate` or `byte_rate` exceeds set thresholds → IDS raises an **ALERT** and the web UI shows a red warning.
55+
4. Attacks are simulated safely using a second ESP or a phone (MQTT app / Termux).
56+
57+
---
58+
59+
## 🛠 Hardware & Software Requirements
60+
61+
**Hardware**
62+
63+
- ESP8266 / NodeMCU (sensor)
64+
- Optional second ESP (attacker) or smartphone
65+
- Laptop with Wi‑Fi and USB port
66+
67+
**Software**
68+
69+
- Mosquitto MQTT broker
70+
- Python 3.8+ with `paho-mqtt` and `Flask`
71+
- Arduino IDE (for flashing ESP)
72+
- (Optional) Termux or MQTT mobile app
73+
74+
---
75+
76+
## 🚀 Quick Start (classroom demo)
77+
78+
1. Install and start Mosquitto on laptop.
79+
2. Upload `esp_sensor.ino` to an ESP and set `BROKER_IP` to your laptop IP.
80+
3. Run `python3 ids_web.py` on laptop (default thresholds: `MSG_THRESHOLD=30 msg/s`, `BYTES_THRESHOLD=4000 B/s`).
81+
4. Open the UI: `http://<laptop-ip>:5000` — confirm **OK** status.
82+
5. Simulate attacks:
83+
- **Message‑rate flood:** start phone/ESP attacker with interval `50 ms` → IDS triggers message‑rate alert.
84+
- **Byte‑rate flood:** phone (Termux) publishes ~900B every `200 ms` → IDS triggers byte‑rate alert.
85+
6. Stop attacker → status returns to OK.
86+
87+
> **Safety:** Only run tests on your own devices and local network. Do not run attacks on external or institutional networks.
88+
89+
---
90+
91+
## 📂 Folder Structure
92+
93+
```
94+
IoT_IDS/
95+
├─ README.md # (this file)
96+
├─ requirements.txt # paho-mqtt, Flask
97+
├─ esp/
98+
│ ├─ esp_sensor.ino
99+
│ └─ esp_attacker.ino
100+
├─ python/
101+
│ ├─ ids_web.py
102+
│ ├─ phone_attacker.py
103+
│ └─ mqtt_proxy.py
104+
└─ slides/
105+
└─ one_slide.txt
106+
```
107+
108+
---
109+
110+
## 🔧 Tuning & Extensions
111+
112+
- Adjust `MSG_THRESHOLD` and `BYTES_THRESHOLD` in `ids_web.py` to match your classroom network.
113+
- Possible extensions: add rate‑limiting actions (block/quarantine), store alerts to CSV for the report, integrate cloud dashboards (ThingSpeak/Blynk), or add authentication and TLS for MQTT.
114+
115+
---
116+
117+
## 🧾 Deliverables & Evaluation Evidence
118+
119+
- Live demo (2–3 minutes): normal → message flood → large‑payload flood → tamper/proxy.
120+
- Source code: ESP sketches + Python scripts in the repo.
121+
- Report / screenshots showing alert and logs.
122+
123+
---
124+
125+
## 📫 Contact
126+
127+
- Moavia Amir — contactmuawia@gmail.com
128+
- Muhammad Ramzam — Ramzam@gmail.com
129+
130+
---

ResQTemp/README.md

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
# ⚙️ ResQTemp — Smart Temperature & Rescue Alert System
2+
3+
**Course:** Computer Organization & Assembly Language (COAL)
4+
**Semester:** 3rd
5+
**Submitted To:** Prof. Ghulam Mustafa
6+
**Submitted By:**
7+
- 🧠 *Moavia Amir* (2k24_BSAI_72) — [📧 contactmuawia@gmail.com](mailto:contactmuawia@gmail.com)
8+
- ⚙️ *Muhammad Dawood* (2k24_BSAI_31) — [📧 muhammaddawood@vu.edu.pk](mailto:muhammad.dawood@vu.edu.pk)
9+
10+
---
11+
12+
## 📘 Project Overview
13+
14+
**ResQTemp** is a microcontroller-based **smart temperature control and rescue alert system** integrating **Assembly-level programming** with **IoT and GSM communication**.
15+
It demonstrates how **low-level hardware control** (in Assembly) can synchronize with **modern IoT automation** to enhance safety and real-time monitoring.
16+
17+
The project monitors temperature using an **LM35 sensor**, controls **fan and LED** responses, and triggers **rescue alerts via SMS and IoT dashboard** after a safety delay if overheating persists.
18+
Through an **ESP8266 web interface**, users can remotely view temperature data, device status, and location-based alerts in emergency mode.
19+
20+
---
21+
22+
## 🧩 Problem Statement
23+
24+
Conventional temperature monitoring systems lack **intelligent decision logic** and **remote visibility**.
25+
In industrial or laboratory environments, a delayed response to overheating can lead to serious equipment or safety issues.
26+
27+
**ResQTemp** bridges this gap by merging:
28+
- **Precision hardware control** (Assembly-level logic)
29+
- **Smart IoT connectivity**
30+
- **Real-time rescue response** via automated SMS and web alerts
31+
32+
---
33+
34+
## 🎯 Objectives
35+
36+
- Implement a temperature monitoring system using Assembly language on Arduino.
37+
- Activate safety outputs (LED/Fan) when temperature crosses threshold.
38+
- Introduce a 15-second delay before triggering emergency mode (avoiding false alerts).
39+
- Send a **rescue SMS using SIM900A** and update IoT dashboard via ESP8266 after the delay.
40+
- Display live readings and system status on a hosted IoT web page.
41+
- Optionally share GPS/location data for emergency tracking.
42+
43+
---
44+
45+
## 🧠 System Overview
46+
47+
| Component Type | Description |
48+
|----------------|-------------|
49+
| **Microcontroller** | Arduino UNO programmed in Assembly (COAL core) |
50+
| **Sensor** | LM35 – Temperature sensor (analog input) |
51+
| **Outputs** | LED indicator, Cooling Fan, Buzzer |
52+
| **IoT Module** | ESP8266 Wi-Fi Module |
53+
| **GSM Module** | SIM900A — sends rescue SMS automatically |
54+
| **Web Page** | HTML + CSS dashboard showing live data & alerts |
55+
| **Language Stack** | Assembly (Arduino), C++ (IoT & GSM logic), HTML/CSS (Web UI) |
56+
57+
---
58+
59+
## 🔬 Working Principle
60+
61+
1. The **LM35 sensor** outputs an analog voltage proportional to temperature.
62+
2. Arduino executes **Assembly instructions** to:
63+
- Compare current temperature with threshold
64+
- Control fan/LED indicators
65+
- Start a **15-second timer** if overheating continues
66+
3. If temperature remains high after 15 seconds:
67+
- Arduino signals the **ESP8266** to update IoT dashboard
68+
- Arduino triggers the **SIM900A module** to send a **rescue SMS** to predefined numbers
69+
4. The ESP8266 dashboard displays:
70+
- Current temperature
71+
- System status: *Normal / Overheat / Rescue Mode*
72+
5. Users can monitor and control the system remotely via the IoT dashboard while receiving immediate SMS alerts.
73+
74+
---
75+
76+
## 🧰 Hardware Requirements
77+
78+
- Arduino UNO
79+
- LM35 Temperature Sensor
80+
- ESP8266 Wi-Fi Module
81+
- SIM900A GSM Module
82+
- LED, Fan, Buzzer
83+
- Breadboard, Jumper Wires, Resistors
84+
- Power Supply (5V)
85+
86+
---
87+
88+
## 💻 Software Requirements
89+
90+
- Arduino IDE
91+
- Assembly/C++ Compiler Support
92+
- HTML + CSS for Web Dashboard
93+
- Serial Monitor or Web Browser for live data
94+
95+
---
96+
97+
## 🚀 Expected Outcomes
98+
99+
- Fully functional hardware prototype controlling temperature automatically.
100+
- Real-time monitoring via IoT dashboard hosted on ESP8266.
101+
- Automated **rescue SMS alerts** via SIM900A module.
102+
- Demonstration of Assembly-level timing and control accuracy.
103+
- Proof of concept for combining **COAL + IoT + GSM** principles.
104+
105+
---
106+
107+
## 🔮 Future Enhancements
108+
109+
- Add ultrasonic sensor for object detection.
110+
- Integrate camera module for live streaming.
111+
- Build a mobile app for remote monitoring.
112+
- Connect to platforms like **ThingSpeak** or **Blynk** for cloud storage.
113+
114+
---
115+
116+
## 🧾 Folder Structure
117+
118+
```txt
119+
COAL-ResQTemp/
120+
121+
├── assembly/
122+
│ └── main.asm
123+
124+
├── esp_web/
125+
│ ├── index.html
126+
│ └── style.css
127+
128+
├── circuits/
129+
│ └── circuit_diagram.png
130+
131+
├── RQT-Proposal.pdf
132+
├── RQT-Report.pdf
133+
└── README.md ← (this file)
134+
```
135+
## 🧩 Learning Impact
136+
137+
This project combines ***Computer Organization & Assembly Language*** concepts with ***IoT-based automation + GSM automation***, demonstrating:
138+
139+
+ Real-world integration of low-level control and networked intelligence
140+
141+
+ Strong understanding of hardware-software interfacing
142+
143+
+ Application of COAL principles in modern embedded systems
144+
145+
## 🏁 Conclusion
146+
147+
***ResQTemp*** showcases the power of **combining Assembly programming** precision with **IoT and GSM innovation**.
148+
It reflects the **NFC IET vision** — merging faith, innovation, and engineering excellence to create impactful, **intelligent systems**.
149+
150+
## 📫 Contact
151+
152+
For collaboration or guidance, connect via:
153+
154+
- [🌐 GitHub Profile](https://github.com/Muawiya-contact)
155+
- [🎥 YouTube Channel — Coding Moves](https://www.youtube.com/@Coding_Moves)
156+
- [📧 Email](mailto:contactmuawia@gmail.com)
157+
158+
---

0 commit comments

Comments
 (0)