Skip to content

Web Attacks Detection based on CNN

Notifications You must be signed in to change notification settings

notify-bibi/cnn_waf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web Attacks Detection based on CNN

用卷积神经网络在CSIC2012数据集进行训练,准确率达99.3%,可以实现对8种Web攻击以及异常请求的检测。

主要内容描述:

  1. 训练和测试的结果请看cnn_train_test.ipynb。

  2. 要应用该模型进行检测请使用detector.py。其中训练好模型保存在model目录下,将URL向量化的模型保存在tokenizer目录下,若要使用detector.py,请自行更改路径。

    # for example
    from detector import Detector
    
    url_test = "GET /tienda1/publico/caracteristicas.jsp?id=d%27z%220"
    detector = Detector()
    label_test = detector.predict_url(url_test)
    print(url_test)
    # out SQLI

参考:

  1. Torpeda CSIC 2012 datasets

  2. Detecting Malicious Requests with Keras & Tensorflow

  3. Fwaf-Machine-Learning-Driven-Web-Application-Firewall

  4. Deep Learning with Python

About

Web Attacks Detection based on CNN

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 99.5%
  • Python 0.5%