{"id":23386928,"url":"https://github.com/b3ta-blocker/raspberry-pi-based-intrusion-detection-system","last_synced_at":"2026-05-02T06:38:20.079Z","repository":{"id":268526850,"uuid":"902754349","full_name":"B3TA-BLOCKER/Raspberry-Pi-based-Intrusion-Detection-System","owner":"B3TA-BLOCKER","description":"Raspberry Pi-based Intrusion Detection System is a lightweight and efficient security solution leveraging machine learning and network traffic analysis to detect potential intrusions on a Raspberry Pi network. This system utilizes advanced algorithms, including LSTM neural networks, to provide real-time threat detection and enhance network security","archived":false,"fork":false,"pushed_at":"2025-03-11T08:58:45.000Z","size":2152,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T09:40:20.722Z","etag":null,"topics":["ai","cybersecurity","ids","intrusion-detection","lstm","machine-learning","network-security","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/B3TA-BLOCKER.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-13T07:47:08.000Z","updated_at":"2025-03-11T08:58:48.000Z","dependencies_parsed_at":"2025-03-11T09:32:16.748Z","dependency_job_id":"867dbd24-a534-4630-a3ff-9130c11a1903","html_url":"https://github.com/B3TA-BLOCKER/Raspberry-Pi-based-Intrusion-Detection-System","commit_stats":null,"previous_names":["b3ta-blocker/raspberry-pi-based-intrusion-detection-system"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/B3TA-BLOCKER%2FRaspberry-Pi-based-Intrusion-Detection-System","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/B3TA-BLOCKER%2FRaspberry-Pi-based-Intrusion-Detection-System/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/B3TA-BLOCKER%2FRaspberry-Pi-based-Intrusion-Detection-System/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/B3TA-BLOCKER%2FRaspberry-Pi-based-Intrusion-Detection-System/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/B3TA-BLOCKER","download_url":"https://codeload.github.com/B3TA-BLOCKER/Raspberry-Pi-based-Intrusion-Detection-System/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247843199,"owners_count":21005420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","cybersecurity","ids","intrusion-detection","lstm","machine-learning","network-security","raspberry-pi"],"created_at":"2024-12-22T01:13:49.163Z","updated_at":"2026-05-02T06:38:20.034Z","avatar_url":"https://github.com/B3TA-BLOCKER.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Raspberry Pi-based Intrusion Detection System  \n\nThis project is a **Raspberry Pi-based Intrusion Detection System (IDS)** that utilizes a Long Short-Term Memory (LSTM) neural network to detect network intrusions. The IDS is trained on the **CSE-CIC-IDS 2018** dataset and is capable of identifying malicious activities in a network.  \n\n---\n\n## Table of Contents  \n- [Overview](#overview)  \n- [Features](#features)  \n- [Project Structure](#project-structure)  \n- [Installation](#installation)  \n- [Usage](#usage)  \n- [Role of the Raspberry Pi](#role-of-the-raspberry-pi)  \n- [Dataset](#dataset)  \n- [License](#license)  \n\n---\n\n## Overview  \nIntrusion detection is a critical aspect of cybersecurity, and this project provides a lightweight yet efficient IDS that can be deployed on a Raspberry Pi. By leveraging LSTM-based neural networks, this system detects anomalous patterns in network traffic and classifies them as malicious or benign.  \n\n---\n\n## Features  \n- LSTM neural network for anomaly detection.  \n- Supports the CSE-CIC-IDS 2018 dataset for training.  \n- Lightweight implementation for Raspberry Pi deployment.  \n- Simulation of network traffic using `simulate.py`.  \n- Easy-to-extend modular architecture.  \n\n---\n\n## Project Structure  \n```\nRaspberry-Pi-based-Intrusion-Detection-System/\n│\n├── app.py                         # Main application script (Raspberry Pi)  \n├── CSE-CIC-IDS-2018/              # Dataset directory \n├── LICENSE                       \n├── model.keras                    # Pre-trained LSTM model file (Raspberry Pi)  \n├── Network_Intrusion_Detection_System_Using_LSTM_Neural_Networks.ipynb  \n│                                 \n├── Project/                       # Pre-configured Python virtual environment  \n├── README.md                      # Project documentation  \n└── simulate.py                    # Simulation script for generating network traffic (Local device)  \n```\n\n---\n\n## Installation  \n\n### For Raspberry Pi  \n1. **Clone the Repository**  \n   ```bash  \n   git clone https://github.com/B3TA-BLOCKER/Raspberry-Pi-based-Intrusion-Detection-System.git \n   cd Raspberry-Pi-based-Intrusion-Detection-System.git \n   ```  \n\n2. **Activate the Pre-configured Virtual Environment**  \n   The project comes with a pre-configured Python virtual environment. Activate it using the following command:  \n   ```bash  \n   source Project/bin/activate  \n   ```  \n\n3. **Prepare the Raspberry Pi**  \n   Ensure the Raspberry Pi is connected to your network. The `app.py` script and `model.keras` file must be present on the Raspberry Pi.  \n\n4. **Start the IDS**  \n   Run the IDS by executing:  \n   ```bash  \n   python3 app.py  \n   ```  \n\n### For Local Device  \n1. Clone the repository on your local device:  \n   ```bash  \n   git clone https://github.com/B3TA-BLOCKER/Raspberry-Pi-based-Intrusion-Detection-System.git \n   cd Raspberry-Pi-based-Intrusion-Detection-System.git \n   ```  \n\n2. Use the `simulate.py` script to generate synthetic network traffic. Ensure the Raspberry Pi is running the IDS (`app.py`) and connected to the same network.\n\n---\n\n## Usage  \n\n### Running the Application on Raspberry Pi  \n1. Start the IDS on the Raspberry Pi:  \n   ```bash  \n   python app.py  \n   ```  \n\n### Simulating Network Traffic on Local Device {and make sure to edit the ip address of the rasberry pi in the script!}\nGenerate synthetic network traffic to test the IDS:  \n```bash  \npython simulate.py  \n```  \n\n### Training the Model  \nIf you wish to train a new model, use the provided Jupyter notebook:  \n```bash  \njupyter notebook Network_Intrusion_Detection_System_Using_LSTM_Neural_Networks.ipynb  \n```  \n\n---\n\n## Role of the Raspberry Pi  \nThe Raspberry Pi serves as the **deployment platform** for the Intrusion Detection System. Its role includes:  \n1. **Processing Network Traffic:**  \n   The Raspberry Pi monitors and processes incoming network traffic for intrusion detection.  \n\n2. **Lightweight Deployment:**  \n   The Raspberry Pi’s low power consumption and compact size make it ideal for continuous IDS deployment in small networks.  \n\n3. **Running the IDS Model:**  \n   The `app.py` script runs the pre-trained LSTM model (`model.keras`) on the Raspberry Pi to classify traffic as benign or malicious.  \n\n4. **Real-Time Detection:**  \n   By deploying the IDS on the Raspberry Pi, network traffic is analyzed in real-time for immediate detection of malicious activities.  \n\n---\n\n## Importance of Network Simulation  \nTo test and evaluate the IDS, the `simulate.py` script is used to simulate network traffic from a local device. This ensures that:  \n1. **Traffic Diversity:**  \n   Simulated traffic includes both benign and malicious samples to test the accuracy of the IDS.  \n\n2. **Evaluation of the Model:**  \n   It allows thorough evaluation of the IDS performance without requiring actual malicious activities.  \n\n3. **Seamless Testing:**  \n   By simulating network traffic from a local device, developers can test the IDS remotely without affecting live networks.  \n\n---\n\n## Dataset  \n\nThis project uses the **CSE-CIC-IDS 2018** dataset, which is widely used for intrusion detection system training and evaluation. It contains a diverse set of network traffic samples labeled as benign or malicious. For more information on the dataset, visit [CSE-CIC-IDS 2018 Dataset](https://www.unb.ca/cic/datasets/ids-2018.html).  \n\n---\n\n## License  \n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.  \n\n---\n\n## Contribution  \n\nContributions are welcome! If you'd like to contribute, please fork the repository, make your changes, and submit a pull request.  \n\n---\n\n## Contact  \n\nFor any queries or feedback, feel free to contact:  \n- **Hassaan Ali Bukhari**  \n- Email: hassaanalibukhari@gmail.com\n- GitHub: [b3ta-blocker](https://github.com/b3ta-blocker)  \n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb3ta-blocker%2Fraspberry-pi-based-intrusion-detection-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fb3ta-blocker%2Fraspberry-pi-based-intrusion-detection-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb3ta-blocker%2Fraspberry-pi-based-intrusion-detection-system/lists"}