0% found this document useful (0 votes)
9 views47 pages

Final Report

Uploaded by

Joel Lalu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views47 pages

Final Report

Uploaded by

Joel Lalu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 47

AN INTRUSION DETECTION SYSTEM

PROJECT REPORT

submited by:

JOEL LALU ADR22CS037


JOSHUA JAMES ADR22CS039
SHAMBHU S ADR22CS059
UBAID D A LADR22CS068

to

APJ Abdul Kalam Technological University


in partial fulfillment of the requirements for the award of Degree

of

Bachelor of Technology
in
Computer Science and Engineering

Under the guidance of

PROF. SANGEETHA A

Department of Computer Science and Engineering


College of Engineering Adoor
2024-2025
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
COLLEGE OF ENGINEERING, ADOOR

CERTIFICATE
This is to certify that the report entitled AN INTRUSION DETECTION SYSTEM sub-
mitted by JOEL LALU (ADR22CS037), JOSHUA JAMES (ADR22CS039), SHAMBHU
S(ADR22CS059), UBAID D A (LADR22CS068) to the APJ Abdul Kalam Technological
University in partial fulfillment of the requirements for the award of the Degree of Bachelor
of Technology in Computer Science and Engineering is a bonafide record of the project work
carried out by them under my guidance and supervision. This report in any form has not been
submitted to any other University or Institute for any purpose.

Countersigned by:

Prof. SANGEETHA A Prof. Honey M


Project Guide Project Coordinator

Dr VINOD P R
Head of Department External Examiner
DECLARATION
We undersigned hereby declare that the project report AN INTRUSION DETECTION
SYSTEM submitted for partial fulfillment of the requirements for the award of the degree of
Bachelor of Technology of the APJ Abdul Kalam Technological University, Kerala is a bonafide
work done by us under supervision of Prof SANGEETHA A. This submission represents our
ideas in our own words and where ideas or words of others have been included, we have ade-
quately and accurately cited and referenced the original sources. We also declare that we have
adhered to the ethics of academic honesty and integrity and have not misrepresented or fabri-
cated any data or idea or fact or source in my submission. We understand that any violation
of the above will be a cause for disciplinary action by the institute and/or the University and
can also evoke penal action from the sources which have thus not been properly cited or from
whom proper permission has not been obtained. This report has not been previously formed as
the basis for the award of any degree, diploma, or similar title of any other University.

Place: Manakala, Adoor JOEL LALU


Date: 04/04/2025 JOSHUA JAMES
SHAMBHU S
UBAID D A
Contents

ACKNOWLEDGEMENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . i
ABSTRACT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii
LIST OF FIGURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii
ABBREVIATIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv

1 INTRODUCTION 1
1.1 MOTIVATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 PROBLEM DESCRIPTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 SCOPE OF PROPOSED SYSTEM . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.4 OBJECTIVES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.5 PROJECT SCHEDULE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 LITERATURE REVIEW 5
2.1 LITERATURE SURVEY OVERVIEW . . . . . . . . . . . . . . . . . . . . . . . . 9

3 SYSTEM DESIGN 11
3.1 DATA FLOW DIAGRAM LEVEL 0 . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 DATA FLOW DIAGRAM LEVEL 1 . . . . . . . . . . . . . . . . . . . . . . . . . 11

4 SYSTEM ARCHITECTURE 15
4.1 ARCHITECTURAL DIAGRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

5 DESIGN 19

6 REQUIREMENT ANALYSIS 22
6.1 SOFTWARE REQUIREMENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
6.2 HARDWARE REQUIREMENTS . . . . . . . . . . . . . . . . . . . . . . . . . . 23

7 METHODOLOGY 24

8 IMPLEMENTATION 25

9 RESULTS AND DISCUSSIONS 34


9.1 Terminal Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
9.2 Login Page Of IDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
9.3 Dashboard Of a IDS System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
9.4 Results of IDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

10 CONCLUSION 38

References 39
ACKNOWLEDGEMENT

We extend our profound gratitude to God almighty for His blessings. Our heartfelt thanks
to Dr. K Sunilkumar, Principal, College of Engineering, Adoor, and Dr. Vinod P R , Head of
Department, for their exceptional support throughout our journey. We reserve special appreci-
ation for Prof. Sangeetha A whose mentorship has been invaluable. Our gratitude extends to
the dedicated faculty, supportive friends, and loving family members who stood by us. We also
acknowledge the invaluable contributions of researchers in Intrusion Detection System. Lastly,
we express our sincere thanks to everyone involved; your unwavering support has been the cor-
nerstone of our success. We earnestly hope that our endeavors in Intrusion Detection System
will contribute positively to the betterment of society.

With heartfelt thanks,


JOEL LALU
JOSHUA JAMES
SHAMBHU S
UBAID D A

i
ABSTRACT

An Intrusion Detection System (IDS) is a type of security system that monitors highly re-
stricted areas and alerts system administrators or security personnel when it detects suspicious
or unauthorized activity.Security systems often depend on human operators to monitor live
video feeds, which is prone to human errors.Traditional security cameras could only record
video but lacked real-time analysis or automated alerting capabilities.Older systems lacked ad-
vanced alerting mechanisms to immediately notify authorities or owners. These are some of
the problems of existing security systems.Security in restricted areas is essential for protecting
valuable assets, sensitive information, ensuring the safety of personnel from intruders.. Authen-
tication of the entered person can be done by face identification, through which a smart security
system can be developed. Creating and implementing a face recognition-based surveillance
system is the goal of this project. Real time Intrusion detection system provides surveillance for
restricted and confidential areas with help of face recognition and detection, when an intruder
or unauthorized person enters the restricted areas.

ii
LIST OF FIGURES

SL NO: FIGURE NAME PAGE NO:

2.1 LITERATURE SURVEY OVERVIEW 9-10

3.1 DFD: LEVEL 0 13

3.2 DFD: LEVEL 1 14

4.1 ARCHITECTURAL DIAGRAM: 17

4.2 VISUAL REPRESENTATION OF IDS 18

5.1 DESIGN MODULES DIAGRAM 21

5.2 USE CASE DIAGRAM 21

9.1 TERMINAL OUTPUT 34

9.2 LOGIN PAGE OF IDS 35

9.3 IDS DASHBOARD DISPLAYING DETEC- 36


TION EVENT

iii
ABBREVIATIONS

SL NO: ABBREVIATIONS EXPANSION

1 IDS Intrusion Detection System

2 OpenCV Open Source Computer Vision Li-


brary

3 SMTP Simple Mail Transfer Protocol

4 MLP Multi-layer perceptron

5 LR Logistic Regression

iv
Chapter 1

INTRODUCTION

An Intrusion Detection System (IDS) is a security solution designed to monitor highly restricted
areas and identify unauthorized or suspicious activity. It plays a crucial role in enhancing
surveillance by automatically detecting the presence of intruders and immediately notifying
system administrators or security personnel.

This system operates in real-time by analyzing camera feeds and detecting unauthorized indi-
viduals within a specified time frame. Upon detection, it triggers an alert, captures a snapshot
of the intruder, and sends it to the admin for further action.Administrators can securely log in to
a dedicated web application to view detailed reports, respond to alerts, and review the history
of all intrusion attempts.

This combination of automation and user control ensures efficient,timely,and accurate intru-
sion monitoring.This advanced system continuously monitors the protected zone, vigilantly
detecting any suspicious or unauthorized activity. Upon identifying an intruder,the IDS swiftly
triggers an alert, notifying system administrators or security personnel of the potential threat.

The IDS takes proactive measures to address the security breach, capturing a snapshot of the
unauthorized individual and sending it to the administrator for further action. This enables
the admin to visually verify the identity of the intruder and assess the severity of the situation.
Furthermore, the system prompts the administrator to decide on the course of action to be taken,
ensuring a swift and effective response to the security threat.

To provide a comprehensive security solution, the IDS is integrated with a web application that
allows administrators to access detailed reports and histories of previous intrusion attempts.
By logging into the web application, admins can review incident reports, analyze secu-
rity trends, and refine their response strategies to enhance the overall security posture of the
protected area. This centralized platform enables administrators to stay informed, respond
promptly, and maintain a secure environment.

1.1 MOTIVATION
In current fast growing world,We are in need to work with Different Application and Technolo-
gies. To ensure the Security of the Application we use and to overcome from Threats , Attacks
malicious activity that occurs in a network or a system, An Intrusion detection system is de-
signed and used.Intrusion Detection is software or a device that scans a system or a network for
a distrustful activity.intrusion detection becomes vital to perform network security using various

1
AN INTRUSION DETECTION SYSTEM 2

machine learning techniques to build different types of Intrusion Detection Systems to protect
the networks. Performance of an Intrusion Detection is mainly depends on accuracy level.. Ma-
chine learning techniques like Support Vector Machine (SVM) , Logistic Regression , Random
Forest , Random Projection and Decision Tree Algorithm are applied. These techniques are
well-known to solve the classification problems. For evaluation of intrusion detection system,
CSL- KDD knowledge discovery Dataset is taken. The outcomes show the best accuracy level.

1.2 PROBLEM DESCRIPTION


Traditional security systems are plagued by inherent limitations, including reliance on human
operators to monitor live video feeds, which is susceptible to errors due to fatigue, distraction,
or inadequate training. Furthermore, conventional security cameras are restricted to merely
recording video, lacking the capability for real-time analysis or automated alerting, which ham-
pers prompt response to potential threats. Additionally, older systems are often devoid of ad-
vanced alerting mechanisms, failing to immediately notify authorities or owners of suspicious
activities, thereby delaying intervention and potentially exacerbating security breaches As we
see now a days intrusion detection system is an common thing even for small website. But what
makes a concern is with which machine learning algorithm you are using it. In market there
are various intrusion detection systems using single machine learning algorithm or two machine
learning algorithms. If the website attributes doesn’t match with a particular machine learning
algorithm it won’t show the correct accuracy whether the intrusion is done in the website or not
. It showcase the issue they came up with the intrusion recommendation system using five dif-
ferent algorithms it will be helpful for the owner of the website to know with which algorithm
used intrusion detection system used to the website we can get the correct results..

1.3 SCOPE OF PROPOSED SYSTEM


The scope of the Intrusion Detection System (IDS) encompasses the monitoring and detection of
unauthorized access attempts in highly restricted areas. This includes the ability to identify and
alert administrators to suspicious or anomalous activity, such as the presence of an unauthorized
person within a specific time interval. The system’s scope also includes the triggering of alerts
and messages to administrators, accompanied by visual evidence in the form of snapshots.The
scope of the IDS further extends to the provision of a web-based platform for administrators
to access reports and historical data on previous intrusion attempts. This enables administra-
tors to track patterns and trends in unauthorized activity, facilitating informed decision-making
and the development of more effective security strategies. The system’s scope also includes
the ability for administrators to login and access the system remotely, ensuring timely response
to security incidents.The overall scope of the IDS is to provide a comprehensive security so-
lution for highly restricted areas, leveraging advanced monitoring and detection capabilities to
identify and respond to unauthorized access attempts. By providing visual evidence, alerts, and
historical data, the system supports proactive security measures, minimizes the risk of security
breaches, and enhances overall security posture

Dept of CSE, College of Engineering Adoor


AN INTRUSION DETECTION SYSTEM 3

1.4 OBJECTIVES
The objective of the Intrusion Detection System (IDS) is to provide real-time security mon-
itoring and alerting capabilities to detect and respond to unauthorized access attempts. This
enables prompt identification and notification of potential security breaches, allowing admin-
istrators to take swift action to prevent or mitigate damage.Another key objective of the IDS
is to provide visual evidence of unauthorized activity through snapshots of the intruder. This
visual evidence can be instrumental in identifying the perpetrator and taking subsequent action.
Furthermore, the system’s ability to trigger messages and alerts ensures that administrators are
notified promptly, enabling them to respond quickly and effectively.The IDS also aims to pro-
vide a comprehensive record of all intrusion attempts, allowing administrators to access reports
and historical data through a web-based platform. This enables informed decision-making,
facilitates the identification of patterns or trends in unauthorized activity, and supports the de-
velopment of more effective security strategies.

Dept of CSE, College of Engineering Adoor


AN INTRUSION DETECTION SYSTEM 4

1.5 PROJECT SCHEDULE

Sl.no ACTIVITY 2023-2024


DEC JAN FEB MAR APR
1 LITERATURE REVIEW X X
2 FEASIBILITY STUDY X
3 SYSTEM DESIGN X
4 IMPLEMENTATION X X
5 TESTING X
6 PROJECT REPORT X

Table 1.1: Project Schedule

Dept of CSE, College of Engineering Adoor


Chapter 2

LITERATURE REVIEW

1. ADVANCED SURVEILLANCE SYSTEM USING OPENCV

by Guruprasad.U , Bhavani M

It detects motion and capture image, sends out e-mail notification attached together with the
image file via SMTP server as alert, making it a real-time system. Further the admin can react
to any situation immediately, where as in other systems he will just know about the the heft
happening but could not react to it.By using this surveillance system, we can reduce the video
storage system for a huge extent since it will store the video only if it detects any motion and
also it reduces the cost of the entire system. It does not need any manpower to monitor the
entire video continuously and hence it also reduces the man power required for surveillance
system. It detects motion and capture image, sends out e-mail notification attached together
with the image file via SMTP server as alert, making it a real-time system. Further the admin
can react to any situation immediately, where as in other systems he will just know about the
theft happening but could not react to it.

2. INTRUSION DETECTION SYSTEM:ANOMALY DETECTION USING OUTILER


DETECTION APPROACH

by Jabez , Dr. b.Muthukumar

In this Paper have presented the details of a new approach called outlier detection approach
to detect the approach to detect the instruction in the computer network.Our training model
consists of big datasets with distributed environment that improves the performance of Intrusion
detection system. The proposed approach is also been tested with the KDD datasets that are
received from real world. The machine learning approaches detect the intrusion in the computer
network with huge execution time and storage to predict the when compared to the proposed
IDS system which takes less execution time and storage to test the dataset .Here in this study, the
performance of proposed IDS is better than that of other existing machine learning approaches
and can significantly detect almost all anomaly data in the computer network. In future, the
proposed work can be possibly used for various distance computation function between the
trained model and testing data. Our research work can be considered to improve the efficiency
of IDS in a better manner.

5
AN INTRUSION DETECTION SYSTEM 6

3. A STUDY OF NETWORK INSTRUCTION DETECTION SYSTEM USING


ARTIFICIAL INTELLIGENCE/MACHINE LEARNING

by Patrick Vanin, Laban Laxmi Dhirani, John O’Connell, Donna O’Shea, Brian Lee

This paper provides a thorough study of Intrusion Detection Systems and how they could be
improved using machine learning.Firstly, the concept of Intrusion Detection Systems was pre-
sented. There are three main types of IDS: Network Intrusion Detection System, Host Intrusion
Detection System,and a Hybrid Intrusion Detection System. In addition, each type of IDS can
either detect attacks by using a recorded signature or by comparing the behavior of the net-
work with a baseline of the normal traffic or both. Then, the different metrics used to assess
Intrusion Detection System by various researchers are presented. The most important met-
rics are the Accuracy, the Detection Rate (Recall) and the F-Measure. A general overview of
what is machine learning, and a global taxonomy is also discussed. There are three types of
machine learning techniques: Supervised, Semi-supervised and Unsupervised. Most of the ma-
chine learning techniques studied fall into one of these categories. A comprehen-sive review
of recently published papers using machine learning for IDS was also dis-cussed. Based on
this study, the recent trends show that deep learning methods are more and more used to detect
attacks. However, this increases the complexity of the models which requires more computing
resources. In addition, it was shown that more and more solutions are using feature extraction
with Auto-Encoder as one of the techniques used.

4. ANALYSIS OF INTRUSION DETECTION SYSTEMS:TECHNIQUES,DATASETS


AND RESEARCH OPPORTUNITY

by Chaitrali T.Dhumal, Dr.s.v.pingale

This paper attempts to undergo comprehensive review on existing Intrusion Detection Systems
(IDS) and datasets. Different recent techniques such as data mining, machine learning and deep
learning are reviewed.In addition to this,the proposed work presents a comprehensive approach
in the field of cyber security and machine learning by using CNN algorithm and CSE-CIC-
IDS2018 dataset. The intended work shall include the calculation the different performance
matrix such as precision, recall, f1score and accuracy.

5. INTRUCTION DETECTION SYSTEM IN PYTHON

by Mrinal Wahal,Dr.Tanupriya Chodhury, Manik Arora

This paper critically demonstrates process to develop a basic intrusion detection system in
Python using both external and inbuilt modules, hence, drawing one of the most fundamen-
tal paradigms to explain the working and design of intrusion detection.As explained, this self-
designed basic intrusion detection system is an appropriate example to understand the basics
of cyber intrusions and their concerned preventive measures. The principle property of the
designed system lies in its very operation at the most fundamental and institutional level of op-
eration. And therefore, this concept can be heretofore used as a building block for researches in
the similar field of interest/expertise, as evident by the provided case studies, for both Gamma
testing and Beta testing. For future, we expect to thoroughly design an advanced neural network
based artificially intelligent intrusion detection and prevention system.

Dept of CSE, College of Engineering Adoor


AN INTRUSION DETECTION SYSTEM 7

6. JOURNAL OF NETWORK AND COMPUTER APPLICATION

by Hung-Jen Liao, Chun-Hung Richard Lin, Ying- ChihLin

Here introduced an overview of detection methodologies, approaches and technologies for


IDSs. Each technique has its superiority and limitations, so that we should be cautious about
selecting the approaches. Take the pattern-based IDS for an instance, although it is simple
to implement and very effective to inspect known attacks, the approach could hardly identi-
fies unknow attacks, attacks concealed by evasion techniques and many variants of known at-
tacks.Moreover, heuristic-based approaches have the merit of no prior knowledge of attacks,
but do not work well in real-time applications because of the high computational complexity.
Therefore, having a comprehensive view of IDSs and application requirements is indispensable
before practical usages. In addition, we propose a more elaborate review on IDSs. Tables and
figures we summarized contribute to easily grasp the overall picture. Furthermore, we briefly
introduce two famous and open-source tools for studying IDSs

7. SURVEY OF INTRUCTION DETECTION SYSTEMS

by Ansam Khraisat,Iqbal Gondal, Peter Vamplew Joarder Kamruzzaman

This study also examines four common evasion techniques to determine their ability to evade
the recent IDSs. An effective IDS should be able to detect different kinds of attacks accurately
including intrusions that incorporate evasion techniques.In the Internet, the outside attackers
may be amateur pranksters or organized criminals or international terrorists or even hostile
governments. A computer network consists of two components namely hardware and soft-
ware. Both of these components may have their own risks and vulnerabilities. In this paper,
we have surveyed various types of Intrusion Detection Model in different cases. This paper
presented intrusion detection systems (IDS) in several areas. It consist of Web Application,
Cloud Environment, Internet of Things (IoT), Mobile Ad-Hoc Network (MANET), Wireless
Sensor Network (WSN) and Voice over Internet Protocol (VOIP). We have found that IDS is a
significant part in security system of the networks.

8. PERFORMANCE OF MACHINE LEARNING TECHNIQUES IN ANOMALY DE-


TECTION WIT BASIC FEATURE SELECTION STRATEGY

by Md Badiuzzaman Pranto,Md Badiuzzaman Pranto

An intrusion detection system is a software application or device that scans a network for abnor-
mal or malicious activities. Attackers can apply several different approaches when attempting
to infiltrate into a system. A sound intrusion detection system must understand the patterns
of different types of updated intrusions. While using machine learning techniques to detect
such skeptical approaches, the classifiers should be updated and trained with newly available
samples. The characteristic of an efficient IDS is to detect attacks accurately with a minimum
misclassification rate.This research work showed the experiments and results of different ap-
proaches to use intrusion data methodically for detecting intrusions using machine learning
techniques. The research goals mentioned in Section III-A have been achieved and answered
with the support of experimental results and discussions. However, we can deduce that this

Dept of CSE, College of Engineering Adoor


AN INTRUSION DETECTION SYSTEM 8

research’s methodology and analysis can be deployed in a network intrusion detection system
to get better detection performance. Cost-sensitive learning is a type of learning that consid-
ersisclassification costs. The goal of this kind of learning is to minimize the total cost. In the
future, research can beconducted to reduce the misclassification rate and increase the perfor-
mance more by applying cost-sensitive learning on this methodology.

9. AN UNSUPERVISED GENERATIVE ADVERSARIAL NETWORK BASED-HOST


INTRUSION DETECTION FOR IOT DEVICES

by Idriss Idrissi,Omar Moussaoui

The necessity for IoT security has been highlighted by series of high-profile cases in which a
common IoT device was used to access and attack a larger network. It is crucial for assuring
the security of networks that have IoT devices attached to them. IoT security encompasses a
wide range of tactics, strategies, protocols, and actions aimed at mitigating modern enterprises’
growing IoT risks. By exploiting the generative adversarial network (Skip-GANomaly), this
paper proposes a specific IDS, called “EdgeIDS”, for IoT devices. This proposed “EdgeIDS”
outperforms quantitatively state-of-the-art methods. The experimental results in this study shed
light on the suggested method’s capacity to detect anomalies traffic thus attacks in an IoT en-
vironment. Because most IoT devices have limited capabilities, the proposed “EdgeIDS” will
be compelled to analyze only the network’s inbound data in real-time. In addition, another net-
work IDS “DL-NIDS” must be deployed on the fog node to strengthen security on a device with
higher processing power, ideally coupled to a lightweight hardware accelerator.

10. EVALUATING PERFORMANCE OF SUPERVISED LEARNING TECHNIQUES


FOR DEVELOPING.REAL-TIME INTRUSION DETECTION SYSTEM

by Shadi Abudulla,Ekhlas S

In this work, we designed and implemented a Network Intrusion Detection System (NIDS) by
using machine learning. This presented system detects attack in real-time. The system de-
tects attack by using the model that was selected from different machine learning techniques.
The model was selected by evaluating five classification algorithms: Decision Tree (DT), Ran-
dom Forest (RF),Naive Base, Multi-Layer Perceptron (MLP) and Logistic Regression (LR).
We evaluated selected algorithms by finding the best accuracy. The models was trained by us-
ing CSE-CIC-IDS2018 dataset which contains different types of attacks. We also developeda
web application to make this system easy to use. The web application provides alerts when
attacks happen and generate a log file for reporting all intrusions.This work can be extended by
improving performance of the presented system. One of the improving directions is based on
employing more machine learning techniques for developing IDS. It is interested to evaluate
performance of applying semi-supervised classification to the used dataset. We can also expand
the system by enabling detection of attacks that affect host devices such as viruses, Trojan,
malware, etc. Moreover, extracting additional features from the used dataset may improve the
performance.

Dept of CSE, College of Engineering Adoor


AN INTRUSION DETECTION SYSTEM 9

2.1 LITERATURE SURVEY OVERVIEW

Sl No: Title of the Paper Authors Technologies Used Publication Year Observations
1 Advanced Gunaprasad Python, OpenCV, Journal of 2019 It Detects Motion
Surveillance Ujhari,Bhavani SMTP Emerging And Capture Image
Systems Using M.Kiran Technolo-
OpenCV Kumar K. gies and
Innovative
Research
(JETIR)
2 Intrusion Detection JABEZ, Artificial Neural ScienceDirect 2011 It Presented The
System (IDS) Dr Muthu Networks - ANN Details Of a New
Anomaly Approach
Detection using
Outlier Detection
Approach
3 A Study of .Patrick Artificial Intelli- MDPI 2022 This Provide How
Network Intrusion Varin,Thomas gence/Machine The System Could
Detection Systems Newe,Labinot Learning Be Improved Using
Using Artificial In- Lumi ML
telligence/Machine Duhan,Eoin
Learning O’Connell,Donna
O’Shea,Brian
Lee,Muzaffar
Rao
4 Analysis of 1.Chaitali CNN Model, SSRN 2024 It Attempts To
Intrusion Detection T. Dhumal Artificial Neural Undergo Compre-
Systems: 2.Dr. B. V. Network, Machine hensive Review On
Techniques, Pingale Learning Algo- Existing IDS
Datasets and rithms
Research
Opportunity
5 Intrusion Detection 1.Mrinal Client-server ICCCA 2018 It Critically
System in Python Walia 2.Dr. systems, Computer Demonstrate
Tanupriya hacking, Computer Process To De-
3.Manik networks, Network velop A Basic IDS
Arora security, NIDS In Python
6 Journal of Network 1.Hung-Jen Machine learning, ELSEVIER 2022 Here Introduced
and Computer Liao Artificial intelli- An Overview
Applications 2.Chun- gence Of Detection
Hung Methodolo-
Richard Lin gies,Approaches
3.Ying-Chin And Technologies
Lin For IDSs.
4.Kuang-
Yuan Tung

Dept of CSE, College of Engineering Adoor


AN INTRUSION DETECTION SYSTEM 10

7 Survey Of IDS Ammar HIDS,NIDS Spriger 2019 This paper pre-


Khraisat,Iqbal Open sented intrusion
Gondal,Peter detection systems
Vam- (IDS) in several
plew,Joarder areas.
Kam-
ruzzman
8 Performance of Md. Badiuz- Machine learning Research 2019 This research
Machine Learning zaman algorthims, Gate work showed the
Techniques in Pranto, Md. Haarcascade experiments and
Anomaly Hasibul algorithm results of differ-
Detection with Alam Ratul, ent approaches
Basic Feature Md. to use intrusion
Selection Strategy Mahidur data methodically
- A Network Rahman, for detecting in-
Intrusion Ishrat Jahan trusions using
Detection System Diya, and machine learning
Zunayeed- techniques.
Bin Zahir
9 An Unsupervised Idriss ML,DL Indonesian 2022 Improved user ex-
Generative Idrissi, Journal of perience
Adversarial Mostafa Electrical
Network Azizi, Omar Engineering
Based-host Moussaoui and Com-
Intrusion Detection puter Sci-
System For IoT ence
Devices
10 Evaluating Per- Shadi I. ML,AI IJEAIS 2022 Extracting ad-
formance of Abudalfa, ditional features
Supervised Learn- Ekhlas S. from the used
ing Techniques for Isleem, dataset that leads
Developing Real- Marah J. to improve the per-
Time Intrusion Elshaikh formance.
Detection System Khalil,
Rewaa A.
Dalloul and
Shaimaa
M.Iqtefan

Dept of CSE, College of Engineering Adoor


Chapter 3

SYSTEM DESIGN

3.1 DATA FLOW DIAGRAM LEVEL 0

1. Admin (External Entity)

Role: End-user who interacts with the Intrusion Detection System. Action: Sends a request to
access a resource (e.g., login, view reports, check camera feed). Waits for a response from the
system.

2. Intrusion Detection System (Central Process):

This is the main system that encapsulates all internal functions: Login authentication,monitoring
and alerting,data storage and report generation

3. Server (External Entity)

Role: Provides backend services and data storage. Action: Receives requests forwarded by the
system (e.g., database queries, video feed access, file storage).Returns responses to the Intrusion
Detection System, such as:Authentication Success/Failure,intrusion history data,Video/image
data,acknowledgment of saved reports.

3.2 DATA FLOW DIAGRAM LEVEL 1


1. External Entity: Admin:

The Admin is the only user interacting with the system.The admin performs key actions:Logs
in by entering a username and password.Receives feedback about login success or failure.Gets
alerted in case of any intrusion detected.Views the intrusion history and detailed reports.Acts as
both the input provider and the decision-maker based on system alerts.

11
AN INTRUSION DETECTION SYSTEM 12

2. Process :Login

This is the first point of interaction in the system.It accepts the username and password entered
by the admin.Sends the entered data to the Login Database to verify the credentials.

After checking: If correct, the login process is successful and proceeds further. If incorrect,
sends back a Login Failure message to the admin. On successful login.

3. Data Store:

Admin credentials (username password).When the login request is received:It checks the cre-
dentials sent by the Login process.Returns an authentication response (success or failure).It
plays a vital role in maintaining access control to the system.

4. Process: Monitoring Alert System

Activated after successful login.It continuously monitors the system for any unusual or unau-
thorized activity.If an intrusion is detected: It alerts the admin immediately.Simultaneously, it
sends the detected data to the Intrusion Report Database to save the intrusion event for future
review.

5. Data Store: Intrusion Report Database

Stores records of all detected intrusions. It receives this data from the Monitoring Alert System.
The database allows storage, retrieval, and reporting of past intrusion events.This data is used
by the Detected Intrusion History process when the admin wants to view past incidents.

6. Process: Detected Intrusion History

This component enables the admin to view the history of previously detected intrusions.It
fetches this information from the Intrusion Report Database.The data shown can include:timestamp
of intrusion, type or nature of the event,possibly image or video evidence

Dept of CSE, College of Engineering Adoor


AN INTRUSION DETECTION SYSTEM 13

Figure 3.1: DFD level 0

Dept of CSE, College of Engineering Adoor


AN INTRUSION DETECTION SYSTEM 14

Figure 3.2: DFD level 1

Dept of CSE, College of Engineering Adoor


Chapter 4

SYSTEM ARCHITECTURE

This IDS system is built around a frontend (user interface) for interaction with the admin and a
backend (server-side) to handle the processing, data management, and notifications.

Frontend:

The frontend consists of the User Interface (UI) that admins interact with to manage and monitor
the intrusion detection system.

Components of the Frontend:

• Admin Dashboard (Web Application):

• Login Module: Allows admins to log into the system. This would include a login form
with fields for username and password.

• Detected Intrusion History: Displays a list of previously detected intrusions, allowing the
admin to review historical data and any related alerts.

• Reports Viewer: Displays detailed reports on the intrusion incidents, such as time, type
of intrusion, and images of the incident captured.

User Flow:

The admin accesses the web application (using a browser or client app).

After login, the admin can view past reports, history, and real-time alerts of any intrusions.

The frontend sends requests to the backend to fetch data and display the status of the intrusion
system.

15
AN INTRUSION DETECTION SYSTEM 16

Backend:

The backend is responsible for processing, storing, and managing all the data, as well as han-
dling the intrusion detection logic.

Components of the Backend:

• Authentication Service: Verifies the login credentials provided by the admin against the
Login Database.Issues a response (usually a token or session data) after successful au-
thentication, allowing access to the dashboard.

• Detected Intrusion History: Displays a list of previously detected intrusions, allowing the
admin to review historical data and any related alerts.

• Intrusion Detection Module: This module receives the camera feed data from the cam-
era(s), processes the video using machine learning or computer vision techniques (like
OpenCV for face detection), and checks for signs of intrusion.Once an intrusion is de-
tected, it triggers an alert, stores the data in the Intrusion Report Database, and sends a
notification to the admin.

• Database Services: Login Database: Stores login credentials and user-related data. In-
trusion Report Database: Stores detailed records of each detected intrusion, including
timestamps, descriptions, image snapshots, and any alerts associated with that intrusion.

• API Layer:The API layer serves as the communication bridge between the frontend (ad-
min UI) and the backend (Intrusion Detection Module, databases, etc.). It enables the
frontend to request data, submit credentials, or fetch reports.

Backend Flow:

When an admin logs in, the Authentication Service verifies the credentials with the Login
Database.

Upon successful login, the Admin Dashboard fetches data about the intrusions from the Intru-
sion Report Database via the API.

The Intrusion Detection Module constantly analyzes the camera feed to detect intrusions, stor-
ing any detected incidents in the Intrusion Report Database

Dept of CSE, College of Engineering Adoor


AN INTRUSION DETECTION SYSTEM 17

4.1 ARCHITECTURAL DIAGRAM

Figure 4.1: Architectural Design

Dept of CSE, College of Engineering Adoor


AN INTRUSION DETECTION SYSTEM 18

Figure 4.2: Visual representation of IDS

Dept of CSE, College of Engineering Adoor


Chapter 5

DESIGN

Intrusion Detection System (IDS) – Module Explanation An Intrusion Detection System (IDS)
monitors and detects unauthorized access or anomalies in a secured environment. Below is a
breakdown of each module in the IDS architecture:

1. User Interface (Web Application):

This is the front-end where administrators interact with the IDS. It provides the following func-
tionalities:

• Admin Login Module: Allows administrators to securely log into the system.

• Detected Intrusion History Module: Displays past intrusion records with timestamps and
images.

• Reports Viewer Module: Provides reports on intrusion incidents, including detailed logs
and captured snapshots.

• Interaction: The admin accesses the web application, views alerts, and manages reports.

2. Login Module:

Handles user authentication and verification. It ensures that only authorized personnel can
access the IDS dashboard.

• Credential Verification: Cross-checks login details with stored credentials in the database.

• Authentication Response: Grants or denies access based on credential validity.

• Interaction: The system queries the Login Database for authentication and responds ac-
cordingly.

3. Intrusion Detection Module

The core module responsible for detecting intrusions through real-time surveillance.

• Camera Feed Processing (Using OpenCV): Captures live video feeds and processes them
in real time.

19
AN INTRUSION DETECTION SYSTEM 20

• Face Detection Algorithm: Uses machine learning-based face detection to identify unau-
thorized individuals.

• Intrusion Alert Generation: If an unidentified person is detected, the system captures an


image and triggers an alert.

• Interaction: This module continuously analyzes camera feeds and stores intrusion inci-
dents in the database while notifying the admin.

4. Data Storage

Stores all necessary data related to user authentication.

• Login Database: Contains administrator credentials for authentication.

• Intrusion Report Database: Maintains records of detected intrusions, including times-


tamps, images, and logs.

• Interaction: The system retrieves login credentials from the Login Database and logs
intrusion events in the Intrusion Report Database.

System Workflow Summary:

• The admin logs in through the web application.

• The login module authenticates the credentials against the login database.

• The intrusion detection module monitors the camera feed using OpenCV and face detec-
tion.

• If an intruder is detected, an alert is generated, and the incident is logged in the database.

• This architecture ensures real-time monitoring, authentication, intrusion detection, and


alerting, making the IDS effective and responsive.

Dept of CSE, College of Engineering Adoor


AN INTRUSION DETECTION SYSTEM 21

Figure 5.1: Design Modules Diagram

Figure 5.2: Use Case Diagram

Dept of CSE, College of Engineering Adoor


Chapter 6

REQUIREMENT ANALYSIS

The requirement analysis for the proposed Real-Time Intrusion Detection System (IDS) based
on face recognition involves identifying the functional and non-functional requirements neces-
sary to ensure secure, efficient, and reliable surveillance in restricted areas. This section outlines
both hardware and software requirements along with user and system-level needs.

6.1 SOFTWARE REQUIREMENTS

Operating System

Compatibility with common operating systems, including Windows, Linux, and macOS.

Programming Language Used

python,HTML,CSS,JAVASCRIPT

Web Framework

Django : Backend web framework for building the admin dashboard, database management,
and user authentication. Django.

Database

SQLite (default with Django);Stores admin credentials, known faces metadata, and intrusion
event logs.

Python Libraries and Packages

OpenCV:Used for real-time image processing, face detection from live video feeds.

NumPy:Supports numerical operations and matrix handling during image processing.

Pillow: Used for image manipulation, such as saving captured face images.

Datetime: For timestamping intrusion events and captured images.

22
AN INTRUSION DETECTION SYSTEM 23

6.2 HARDWARE REQUIREMENTS

The following hardware components are essential for building and deploying a real-time intru-
sion detection system using face recognition. These components ensure smooth data capture,
processing, storage, and communication of alerts.

USB Webcam / IP Camera: Supports continuous video streaming

CPU: A dual-core processor is the minimum requirement for basic functionality.

Dept of CSE, College of Engineering Adoor


Chapter 7

METHODOLOGY

The proposed system follows a structured approach, integrating real-time face recognition with
alert mechanisms. Below is the step-by-step methodology of the project:

1. System Initialization:

The system boots up and initializes all necessary modules: camera, face recognition model, and
alerting services.The face database of authorized personnel is loaded into memory from storage.

2. Live Video Capture:

A live video stream is captured using a connected camera.Each frame of the video is processed
in real-time.

3. Face Detection

OpenCV is used to detect faces within each video frame.If no face is detected, the system
continues monitoring.If a face is detected, the region of interest is extracted for further analysis.

4.Web Dashboard for Admin

A secure web interface allows the admin to:View live stream or captured images

5.Logging and Reporting

All events are stored in a database with details such as: Date and time,image of the detected
person,recognition status.

6. Alert Generation

The system immediately sends an alert to the admin or security personnel.

24
Chapter 8

IMPLEMENTATION

opencv.py
1 import cv2
2 import time
3 import os
4 from datetime import datetime
5 import sys
6 import django
7 from django.conf import settings
8
9 # Set up Django environment
10 os.environ.setdefault(’DJANGO_SETTINGS_MODULE’, ’new_project.settings
’)
11 django.setup()
12
13 # Import Django models after setting up Django
14 from app1.models import IntrusionEvent
15
16 # Django media directory setup
17 BASE_DIR = "c:/Users/JOEL/webapp"
18 MEDIA_DIR = os.path.join(BASE_DIR, "new_project/media")
19 VIDEO_DIR = os.path.join(MEDIA_DIR, "videos")
20 IMAGE_DIR = os.path.join(MEDIA_DIR, "images")
21
22 # Create required directories
23 os.makedirs(VIDEO_DIR, exist_ok=True)
24 os.makedirs(IMAGE_DIR, exist_ok=True)
25
26 # Load Haar Cascade for face detection
27 cascade_path = os.path.join(os.path.dirname(__file__), "
haarcascade_frontalface_default.xml")
28 face_cascade = cv2.CascadeClassifier(cascade_path)
29
30 if face_cascade.empty():
31 print("Error: Could not load face cascade classifier xml file")
32 exit()
33
34 # Start video capture

25
AN INTRUSION DETECTION SYSTEM 26

35 video = cv2.VideoCapture(0)
36
37 if not video.isOpened():
38 print("Error: Could not open video camera.")
39 exit()
40
41 frame_width = int(video.get(3))
42 frame_height = int(video.get(4))
43
44 # Generate filenames with correct paths
45 timestamp = datetime.now().strftime(’%Y-%m-%d_%H-%M-%S’)
46 video_path = os.path.join(VIDEO_DIR, f"intrusion_{timestamp}.mp4")
47 video_writer = cv2.VideoWriter(video_path, cv2.VideoWriter_fourcc(*’
avc1’), 10, (frame_width, frame_height))
48 last_capture_time = time.time()
49
50 # clear screen of previous messages
51 os.system(’cls’)
52
53 # add a new welcome message
54 message = """
55 ___ ____ ____
56 |_ _| _ \/ ___|
57 | || | | \___ \\
58 | || |_| |___) |
59 |___|____/|____/
60
61 press ctrl + c to save event and exit
62
63 """
64 print(message)
65
66
67 try:
68 while True:
69 check, frame = video.read()
70 if not check or frame is None:
71 print("Error: Could not read frame.")
72 break
73
74 current_time = datetime.now().strftime(’%Y-%m-%d %H:%M:%S’)
75 cv2.putText(frame, current_time, (10, 30), cv2.
FONT_HERSHEY_SIMPLEX,
76 1, (0, 255, 255), 2, cv2.LINE_AA)
77
78 gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
79 faces = face_cascade.detectMultiScale(gray, scaleFactor=1.2,
minNeighbors=12, minSize=(50, 50))
80
81 for x, y, w, h in faces:
82 cv2.rectangle(frame, (x, y), (x + w, y + h), (0, 255, 0), 3)

Dept of CSE, College of Engineering Adoor


AN INTRUSION DETECTION SYSTEM 27

83
84 if time.time() - last_capture_time >= 5:
85 image_path = os.path.join(IMAGE_DIR, f"face_detected_{
timestamp}.jpg")
86 cv2.imwrite(image_path, frame)
87 print(f"Image saved: {image_path}")
88 last_capture_time = time.time()
89
90 video_writer.write(frame)
91 cv2.imshow("Face Detection Video", frame)
92
93 if cv2.waitKey(1) == ord(’q’):
94 break
95
96 except KeyboardInterrupt: # save videos on exit
97 video.release()
98 video_writer.release()
99 cv2.destroyAllWindows()
100 event = IntrusionEvent(
101 video=f"./media/videos/intrusion_{timestamp}.mp4",
102 image=f"./media/images/face_detected_{timestamp}.jpg"
103 )
104 event.save()
105 print(f"Event saved in database with video: {video_path}")

login.html
<!DOCTYPE html >
<h t m l l a n g =” en”>
<head>
<meta c h a r s e t =”UTF−8”>
<meta name =” v i e w p o r t ” c o n t e n t =” w i d t h = d e v i c e − w i d t h , i n i t i a l − s c a l e =1.0” >
< t i t l e >L o g i n Page </ t i t l e >
<s t y l e >
body {
display : flex ;
justify −content : center ;
align −items : center ;
h e i g h t : 100 vh ;
b a c k g r o u n d : l i n e a r − g r a d i e n t ( t o r i g h t , #4 f a c f e , #00 f 2 f e ) ;
font − family : Arial , sans − s e r i f ;
margin : 0;
}
. login − container {
background : white ;
p a d d i n g : 2 rem ;
b o r d e r − r a d i u s : 12 px ;
box −shadow : 0 4 px 10 px r g b a ( 0 , 0 , 0 , 0 . 1 ) ;
text −align : center ;
w i d t h : 100%;
max− w i d t h : 350 px ;

Dept of CSE, College of Engineering Adoor


AN INTRUSION DETECTION SYSTEM 28

}
h2 {
c o l o r : #333;
}
p {
c o l o r : #666;
margin − b o t t o m : 1 rem ;
}
input {
w i d t h : 100%;
p a d d i n g : 10 px ;
m a r g i n : 8 px 0 ;
b o r d e r : 1 px s o l i d # c c c ;
b o r d e r − r a d i u s : 8 px ;
f o n t − s i z e : 1 rem ;
}
. btn {
w i d t h : 100%;
p a d d i n g : 10 px ;
b a c k g r o u n d : #00 bcd4 ;
color : white ;
b o r d e r : none ;
b o r d e r − r a d i u s : 8 px ;
f o n t − s i z e : 1 rem ;
cursor : pointer ;
t r a n s i t i o n : 0.3 s ;
}
. btn : hover {
b a c k g r o u n d : #0097 a7 ;
}
. signup {
margin − t o p : 1 rem ;
f o n t − s i z e : 0 . 9 rem ;
}
. signup a {
c o l o r : #00 bcd4 ;
t e x t − d e c o r a t i o n : none ;
}
. signup a : hover {
text −decoration : underline ;
}
</ s t y l e >
</ head>
<body>
<d i v c l a s s =” l o g i n − c o n t a i n e r ”>
<h2>Welcome Back ! </ h2>
<p>S i g n i n t o c o n t i n u e </p>
<form>

Dept of CSE, College of Engineering Adoor


AN INTRUSION DETECTION SYSTEM 29

< i n p u t t y p e =” e m a i l ” p l a c e h o l d e r =” E n t e r y o u r e m a i l ” r e q u i r e d >
< i n p u t t y p e =” p a s s w o r d ” p l a c e h o l d e r =” E n t e r y o u r p a s s w o r d ” r e q u i r e d >
<b u t t o n t y p e =” s u b m i t ” c l a s s =” b t n ”> S i g n In </ b u t t o n >
</ form>
<p c l a s s =” s i g n u p ”>Don ’ t h a v e an a c c o u n t ? <a h r e f =”#”> S i g n up </ a ></p>
</ d i v >
</ body>
</ html >
dashboard.html
1
2 {% load static %}
3 <!DOCTYPE html>
4 <html lang="en">
5 <head>
6 <meta charset="UTF-8">
7 <meta name="viewport" content="width=device-width, initial-scale
=1.0">
8 <title>Intrusion Detection Dashboard</title>
9 <style>
10 * {
11 margin: 0;
12 padding: 0;
13 box-sizing: border-box;
14 }
15
16 body {
17 font-family: Arial, sans-serif;
18 background: #f0f2f5;
19 padding: 20px;
20 }
21
22 .dashboard-container {
23 max-width: 1200px;
24 margin: 0 auto;
25 }
26
27 .header {
28 background: #fff;
29 padding: 20px;
30 border-radius: 8px;
31 margin-bottom: 20px;
32 box-shadow: 0 2px 4px rgba(0,0,0,0.1);
33 }
34
35 .header h1 {
36 color: #1a73e8;
37 margin-bottom: 10px;
38 }
39
40 .event-grid {

Dept of CSE, College of Engineering Adoor


AN INTRUSION DETECTION SYSTEM 30

41 display: grid;
42 grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
43 gap: 20px;
44 }
45
46 .event-card {
47 background: #fff;
48 border-radius: 8px;
49 padding: 15px;
50 box-shadow: 0 2px 4px rgba(0,0,0,0.1);
51 }
52
53 .event-card h3 {
54 color: #333;
55 margin-bottom: 15px;
56 }
57
58 .event-card video {
59 width: 100%;
60 border-radius: 4px;
61 margin-bottom: 10px;
62 }
63
64 .event-card img {
65 width: 100%;
66 border-radius: 4px;
67 margin: 10px 0;
68 }
69
70 .event-details {
71 margin-top: 15px;
72 padding-top: 15px;
73 border-top: 1px solid #eee;
74 }
75
76 .event-details p {
77 color: #666;
78 margin: 5px 0;
79 font-size: 14px;
80 }
81
82 .timestamp {
83 color: #1a73e8;
84 font-weight: bold;
85 }
86 </style>
87 </head>
88 <body>
89 <div class="dashboard-container">
90 <div class="header">
91 <h1>Intrusion Detection System</h1>

Dept of CSE, College of Engineering Adoor


AN INTRUSION DETECTION SYSTEM 31

92 <p>Real-time surveillance monitoring dashboard</p>


93 <form method="POST" style="margin-top: 10px;">
94 {% csrf_token %}
95 <button type="submit" name="clear_events" class="delete-
btn">Clear All Events</button>
96 </form>
97
98 </div>
99
100 <div class="event-grid">
101 {% for event in intrusion_events %}
102 <div class="event-card">
103 <h3>Detection Event #{{ event.id }}</h3>
104
105 {% if event.video %}
106 <video controls>
107 <source src="{{ event.video}}" type="video/mp4">
108 Your browser does not support video playback.
109 </video>
110 {% endif %}
111
112 {% if event.image %}
113 <img src="{{ event.image }}" alt="Detected Face">
114 {% endif %}
115
116 <div class="event-details">
117 <p class="timestamp">Time: {{ event.timestamp }}</p
>
118 <p>Location: {{ event.location|default:"Main Camera
" }}</p>
119 <p>Detection Type: {{ event.type|default:"Face
Detection" }}</p>
120 <p>Status: {{ event.status|default:"Recorded" }}</p
>
121 </div>
122 </div>
123 {% empty %}
124 <div class="event-card">
125 <h3>No Events</h3>
126 <p>No intrusion events have been detected yet.</p>
127 </div>
128 {% endfor %}
129 </div>
130 </div>
131 </body>
132 </html>

manage.py
1 import os
2 import sys
3

Dept of CSE, College of Engineering Adoor


AN INTRUSION DETECTION SYSTEM 32

4
5 def main():
6 """Run administrative tasks."""
7 os.environ.setdefault(’DJANGO_SETTINGS_MODULE’, ’new_project.
settings’)
8 try:
9 from django.core.management import execute_from_command_line
10 except ImportError as exc:
11 raise ImportError(
12 "Couldn’t import Django. Are you sure it’s installed and "
13 "available on your PYTHONPATH environment variable? Did you
"
14 "forget to activate a virtual environment?"
15 ) from exc
16 execute_from_command_line(sys.argv)
17
18
19 if __name__ == ’__main__’:
20 main()

view.py
1 from django.shortcuts import render, redirect
2 from django.contrib.auth import authenticate, login, logout
3 from django.contrib.auth.models import User
4 from .models import IntrusionEvent
5
6 def display(request):
7 if request.method == "POST":
8 email = request.POST["email"]
9 password = request.POST["password"]
10 username = email.split("@")[0] # extract user name from email
11 user = authenticate(request, username=username, email=email,
password=password)
12 if user is not None:
13 login(request, user)
14 return redirect("/dash")
15 else:
16 return render(request,’login.html’, {’error’: "invalid user
credentials"})
17 return render(request,’login.html’)
18
19 def signout(request):
20 logout(request)
21 return redirect("/")
22
23 def dashboard(request):
24 if request.user.is_authenticated: # check if user is logged in
25 if request.method == ’POST’ and ’clear_events’ in request.POST:
26 IntrusionEvent.objects.all().delete()
27 return redirect(’/dash’)
28 intrusion_events = IntrusionEvent.objects.values(’id’, ’

Dept of CSE, College of Engineering Adoor


AN INTRUSION DETECTION SYSTEM 33

timestamp’, ’video’, ’image’)


29 return render(request, "dash.html", {"intrusion_events":
intrusion_events})
30 return redirect("/")

Dept of CSE, College of Engineering Adoor


Chapter 9

RESULTS AND DISCUSSIONS

9.1 Terminal Output

Figure 9.1: Terminal running the Intrusion Detection System

The terminal shown in the image is a Windows PowerShell terminal being used to run and
monitor a Django web server for an Intrusion Detection System (IDS) project.

The terminal is a Windows PowerShell interface that serves as a command-line environment for
executing and monitoring a Python-based Intrusion Detection System (IDS) project.

It displays logs for face detection events, image and video storage, and the running of a Django
development server.

It is also used to manage virtual environments, run scripts, and display real-time feedback on
system activity, helping the developer track and debug events during intrusion monitoring.

34
AN INTRUSION DETECTION SYSTEM 35

9.2 Login Page Of IDS

Figure 9.2: Login page interface for the Intrusion Detection System’s admin panel.

A login page is a user interface screen that allows registered users to access a secure system or
application by entering their credentials—typically an email (or username) and a password.

It acts as a gatekeeper, ensuring that only authenticated users can proceed to the protected parts
of the system.

Dept of CSE, College of Engineering Adoor


AN INTRUSION DETECTION SYSTEM 36

9.3 Dashboard Of a IDS System

Figure 9.3: Intrusion Detection System Dashboard displaying detection events.

Figure 9.3 illustrates the user interface of a real-time intrusion detection system dashboard for
surveillance monitoring.
The image depicts the user interface of a real-time intrusion detection system designed for
surveillance monitoring. The dashboard visually represents intrusion events detected by a cam-
era system using face detection technology.
The top section of the dashboard includes system controls such as Logout and Clear All Events
buttons, allowing the administrator to manage sessions and event history.
Each detection event is presented in a card format containing:
• A timestamp showing the exact time the event occurred.
• A video clip recording the activity during the intrusion.
• A snapshot frame from the video with face detection boxes (highlighted in green) indi-
cating detected human faces.

Dept of CSE, College of Engineering Adoor


AN INTRUSION DETECTION SYSTEM 37

9.4 Results of IDS


The Intrusion Detection System (IDS) project successfully demonstrates a real-time, intelligent
surveillance solution that enhances security monitoring through automation and accuracy.

By integrating OpenCV-based face detection, a web-based admin interface, and automated no-
tification mechanisms, the system effectively detects and logs unauthorized access events.

The platform enables administrators to:

Monitor intrusion events through recorded videos and snapshots.

Manage and review historical intrusion data through a centralized web dashboard.

Through the combination of computer vision, web technologies, and database management,
the system offers a scalable and user-friendly tool for surveillance, particularly in sensitive or
restricted areas.

Dept of CSE, College of Engineering Adoor


Chapter 10

CONCLUSION

The scope of the Intrusion Detection System (IDS) encompasses the monitoring and detection of
unauthorized access attempts in highly restricted areas. This includes the ability to identify and
alert administrators to suspicious or anomalous activity, such as the presence of an unauthorized
person within a specific time interval.

The system’s scope extends to the detection of unauthorized persons, triggering alerts and mes-
sages to administrators, accompanied by visual evidence in the form of snapshots. This enables
administrators to verify the identity of the intruder and take necessary action.

The IDS also provides a web-based platform for administrators to access reports and historical
data on previous intrusion attempts. This enables administrators to track patterns and trends
in unauthorized activity, facilitating informed decision-making and the development of more
effective security strategies.

The scope of the IDS includes the ability for administrators to login and access the system
remotely, ensuring timely response to security incidents. This enables administrators to respond
promptly to alerts and messages, minimizing the risk of security breaches.

Furthermore, the IDS scope encompasses the provision of a comprehensive security solution for
highly restricted areas. This includes the integration of advanced monitoring and detection ca-
pabilities, ensuring that unauthorized access attempts are identified and responded to promptly.

Overall, the scope of the IDS is to provide a robust and effective security solution for highly
restricted areas, leveraging advanced technologies to detect and respond to unauthorized access
attempts. By providing real-time alerts, visual evidence, and historical data, the system supports
proactive security measures, minimizes the risk of security breaches, and enhances overall se-
curity posture.

38
References

1. “Advanced Surveillance System Using OpenCV” by Gu-


ruprasad,Bansa,Bhavani.M,Kiran Kumar. K, JETIR, 2019.
2. “Intrusion Detection System (IDS): Anomaly Detection using Outlier Detection Ap-
proach” by JABEZ, Dr. B. MUTHUKUMAR, ScienceDirect 2015.
3. “A Study of Network Intrusion Detection Systems Using Artificial Intelligence/Ma-
chine Learning”, Patrick Vanin, Thomas, Laban Lakshmi Dhirani, Eoin O’Connell,
Donna O’Shea,Brian Lee, Muzaffar Rao, MDPI 2022.
4. “Techniques, Datasets and Research Opportunity”, Chaitrali T. Dhumal, Dr. S. V.
Pingal,SSRN 2024.
5. “Intruction Detection System in Python”, Mrinal Wahal,Dr. Tanupriya Choudhury,
Arora Beads, 8th International Conference on Cloud Computing Data Science En-
gineering ( Confluence)2018.
6. “Remote home surveillance system” by Sushant Kumar and Dr. S SSoplanki. IEEE
2016.
7. “Journal of Network and Computer Applications”, by Hung-Jen Liao,Chun-Hung
Richard Lin, Ying-Chih Lin, Kuang-Yuan Tung, ELSEVIER 2012.
8. “Survey of intrusion detection systems” by Ansam Khraisat, Iqbal Gondal, Peter
Vamplew Joarder Kamruzzaman, Springer Open 2019.
9. “Evaluating Performance of Supervised Learning Techniques for Developing Real-
Time Intrusion Detection System” by Shadi I. Abudalfa, Ekhlas S. Isleem, Marah J.
Elshaikh Khalil, Rewaa A. Dalloul and Shaimaa M. Iqtefan , IJEAIS 2022.
10. “An unsupervised generative adversarial network based-host intrusion detection sys-
tem for IoT devices” by Idriss Idrissi, Mostafa Azizi, Omar Moussaoui , RE-
SEARCHGATE 2022.

39

You might also like