Giter Club home page Giter Club logo

cnn_waf's Introduction

Web Attacks Detection based on CNN

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

主要内容描述:

  1. docker run -d -v /root/cnn_waf:/app -p 8888:8888 thuuyen18102001/nckh2023:cnn-env-v1.4

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

  3. 要应用该模型进行检测请使用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
  4. API server: docker run -d -p 8009:80 thuuyen18102001/nckh2023:cnn-fastapi-v1.1

参考:

  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

cnn_waf's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.