[Video]Building a Machine Learning Based Web Application Firewall/Intrusion Prevention System From Scratch

Recently I started to play around with some machine learning stuffs, and I decided to build a small project related to cyber security. So, I decided to build a Machine Learning based Web Application firewall. 

Disclaimer:  I’ve worked on web application security for a few years; however, this subject (machine learning) is completely new to me. Just because I make a video guides, doesn't mean I know everything, please feel free to correct me if I'm wrong at any point. Full series here

I've used pycaret library to develop this IPS from scratch. Here is the summary of what it does

1. A proxy intercepts  all HTTP request any server.

2. An web application security scanner is fired against a dummy web application

3. The scanner ran in two modes – Crawling Mode and Scanning Mode.

4. The Intercepting proxy logs all the HTTP request generated by the scanner. The crawling and scanning http log exported from the proxy. 

5. A python script parse all http request logs and extracts several features form the raw request. Those features will be used to tarin the model.

6. The exported feature data then fed to kmean’s clustering model for training. We choose to create two clusters. One for good requests and one for bad request.

7. Once the model is trained its deployed and integrated with HTTP proxy in real time.

8. From the live data the IPS tries to detect if any request falls in good cluster and bad cluster and alert user.


  1. WBCHSE Syllabus 2021 - West Bengal Council of Higher Secondary Education (WBCHSE) is Responsible to Conduct 11th & 12th Class Examination Public Examination 2021 for Every Year Month of February, West Bengal Board 11th & 12th Class Exam Every Year More than Lakhs of Students have Participated in Public Examination. WB 12th Revised Syllabus Students Download WBCHSE HS new WBCHSE Syllabus 2021 & Exam Pattern After Regular Riding and Check Syllabus for Better Performance in Annual Final Examination 2021, Students visit our Website you can Download WB 11th & 12th Class Syllabus & Exam Pattern 2021 Pdf Format Download.

    1. Implementing machine learning (ML) for firewalls and intrusion prevention systems (IPS) can significantly enhance the ability to detect and respond to threats in real-time. Traditional security systems often rely on predefined rules and signatures, which can struggle to keep up with evolving threats. Machine learning models, on the other hand, can analyze vast amounts of data, identify patterns, and adapt to new threats without explicit programming.

      Machine Learning Projects for Final Year

      Deep Learning Projects for Final Year

      Cyber Security Projects For Final Year

  2. This is really a very good article that I really like and will definitely share it widely with my friends, wish you all good health and make more articles in the future. Thanks


Post a Comment