GithubHelp home page GithubHelp logo

kennyzeng / webshell-aihunter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from coldwave96/webshell-aihunter

0.0 1.0 0.0 26.43 MB

机器学习NB算法实现基于文本的WebShell检测工具

Home Page: https://coldwave96.github.io/2019/11/07/WebshellDetection/

License: Apache License 2.0

Python 100.00%

webshell-aihunter's Introduction

WebShell AIHunter - 机器学习算法检测Webhell

Welcome to my personal blog(^◇^)


工具介绍

  • [⇥] 机器学习NB算法(朴素贝叶斯算法)

  • [⇥] 词袋加IF-TDF模型对数据进行预处理及特征提取

  • [⇥] 基于文本的WebShell检测

  • [⇥] 支持检测php,asp和jsp三种类型的Webshell

数据格式

⚠️⚠️ Data文件夹形式默认结构如下:

  • Data
    • check
    • normal
      • asp
      • jsp
      • php
    • WebShell
      • asp
      • jsp
      • php

💎 Tips:

1.训练时需自行填充Data文件夹下对应目录的文件

2.WebShell文件夹存放3种格式的WebShell文件,normal文件夹存放3种格式的正常文件,check文件夹下存放待检测的文件

3.待检测文件无需分类别存放

4.所有文件下可以有子文件,但是不支持压缩文件包。

5.训练和检测时只会打开对应格式的文件,错误格式文件会自动跳过

6.Release只会发布训练好的模型和检测脚本

使用方法

检测

  • 只需要下载Release的版本,将待检测文件放入Data/check文件夹下,执行python check.py命令即可

训练

  • 下载整个项目的源代码

  • 按照数据格式部分分别填充黑白样本文件

  • 依次执行python train_php.pypython train_asp.pypython train_jsp.py命令即可训练模型

下一步计划

  • 代码优化 + 算法更新 + 添加更多的Webshell静态检验(动态污点追踪暂时想不了==)

  • 更多类型检测 + 自主指定文件夹

  • 考虑建立黑样本模型,类似黑名单机制(理论上白样本模型应该更好可是不切实际)

  • 另外求更多更好的黑样本 🙏🙏

webshell-aihunter's People

Contributors

coldwave96 avatar

Watchers

James Cloos avatar

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.