Skip to content
OnlyProjects
B.Tech / B.E. · Cyber SecurityFor educational purposes only
Code included

NetLens: A Passive Network Traffic Analyser and Visibility Dashboard for a College Computer Lab

Flows, top talkers and scan indicators for the lab's own network — headers only, no blocking, full history

Mapped to your syllabusVTU 2022 Scheme (OBE/CBCS) · BCY685 Major Project Phase-I · Semester 6

Overview

1 min read

NetLens is a passive network-traffic analyser built for a college computer lab — the 60-machine lab where the lab in-charge today answers "why is the network slow?" by guessing. It listens on the lab's own network segment through a mirror port on the lab's managed switch, reassembles packets into flow records (who talked to whom, on which port, how many bytes), stores them in MySQL, and serves a Flask API with a React dashboard.

The dashboard answers the everyday questions: which machines are the top talkers this week, how the traffic splits across HTTP, HTTPS, DNS and SMB, which DNS names the lab resolves most often, and how many machines are actually idle. On the security side it computes two passive indicators — a port-scan pattern (one source sending SYNs to many distinct ports) and duplicate-IP / ARP-storm behaviour — and raises them as events to investigate, never as automatic blocking. NetLens is a visibility and measurement tool: it reads, it never intercepts, modifies or blocks a single packet.

Everything is captured header-only (no web content, no emails, no passwords), stored for a fixed 30-day retention window, and the whole deployment sits inside the college's own lab with written permission from the lab in-charge. Scapy, the industry-standard Python packet library, is used alongside the VTU-taught stack (MySQL from DBMS, React from the elective lab), which makes this a defensive-security project that stays fully within the syllabus and within ethical bounds.

Relevant for
Karnataka
Level
Intermediate · 14 weeks · team of 4
Common at
Visvesvaraya Technological University, Jawaharlal Nehru Technological University Hyderabad, APJ Abdul Kalam Technological University
Updated
Nov 2026

Syllabus alignment

VTU · 2022 Scheme (OBE/CBCS)

BCY685 · Major Project Phase-I · Semester 6 · 2 credits · CIE 100

Subjects this project applies
  • BCS403 DBMS (MySQL)
  • BCSL504 Web Technology Lab
  • BCS602 Machine Learning (Python / scikit-learn)
  • BCSL657B React Lab
How it is evaluated

Team: individual or group ≤ 4

report : presentation : Q&A = 50 : 25 : 25; report marks identical for all batch-mates; SEE by two university examiners

Also fits: JNTUH R22, KTU 2019 Scheme (2024 scheme for 2024 admits), BPUT 2023-24 admission batch.

What's in the box

11 parts · 5 free · 2 previewed · 4 unlock for ₹2,000

Problem & synopsis

5 min read

Problem statement

A college computer lab of 60 machines has no systematic record of its own network activity. Slowdowns are investigated by guesswork, capacity planning (how many machines actually need internet during a lab session?) is done on intuition, and security-relevant behaviour — a machine scanning others, ARP anomalies, sudden DNS spikes — goes unnoticed because nothing is observing the segment. One-off Wireshark captures give minutes of visibility with no history and no per-machine view, while commercial network-management systems are far beyond a lab budget and over-featured for a single segment.

What is needed is a passive, privacy-respecting, low-cost analyser that runs permanently inside the lab's own network: it should convert raw packets into queryable flow history, expose the answers to everyday operational questions on a dashboard, flag scan-like behaviour as indicators for human review — and never intercept, alter or block traffic, and never capture content beyond packet headers.

Synopsis

Abstract

College computer labs run on shared infrastructure nobody measures. When a lab slows down, staff reboot the switch or blame a batch of students; when something suspicious happens, there is no record to look back at. NetLens is a passive traffic analyser that gives a single lab a permanent, queryable memory of its own network: flow records in MySQL, a Flask REST API and a React dashboard showing top talkers, protocol mix, DNS summary and two passive scan indicators, with 30-day retention and CSV/PDF reports.

Introduction

Our department has four labs of about 60 PCs each behind a managed switch. The lab in-charge must plan lab capacity, justify bandwidth requests and respond to security notices, but the only tools available are a one-off Wireshark capture (which shows minutes of traffic, not history) and the router's daily totals (which show nothing per machine). Nothing answers "which machine was talking to the internet at 2 pm last Thursday?" NetLens turns that question into a 5-second query.

Existing System

  • Ad-hoc Wireshark runs on a technician's laptop: minutes of visibility, no storage, no history, no per-machine view.
  • Router/ISP counters: totals only, no protocol or host breakdown, no export.
  • Complaint-driven debugging: "the lab is slow" is investigated after the fact with no evidence.
  • Limitations: no persistence, no per-machine accountability, security events noticed only when something breaks, and commercial network-management products cost far more than a lab budget allows.

Proposed System

  • A capture service (Python + Scapy) running on one lab PC connected to a switch mirror port, assembling header-only packets into bidirectional flow records with idle timeouts.
  • A MySQL store with a fixed 30-day retention job; no packet payloads are ever written to disk.
  • Two passive indicators computed over rolling windows: (1) port-scan pattern — a source SYNning many distinct destination ports with few completions; (2) duplicate-IP / ARP-storm behaviour on the lab segment. Each becomes an event with severity and evidence, for a human to investigate.
  • A Flask REST API and React dashboard: live counters, top talkers, protocol pie, DNS summary, event list with acknowledge workflow, and weekly CSV/PDF reports for the lab committee.

Feasibility Study

  • Technical: Scapy, MySQL and Flask are open-source and documented; the capture PC needs one NIC on the mirror port and runs comfortably on a standard lab machine. A replay mode ingests public sample capture files so development and testing need no live network at all.
  • Economic: ₹0 in licences. Hardware is one existing lab PC; the switch already supports port mirroring.
  • Operational: The tool is read-only — it cannot affect lab traffic. Privacy is handled by design: headers only, hostnames aggregated, retention capped at 30 days, and access restricted to the lab in-charge, with a permission note signed before deployment.

Objectives

  1. 01Design a normalised MySQL schema (3NF) for lab machines, flow records, security events and capture sessions, with a 30-day retention policy.
  2. 02Build a header-only capture service in Python with Scapy that assembles packets into bidirectional flow records using idle timeouts, without storing any payload bytes.
  3. 03Implement two passive indicators — port-scan pattern and duplicate-IP/ARP-storm — as threshold rules over rolling windows, producing reviewable events with evidence.
  4. 04Develop a Flask REST API exposing flows, machines, events and summary statistics with role-based access (lab in-charge vs read-only viewer).
  5. 05Build a React dashboard with live counters, top-talker and protocol views, a DNS summary, an event workflow (open → acknowledged → closed) and CSV/PDF reports.
  6. 06Provide an offline replay mode that ingests public sample pcap files, so the entire system can be developed, demoed and tested without touching a live network.
  7. 07Measure the indicator engine's false-positive behaviour over one week of clean lab traffic and tune thresholds with recorded evidence.

Scope

In scope

  • One lab network segment (60 machines) behind a managed switch with a mirror port; capture on the college's own systems only, with written permission.
  • Header-only capture: Ethernet/IP/TCP/UDP/ARP/DNS headers; no payloads, no TLS content, no credentials.
  • Flow records with 5-tuple, byte/packet counts and timestamps; 30-day retention with an automatic purge job.
  • Two passive indicators (port-scan pattern, duplicate-IP/ARP-storm) as human-review events; acknowledge/close workflow.
  • Dashboard (top talkers, protocol mix, DNS summary, idle-machine view), weekly reports as CSV and PDF.
  • Offline replay of public sample pcaps for development and testing.

Out of scope (v1)

  • Any inline function: blocking, rate-limiting,IPS-style prevention — NetLens is strictly observe-only.
  • Internet-facing or wireless monitoring, monitor-mode Wi-Fi capture, or any network the college does not own.
  • Payload inspection, DPI, or decryption of any kind.
  • ML-based anomaly scoring (listed in future scope; v1 uses transparent thresholds).
  • Multi-lab centralised deployment (v1 is one segment, one capture PC).

Methodology

The project follows an incremental SDLC model across the 14 weeks of Major Project Phase-I, with each increment reviewed by the guide before the next begins. Requirements and permissions come first because a monitoring project is only ethical with explicit authorisation.

PhaseWeeksActivitiesDeliverable
Requirements & approvals1Interview the lab in-charge; write the permission note and privacy policy (headers-only, 30-day retention); list functional/non-functional requirementsSRS + signed permission note
System design2–3Flow-record lifecycle, ER diagram, DFDs, schema design, indicator-rule definitions, UI wireframesDesign document
Increment 14–6Capture service: Scapy sniffer on mirror-port interface, flow table with idle timeouts, replay importer for sample pcaps, MySQL writerFlows visible via SQL
Increment 27–9Indicator engine: port-scan and ARP/duplicate-IP rules, event records with evidence, deduplicationEvents in DB + unit tests
Increment 310–11Flask API + retention job; React dashboard views and acknowledge workflowWorking dashboard
Tuning & testing12–13One week of clean capture, false-positive measurement, threshold tuning, black-box test casesTuning report + test table
Documentation14Phase-I report, PPT, demo rehearsalPhase-I submission

Testing approach: unit tests for flow assembly and each indicator rule; replay testing with public sample capture files (including scan-heavy samples) for repeatable, safe evaluation; a controlled localhost port-scan test on our own test laptop with the lab in-charge's knowledge; black-box test cases for every dashboard screen; and one clean week of live lab capture to measure false positives before fixing thresholds.

Architecture & tech stack

3 diagrams · 5 technologies · 2 min read

  • Python
  • Scapy
  • MySQL
  • Flask
  • React

NetLens is a three-tier read-only pipeline: capture, storage, presentation.

  1. Capture tier — a Python service on the lab PC uses Scapy to sniff the mirror-port interface, keeping only headers. It maintains an in-memory flow table (5-tuple + direction) flushed to MySQL on idle timeout or every 60 seconds, and an offline replay importer reads pcap files through the same code path, so replay and live capture produce identical records.
  2. Storage tier — MySQL holds lab machines, flow records, security events (with JSON evidence) and capture sessions; a daily job deletes flow rows older than 30 days and logs the purge.
  3. Presentation tier — a Flask REST API serves aggregated views (top talkers, protocol mix, DNS summary, events) to a React dashboard with two roles: lab in-charge (full access, acknowledge/close events) and viewer (read-only).
flowchart LR
  SW["Lab managed switch — mirror port"] -->|headers only| CAP["Capture service (Python + Scapy)"]
  PCAP["Public sample pcaps"] -->|replay mode| CAP
  CAP --> FT["In-memory flow table + indicator rules"]
  FT -->|flush / events| DB[("MySQL — flows, events, sessions")]
  DB -->|30-day purge| PURGE["Retention job"]
  DB --> API["Flask REST API"]
  API -->|role-based access| UI["React dashboard"]
  UI --> RPT["CSV / PDF weekly report"]

ER diagram

erDiagram
  CAPTURE_SESSION ||--o{ FLOW_RECORD : contains
  LAB_MACHINE ||--o{ FLOW_RECORD : participates
  FLOW_RECORD }o--|| LAB_MACHINE : "peer machine"
  LAB_MACHINE ||--o{ SECURITY_EVENT : "involved in"
  USER ||--o{ EVENT_UPDATE : "acknowledges"
  SECURITY_EVENT ||--o{ EVENT_UPDATE : "has"

  CAPTURE_SESSION {
    int id PK
    datetime startedAt
    string mode "live or replay"
    string interface
  }
  LAB_MACHINE {
    int id PK
    string ipAddress
    string macAddress
    string hostname
    string lab
  }
  FLOW_RECORD {
    bigint id PK
    int sessionId FK
    string srcIp
    string dstIp
    int srcPort
    int dstPort
    string protocol
    bigint bytesIn
    bigint bytesOut
    datetime firstSeen
    datetime lastSeen
  }
  SECURITY_EVENT {
    int id PK
    int machineId FK
    string kind "port-scan or arp-anomaly"
    string severity
    json evidence
    string status
    datetime raisedAt
  }
  EVENT_UPDATE {
    int id PK
    int eventId FK
    int userId FK
    string status
    string remark
  }
  USER {
    int id PK
    string email UK
    string passwordHash
    string role
  }

Data flow (context view)

flowchart TD
  SW(["Lab switch / mirror port"]) -- "packet headers" --> P1["1.0 Capture & assemble flows"]
  P1 <--> D1[("D1 Flow records")]
  P1 --> P2["2.0 Evaluate indicators"]
  D1 --> P2
  P2 --> D2[("D2 Security events")]
  D1 --> P3["3.0 Aggregate & report"]
  D2 --> P3
  P3 --> LC(["Lab in-charge / viewer"])
  LC -- "acknowledge / close" --> D2

Every arrow into NetLens is read-only from the network's point of view: the switch mirror port duplicates traffic to our NIC, and nothing we do can delay, drop or alter the packets the lab machines exchange.

Modules

4 modules

  1. Module 01

    Capture & Flow Aggregation (Member 1)

    The Scapy-based sniffer bound to the mirror-port interface: parses Ethernet/IP/TCP/UDP/ARP headers, maintains a bidirectional flow table keyed on the 5-tuple, expires flows after a 60-second idle timeout or 1,000-packet cap, and batches inserts into MySQL. Includes the offline replay importer that feeds public sample pcaps through the identical parsing path, and a pcap ring buffer kept for 48 hours purely as debugging evidence.

  2. Module 02

    Indicator Engine (Member 2)

    Implements the two passive rules over rolling windows: the port-scan rule flags a source whose SYN count to distinct destination ports crosses a threshold (default 25 ports per 5 minutes) while completions stay below 10%, and the ARP rule flags duplicate-IP replies or reply storms. Each match is deduplicated, graded (info/warning/high), stored with JSON evidence (sampled ports, packet counts), and can never trigger any action beyond raising a reviewable event.

  3. Module 03

    Storage, Retention & API (Member 3)

    Owns the MySQL schema (machines, sessions, flows, events, updates, users), the daily 30-day retention purge with a logged summary, and the Flask REST API: JWT-authenticated endpoints for machines, flows (with time-range and machine filters), events, aggregates and report export. Enforces two roles — lab in-charge and viewer — so read-only users cannot mutate event status, and validates every input before it reaches SQL.

  4. Module 04

    Dashboard & Reports (Member 4)

    The React front end: live capture status, top-talker table, protocol-mix chart, DNS summary, idle-machine view, and the event workflow screen (open → acknowledged → closed with remarks). Generates the weekly CSV and one-page PDF report for the lab committee (volume, top machines, events raised/closed), and shows the replay-mode banner so a demo can never be mistaken for live capture.

Slides

12 slides · titles free · bullets, notes and the .pptx unlock

  1. Slide 1

    NetLens — Passive Traffic Analyser for a College Lab

  2. Slide 2

    Motivation

  3. Slide 3

    Problem Statement

  4. Slide 4

    Existing vs Proposed

  5. Slide 5

    Objectives

  6. Slide 6

    Technology Stack

  7. Slide 7

    Architecture

  8. Slide 8

    Indicator Engine

  9. Slide 9

    Data Design

  10. Slide 10

    Demo (Replay Mode)

  11. Slide 11

    Testing & False-Positive Plan

  12. Slide 12

    Phase-I Deliverables & Phase-II Roadmap

Bullets, speaker notes and the .pptx · ₹2,000

The titles above are the real outline. The rest is what you present from.

Unlock for ₹2,000

Viva questions & answers

3 of 15 answered free · 12 unlock

Read each answer, close it, and say it in your own words. Your viva will ask. Now you'll know.

  1. 01Concept

    What does "passive" monitoring mean, and why is NetLens passive rather than inline?

    Passive means the tool only listens to a copy of the traffic — the switch mirror port duplicates every frame to our capture NIC — so NetLens can never delay, drop or alter a packet. Inline devices such as firewalls sit in the traffic path and can block. We deliberately chose passive because a student project should not have the power to disrupt the lab, and passive collection is also the standard first stage of the NIST SP 800-94 detection model.

  2. 02Concept

    What exactly is a flow record, and how is it different from a packet?

    A packet is one frame on the wire; a flow is the set of packets sharing the same 5-tuple — source IP, destination IP, source port, destination port and protocol — within a time window. NetLens accumulates packets into bidirectional flow records with byte and packet counters and first/last-seen timestamps, expiring a flow after 60 seconds of idle time. This compresses millions of packets into a queryable summary, which is what makes 30-day history storage feasible.

  3. 03Concept

    Which OSI layers does your analyser work at, and what does it deliberately not look at?

    We work at layer 2 for ARP, layer 3 for IP, and layer 4 for TCP/UDP headers, plus a light layer-7 look at DNS header fields for the domain-summary view. We deliberately do not inspect payloads — no HTTP content, no TLS data, nothing beyond headers — which keeps the tool privacy-safe, shrinks storage dramatically, and means there is no decryption component for the panel to question.

+12 more questions, with answers

Try the free ones out loud first. Your examiner will not accept “it's in the PPT”.

Source code & how to run

6 steps · complete source code · unlocks with the project

Unlocks with the project · ₹2,000

6 steps · source code zip

Prerequisites, install, seed data and tests, written for demo day. Plus the complete source.

Unlock for ₹2,000

READMEFIRST

293 words · unlocks with the project

What to change before it goes anywhere near a submission. Skipping it is how the demo fails live.

Unlocks with the project · ₹2,000

293 words · ~1 min read

The checklist of things to rename, re-seed and re-think so the project reads as yours.

Unlock for ₹2,000

Instructions

304 words · unlocks with the project

How to study it, adapt it and walk your examiner through it, step by step.

Unlocks with the project · ₹2,000

304 words · ~2 min read

Report structure, formatting rules and the submission checklist your department will grade.

Unlock for ₹2,000

References

7 sources

  1. NIST Special Publication 800-94 — Guide to Intrusion Detection and Prevention Systems (IDPS)
  2. Scapy — official documentation (packet crafting and sniffing library for Python)
  3. Wireshark — official documentation and sample captures
  4. NIST Special Publication 800-92 — Guide to Computer Security Log Management
  5. CERT-In — FAQs on the Cyber Security Directions of 28 April 2022 (6-hour incident reporting, log retention)
  6. James F. Kurose & Keith W. Ross, Computer Networking: A Top-Down Approach, 8th ed., Pearson
  7. W. Richard Stevens, TCP/IP Illustrated, Volume 1: The Protocols, 2nd ed., Addison-Wesley

Cite this bundle

OnlyProjects. (2026). NetLens: A Passive Network Traffic Analyser and Visibility Dashboard for a College Computer Lab: B.Tech / B.E. Cyber Security project bundle [Educational resource]. https://onlyprojects.online/projects/btech-cyber-netlens-lab-traffic-analyser

Future scope

1 min read

  • ML anomaly scoring: replace fixed thresholds with a scikit-learn model (from BCS602) trained on the clean-week baseline, reporting anomaly scores alongside rule events.
  • NetFlow input: accept router-exported NetFlow v9 records as an alternative to raw capture, removing the mirror-port requirement.
  • Multi-lab agents: one MySQL server aggregating several capture agents with per-lab dashboards.
  • Grafana integration: export aggregates to Grafana so the department reuses existing dashboards.
  • Indicator pack: SMB-version anomalies, unusual DNS name-length spikes, and beaconing (regular-interval flows) as additional review events.
  • IPv6 support: dual-stack flow keys, since labs are beginning to see IPv6 router-advertisement traffic.

Keep browsing

Same degree, same syllabus slot, different idea. Pick the one your guide will actually approve.

B.Tech / B.E.Code included

Aerospace / Aeronautical

Low-Speed Open-Circuit Wind Tunnel with Force Balance for Aerofoil Lift-Drag Measurement

Build a subsonic test tunnel on a student budget, then trace lift and drag on a 3D-printed NACA 0012 against theory

  • C / Arduino Uno (industry-standard extra) — HX711 load-cell and serial logging firmware
  • Python (NumPy, Matplotlib) — calibration, force coefficients and plots
  • MATLAB / Scilab — thin-airfoil theory overlay and regression
  • +4

intermediate14 wk4 students