Vishnu Kumar
Vishnu Kumar
F/ TL / 024
Rev.00 Date 20.03.2020
Page 1 of 54
PROJECT TITLE
By
BONAFIDE CERTIFICATE
This is to certify that this project report is the Bonafide work of MR. VISHNU KUMAR
K.G
(224011101648) , who carried out the project entitled “ Anomaly Detection in
Online Banking services” under our supervision from January 2025 to March 2025.
DECLARATION
I, VISHNU KUMAR K.G (224011101648) , hereby declare that the Project Report entitled
guidance of Ms. G. ANANDHI and is submitted in partial fulfilment of the requirements for the
DATE: _______________
PLACE: ______________
FORM NO. F/ TL / 024
Rev.00 Date 20.03.2020
Page 4 of 54
ACKNOWLEDGEMENT
I would like to express my heartfelt gratitude to our beloved Chancellor, Thiru A.C.
Shanmugam, our President, Er. A.C.S. Arunkumar, and our Secretary, Thiru A. Ravikumar
for providing me with the opportunity to pursue my degree in this esteemed institution. Their
I extend my sincere thanks to our Vice Chancellor, Dr. S. Geethalakshmi, for her
encouragement and guidance whenever needed. Her support has been invaluable in my
A special note of appreciation goes to our Head of the Department, Dr. Viji Vinod, for her
insightful advice and motivation throughout my academic tenure. Her encouragement has
I am deeply grateful to our Project Coordinator, Dr. V. Sarala Devi (Assistant HOD), and our
Project Guide, Ms. G. Anandhi (Assistant Professor), for their remarkable guidance,
patience, and constant support. Their expertise and dedication have played a crucial role in
I would also like to thank all my professors and faculty members for their dedication and
My heartfelt appreciation goes to my family for their unwavering support, love, and
and classmates, whose companionship and collaboration have made my academic journey
Finally, I express my deep gratitude to everyone who has been a part of my learning
experience. This achievement would not have been possible without their guidance and
support.
FORM NO. F/ TL / 024
Rev.00 Date 20.03.2020
Page 6 of 54
TABLE OF CONTENTS
2 Literature Review
4 System Architecture
5 Technology Used
FORM NO. F/ TL / 024
Rev.00 Date 20.03.2020
Page 7 of 54
6 Implementation
8 Future Enhancements
11 Conclusion
12 References
ABSTRACT
In today's digital era, online banking has become an essential service for users
worldwide. However, with the rise in digital transactions, fraud and cyber-attacks have
FORM NO. F/ TL / 024
Rev.00 Date 20.03.2020
Page 9 of 54
monitoring.
The system captures intruder images using OpenCV when an unauthorized user
enters incorrect credentials three times. The system also integrates CAPTCHA
automated email alert is sent to the user and the admin, providing location details of
The backend of the project is developed using Python Flask, and the database used is
SQLite. The project enhances security in online banking transactions and helps
CHAPTER 1: INTRODUCTION
system enables users to access their accounts, transfer funds, pay bills, and manage finances
anytime and anywhere. Banks offer online banking services through web applications and
mobile banking apps, providing convenience and efficiency.
Anomaly detection algorithms use machine learning, statistical models, and rule-based
approaches to detect and prevent fraudulent transactions.
The Anomaly Detection in Online Banking System aims to enhance the security of digital
transactions by detecting fraudulent activities and unauthorized access attempts. The primary
objectives of the project include:
o Prevent Unauthorized Access: Implementing CAPTCHA-based authentication and
monitoring failed login attempts.
Intruder Detection: Capturing intruder images and sending security alerts via email.
Fraudulent Transaction Detection: Identifying unusual transaction patterns, such as
large transfers or repeated withdrawals.
Automated Account Security Measures: Locking accounts temporarily after multiple
failed login attempts.
User-Friendly Interface: Providing a simple yet secure banking experience for
customers.
o By implementing these objectives, the system ensures that banks and customers are
protected from cyber fraud.
This project is designed to provide a real-time fraud detection system for online banking
applications. It focuses on detecting fraudulent transactions and unauthorized access
attempts using automated security mechanisms.
Key Features and Scope:
User Authentication: Secure login system with CAPTCHA verification.
Intruder Detection System: Captures images of unauthorized users after three failed
login attempts.
Fraud Detection System: Monitors and flags suspicious transactions based on
predefined rules.
FORM NO. F/ TL / 024
Rev.00 Date 20.03.2020
Page 12 of 54
Email Alerts: Sends security notifications to the admin in case of suspicious activities.
Admin Controls: Allows freezing or unfreezing user accounts based on fraud analysis.
This system focuses on anomaly detection without using AI or deep learning models
(future enhancement).
The system currently relies on rule-based fraud detection rather than real-time machine
learning predictions.
Only basic security measures like CAPTCHA and email alerts are included; advanced
cybersecurity techniques can be added in later versions.
The Anomaly Detection in Online Banking System aims to enhance digital banking security by
integrating fraud detection and anomaly detection methods. It is designed to be scalable,
efficient, and user-friendly for financial institutions to implement.
FORM NO. F/ TL / 024
Rev.00 Date 20.03.2020
Page 13 of 54
Studies show that over $40 billion is lost annually due to banking fraud. Banks face risks from
Machine learning models are increasingly used in banking fraud detection, utilizing transaction
Intruder detection using OpenCV and image processing helps recognize unauthorized access
Threat Description
Brute Force
Repeated attempts to guess passwords.
Attacks
fraud patterns.
attacks.
system.
o Prevents automated bot attacks and ensures that only human users
owner/admin.
o The system monitors all transactions and flags suspicious activities, such as:
is detected.
unauthorized withdrawals.
AI-powered anomaly
Fraud Detection Rule-based, static
detection
FORM NO. F/ TL / 024
Rev.00 Date 20.03.2020
Page 17 of 54
Immediate email
User Notifications Delayed alerts
notifications
Conclusion
system will provide users with better protection against cyber threats and
transactions.
FORM NO. F/ TL / 024
Rev.00 Date 20.03.2020
Page 18 of 54
CHAPTER 4
attempts.
DFD Level 1 – Breaks down data flow for authentication and fraud detection.
FORM NO. F/ TL / 024
Rev.00 Date 20.03.2020
Page 20 of 54
FORM NO. F/ TL / 024
Rev.00 Date 20.03.2020
Page 21 of 54
Displays how user data, transaction history, and fraud detection logs are stored.
This chapter delves into the technologies employed in the development of the system,
Each component plays a critical role in ensuring the system is functional, secure, and
user-friendly.
The system is built using a combination of programming languages and frameworks, each
chosen for its specific strengths in handling different aspects of the application.
automation.
build the backend of the application. It provides the necessary tools to handle
routing, request processing, and server-side logic. Flask is chosen for its
and business logic. Flask's modular design allows developers to add extensions
making it easy to set up and use without requiring a separate database server.
o SQLite is ideal for small-scale applications or prototypes due to its simplicity and
o In this system, SQLite is used to store user information, transaction records, and
other critical data. Its file-based architecture makes it portable and easy to
manage.
o HTML (HyperText Markup Language) is used to structure the content of the web
pages. It defines the layout and elements of the user interface, such as forms,
o CSS (Cascading Style Sheets) is used to style the HTML elements, ensuring the
colors, fonts, and spacing, providing a consistent look and feel across the
application.
Security is a top priority in the system, and several measures are implemented to
verify their identity using two different methods. Typically, this involves
something the user knows (e.g., a password) and something the user has (e.g.,
Humans Apart) is used to prevent automated bots from attempting to log in.
image or solving a puzzle) that is easy for humans but difficult for bots.
o This combination of 2FA and CAPTCHA ensures that only legitimate users can
logins.
o OpenCV (Open Source Computer Vision Library) is a powerful tool for real-time
image and video processing. In this system, OpenCV is used to capture images
o When a user exceeds the allowed number of login attempts, the system triggers
OpenCV to activate a camera (if available) and record the intruder's face or
surroundings. This footage is stored securely and can be used for further
investigation or evidence.
o This feature acts as a deterrent against malicious actors and provides a way to
Here is the database schema formatted as a table for easy copy-pasting into Word:
Table: Users
Purpose: This table stores essential user information, including identification and
financial data. It is central to the system’s functionality, enabling balance checks and
transactions.
FORM NO. F/ TL / 024
Rev.00 Date 20.03.2020
Page 28 of 54
Table: Transactions
ENUM(‘Deposit’, ‘Withdrawal’,
Type Type of transaction performed.
‘Transfer’)
Purpose: This table records all financial transactions performed by users. It serves as a
CHAPTER 6: IMPLEMENTATION
In this chapter, we will discuss the implementation of key security mechanisms in the Anomaly
Detection in Online Banking system. These modules play a crucial role in ensuring account
The User Authentication Module ensures that only authorized users can access the banking
o Users are required to enter their registered card number and password to log in.
o The system verifies credentials against the database before granting access.
2. CAPTCHA Integration:
o This security feature ensures that bots cannot repeatedly attempt to guess
passwords.
o After multiple failed login attempts, the system temporarily blocks the account to
The Intruder Detection System (IDS) is designed to detect and respond to unauthorized login
o If the device has a webcam, the system captures a photo of the person
holder.
o The email contains the date, time, IP address, and (if available) the captured
account.
o The user must verify their identity via email or contact customer support to
regain access.
These security measures ensure that unauthorized access attempts are immediately flagged
and prevented.
Conclusion:
strengthens the security of online banking systems. These modules work together to prevent
unauthorized access, detect fraudulent activities, and ensure that users’ financial transactions
remain secure.
FORM NO. F/ TL / 024
Rev.00 Date 20.03.2020
Page 31 of 54
Testing and validation are critical components of software development, ensuring that the
describes various test cases executed to validate system performance, security, and
reliability. The system was tested under multiple conditions to evaluate its efficiency in
The system was tested using the Black Box Testing approach, where functional outputs
were examined without analyzing internal code structure. Various test cases were designed to
verify:
Login Authentication – Ensuring only valid users can access the system.
Performance Testing – Evaluating system responsiveness and handling under high loads.
The testing process was divided into Unit Testing, Integration Testing, and System
Testing.
FORM NO. F/ TL / 024
Rev.00 Date 20.03.2020
Page 32 of 54
The following test cases were executed to validate different modules of the system:
Password Reset
Forgot Password request OTP sent to registered email ✅ Passed
Test
Security limit)
Unauthorized access
Database Security Access Denied ✅ Passed
attempt
Account Lockout
Multiple failed logins Account temporarily blocked ✅ Passed
Test
Each test case was executed under real-world scenarios, ensuring the system is robust
To test the Intruder Detection System, the following tests were conducted:
o The system captured an image of the user using the device webcam.
o An email alert was sent to the registered user with details of the failed attempts.
The Fraud Detection Module was tested using simulated transactions to check if the system
o The system flagged the transaction and sent a fraud alert to the user.
o The transaction was put on hold until the user confirmed the request.
verification.
To ensure scalability and efficiency, the system was tested under high transaction loads.
Results: The system performed efficiently under heavy loads, with no crashes.
7.6 Conclusion
The Testing & Validation phase ensured that the Anomaly Detection in Online Banking
System performs securely and efficiently. The system successfully passed various
security, the system effectively prevents unauthorized access and fraudulent transactions.
FORM NO. F/ TL / 024
Rev.00 Date 20.03.2020
Page 36 of 54
The Anomaly Detection in Online Banking System has been developed to improve security
and prevent fraudulent transactions. However, as cyber threats continue to evolve, the system
must incorporate advanced security measures to stay ahead of fraudsters. The following
future enhancements will further strengthen fraud detection, transaction security, and user
verification.
Overview
Currently, the system detects fraudulent transactions using predefined rules, such as flagging
large transactions or multiple transfers to unknown accounts. However, fraud techniques are
constantly evolving. By integrating Machine Learning (ML), the system can identify
anomalies more accurately and adapt to new fraud patterns over time.
How It Works?
Machine learning models will analyze transaction behaviors and detect deviations from
normal patterns.
The system will continuously learn and improve, minimizing false alerts while ensuring
maximum security.
FORM NO. F/ TL / 024
Rev.00 Date 20.03.2020
Page 37 of 54
Benefits
Overview
How It Works?
Each transaction is stored in an encrypted block and linked to the previous one,
Transactions are validated across multiple nodes, making hacking attempts extremely
difficult.
ensuring integrity.
Benefits
Improved transparency ensures secure auditing for financial regulators and users
Implementation Plan
FORM NO. F/ TL / 024
Rev.00 Date 20.03.2020
Page 38 of 54
Overview
Currently, the system relies on standard username and password authentication, which is
How It Works?
Instead of relying only on passwords, users must verify their identity using multiple
authentication factors.
The system will send a one-time password (OTP) to the user’s registered phone
attempts.
FORM NO. F/ TL / 024
Rev.00 Date 20.03.2020
Page 39 of 54
Benefits
authentication factor
Stronger security against phishing, making it difficult for hackers to bypass login
verification
User-friendly security measure that does not require additional hardware or complex
installations
Implementation Plan
Conclusion:
will significantly enhance the Anomaly Detection in Online Banking System by improving
fraud detection, transaction security, and user authentication. These future enhancements
will ensure that the system remains resilient against evolving cyber threats, providing a secure
PROGRAMM:
if request.method == "POST":
card_number = request.form.get("card_number")
pin = request.form.get("pin")
user_captcha = request.form.get("captcha")
correct_captcha = session.get("captcha_answer")
if user_captcha.strip() != correct_captcha.strip():
flash("Incorrect CAPTCHA! Try again.")
return redirect(url_for("login"))
FORM NO. F/ TL / 024
Rev.00 Date 20.03.2020
Page 41 of 54
if user:
session['logged_in'] = True
session['user_id'] = user[0]
session['card_number'] = user[1]
session['user_name'] = user[2]
session['account_number'] = user[3]
session['balance'] = user[4]
session.pop("captcha_question", None)
session.pop("captcha_answer", None)
if failed_attempts[card_number] >= 3:
send_email()
flash("Too many failed attempts! Security alert sent.")
return redirect(url_for("failure"))
Captures intruder’s image and sends an email alert if login fails three times.
PROGRAMM:
def capture_image():
cam = cv2.VideoCapture(0)
ret, frame = cam.read()
if ret:
image_path = "intruder.jpg"
cv2.imwrite(image_path, frame) # Save the captured image
cam.release()
return image_path
return None
def send_email():
global EMAIL_SENDER, EMAIL_PASSWORD, ADMIN_EMAIL
msg = MIMEMultipart()
msg["From"] = EMAIL_SENDER
msg["To"] = ADMIN_EMAIL
msg["Subject"] = "Unauthorized ATM Access Detected"
encoders.encode_base64(part)
part.add_header("Content-Disposition", f"attachment; filename={image_path}")
msg.attach(part)
3. Logout Functionality
PROGRAMM:
@app.route("/logout")
def logout():
session.clear()
flash("You have been logged out!", "info")
return redirect(url_for("login"))
FORM NO. F/ TL / 024
Rev.00 Date 20.03.2020
Page 44 of 54
The cost and infrastructure required for implementing the anomaly detection system depend
Hardware Requirements
Server: A dedicated or cloud-based server for hosting the banking application and
database.
Storage: Adequate storage space for maintaining user data, transaction logs, and
security alerts.
transmissions.
CCTV & Camera Setup (Optional): For capturing intruder images during unauthorized
login attempts.
Software Requirements
Database Management System: SQLite or MySQL for storing user details and
transaction logs.
frameworks.
Initial Setup Cost: One-time cost for infrastructure setup, including hardware and
software installation.
Cloud Service Cost: If deployed on cloud servers (e.g., AWS, Azure, or Google
1. Install Python:
(https://www.python.org/).
o Run the database script to create the required tables (users, transactions).
python app.py
1. Login Process:
o Open the login page and enter your card number and PIN.
2. Perform Transactions:
o The system will update your balance and record the transaction.
4. Security Features:
o If multiple incorrect login attempts occur, the system captures an image and
1. Admin Login:
FORM NO. F/ TL / 024
Rev.00 Date 20.03.2020
Page 47 of 54
2. Freeze an Account:
further transactions.
3. Unfreeze an Account:
o The admin can review flagged accounts and unfreeze them upon verification.
Account locked after Security system Wait for the cooling period or contact
Email alerts not received SMTP server Verify email settings and check spam
FORM NO. F/ TL / 024
Rev.00 Date 20.03.2020
Page 48 of 54
misconfiguration folder.
The Anomaly Detection in Online Banking System was developed with the primary goal of
unauthorized access. The project successfully integrates multiple security layers, including
accounts.
1. Secure User Authentication – Ensures only authorized users can access accounts by
2. Intruder Detection System – Captures images of intruders after multiple failed login
5. Real-Time Transaction Monitoring – Tracks all banking transactions and stores them
This system effectively minimizes banking fraud risks by combining data-driven anomaly
The Anomaly Detection in Online Banking System has practical applications in various
financial domains:
Online Banking Security: Helps banks monitor and secure digital transactions,
withdrawals.
unauthorized transactions.
By implementing this system, financial institutions can build customer trust, reduce fraud-
While the project has successfully addressed several security concerns, there are some
limitations:
3. User Privacy Concerns: Capturing intruder images may raise privacy concerns if not
To overcome these limitations, future versions of the system can integrate AI-powered fraud
learning models to analyze user behavior and detect sophisticated fraud patterns.
Mobile App Integration: Extending security features to mobile banking applications for
The Anomaly Detection in Online Banking System has proven to be an effective solution
detection, and automated alerts makes this system a valuable asset for financial
institutions.
By continuously updating the system with new security technologies, banks and users can
implementation techniques used in the project. This chapter provides a list of academic
papers, books, and credible online sources that have contributed to the development of the
This research paper published in the IEEE (Institute of Electrical and Electronics Engineers)
journal discusses various techniques used for fraud detection in online banking. Some of the
transactions.
FORM NO. F/ TL / 024
Rev.00 Date 20.03.2020
Page 52 of 54
authentication methods.
This paper is significant because it provides insight into advanced fraud detection techniques
that help financial institutions minimize risks and prevent cyber threats. Many of these
techniques have inspired the fraud detection mechanism implemented in this project,
This study, presented at the International Banking Conference, highlights the growing
attempts.
fraudulent patterns.
This reference supports the need for implementing multi-layered security measures in online
banking applications. Many of the cybersecurity principles discussed in this study have been
adopted in this project, including CAPTCHA verification, email alerts for unauthorized access,
Below are some additional references that contribute to understanding fraud detection,
authentication.
Conclusion:
FORM NO. F/ TL / 024
Rev.00 Date 20.03.2020
Page 54 of 54
This chapter highlights the importance of academic research, industry studies, and
applications. The references used in this project ensure that the system is aligned with the
latest trends in fraud detection and cybersecurity, making it a reliable and secure solution for