BF-IDS-Project_Proposal

Project Proposal

Project Title: BF-IDS: Behavioral Fingerprinting-Augmented Embedded Intrusion Detection System with Real-Time Dashboard

Course: MICROPROCESSOR AND EMBEDDED SYSTEM

Program: BSc in CSE

Team: Sagar Biswas (The project is not finalized yet. If it remains that way, I will proceed with it as a solo project in future).

Supervisor: Md Sajid Hossain

Semester: 2025-2026, Spring


1. Executive Summary

This project proposes a low-cost, practical, and novel Behavioral Fingerprinting-Augmented Embedded Intrusion Detection System (BF-IDS) built on a Raspberry Pi 4 with optional ESP32 satellite nodes. The core idea is simple: instead of only relying on fixed rules or known attack signatures, the system also learns the normal behavior of every device on the network and raises an alert when something starts acting differently than usual.

Most existing IDS tools like Snort or Suricata work by matching traffic against a database of known attack patterns. That works fine for known attacks, but it completely misses new or zero-day attacks. Our system adds a behavioral fingerprinting layer on top — each device builds a profile of its own traffic habits over time, and any unexpected deviation from that profile triggers an alert, even if no matching signature exists.

On top of that, the system supports distributed monitoring through ESP32 nodes that connect back to the Raspberry Pi master over MQTT. This makes it possible to monitor multiple network segments at once using cheap hardware.

The system also captures network traffic in real time, sends alerts via Email and Telegram, automatically blocks malicious IPs using firewall rules, and shows everything through a web-based dashboard. The focus is on making a working, reproducible, and well-documented system that can be tested and evaluated properly.


2. Objectives


3. System Overview

The entire system runs on a Raspberry Pi 4 as the central node. ESP32 boards act as optional satellite nodes that monitor remote network segments and forward data over MQTT.

The main modules are:

Updated data flow:

[ESP32 Nodes] --MQTT--> [Node Manager]
                                |
[NIC] -> [libpcap capture] -> [Ring Buffer] -> [Preprocessor + Feature Extractor]
                                                          |
                                              +-----------+-----------+
                                              |           |           |
                                     [Rule Engine] [Anomaly Engine] [Fingerprint Engine]
                                              |           |           |
                                              +-----------+-----------+
                                                          |
                                              [Response Manager + Logger]
                                                          |
                                                    [Dashboard]

4. Detection Design

Rule-Based Detection

Statistical Anomaly Detection

Behavioral Fingerprinting Engine (New — Core Novelty)

This is the main thing that makes BF-IDS different from a regular IDS.

Every device on the network has a “traffic personality” — its own normal habits. A smart bulb mostly just sends tiny status packets. A laptop has varied traffic but follows a certain rhythm. A security camera continuously streams data to specific destinations. These patterns are unique to each device.

The Behavioral Fingerprint Engine learns these patterns during a training window and then monitors for deviations in real time. The features tracked per device are:

- avg_packet_size          (normal size range for this device)
- packet_size_std          (how much size varies normally)
- protocol_ratio           (TCP : UDP : ICMP split)
- dominant_destinations    (which IPs/ports it usually talks to)
- inter_arrival_time       (how often it sends packets)
- bytes_per_hour           (hourly traffic baseline)
- sleep_wake_pattern       (when it is usually active or quiet)
- new_dest_rate            (how often it contacts new destinations)

An Isolation Forest model is trained on these features per device. When a device’s live stats score as anomalous against its own profile, the engine raises a behavioral alert. This catches things like:

The key advantage here is that none of this needs prior knowledge of the attack. It works even on encrypted traffic because we are looking at traffic metadata, not payload content.

False Positive Mitigation


5. Implementation Plan and Technologies

Packet Capture:

Core Processing:

Distributed Nodes:

Dashboard:

Storage:

Testing Tools:

Deployment:


6. Testing and Evaluation

Planned tests:

Key metrics:

Target goals:


7. Safety and Ethics

All testing will be done in a private, controlled lab network. No tests will be run on any network or device without explicit permission. Log data released publicly will be anonymized before sharing. The threat model document will explain what the system is and is not designed to defend against. Responsible testing procedures will be documented in the final report.


8. Deliverables


9. Timeline (8 Weeks)


10. Risk Analysis and Mitigation


11. Budget Estimate

No paid services are required. GeoLite2, Mosquitto MQTT broker, and all notification APIs used are free at the basic level.

Why ESP32?

ESP32 Roles in This Project


12. Repository Layout

bf-ids/
|
|-- README.md                        # Project overview and setup guide
|-- LICENSE                          # MIT License
|-- .gitignore
|-- requirements.txt                 # Python dependencies
|-- Makefile                         # Build automation for C capture module
|-- config.yaml                      # Default runtime configuration
|
|-- capture/                         # High-performance packet capture (C + libpcap)
|   |-- src/
|   |   |-- capture.c
|   |   |-- ring_buffer.c
|   |   |-- ring_buffer.h
|   |-- include/
|   |-- build/
|   |-- README.md
|
|-- core/                            # Core processing logic
|   |-- preprocessor/
|   |   |-- flow_builder.py
|   |   |-- packet_parser.py
|   |
|   |-- fingerprint/                 # Behavioral Fingerprinting Engine (NEW)
|   |   |-- profile_builder.py       # learns normal behavior per device
|   |   |-- deviation_scorer.py      # real-time anomaly scoring (Isolation Forest)
|   |   |-- feature_vectors.py       # feature extraction from flow data
|   |   |-- model_store/             # saved trained models per device MAC
|   |   |-- README.md
|   |
|   |-- detector/
|   |   |-- rules/
|   |   |   |-- port_scan.py
|   |   |   |-- icmp_flood.py
|   |   |   |-- brute_force.py
|   |   |
|   |   |-- anomaly/
|   |   |   |-- ewma.py
|   |   |   |-- zscore.py
|   |   |
|   |   |-- engine.py                # combines rule + anomaly + fingerprint scores
|   |
|   |-- database/
|       |-- models.py
|       |-- storage.py
|
|-- nodes/                           # Distributed ESP32 Satellite Nodes (NEW)
|   |-- esp32_satellite/             # ESP32 firmware
|   |   |-- main.cpp
|   |   |-- mqtt_client.cpp
|   |   |-- watchdog.cpp
|   |   |-- README.md
|   |-- mqtt_broker_config/          # Mosquitto broker config for RPi
|   |-- node_manager.py              # RPi side: collects and parses ESP32 data
|
|-- response/                        # Enforcement and alert handling
|   |-- firewall.py
|   |-- alert_service.py
|   |-- gpio_controller.py
|   |-- watchdog_interface.py
|
|-- dashboard/                       # Web UI
|   |-- app.py
|   |-- templates/
|   |-- static/
|   |-- websocket.py
|
|-- configs/
|   |-- development.yaml
|   |-- production.yaml
|
|-- tests/
|   |-- unit/
|   |-- integration/
|   |-- fingerprint/                 # Fingerprint training and eval scripts (NEW)
|   |   |-- train_profiles.py
|   |   |-- eval_detection.py
|   |-- traffic_simulation/
|   |   |-- nmap_scripts/
|   |   |-- hping_tests/
|   |   |-- replay_pcaps/
|   |-- sample_pcaps/
|
|-- scripts/
|   |-- setup.sh
|   |-- run.sh
|   |-- reset_firewall.sh
|   |-- train_fingerprints.sh        # shortcut to retrain all device profiles (NEW)
|
|-- docs/
|   |-- architecture.md
|   |-- sequence_flow.md
|   |-- fingerprint_design.md        # explains the behavioral fingerprinting approach (NEW)
|   |-- performance_report.md
|   |-- threat_model.md
|   |-- viva_notes.md
|
|-- docker/
|   |-- Dockerfile
|   |-- docker-compose.yml
|
|-- ci/
    |-- github-actions.yml

13. Architecture Diagram

Below is the architecture diagram for BF-IDS. It shows the Raspberry Pi as the central node, the ESP32 satellite nodes, all processing modules, and how they connect together.

BF-IDS architecture diagram

Diagram Summary

Think of the system like a security office that watches over a whole building with multiple checkpoints placed at different doors.


14. Sequence Diagram

Part 1 — Real-Time Packet Processing and Detection

This diagram shows what happens from the moment a packet arrives on the network until a detection decision is made.

BF-IDS sequence diagram part 1

Diagram Summary

Part 2 — Admin Control, Fingerprint Training and Node Health

This diagram covers the management side of the system — what the admin can do, how fingerprint models are trained, and how ESP32 nodes are monitored.

BF-IDS sequence diagram part 2

Diagram Summary


15. Fingerprint Engine — Internal Design

This diagram shows how the Behavioral Fingerprint Engine processes each device’s traffic internally, including the learning phase for new devices and the deviation scoring phase for known devices.

BF-IDS fingerprint engine diagram

Diagram Summary

The Fingerprint Engine works in two completely different modes depending on whether it has seen a device before.


16. Limitations and Future Work

Current Limitations

Future Work


17. Quick Q/A (Important Terms)

ICMP Flood

Traffic Spike

libpcap

Lock-Free Ring Buffer

Behavioral Fingerprinting

Isolation Forest

MQTT

EWMA

z-score

GPIO Pins

UART

I2C

Distributed IDS Node

NIC (Network Interface Card)


18. Project Development Note

This project started as a basic embedded IDS proposal for an academic course submission. After reviewing existing tools and current trends in IoT security, it became clear that rule-based detection alone is not enough — most real-world IoT compromises involve behavior changes that no existing signature would catch. That realization led to the addition of the behavioral fingerprinting layer, which is now the core differentiator of this project.

The proposal has gone through multiple revisions. The current README represents the second major version — upgraded with behavioral fingerprinting, distributed ESP32 node support, and a more honest evaluation plan compared to the original draft.


*Prepared by: Sagar Biswas* *Date: 27-02-2026 (Revised: 06-03-2026)*