Skip to content
OnlyProjects
MCA · Cyber SecurityFor educational purposes only
Code included

Mini-SIEM Log Correlation & Alert-Triage Lab for a College Lab Network (Python/MySQL)

Turn the logs your college lab already writes into one correlated alert queue you can defend line by line

Mapped to your syllabusVTU MCA 2022 Scheme · 22MCA44 Project Phase-2 · Semester 4

Overview

1 min read

LabNet SIEM: Log Correlation & Alert-Triage Lab is a defensive-security project that turns the scattered logs of a small college lab network into one correlated alert queue. Every Linux lab machine already writes logs — SSH and sudo activity in auth.log, web-server requests in access.log, cron jobs in syslog — but nobody reads them until something breaks. This project builds a miniature SIEM (Security Information and Event Management) system out of components the student controls end to end: a lightweight shipper that tails log files on each lab host, a Python parser that normalises every line into a common event schema, a MySQL event store, a correlation engine driven by human-readable YAML rules, and a Flask dashboard where alerts arrive with a severity, a MITRE ATT&CK mapping and an analyst verdict.

All detection happens on your own lab systems only — your VMs, your logs, your rules. The bundle includes a scripted activity generator that produces the log signatures the rules are designed to catch (rapid failed SSH logins, a short probe sequence, repeated 404 requests to the lab web server) so every rule can be demonstrated live in the viva without touching any machine you do not own.

Flask and Chart.js are industry-standard extras layered on top of the Python, MySQL and JavaScript skills the VTU MCA 2022 scheme teaches (22MCA21, 22MCA24, 22MCA31). The result is a project where every design decision — schema, rule DSL, window size, severity scale — is one you can explain and defend.

Relevant for
Karnataka
Level
Advanced · 16 weeks · solo
Common at
VTU, AKTU, JNTUH
Updated
Nov 2026

Syllabus alignment

VTU · MCA 2022 Scheme

22MCA44 · Project Phase-2 · Semester 4 · 16 credits · CIE 100 + SEE 100

Subjects this project applies
  • 22MCA31 Data Analytics with Python
  • 22MCAL36 Data Analytics Lab
  • 22MCA21 DBMS (MySQL)
  • 22MCA24 Web Technologies
  • 22MCA332 Cloud Computing
How it is evaluated

50 : 25 : 25 (report : presentation : Q&A); plagiarism check mandatory

Also fits: AKTU MCA 2020-21 (KCA), JNTUH MCA R22.

What's in the box

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

Problem & synopsis

6 min read

Problem statement

A college lab with sixty machines, one web server and one firewall emits tens of thousands of log lines every day, yet has no mechanism to notice when something in them matters. Repeated failed SSH logins, an unusual run of sudo commands on a non-teaching machine, or a scanner probing the lab web server all leave the same trace: ordinary lines in files nobody opens. By the time a problem is noticed — a full disk, a defaced intranet page, a lab machine behaving oddly — the supporting evidence is scattered across hosts, and there is no way to answer even basic questions such as which accounts attempted login, from which addresses, and when.

Commercial SIEM platforms solve this for enterprises, but a college cannot deploy one: licences are expensive, and more importantly a closed product teaches a student nothing about how normalisation, correlation and triage actually work. What is needed is a small, fully explainable, rule-driven SIEM that a department can run on its own hardware, that watches only its own systems, and that demonstrates the complete detection loop — collect, normalise, correlate, triage, tune — with every step visible and every rule arguable in a viva.

Synopsis

Abstract

A college lab generates thousands of log lines a day and reads none of them. Security events — repeated failed logins, unusual sudo use, a scanner probing the lab web server — leave evidence in files nobody opens until days later. This project builds a miniature SIEM: a shipper and parser that normalise events from several sources into one schema, a MySQL event store, a rule-driven correlation engine that raises alerts only when related events occur inside a time window, and a triage console where each alert is confirmed or dismissed, the verdict feeding back into rule tuning.

Introduction

A sixty-machine lab plus one web server produces four log streams: Linux auth.log, syslog, the Nginx/Apache access log and the lab firewall's connection log. Individually, each line is noise. Security value appears in correlation: five failed SSH logins from one address followed by a success is a story no single line tells. The project teaches exactly this skill — detection engineering — with nothing beyond the scheme's own courses.

Existing System

  • Logs exist on each host but are never collected centrally; debugging means logging into each machine and grepping by hand.
  • There is no alerting: a weekend burst of failed SSH logins goes unnoticed until Monday.
  • There is no history and no evidence trail — questions like "who tried to log in, from where, when?" are unanswerable.
  • Commercial SIEMs (Splunk, QRadar) are powerful but licence-heavy and opaque to a student who must explain every component.
  • Limitations: no central store, no correlation, no triage workflow, no measurable false-positive rate.

Proposed System

  • Collect: a small Python shipper tails configured log files per host and posts batches to a collector API.
  • Normalise: per-source parser rules map every line into one event schema (timestamp, host, source, event_type, actor, src_ip, outcome, raw).
  • Store: MySQL tables indexed on (host, ts) and (src_ip, ts), with daily partitions and a retention purge.
  • Correlate: YAML rule files express threshold rules (N events of a type in T minutes), sequence rules (failures followed by success) and volume rules (4xx rate per address); each rule carries a severity and a MITRE ATT&CK technique id.
  • Triage: a Flask console lists alerts with their context events inline; the analyst marks it True Positive, False Positive or Needs Review and the verdict is stored.
  • Tune: a weekly report shows hits and false-positive rate per rule, closing the detection-tuning loop with evidence.

Feasibility Study

  • Technical: Python 3, MySQL 8 and Flask are free, documented and light enough for two Linux VMs to demonstrate multi-host collection end to end.
  • Economic: zero licence cost; everything runs on the department's own hardware.
  • Operational: the admin gets one page each morning instead of six log files; the analyst workflow needs no training.
  • Ethical and legal: all monitoring targets systems the department owns; no shared-network traffic is intercepted, and login usernames are the only personal data retained.

Objectives

  1. 01Design a normalised MySQL schema (hosts, sources, events, rules, alerts, verdicts) that stores a day of lab traffic — around one million events — with sub-second queries on its indexed access paths.
  2. 02Build a multi-source log shipper and parser that converts auth.log, syslog and Nginx access-log lines into a single common event schema with at least 95 percent parse success on real lab traffic.
  3. 03Implement a YAML-driven correlation engine supporting threshold, sequence and volume rules that evaluate on rolling time windows over the event store.
  4. 04Map every correlation rule to a MITRE ATT&CK technique so that each alert carries a tactic, technique id and severity the analyst can reason about.
  5. 05Provide a Flask triage console where alerts can be reviewed together with their context events and marked True Positive, False Positive or Needs Review, with verdicts persisted for audit.
  6. 06Measure and reduce false positives: publish a weekly per-rule hit and false-positive report and demonstrate at least one measurable tuning improvement over the project period.
  7. 07Generate controlled, scripted activity on the lab's own test VMs so that every rule has a repeatable, ethical demonstration for internal reviews and the final viva.

Scope

In scope

  • Collection from Linux lab hosts by file tailing (auth.log, syslog) and from the lab web server's access log — file-based sources only.
  • Six to ten correlation rules across credential-attack, probing and misuse categories, each mapped to a MITRE ATT&CK technique.
  • A MySQL event store sized for a 180-day retention window, in line with CERT-In's log-retention direction of April 2022.
  • A Flask triage dashboard, a weekly tuning report and CSV export of alerts for the department's records.
  • A scripted activity generator for the lab's own test VMs to exercise rules safely and repeatably.

Out of scope (v1)

  • Live packet capture or any monitoring of hosts the department does not own.
  • Windows Event Log collection (kept as a future enhancement; Linux only in version 1).
  • Machine-learning anomaly detection — rules are deliberately hand-written and explainable.
  • Case management, ticketing integrations and email/SMS notification gateways.

Methodology

The project follows an iterative-incremental SDLC model, aligned to VTU's two-phase MCA structure: Phase-1 (22MCAL35) covers analysis and design with a thin prototype, and Phase-2 (22MCA44) delivers the increments, testing and final evaluation.

PhaseWeeksActivitiesDeliverable
Requirement analysis1–2Inventory lab log sources, sample each format, measure daily volumes, list functional and non-functional requirements, agree a retention policy with the lab administratorSRS and log-source catalogue
System design3–4Event schema, ER diagram, DFD levels 0–1, rule-DSL design, dashboard wireframesDesign document
Increment 15–7Shipper, collector API, parser, normalisation into MySQLOne host feeding the store live
Increment 28–10Correlation engine with threshold, sequence and volume rules; ATT&CK mappingFirst alerts firing on seeded activity
Increment 311–12Triage console, verdict persistence, weekly report, CSV exportWorking end-to-end system
Testing and tuning13–14Unit and integration tests, load test with one million events, false-positive tuning passTest report and tuned rule set
Documentation15–16Final report, PPT, demo rehearsalPhase-2 submission

Testing approach: pytest unit tests for every parser pattern and rule operator; integration tests that replay a recorded day of lab logs and assert the expected alert counts; a load test validating query performance at one million events; and a documented false-positive review in which every rule is scored and tuned. Because detection logic is data-driven, the same seeded activity is replayed after every rule change, so tuning results are regression-tested rather than anecdotal.

Architecture & tech stack

2 diagrams · 6 technologies · 2 min read

  • Python 3
  • MySQL 8
  • Flask
  • JavaScript (ES6)
  • Chart.js
  • PyYAML

LabNet SIEM is built as a pipeline of five cooperating stages, each independently runnable and testable:

  1. Collection — a lightweight Python shipper on each lab host tails configured log files, remembers byte offsets so nothing is re-sent after a restart, and POSTs batches to the collector with a shared token.
  2. Normalisation — the parser maps each line to the common event schema (timestamp, host, source, event_type, actor, src_ip, outcome, raw). Unparsable lines are stored raw with a parse_failed flag rather than dropped, so parser improvements recover old data.
  3. Storage — MySQL stores hosts, sources, events, rules, alerts and verdicts; daily partitions and composite indexes keep the correlation queries fast.
  4. Correlation — a worker evaluates the YAML rules on rolling windows: threshold (count of an event type per key), sequence (ordered steps within T minutes) and volume (rate per key). Matches become alerts carrying severity and an ATT&CK reference.
  5. Presentation — a Flask application serves the alert queue, event context and weekly report; triage verdicts are written back to MySQL.
flowchart LR
  H1["Lab host 1 (auth.log, syslog)"] --> SH1[Shipper]
  H2["Lab host 2 (auth.log)"] --> SH2[Shipper]
  W["Lab web server (access.log)"] --> SH3[Shipper]
  SH1 -->|HTTPS batches| C[Collector API]
  SH2 -->|HTTPS batches| C
  SH3 -->|HTTPS batches| C
  C --> P[Parser and normaliser]
  P --> DB[(MySQL event store)]
  Q[Correlation worker] -->|reads rules| R[rules.yaml]
  DB --> Q
  Q --> A[Alerts]
  DB --> CON[Flask triage console]
  A --> CON
  CON -->|verdicts| DB
  CON --> REP[Weekly tuning report]

ER diagram (core tables)

erDiagram
  HOST ||--o{ SOURCE : "runs"
  SOURCE ||--o{ EVENT : produces
  EVENT }o--|| RULE : "matched by"
  RULE ||--o{ ALERT : triggers
  ALERT ||--o{ TRIAGE_VERDICT : receives
  HOST {
    string id PK
    string hostname UK
    string ip
  }
  SOURCE {
    string id PK
    string host_id FK
    string log_path
    string parser
  }
  EVENT {
    bigint id PK
    datetime ts
    string host_id FK
    string source_id FK
    string event_type
    string actor
    string src_ip
    string outcome
    text raw
  }
  RULE {
    string id PK
    string name
    string rule_type
    int window_seconds
    int threshold
    string severity
    string mitre_id
  }
  ALERT {
    bigint id PK
    string rule_id FK
    datetime raised_at
    string key_value
    string status
  }
  TRIAGE_VERDICT {
    bigint id PK
    bigint alert_id FK
    string analyst
    string verdict
    string comment
  }

The design is deliberately event-sourced: alerts are derived views over stored events, so re-running a corrected rule over old data reproduces history. This property lets the report show before-and-after tuning results on identical data — a strong, honest evidence chain for the viva.

Modules

7 modules

  1. Module 01

    Log Shipper

    A small Python agent installed on each lab host that tails configured files (auth.log, syslog, access.log), tracks byte offsets in a state file so lines are never re-sent or skipped after a restart, and batches lines to the collector API over HTTPS with a shared token.

  2. Module 02

    Collector & Parser

    Receives batches, applies per-source regex parsing rules to extract timestamp, actor, source address, process and outcome, normalises everything into the common event schema, and records unparsable lines with a parse_failed flag for later pattern work.

  3. Module 03

    Event Store

    The MySQL schema: hosts, sources, daily-partitioned events, rules, alerts and verdicts; composite indexes on (host, ts) and (src_ip, ts); and a 180-day purge job that keeps retention aligned with the CERT-In log-retention direction.

  4. Module 04

    Correlation Engine

    Reads YAML rule definitions and evaluates them on rolling windows: threshold rules (N events of a type per key), sequence rules (failure-then-success within T minutes) and volume rules (4xx rate per address). Every rule carries a severity and a MITRE ATT&CK technique id.

  5. Module 05

    Alert Triage Console

    A Flask and JavaScript dashboard showing the live alert queue, drill-down to the context events that triggered each alert, and one-click verdicts (True Positive, False Positive, Needs Review) with comments persisted to the database.

  6. Module 06

    Reporting & Tuning

    Generates a weekly report of per-rule hits, false-positive rate and time-to-triage, exports alerts as CSV for the department, and suggests threshold changes; this report is the evidence for the tuning-improvement claim in the final write-up.

  7. Module 07

    Activity Generator & Seed Data

    Scripted, clearly-labelled routines run only on the lab's own test VMs that produce the log signatures the rules detect — bursts of failed SSH logins, a short probe sequence, repeated 404 requests — plus a benign-traffic seed so the console shows a realistic mixed queue.

Slides

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

  1. Slide 1

    LabNet SIEM — Log Correlation & Alert-Triage Lab

  2. Slide 2

    The Problem: Logs Nobody Reads

  3. Slide 3

    Existing vs Proposed System

  4. Slide 4

    Objectives

  5. Slide 5

    Technology Stack

  6. Slide 6

    System Architecture

  7. Slide 7

    Database Design

  8. Slide 8

    Correlation Rules — the Heart

  9. Slide 9

    Demo — Live Alert & Triage

  10. Slide 10

    Testing & Tuning Results

  11. Slide 11

    Novelty & Individual Contribution

  12. Slide 12

    Conclusion & Future Scope

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 14 answered free · 11 unlock

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

  1. 01Concept

    What is a SIEM, and in what sense is your system one?

    A SIEM collects security-relevant events from many sources into one store, correlates them into alerts, and supports analyst triage. My system implements all four functions at lab scale: shippers collect, the parser normalises, a correlation engine raises alerts from stored events, and the console records verdicts — so it is a genuine, if deliberately small, SIEM.

  2. 02Concept

    Why is correlation more valuable than alerting on single events?

    A single failed login is routine in any lab; a single 404 is normal web noise. The story that matters is a pattern — repeated failures followed by a success, or a sustained run of 404s from one address. Correlation across events in a time window is what turns thousands of noise lines into a handful of meaningful alerts.

  3. 03Concept

    What is MITRE ATT&CK and why did you map rules to it?

    MITRE ATT&CK is a public knowledge base of adversary tactics and techniques observed in real intrusions. Mapping each rule to a technique id gives every alert a common language — the analyst and the examiner immediately know what class of behaviour fired, and it keeps rule design honest because vague rules cannot be mapped precisely.

+11 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

7 steps · complete source code · unlocks with the project

Unlocks with the project · ₹2,000

7 steps · source code zip

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

Unlock for ₹2,000

READMEFIRST

249 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

249 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

371 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

371 words · ~2 min read

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

Unlock for ₹2,000

References

10 sources

  1. NIST Special Publication 800-92 Rev. 1 (Initial Public Draft) — Cybersecurity Log Management Planning Guide
  2. MITRE ATT&CK — adversary tactics and techniques knowledge base
  3. OWASP Logging Cheat Sheet
  4. OWASP Application Logging Vocabulary Cheat Sheet
  5. Indian Computer Emergency Response Team (CERT-In) — Directions under Section 70B(6) of the IT Act, 28 April 2022 (6-hour incident reporting; 180-day rolling log retention)
  6. MySQL 8.0 Reference Manual
  7. Flask — official documentation (Pallets Projects)
  8. Python 3 — official documentation
  9. Anton Chuvakin, Kevin Schmidt and Chris Phillips, Logging and Log Management: The Authoritative Guide to Understanding the Concepts Surrounding Logging and Log Management, Syngress/Elsevier
  10. David R. Miller, Shon Harris, Allen Harper and Stephen VanDyke, Security Information and Event Management (SIEM) Implementation, McGraw-Hill

Cite this bundle

OnlyProjects. (2026). Mini-SIEM Log Correlation & Alert-Triage Lab for a College Lab Network (Python/MySQL): MCA Cyber Security project bundle [Educational resource]. https://onlyprojects.online/projects/mca-cyber-log-correlation-siem-lab

Future scope

1 min read

  • Windows Event Log support via a small agent reading login-failure and login-success event patterns, widening coverage to the whole lab.
  • Anomaly-assisted tuning — a per-account baseline of usual login hours and usual source hosts that ranks rules by deviation, kept simple and explainable.
  • Ticketing hook — push confirmed True Positives to the department's helpdesk tool so triage becomes an auditable workflow.
  • Elasticsearch backend option behind the same rule DSL, to compare MySQL and search-engine performance at similar volumes.
  • Notification — a daily digest email to the lab administrator instead of console-only alerting.
  • Docker Compose packaging so another college can adopt the lab in minutes.

Keep browsing

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