AI-Based Cybersecurity System Final Year Project | Source Code
LIMITED TIME
Get Source Code ₹99
Real project UI Full source included

No live demo yet — message us for access

Our team shares demo access on WhatsApp within minutes

AI-Based Cybersecurity System Final Year Project

Complete final-year project source code with frontend, backend, database, and setup guide. Instant download after secure payment.

  • PYTHON Stack
  • Instant Download
Secure CCAvenue payment Instant download link WhatsApp support

Choose your plan

Source Code Only

Full ZIP with frontend, backend, database & documentation.

₹99 one-time
  • Complete project source files
  • Database script included
  • How-to-run guide

What's in your download

Review features, setup steps, and credentials before you pay.

Project Overview

Description, tech stack, and what is included

Full source Frontend + backend
Database .sql file
Setup guide README included

AI-Based Cybersecurity System for Safe and Controlled AI Usage is a Flask-based cybersecurity web application designed to provide safe, monitored, and controlled AI chat access for colleges, enterprises, and organizations. The platform scans every user prompt before sending it to OpenAI, performs AI-based risk scoring, masks sensitive data, blocks malware/phishing/injection/policy-violating requests, and gives administrators full control over users, rules, approvals, logs, exports, and system policies.

The system includes a secure user panel for AI chat, prompt safety results, usage limits, safe templates, chat history, blocked prompt tracking, approval requests, and false-positive reporting. It also includes a powerful admin panel for user CRUD, security policy management, prompt monitoring, approvals, incident review, usage logs, security logs, login history, audit trail, OpenAI settings, branding, system settings, reports, CSV/Excel export, and database backup.

This project is suitable for B.Tech, M.Tech, BCA, MCA, BE, ME, BSc, and MSc students who need a practical final year project, major project, or minor project based on cybersecurity, AI safety, secure AI chat, prompt injection detection, sensitive data masking, Flask development, OpenAI API integration, audit logging, admin dashboard, policy control, and secure web application design. FileMakr can provide this project with source code, project report, documentation, and setup support for academic submission.

Technical snapshot

Project
AI-Based Cybersecurity System Final Year Project
Stack
PYTHON
Includes
Code, DB, README
License
Academic submission
Secure CCAvenue payment · Instant download · Need help? WhatsApp us

Admin Features

Modules and controls available to administrators

  • Secure administrator login in this final year project
  • Administrator role-based access
  • Admin dashboard
  • View system statistics
  • View risk category charts
  • View daily usage charts
  • Quick action shortcuts
  • Manage users
  • Search users
  • List all users
  • View user detail
  • Update user profile
  • Update user role
  • Update user status
  • Update prompt limits
  • Update feature access
  • Reset user password
  • Unlock user account
  • Delete user
  • Create new user accounts
  • Review user false-detection reports
  • Update report status
  • Add admin remarks
  • Manage blocked keywords
  • Add high-risk keywords
  • Toggle blocked keywords
  • Delete blocked keywords
  • Manage allowed keywords
  • Whitelist educational keywords
  • Manage prompt risk categories
  • Manage regex-based security rules
  • Add security rules
  • Toggle security rules
  • Delete security rules
  • Manage sensitive data patterns
  • Configure PII detection regex patterns
  • Manage masking rules
  • Configure mask tokens by data type
  • Manage risk score ranges
  • Define low, medium, high, and critical score ranges
  • Configure account blocking rules
  • Auto-block based on critical prompts
  • Auto-block based on failed logins
  • Monitor all prompts
  • Review latest 200 prompts
  • Open prompt detail modals
  • Monitor blocked prompts
  • Filter blocked prompts by user
  • Monitor sensitive data incidents
  • View detected and masked sensitive data logs
  • Manage approval requests
  • Approve pending prompt requests
  • Reject pending prompt requests
  • Update approval status
  • View usage logs
  • Track OpenAI API calls
  • Track token usage
  • Track request duration
  • Track API errors
  • View security logs
  • Track block events
  • Track injection attempts
  • Track account actions
  • View login history
  • Track login/logout sessions
  • Track failed login attempts
  • Track IP addresses
  • View audit trail
  • Track admin actions
  • Track user updates
  • Track approvals
  • Track backups
  • Manage OpenAI settings
  • Configure model
  • Configure token limit
  • Configure temperature
  • Configure system instruction
  • Toggle API usage
  • Manage safe templates
  • Create pre-approved prompt templates
  • Manage warning messages
  • Customize block, warn, and mask messages
  • Manage branding
  • Configure app name
  • Configure tagline
  • Configure titles
  • Configure footer
  • Configure support email
  • Manage system settings
  • Enable or disable maintenance mode
  • Enable or disable registration
  • Configure limits
  • Configure session timeout
  • Run database backup
  • Export daily prompts
  • Export blocked prompts
  • Export user activity
  • Export API usage reports in CSV/Excel

The admin panel includes users, security engine, monitoring, logs, configuration, reports, exports, and backup modules

User Features

What end users can do in this application

  • User registration in this final year project
  • User login
  • Password reset
  • User logout
  • Secure AI chat
  • Submit prompts safely
  • View security analysis result
  • View risk badges
  • Receive AI response after safety checks
  • Use safe prompt templates
  • Request approval for blocked prompts
  • Dashboard with daily prompt limit
  • Dashboard with usage stats
  • View recent chats
  • Quick action shortcuts
  • Profile management
  • Update name
  • Update department
  • Update course
  • Update contact details
  • Change password
  • Chat history
  • View all past prompts
  • Open prompt detail modal
  • Delete single history entry
  • Clear complete chat history
  • Blocked prompts page
  • View read-only list of blocked prompts
  • Approval tracking
  • View pending approval requests
  • View approved requests
  • View rejected requests
  • Usage statistics
  • View personal API usage
  • View token counts
  • View prompt statistics
  • Report incorrect detection
  • Report false-positive blocks
  • View submitted reports
  • View admin responses

The user panel includes dashboard, secure AI chat, profile, chat history, blocked prompts, approvals, usage stats, and report issue modules

Other Features

Additional capabilities included in the project

Security Engine Features in this final year project

  • GPT-powered AI security analyzer
  • JSON risk analysis
  • Risk score generation
  • Risk level classification
  • Recommended action: allow, warn, mask, or block
  • Blocking reason generation
  • Rule-based fallback engine
  • Regex security rules
  • Blocked keyword detection
  • Allowed keyword handling
  • Sensitive data detection
  • Email detection
  • Phone number detection
  • Aadhaar detection
  • PAN detection
  • Credit card detection
  • API key detection
  • Password detection
  • Automatic sensitive value masking
  • Prompt injection detection
  • Jailbreak pattern detection
  • Instruction override detection
  • Command execution pattern detection
  • Account blocking rules
  • Auto-block after critical prompts
  • Auto-block after blocked prompt threshold

The security engine includes AI analysis, rule-based fallback, sensitive data detection, automatic masking, prompt injection detection, and account blocking rules.


Security Workflow in this final year project


 

User submits prompt

Sensitive data scan

Mask emails, phones, API keys, passwords, etc.

AI Security Analyzer + Rule Engine

Risk score, level, and action generated

If unsafe: block prompt and save reason

If safe/warn/mask: send safe prompt to OpenAI

AI response generated and logged

Security analysis uses gpt-4o-mini for fast JSON scoring, while user responses use gpt-4o, configurable from Admin → OpenAI Settings.


Other Features in this final year project

  • Flask web application
  • Multi-layer AI security engine
  • Safe and controlled AI usage
  • Prompt risk scanning before OpenAI request
  • Sensitive data masking before AI processing
  • Dangerous request blocking
  • Audit trail
  • Approval workflow
  • False-positive report workflow
  • Daily usage limits
  • Chat history
  • Admin incident review
  • CSV report export
  • Excel report export
  • Database backup
  • Branding configuration
  • OpenAI model configuration
  • System configuration
  • SQLite default database
  • PostgreSQL production support
  • Bootstrap-based responsive UI
  • Chart.js dashboard charts
  • Flask-WTF forms
  • CSRF protection
  • Flask-Login authentication
  • Werkzeug password hashing
  • Python dotenv environment configuration
  • Sample/dummy data seeding

The technology stack includes Python, Flask, Flask-Login, Werkzeug, Flask-SQLAlchemy, SQLite/PostgreSQL, Flask-WTF, OpenAI API, Bootstrap, Chart.js, Pandas, openpyxl, and python-dotenv.


Technology Used in this final year project

Layer Technology
Backend Python 3.10+, Flask 3.0
Authentication Flask-Login, Werkzeug password hashing
Database ORM Flask-SQLAlchemy
Database SQLite default, PostgreSQL production
Forms / CSRF Flask-WTF, WTForms
AI / LLM OpenAI API, gpt-4o, gpt-4o-mini
Frontend Bootstrap 5, Bootstrap Icons, Inter font
Charts Chart.js
Reports / Export Pandas, openpyxl
Configuration python-dotenv
Architecture Flask app factory, blueprints, services, templates

How to Run

Step-by-step setup on your laptop or PC

Step 1: Open project folder


 

cd "c:\Project\Python Source Code\AI-Based Cybersecurity System for Safe and Controlled AI Usage"


Step 2: Create virtual environment


 

python -m venv venv


Step 3: Activate virtual environment


 

.\venv\Scripts\Activate.ps1


Step 4: Install dependencies


 

pip install -r requirements.txt


Step 5: Configure environment file


 

copy .env.example .env

Edit .env and set required values.


Step 6: Run application


 

python run.py

Open in browser:

Page URL
Landing Page http://127.0.0.1:5000
User Panel http://127.0.0.1:5000/user/dashboard
Admin Panel http://127.0.0.1:5000/admin/dashboard

On first run, the database is automatically created and default configuration with sample data is seeded.


Environment Variables

Create .env in the project root:


 

FLASK_SECRET_KEY=your-random-secret-key

OPENAI_API_KEY=sk-...

DATABASE_URL=sqlite:///cybersecurity_ai.db

Variable Description
FLASK_SECRET_KEY Flask session signing key
OPENAI_API_KEY OpenAI API key
DATABASE_URL Database connection string

The uploaded documentation lists Flask secret key, OpenAI API key, and database URL as environment variables.

Login Credentials

Default demo accounts for testing after setup

Primary Seeded Accounts

Role Email Password
Administrator [email protected] admin123
Demo User [email protected] user123

Additional Demo Accounts

Role Email Password Notes
Normal User [email protected] user123 Active student with chat history
Normal User [email protected] user123 Active student
Normal User [email protected] user123 Blocked — test unlock flow
Restricted User [email protected] user123 Daily limit: 20
Security Reviewer [email protected] reviewer123 Reviewer role

License

Usage terms for academic and personal projects

Related Tags

Search terms and categories for this source code

AI-Based Cybersecurity System Final Year Project Source Code Final Year PYTHON Project Ready-to-Run Code With Database File Plagiarism-Free Faculty Approved AI-Based Cybersecurity System Secure AI Assistant project AI cybersecurity project safe AI usage system controlled AI chat project prompt injection detection project AI security engine sensitive data masking system Flask cybersecurity project OpenAI API project final year project major project minor project source code project report AI safety project secure chatbot project cybersecurity web application audit logging system admin panel cybersecurity project college project source code