Giter Site home page Giter Site logo

futabato / waffle Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 99.79 MB

a Web Application Firewall using Signature and Character-level CNN

License: MIT License

Python 8.82% HTML 5.82% Jupyter Notebook 75.36% Dockerfile 0.24% PHP 8.86% Hack 0.89%
waf character-level-cnn

waffle's Introduction

WAffle

a Web Application Firewall using Signature and Character-level CNN

概要

正規表現によるパターンマッチングとCharacter-level CNNで防御するWeb Application FirewallをPythonで実装しました。

HTTP DATASET CSIC 2010をTraining : Validation : Test = 7.5 : 1.5 : 1.0に分割し、学習と検証を行いました。
Testデータ(6,107件)に対して、Accuracy: 86.4, Precision: 75.7, Recall: 99.3という精度が出ています。

使用したテストデータと、性能テストを行った後のcsvファイル、学習済みモデルはGoogle Driveからダウンロードできます。

元のデータセットをcsv形式に変換したものはkaggleにて公開されていたので、以下のリンクからダウンロードしました。
CSIC 2010 Web Application Attacks | Kaggle

waf

waf.pyがWAFの本体となっています。
$ python waf.py
簡単なダッシュボードを用意しています。
$ python dashboard.py

vuln

防御対象となる脆弱なWebアプリケーションをPHPで実装しています。
バックドアなども含まれるため、cloneしたらフォルダをWindows Defenderから除外する必要があります。
$ docker-compose up --build

model

Character-level CNNという手法を使っています。
Web Application Firewall using Character-level Convolutional Neural Networkという論文を参考に、Kerasで実装しました。

analysis

WAffleを介した通信内容はcsvファイルとして保存していて、Streamlitによって開くことができるようになっています。
$ streamlit run analysis.py

waffle's People

Contributors

futabato avatar l7elvli avatar y0d3n avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

waffle's Issues

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.