CSRF attack detection and prevention using ML

CSRF attack detection and prevention using ML

Jun 10, 2024 ยท 2 min read
Image credit: imperva

Overview

CSRF Attack Detection and Prevention Using ML is a project focused on enhancing web security by leveraging machine learning techniques to identify and mitigate Cross-Site Request Forgery (CSRF) attacks. This project combines advanced data analysis and machine learning methodologies to develop a robust detection system and deployable API for real-time protection against CSRF threats.

CSRF attacks pose a significant threat to web applications by tricking users into executing unwanted actions on a different site where they are authenticated. This project aims to detect such attacks proactively and prevent potential security breaches through an intelligent, machine learning-based approach.

Techniques and Implementation

  • Machine Learning Models:
    • Applied various machine learning techniques, including supervised learning algorithms such as Decision Trees, Random Forests, Support Vector Machines (SVM), and Neural Networks.
    • Conducted extensive experiments to compare the performance of these models in terms of accuracy, precision, recall, and F1-score.
    • Selected the best-performing model for real-time CSRF attack detection based on evaluation metrics and computational efficiency.
  • Model Deployment:
    • Developed an API to deploy the trained machine learning model, allowing integration with web applications for real-time CSRF attack detection and prevention.
    • Implemented the API using a FastAPI framework, ensuring it can handle high traffic and provide quick responses to incoming web requests.
  • Detection and Prevention Mechanism:
    • The API monitors incoming web requests and analyzes them using the trained machine learning model.
  • The project resulted into a conference publication.

Publications

  • Enhancing Web Security: A Comparative Analysis of Machine Learning Models for CSRF Detection. 2024 Intelligent Methods, Systems, and Applications (IMSA) DOI

Student List

  • Bassem Osama
  • Mohamed Ramadan

Main Supervisors

Did you find this page helpful? Consider sharing it ๐Ÿ™Œ