Final Project Report
Final Project Report
SYSTEM
A Project Report
Submitted by:
FAYIQ AHMAD (20048135149)
at
SSM COLLEGE OF ENGINEERING
PARIHASPORA PATTAN, BARAMULLA, KASHMIR
AFFILIATED TO
THE UNIVERSITY OF KASHMIR, HAZRATBAL SRINAGAR
2024
FIRELOCK WEB PROTECTION SYSTEM September 2024
DECLARATION
We hereby declare that the project entitled “FIRELOCK WEB PROTECTION
SYSTEM” submitted for the B.Tech (CSE) degree is our original work and the
project has not formed the basis for the award of any other degree, fellowship or any
other titles.
FAYIQ AHMAD________________________
MUNEER AHMAD_____________________
MOHAMMAD SHUAIB_________________
CSE 2
FIRELOCK WEB PROTECTION SYSTEM September 2024
CERTIFICATE
This is to clarify that the project entitled
SYSTEM
Submitted by
and is approved for the partial fulfilment of the requirement for the award of the
This Project report has not been found earlier submitted to any other institute or
Principal
CSE 3
FIRELOCK WEB PROTECTION SYSTEM September 2024
ACKNOWLEDGEMENT
We take this opportunity to express our profound sense of gratitude and respect to
all those who helped me/us throughout the duration of this project. We
acknowledge the effort of those who have contributed significantly to my project.
First of all we are very thankful to our God for providing us such a great
opportunity to do the Project in this college and also very thankful to our Parents
for their ongoing support and directions. We feel privileged to offer my sincere
thanks and deep sense of gratitude to the Principal, Mrs. Yasmeen Viqar and
Ms. Peerzada Saima for expressing their confidence in us by letting us work on a
project of this magnitude and using the latest technologies and providing their
support, help & encouragement in implementing this project. Last but not the
least, I am grateful to all my friends for providing critical feedback & support
whenever required. There are times in such projects when the clock beats your
time and you run out of energy, you just want to finish it once and forever. Parents
and friends made us endure such times with their never-failing humour & warm
wishes.
FAYIQ AHMAD
MUNEER AHMAD
MOHAMMAD SHUAIB
CSE 4
FIRELOCK WEB PROTECTION SYSTEM September 2024
ABSTRACT
Web applications today face a growing number of security challenges, ranging from SQL
injection attacks and malicious bots to spam and proxy-based intrusions. Many websites,
especially smaller ones,lack comprehensive security systems, making them vulnerable to
such threats. This project presents the design and implementation of a Website
Protection System, developed in PHP, that provides real-time security against multiple
attack vectors. The system is designed to be easily integrated into any PHP-based website
by simply including a single file in the website’s code.
The project also features a user-friendly admin panel that allows website administrators
to:
This system not only provides comprehensive security but also ensures minimal impact
on website performance through optimized PHP code and lightweight logging
mechanisms. Furthermore, the admin panel is protected with role-based access control
CSE 5
FIRELOCK WEB PROTECTION SYSTEM September 2024
(RBAC) to ensure that only authorized users can configure security settings and review
logs.
The effectiveness of the protection system was validated through extensive testing using
simulated attacks, such as SQL injections and bot requests. During testing, malicious
attempts were successfully blocked, with offenders being redirected to a custom error
page displaying a "Blocked" message. Feedback from users highlighted the ease of
integration and the intuitive nature of the admin panel.
This project demonstrates that robust web security can be achieved through lightweight,
easy-to-integrate solutions. In the future, the system can be enhanced to support additional
security measures, such as cross-site scripting (XSS) prevention and two-factor
authentication. With its modular design and comprehensive security features, this
website protection system is ideal for web developers seeking to safeguard their
applications against modern web-based threats.
CSE 6
FIRELOCK WEB PROTECTION SYSTEM September 2024
Title Page
Declaration of Student 2
Acknowledgement 4
Abstract 5-6
1. INTRODUCTION 14-19
1.1 Background
CSE 7
FIRELOCK WEB PROTECTION SYSTEM September 2024
Protection System
CSE 8
FIRELOCK WEB PROTECTION SYSTEM September 2024
2.4.1 Cloudflare
2.4.2 Sucuri
2.4.3 ModSecurity
24-27
3. SYSTEM ANALYSIS AND DESIGN
CSE 9
FIRELOCK WEB PROTECTION SYSTEM September 2024
Page No.
Table of Contests
3.3.1 Security
3.3.2 Scalability
3.3.3 Usability
3.3.4 Performance
Authorization
CSE 10
FIRELOCK WEB PROTECTION SYSTEM September 2024
4.1.1 Usability
4.1.2 Security
4.1.3 Responsiveness
4.1.4 Scalability
CSE 11
FIRELOCK WEB PROTECTION SYSTEM September 2024
Overview)
5.2.2 Scalability
CSE 12
FIRELOCK WEB PROTECTION SYSTEM September 2024
6. 37-39
CONCLUSION AND RECOMMENDATION
6.1 Conclusion
6.2 Recommendations
7. REFERENCES 40-42
CSE 13
FIRELOCK WEB PROTECTION SYSTEM September 2024
1. INTRODUCTION
1.1 Background:-
Web applications and websites have become essential tools for individuals and
organizations alike. However, as the reliance on digital platforms grows, so does
the risk of cyber-attacks. Websites are often targeted by attackers using
techniques such as SQL injection, spam, bots, and proxy-based intrusions to
steal sensitive data, disrupt services, or compromise system integrity. Small and
medium-sized websites are particularly vulnerable, as they typically lack robust
security infrastructure. In response to these risks, the need for a lightweight,
easy-to-implement protection system has grown.
CSE 14
FIRELOCK WEB PROTECTION SYSTEM September 2024
Loss of trust from users, negatively impacting the website's reputation and
revenue.
CSE 15
FIRELOCK WEB PROTECTION SYSTEM September 2024
Scalable Solution: Ensure the system can handle an increasing volume of users
and attacks without significant performance degradation.
CSE 16
FIRELOCK WEB PROTECTION SYSTEM September 2024
The importance of this project lies in its ability to prevent security breaches and
maintain the integrity of websites without requiring specialized cybersecurity
expertise. Below are the key benefits of this system:
1. Real-Time Protection:-
2. Easy Integration:-
The system can be integrated into any PHP-based web application by including a
single script file, reducing the complexity for developers.
3. Cost-Effective Security:-
4. Comprehensive Security:-
Protects against multiple types of attacks, including SQL injection, spam, and
bots, ensuring all critical areas are covered.
5. Centralized Management:-
The admin panel offers a single dashboard to monitor logs, view blocked
attempts, and adjust security settings in real time.
Spam and inappropriate content are filtered, ensuring the website maintains high-
quality and relevant user input.
7. Performance Optimization:-
CSE 17
FIRELOCK WEB PROTECTION SYSTEM September 2024
Backend: PHP
PHP is used as the core programming language for implementing the security
features. It allows seamless integration into any existing PHP-based web
application.
HTML is used for the admin panel interface to display logs and configuration
options.
CSS is used for styling the admin panel to ensure it is user-friendly and visually
appealing.
JavaScript may be used for form validation and enhancing interactivity within
the admin panel.
CSE 18
FIRELOCK WEB PROTECTION SYSTEM September 2024
The system runs on web servers such as Apache or Nginx, ensuring it can be
deployed on most hosting environments.
Development and testing can be done locally using XAMPP or WAMP. The final
system can also be deployed on cloud-based hosting environments.
CSE 19
FIRELOCK WEB PROTECTION SYSTEM September 2024
2. Literature Review
2.1 Introduction to Website Protection Systems:-
Website security involves implementing technologies, protocols, and techniques to
protect web applications from various online threats, ensuring confidentiality,
integrity, and availability of data. With the rise in cyber threats, even small-scale
websites must adopt security mechanisms to safeguard their resources and user
data. Web protection systems address common issues such as SQL injection,
spam, bots, proxy attacks, and inappropriate user inputs by blocking malicious
actions before they impact the application.
PHP, a popular backend language, offers various functions and libraries that
help in preventing attacks, such as:-
PDO (PHP Data Objects) for secure database interactions to prevent SQL
injection.
CSE 20
FIRELOCK WEB PROTECTION SYSTEM September 2024
Role-Based Access Control (RBAC): Restricts access to the admin panel based
on user roles to prevent unauthorized access.
Secure Login Mechanisms: Uses password hashing and CAPTCHA to prevent
brute-force attacks on the admin panel.
File-Based Logging ensures that all suspicious activity is recorded for later
analysis.
Data Encryption is essential for storing sensitive information such as login
credentials securely.
CSE 21
FIRELOCK WEB PROTECTION SYSTEM September 2024
2.4.1 Cloudflare:-
A well-known web security provider that offers services such as DDoS
protection, bot filtering, and SQL injection prevention. However, it requires
integration with DNS and can introduce latency issues.
2.4.2 Sucuri:-
Sucuri provides malware removal and web application firewall (WAF) services.
While effective, Sucuri can be costly for small websites and may require technical
expertise to set up properly.
2.4.3 ModSecurity:-
An open-source WAF that provides real-time web traffic monitoring and attack
detection. However, it can be complex to configure for developers unfamiliar with
security protocols.
High Costs: Many services such as Cloudflare and Sucuri involve recurring fees.
Complex Integration: Configuring firewalls or integrating with external services
can be challenging for non-experts.
Lack of Customization: Many external solutions provide limited customization
options based on specific site requirements.
CSE 22
FIRELOCK WEB PROTECTION SYSTEM September 2024
CSE 23
FIRELOCK WEB PROTECTION SYSTEM September 2024
Integration Module: A simple script that website owners can include in their
PHP files to enable protection.
Error Handling: Blocked requests are redirected to an error page displaying
"Blocked" as a message.
Manual Purge Button: Allows manual reset of cache or traffic logs.
Bot Detection: Identifies and blocks suspicious bots based on request behavior.
Spam Prevention: Blocks spam inputs on forms using predefined patterns.
CSE 24
FIRELOCK WEB PROTECTION SYSTEM September 2024
3.3.1 Security:-
Encrypted Data Logs: All logs are stored securely to prevent unauthorized
access.
XSS and SQL Injection Prevention: Filters user inputs to mitigate cross-site
scripting (XSS) and SQL attacks.
Role-Based Access Control (RBAC): Only authorized admin users can access
logs and security settings.
3.3.2 Scalability:-
Modular System: New features (e.g., DDoS protection) can be added easily
without disrupting existing functionality.
Support for Multiple Websites: The system can protect multiple websites by
including the main PHP file in their codebase.
3.3.3 Usability:-
3.3.4 Performance:-
CSE 25
FIRELOCK WEB PROTECTION SYSTEM September 2024
Client-Side: HTML, CSS for the admin panel UI, with optional JavaScript for
interactivity
Minimum:
o CPU: 2-core processor
o RAM: 2 GB
o Storage: 500 MB (for logs and files)
Recommended:
o RAM: 4 GB
Client Side: The PHP script is embedded in the website code and intercepts
requests.
Server Side: The admin panel provides the interface for monitoring logs and
configuring security settings. Requests flagged as malicious are blocked server-
side.
The ERD describes the relationships between core entities in the system:
CSE 26
FIRELOCK WEB PROTECTION SYSTEM September 2024
One-to-Many: One admin user can monitor logs for multiple websites.
One-to-One: Each request corresponds to a specific log entry.
Login System: Uses secure password hashing (e.g., bcrypt) and CAPTCHA to
prevent brute-force attacks.
Role-Based Access Control (RBAC): Only authorized users can access sensitive
data and manage settings.
Password Encryption: All admin passwords are encrypted with secure hashing
algorithms.
Log Encryption: Sensitive data in logs is encrypted to prevent unauthorized
access.
CSE 27
FIRELOCK WEB PROTECTION SYSTEM September 2024
4 PROJECT DESIGN
4.1.1 Usability:-
The goal of the system is to ensure that the admin interface is easy to use without
requiring any advanced technical skills.
All key features—such as traffic monitoring, log review, blocking threats, and
toggling protection options—will be available with a few clicks.
The admin will have access to search and filter functionalities within the logs to
locate specific blocked requests.
The integration process for the security module will only require including a
single PHP file into the website’s pages. This ensures seamless integration with
minimal effort.
Clear error messages will be provided to help visitors understand why they are
being blocked (e.g., blocked for spam, proxy usage, or malicious requests).
4.1.2 Security:-
Security is the core of this project, ensuring that the system proactively defends the
website against multiple threats:
o SQL Injection Filtering: Detects and blocks malicious SQL statements
embedded in requests.
o Bot Detection Mechanism: Identifies automated bots based on request patterns,
user-agent checks, and behavior analysis.
o Spam Prevention: Blocks requests with spam-like content in form submissions.
o IP and Proxy Blocking: Identifies requests coming from known proxy networks
or suspicious IPs and blocks them.
Logs and admin credentials will be encrypted to prevent unauthorized access.
All session data and login credentials will be protected using encryption mechanisms
like bcrypt hashing.
4.1.3 Responsiveness:-
CSE 28
FIRELOCK WEB PROTECTION SYSTEM September 2024
The admin panel and user interfaces will be fully responsive, designed to
function seamlessly across devices such as:
o Desktops
o Tablets
o Mobile phones
A dashboard view will dynamically update live traffic data and alerts using
JavaScript or AJAX calls without needing the admin to refresh the page.
4.1.4 Scalability:-
The system will be scalable to handle increased traffic loads and will support:
o Real-time analysis of large volumes of incoming requests.
o Management of extensive logs and IP blocklists without affecting website
performance.
Modular Design: The system will allow new features (e.g., DDoS protection) to
be integrated easily in future updates.
Performance optimization will ensure that the security module does not slow
down page loading times even when traffic increases.
Visitors will be shown a custom error page if their access is blocked due to
malicious behavior.
This error page will contain a message indicating the type of block (e.g.,
“Blocked for SQL Injection attempt” or “Access denied: Proxy detected”).
The error page design will be customizable by the admin to match the website's
branding.
Users may also be redirected to a contact form if they believe the block was a
mistake, enabling the admin to whitelist IPs or resolve issues.
CSE 29
FIRELOCK WEB PROTECTION SYSTEM September 2024
The admin panel will be built using Bootstrap CSS to ensure that all UI
components adjust to the screen size.
Tables, graphs, and control elements in the admin panel will rearrange
dynamically on mobile devices.
CSE 30
FIRELOCK WEB PROTECTION SYSTEM September 2024
CSE 31
FIRELOCK WEB PROTECTION SYSTEM September 2024
4. Changes are saved to the backend database, and the system adjusts its protection
features in real-time.
This detailed DFD illustrates the interaction between the admin panel, database, and
APIs, as well as how the system handles user requests.
CSE 32
FIRELOCK WEB PROTECTION SYSTEM September 2024
5. Results/Outputs
The user interfaces of the Website Protection System are designed to ensure ease
of use and efficiency for administrators and users alike. Below are the detailed
descriptions of each interface:
The Admin Interface serves as the control center for the security system. It
provides the following features:
The Visitor Interface is the experience users encounter when they visit the
website. Key aspects include:
Blocked Access Page: When a visitor's request is blocked, they are redirected to a
customized error page that informs them of the reason for the block (e.g., SQL
Injection attempt, bad word detected, XSS threat).
CSE 33
FIRELOCK WEB PROTECTION SYSTEM September 2024
Contact Form: An option for visitors to report an issue if they believe the block
was a mistake, allowing for easier management of legitimate user access.
A simple interface for users to provide feedback on their experience. This feature
can be especially helpful in understanding how well the protection system
interacts with genuine users and whether any legitimate requests were incorrectly
blocked.
This section evaluates the performance of the Website Protection System under
different conditions, focusing on response times and overall scalability.
The response time of the security system is critical for maintaining a seamless user
experience.
Initial tests indicate that even with the security module active, the average
response time for user requests remains within acceptable limits (typically less
than 200 milliseconds).
5.2.2 Scalability:-
During load testing, the system demonstrated the ability to handle up to 10,000
concurrent requests with minimal latency, highlighting its robust design for
future growth.
CSE 34
FIRELOCK WEB PROTECTION SYSTEM September 2024
This section covers the various measures implemented in the Website Protection
System to ensure user data security and privacy.
The system implements input validation and prepared statements to prevent SQL
injection attacks.
During testing, simulated SQL injection attempts were executed, and the system
successfully blocked all attempts, preventing any unauthorized database access.
The system employs output encoding and sanitization of user inputs to mitigate
XSS vulnerabilities.
Tests were conducted to inject malicious scripts via form submissions and URL
parameters; all scripts were effectively neutralized, and affected requests were
logged and blocked.
The system successfully filtered out multiple submissions containing these words,
redirecting users to the error page with appropriate messages.
The system includes algorithms to identify and block known bad bots and proxy
servers attempting to access the website.
Testing showed that the system effectively blocked these requests, maintaining the
integrity of legitimate user interactions.
CSE 35
FIRELOCK WEB PROTECTION SYSTEM September 2024
All sensitive data transmitted between users and the server is protected using
SSL/TLS encryption, ensuring that data remains secure during transit.
Sensitive data stored in the database, such as admin credentials, is encrypted using
robust algorithms (e.g., AES-256).
Regular security audits are conducted to ensure that encryption standards are
upheld and updated in accordance with best practices.
This section highlights the results of user feedback and testing conducted during
the project, providing insights into the effectiveness and user-friendliness of the
Website Protection System.
General user feedback has been largely positive, particularly regarding the ease of
use and the informative nature of error messages.
Users appreciated the contact form option for reporting blocked access, which
helps clarify misunderstandings about their access rights.
6.1 Conclusion:-
The Website Protection System developed in this project provides a robust and
modular solution to safeguard websites against common and dangerous
cyberattacks. Through the implementation of SQL injection filters, bot detection
mechanisms, proxy and spam filtering, and bad word detection, this system
ensures that websites remain secure and functional. Additionally, the admin panel
provides ease of management, allowing users to monitor live traffic, view detailed
logs, and toggle protection features as needed.
The project achieves its primary goal by offering a lightweight yet effective
security layer that can be easily integrated with any PHP-based website. With the
inclusion of real-time logging and customizable settings, the system empowers
site administrators to have full control over security operations. The protection
mechanism not only reduces vulnerabilities but also maintains the integrity and
availability of websites, crucial for business continuity.
In conclusion, this project addresses the growing need for accessible and proactive
website security by providing a cost-effective and scalable solution that can
defend against evolving threats.
6.2 Recommendations:-
Based on the outcomes and testing of this system, the following recommendations
are suggested:
While the current system provides effective protection against several common
attack types, there are opportunities to enhance the platform further. Some
possible directions for future development include:
CSE 38
FIRELOCK WEB PROTECTION SYSTEM September 2024
By pursuing these future directions, the Website Protection System can evolve
into a comprehensive security solution that is adaptable to both new threats and
different technological environments.
CSE 39
FIRELOCK WEB PROTECTION SYSTEM September 2024
7. References
1. OWASP Foundation. "OWASP Top Ten: The Ten Most Critical Web
Application Security Risks."
o This resource from the Open Web Application Security Project
(OWASP) provides a list of the top ten critical security risks for web
applications, including SQL injection, cross-site scripting (XSS), and other
common vulnerabilities. It is a widely accepted reference for web security
practices.
o Link: https://owasp.org/www-project-top-ten/
o Details: Offers detailed descriptions of each risk, examples of attack
vectors, and best practices for mitigating these risks. This reference is
useful for understanding why certain security measures are implemented in
your project.
2. PHP Security Consortium. "PHP Security Guide."
o This guide provides insights on securing PHP applications, addressing
topics such as SQL injection, cross-site scripting, and other common
threats. It also offers recommendations on server configuration and coding
practices.
o Link: http://phpsec.org/projects/guide/
o Details: Useful for understanding the best practices for securing a PHP-
based website. It explains various vulnerabilities in detail and offers code-
level advice to prevent attacks.
3. Google Developers. "Preventing Abuse: Blocking Bots, Spam, and Scraping."
o This resource discusses methods for preventing abuse on websites,
including strategies for blocking bots, spam, and scraping attempts. It
provides practical advice on using CAPTCHAs, rate limiting, and bot
detection techniques.
o Link:
https://developers.google.com/search/docs/advanced/crawling/blocking-
spam
o Details: Offers strategies and techniques to implement bot detection and
prevention mechanisms, which are useful for enhancing the bot protection
feature of your system.
CSE 40
FIRELOCK WEB PROTECTION SYSTEM September 2024
CSE 41
FIRELOCK WEB PROTECTION SYSTEM September 2024
CSE 42
FIRELOCK WEB PROTECTION SYSTEM September 2024
CSE 43