# cnn-webshell-detect **Repository Path**: w1nd7/cnn-webshell-detect ## Basic Information - **Project Name**: cnn-webshell-detect - **Description**: demo for detecting webshell with cnn - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2020-02-10 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # CNN Webshell 检测模型 通过卷积神经网络来检测检测 PHP 恶意脚本的一次尝试,欢迎交流~ ## 安装说明 安装依赖: ``` pip install -r requirements.txt ``` 初始化数据集,黑白样本分别位于 `dataset/{black,white}` 目录下: ``` git submodule init git submodule update ``` 初始化数据库(可选,用于运行 Web UI): ``` mysql -u -p < schema.sql ``` ## 使用说明 训练新模型: ``` ./training.py ``` 运行 Demo(默认绑定在 `0.0.0.0:5000`): ``` ./demo.py ``` 测试已有模型(位于 `persistence` 目录下): ``` ./test_model_metric_exist.py ``` 训练新模型,并对其进行测试: ``` ./test_model_metric_new.py ``` 训练 RNN 模型,并对其进行测试: ``` ./test_model_metric_rnn.py ``` ## 参考资料 1. [基于 CNN 的 Webshell 检测平台的设计与实现](https://www.grassfish.net/2017/11/18/cnn-webshell-detect/) 2. [基于机器学习的 Webshell 发现技术探索](https://segmentfault.com/a/1190000011112448)