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

PhishGuard: Phishing-Awareness Simulator & Mail-Header Analyser for a College (PHP/MySQL)

Consent-based phishing drills on a closed lab network — measure who clicks, teach the teachable moment, never capture a credential

Mapped to your syllabusBCU SEP 2024 · 24BCAPJ Project · Semester 5

Overview

1 min read

PhishGuard is a defensive security-awareness web application built for a fictional 1,200-student arts and science college in Karnataka. It lets the college run consent-based phishing simulations on a closed lab network and gives students a safe place to practise spotting and reporting fake mails.

The faculty coordinator (Admin) picks a scenario from a template library modelled on scam patterns actually reported across India — fake scholarship mails, "your KYC has expired" bank warnings, fee-refund hooks, UPI cashback offers and authority-impersonation threats. The campaign engine (PHPMailer + a local MailHog SMTP sink) delivers the synthetic mail only to students who opted in, and nothing can leave the lab network. When a volunteer clicks, they land on a teachable moment page that explains the red flags they missed — the system never collects credentials; only the click itself is recorded.

A second module, the mail-header analyser, lets a student upload or paste the headers of any suspicious mail and get a plain-language verdict: the Python module parses the Received chain, reads SPF/DKIM/DMARC authentication results, flags lookalike domains and shortened URLs, and explains its reasoning.

Dashboards show delivery, open, click and report rates, a per-department awareness score, and improvement across successive campaigns — exportable to CSV for Power BI. The stack is PHP 8, MySQL, JavaScript and Python, exactly the languages the BCU SEP 2024 BCA syllabus teaches; MailHog and PHPMailer are industry-standard open-source extras, acknowledged in the report.

Relevant for
Karnataka
Level
Intermediate · 12 weeks · team of 3
Common at
Bengaluru City University, IGNOU, Bharathiar University
Updated
Nov 2026

Syllabus alignment

BCU · SEP 2024

24BCAPJ · Project · Semester 5 · 6 credits · 150 = SEE 120 (writing 20 + demo 60 + viva 20 + report 20) + IA 30 (3 reviews × 10)

Subjects this project applies
  • 24BCA51 Web Programming (HTML5/CSS3/JS/PHP)
  • DBMS (MySQL)
  • 24BCA54 Cryptography
  • 24BCA52 Data Analytics (Python + Power BI)
  • 24BCA63 Data Mining
How it is evaluated

Team: individual or group ≤ 3

hardbound report; open-source / licensed tools must be acknowledged

Also fits: IGNOU BCA (revised) — BCSP-064 guidelines, Bharathiar University 2023-24, Kerala University FYUGP 2024.

What's in the box

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

Problem & synopsis

5 min read

Problem statement

Students at a typical Indian college receive scholarship offers, fee-payment reminders, "KYC expiry" warnings and internship mails daily, and scammers actively target them — India's I4C recorded thousands of impersonation and phishing-linked fraud cases each month in 2024–25. The college's only defence is an annual lecture, which changes knowledge but not clicking behaviour, and there is no safe, consent-based way for students to practise resisting a realistic lure or reporting one. The administration has no baseline measurement of susceptibility, no way to know which departments are most exposed, and no tool a student can use to check whether a suspicious mail's headers show failed SPF/DKIM/DMARC authentication or a lookalike domain. There is a need for a closed, ethics-first simulation and analysis platform that trains through experience, measures improvement, and never puts a real credential or a real outsider at risk.

Synopsis

Abstract

Phishing remains the most common way intruders get a foothold, and in India the human target is the target: India's cyber-crime coordination centre (I4C) reported roughly ₹1,935 crore lost to "digital arrest" impersonation scams in 2024, while the RBI's Be(A)ware booklet and CERT-In's advisories keep warning that fake KYC updates, scholarship offers and UPI collect-request tricks are the everyday lures. College students are prime targets — scholarship mails, fee-payment notices and internship offers land in inboxes that have never been trained to distrust them.

Introduction

Nandanavanam Degree College (fictional) teaches cyber-hygiene as a one-hour lecture once a year. A lecture changes knowledge, not behaviour: nobody clicks in the classroom, so nobody learns what falling for a lure actually feels like, and nobody practises the report button. Security research worldwide agrees that measured, repeated simulation plus immediate coaching is what moves click rates down and report rates up.

Existing System

  • Awareness is delivered as annual lectures and posters; there is no practice and no measurement.
  • Real scam mails forwarded on WhatsApp are the only "examples" students see — after the harm is done.
  • The college has no baseline: it cannot say what fraction of students would click a convincing fake mail today, let alone whether the number improved.
  • Students who receive a genuinely suspicious mail have nowhere to check it: no tool to read SPF/DKIM/DMARC results or spot a lookalike domain.
  • Limitations: no consent framework, no safe environment, no feedback loop, no data.

Proposed System

  • A web portal (PHP 8/MySQL) with three roles — Coordinator (Admin), Volunteer, Viewer — and bcrypt-hashed logins.
  • A template library of 12 synthetic phishing scenarios based on documented Indian scam patterns, each tagged with its red flags.
  • A campaign engine that sends simulated mails only to opted-in volunteers through a local MailHog SMTP sink bound to 127.0.0.1 — delivery outside the lab is structurally impossible.
  • A teachable-moment landing page on click, and a one-click Report Phishing action; only anonymous events are stored, never credentials.
  • A Python header analyser for .eml files: Received-chain parse, SPF/DKIM/DMARC verdicts (RFC 7208/7489), lookalike-domain and URL-shortener checks, with an explained risk verdict.
  • Per-department awareness scores, campaign-over-campaign comparison and CSV export for Power BI.

Feasibility Study

  • Technical: The LAMP stack is taught in the syllabus (24BCA51 Web Programming, DBMS with MySQL). MailHog captures all mail locally, so no external mail server is ever involved. The analyser is a standalone Python CLI — no extra services needed.
  • Economic: Everything is open-source; ₹0 licence cost, runs on one lab PC.
  • Operational & ethical: Volunteers sign a consent form, can opt out at any time, and results are anonymised by department. The design follows the data-minimisation spirit of the DPDP Act, 2023, and CERT-In's advice that awareness training is a core control.

Objectives

  1. 01Build a role-based PHP/MySQL portal with Coordinator, Volunteer and Viewer roles, bcrypt password hashing and prepared statements throughout.
  2. 02Create a template library of 12 synthetic phishing scenarios modelled on documented Indian scam patterns (fake scholarship, KYC expiry, fee refund, UPI cashback, authority impersonation).
  3. 03Deliver simulation mails only to opted-in volunteers through a local MailHog SMTP sink bound to 127.0.0.1 so that no message can leave the lab network.
  4. 04Track delivery, open, click and report events and show a teachable-moment coaching page on every click without ever capturing credentials.
  5. 05Implement a Python analyser that parses .eml headers, extracts SPF/DKIM/DMARC results, and flags lookalike domains and shortened URLs with an explained verdict.
  6. 06Compute a per-department awareness score and show campaign-over-campaign trends, exportable as CSV for Power BI.
  7. 07Attach a short micro-lesson and quiz after each simulated click and measure improvement across campaigns.

Scope

In scope

  • One fictional college, one lab-network deployment, three user roles.
  • Volunteers who opt in via a signed consent form (and can opt out at any time); results anonymised to department level.
  • 12 synthetic templates; campaigns scheduled and sent by the Coordinator only.
  • Tracking of delivery / open / click / report events inside the closed network.
  • Mail-header analyser for pasted or uploaded .eml files (RFC 7208 SPF, RFC 7489 DMARC verdicts, lookalike-domain checks).
  • Micro-lessons, quizzes, awareness dashboard, CSV export.

Out of scope (v1)

  • Sending anything outside the college lab network — the SMTP sink is local-only by design.
  • Integration with the college's production mail server or a mail-gateway plug-in.
  • Credential capture of any kind, even fake ones.
  • Mobile apps, WhatsApp/SMS simulation channels, and real-time inbound-mail filtering.
  • Code-generated attack templates — all templates are hand-written and reviewed by the coordinator.

Methodology

The project follows the Incremental SDLC model: each increment delivers a working slice (portal → campaign engine → analyser → analytics), which is demoed to the guide and refined in the next cycle — a good fit for the 12-week BCU Sem-5 project window and its three internal reviews.

PhaseWeeksActivitiesDeliverable
Requirement analysis1Study CERT-In advisory guidance and RBI Be(A)ware scam patterns; define requirements; draft consent formSRS + ethics checklist
System design2ER diagram, DFDs, use-case list, schema, wireframesDesign document
Increment 13–4Auth, roles, consent registry, template libraryWorking portal
Increment 25–6Campaign engine, MailHog delivery, event tracking, teachable-moment pageSimulation loop
Increment 37–8Python header analyser (Received chain, SPF/DKIM/DMARC, lookalike domains)Analyser CLI
Increment 49Lessons, quizzes, awareness-score computation, CSV exportAnalytics module
Testing & pilot10–11Unit + integration + black-box tests; pilot campaign with 30 consenting volunteersTest report + pilot data
Documentation12Report, PPT, demo rehearsalFinal submission

Team split: Member 1 — portal, roles and campaign engine; Member 2 — tracking, teachable-moment flow and Python analyser; Member 3 — analytics dashboard, quiz module, testing and documentation.

Testing approach: unit tests for the analyser's verdict logic and the awareness-score formula; integration tests that a campaign produces exactly one mail per opted-in volunteer inside MailHog; black-box test cases per screen; and a supervised pilot whose data becomes the project's results chapter.

Architecture & tech stack

3 diagrams · 7 technologies · 2 min read

  • PHP 8
  • MySQL
  • JavaScript (Chart.js)
  • Python
  • HTML5/CSS3
  • PHPMailer
  • MailHog (local SMTP sink)

PhishGuard is a three-tier application plus a small offline analysis tool:

  1. Presentation tier — server-rendered PHP 8 pages styled with HTML5/CSS3; Chart.js (industry-standard open-source) draws the dashboard charts; works on lab desktops and phones.
  2. Application tier — Apache + PHP implements business rules: RBAC checks on every page, campaign scheduling, event recording, score computation. All input is validated server-side; all SQL uses prepared statements.
  3. Data tier — MySQL 8 stores users, consent records, templates, campaigns, events, lessons and reports.
  4. Mail path — PHPMailer hands messages to MailHog, a local SMTP sink bound to 127.0.0.1:1025. MailHog holds every message in memory and exposes a web inbox — no DNS, no relay, no exit to the internet.
  5. Analyser — a Python 3 CLI (analyser/analyse.py sample.eml) that parses headers, reads authentication results, and writes a report row back to MySQL.
flowchart LR
  C["Coordinator browser"] -->|"HTTP on lab LAN"| AP["Apache + PHP 8 application"]
  V["Volunteer browser"] --> AP
  AP --> AU["Auth & RBAC (bcrypt, prepared statements)"]
  AU --> DB[("MySQL 8")]
  AP --> CE["Campaign engine"]
  CE --> MH["MailHog SMTP sink<br/>127.0.0.1:1025 — local only"]
  MH --> TM["Teachable-moment landing page"]
  TM -->|"click / report events"| DB
  AP --> AN["Python header analyser CLI"]
  AN --> DB
  AP --> DASH["Dashboard + CSV export"]

ER diagram

erDiagram
  USER ||--o| VOLUNTEER : "extends"
  USER ||--o{ CAMPAIGN : "creates"
  TEMPLATE ||--o{ CAMPAIGN : "is used by"
  CAMPAIGN ||--o{ MAIL_EVENT : "produces"
  VOLUNTEER ||--o{ MAIL_EVENT : "triggers"
  USER ||--o{ ANALYSIS_REPORT : "saves"
  LESSON ||--o{ QUIZ_ATTEMPT : "is assessed by"
  VOLUNTEER ||--o{ QUIZ_ATTEMPT : "makes"

  USER {
    int id PK
    string email UK
    string passwordHash
    string role
  }
  VOLUNTEER {
    int id PK
    int userId FK
    bool consentGiven
    string department
  }
  TEMPLATE {
    int id PK
    string scenario
    string redFlags
    string subjectLine
  }
  CAMPAIGN {
    int id PK
    int templateId FK
    datetime scheduledAt
    string status
  }
  MAIL_EVENT {
    int id PK
    int campaignId FK
    int volunteerId FK
    string eventType
    datetime occurredAt
  }
  ANALYSIS_REPORT {
    int id PK
    int userId FK
    string spfResult
    string dkimResult
    string dmarcResult
    string verdict
  }
  LESSON {
    int id PK
    string title
    string bodyMarkdown
  }
  QUIZ_ATTEMPT {
    int id PK
    int lessonId FK
    int volunteerId FK
    int scoreOutOf10
  }

DFD — Level 0 (context diagram)

flowchart LR
  C(["Coordinator"]) -- "template, campaign schedule" --> SYS(("PhishGuard"))
  SYS -- "click rate, report rate, awareness scores" --> C
  V(["Volunteer"]) -- "consent, report click, quiz answers" --> SYS
  SYS -- "simulated mail, lesson, quiz" --> V
  E(["Viewer: HOD / Principal"]) -- "read-only request" --> SYS
  SYS -- "anonymised dashboard" --> E

The awareness score per department is 100 × (reports + 0.5 × no-click-no-report) / delivered, computed in SQL and cached on the dashboard; the analyser's risk verdict is Low / Medium / High based on weighted findings (authentication failures, lookalike distance ≤ 2 from a known domain, shortened URLs, risky attachment extensions).

Modules

7 modules

  1. Module 01

    Authentication, Roles & Consent Registry

    Email/password login with bcrypt hashing and HTTP-only session cookies. Three roles (Coordinator, Volunteer, Viewer) are enforced in a shared gate function called at the top of every page, so a volunteer typing an admin URL gets a 403. Volunteers are registered only after a stored consent record with a timestamp; opting out flips the flag and excludes them from all future campaigns.

  2. Module 02

    Template Library

    Twelve synthetic scenarios, each with subject line, body HTML, a difficulty tag and a list of the red flags it exercises (mismatched sender domain, urgency, unverified link, request for OTP). Templates are modelled on patterns documented by RBI's Be(A)ware booklet and CERT-In's awareness material, and the coordinator can edit or disable any of them.

  3. Module 03

    Campaign Engine & Local Delivery

    The coordinator picks a template, a volunteer segment (department, year) and a schedule. The engine renders each mail, sends it through PHPMailer to the MailHog sink on 127.0.0.1:1025, and records a DELIVERED event. Because the sink is loopback-only and no outbound relay is configured, a misconfigured campaign physically cannot reach an external mailbox.

  4. Module 04

    Event Tracking & Teachable Moment

    A unique, non-guessable tracking pixel records opens; the link in each simulated mail leads to a landing page that immediately explains which red flags the scenario contained and links the matching micro-lesson. A prominent "This was a safe simulation — report it like the real thing" button records a REPORT event. No form on this page accepts a password, OTP or any credential, and the code-review checklist forbids adding one.

  5. Module 05

    Mail-Header Analyser

    A Python 3 CLI that accepts a pasted header block or an .eml upload, parses the Received chain top-down, extracts the Authentication-Results verdicts for SPF, DKIM and DMARC, normalises sender domains and compares them against a list of known-good domains (college, major banks, government portals) using Damerau–Levenshtein distance to catch lookalikes such as extra letters or swapped characters. It checks URLs for open redirectors and popular shorteners, then prints a Low/Medium/High verdict with a one-line reason for every finding.

  6. Module 06

    Awareness Dashboard & Reports

    Chart.js dashboards show delivered/opened/clicked/reported counts per campaign, per-department awareness scores and campaign-over-campaign trends. Viewer-role users see the same charts anonymised to department level. Every chart has a CSV export, and the coordinator downloads the CSV bundle to build the Power BI page used in the results chapter.

  7. Module 07

    Micro-lessons & Quizzes

    Each template links to a five-minute lesson (what SPF/DKIM/DMARC mean, how to read a sender address, why UPI never needs a PIN to receive money). After a teachable-moment click, the volunteer takes a 10-question quiz; attempts are stored per volunteer and lesson so the dashboard can show knowledge improvement, not just behaviour change.

Slides

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

  1. Slide 1

    PhishGuard — Phishing-Awareness Simulator & Mail-Header Analyser

  2. Slide 2

    Why This Project: Phishing in India

  3. Slide 3

    Problem Statement

  4. Slide 4

    Existing vs Proposed System

  5. Slide 5

    Objectives

  6. Slide 6

    Technology Stack

  7. Slide 7

    System Architecture

  8. Slide 8

    Database Design

  9. Slide 9

    Demo — Campaign & Teachable Moment

  10. Slide 10

    Demo — Mail-Header Analyser

  11. Slide 11

    Testing & Ethics

  12. Slide 12

    Results, 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 18 answered free · 15 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 phishing, and how does your simulation differ from an actual attack?

    Phishing is a social-engineering attack that uses a convincing mail or site to trick a person into clicking, revealing a secret or paying. Our simulation uses the same psychology but is defensive: the mails are synthetic templates we wrote, delivered only to consenting volunteers on a closed network, the landing page teaches instead of capturing anything, and every step is measured. There is no exploit code, no real target and no data theft anywhere in the system.

  2. 02Concept

    Explain SPF, DKIM and DMARC and how your analyser uses them.

    SPF (RFC 7208) lets a domain publish which mail servers may send for it; DKIM signs the message with a key published in DNS; DMARC (RFC 7489) combines both and adds alignment plus a reporting policy. Our Python analyser parses the Authentication-Results header and each verdict, treats spf=fail, dkim=none or dmarc=fail as risk signals, and explains each finding in plain language on the report.

  3. 03Concept

    Why do you not capture credentials, even fake ones?

    Because the moment a simulation accepts a typed password it becomes a credential-harvesting tool, which is both an ethical line and a legal risk under data-protection principles. The teachable-moment page only records that the link was clicked — that single event is enough to measure behaviour — and our code-review checklist explicitly forbids adding any input field that accepts a password or OTP.

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

280 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

280 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

369 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

369 words · ~2 min read

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

Unlock for ₹2,000

References

11 sources

  1. Indian Computer Emergency Response Team (CERT-In) — advisories, guidelines and awareness material
  2. CERT-In — Cyber Security Awareness booklet (phishing and cyber hygiene)
  3. Reserve Bank of India — Be(A)ware: a booklet on frauds and their modus operandi
  4. Indian Cybercrime Coordination Centre (I4C), Ministry of Home Affairs
  5. RFC 7208 — Sender Policy Framework (SPF) for Authorizing Use of Domains in Email
  6. RFC 7489 — Domain-based Message Authentication, Reporting, and Conformance (DMARC)
  7. OWASP Authentication Cheat Sheet
  8. PHP Manual (official documentation)
  9. MySQL 8.0 Reference Manual
  10. PHPMailer — the classic PHP email-sending library (MIT licence)
  11. William Stallings, Cryptography and Network Security: Principles and Practice, 8th ed., Pearson

Cite this bundle

OnlyProjects. (2026). PhishGuard: Phishing-Awareness Simulator & Mail-Header Analyser for a College (PHP/MySQL): BCA Cyber Security project bundle [Educational resource]. https://onlyprojects.online/projects/bca-cyber-phishguard-college-mail-gateway

Future scope

1 min read

  • Domain health report for the college's own domain: scheduled SPF/DKIM/DMARC lookups that flag misconfigurations an attacker could exploit.
  • WhatsApp-forward checker: paste a forwarded message and get a checklist verdict against known scam patterns.
  • Kannada and Hindi template variants to measure awareness across language backgrounds.
  • Gamified leaderboard (department-level, anonymised) to sustain participation across semesters.
  • A lightweight classifier trained on labelled header features (authentication results, link reputation, domain heuristics) to suggest verdicts for mails the rule engine is unsure about.
  • Inbound-gateway mode: an optional plug-in that scores real incoming mail with the same analyser rules, running strictly inside the college network.

Keep browsing

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

BCACode included

Web Development

Smart Hostel Management System

Room allocation, complaints and mess billing without the register

  • Next.js
  • TypeScript
  • Node.js
  • +3

intermediate8 wk2 students