payelsen-bd/malware-intrusion-detection-framework
GitHub: payelsen-bd/malware-intrusion-detection-framework
这是一个集成了机器学习、Transformer和可解释AI的网络安全框架,旨在通过多模型对比和分层分类实现精准的恶意软件及IoT网络入侵检测。
Stars: 0 | Forks: 0
# 🛡️ Cyber Threat Detection Suite
### 恶意软件检测与使用 ML、Transformers 和可解释 AI 的分层入侵检测
一个结合以下内容的高级网络安全研究仓库:
- 📄 基于文档的网络钓鱼恶意软件检测
- 🌐 分层 IoT 入侵检测
本项目集成了机器学习、基于 Transformer 的建模和可解释 AI,以构建可扩展且可解释的网络安全威胁检测系统。
## 📌 概述
现代网络安全威胁以多种形式出现——从恶意的文档附件到大规模的 IoT 网络入侵。
本仓库展示了:
- 用于网络钓鱼附件的**多格式恶意软件检测框架**
- 用于 IoT 流量的**两阶段分层入侵检测系统**
这两个系统都强调:
- 高准确率
- 可解释性
- 可扩展性
- 现实世界部署就绪
## 🚀 包含的项目
### 🔹 1. 恶意软件检测
检测多种格式中的恶意网络钓鱼附件:
- Word
- Excel
- PDF
- HTML
#### 🔸 核心概念
- 8 类分类(格式 + 良性/恶意)
- 统一特征空间
- 多模型对比
- 可解释预测 (SHAP + LIME)
### 🔹 2. 入侵检测
一个**两阶段分层 IoT 入侵检测系统**
#### 🔸 阶段 1 (Stage-1):
- 预测攻击类型:
- 良性
- DDoS
- Malware
#### 🔸 阶段 2 (Stage-2):
- 基于阶段 1 的输出预测攻击子类型
#### 🔸 亮点:
- TabTransformer 风格架构
- 流式预处理(RAM 安全)
- 防泄漏数据集划分 (70/15/15)
- 可解释 AI + LLM 辅助报告
## 🧠 核心特性
- 基于机器学习的恶意软件检测
- 分层入侵检测(粗粒度 → 细粒度)
- 可解释 AI (SHAP, LIME)
- 大规模数据处理(数百万条记录)
- 校准感知评估
- 研究级 pipeline
## 📂 项目结构
```
cyber-threat-detection-suite/
│
├── README.md
├── requirements.txt
├── LICENSE
│
├── malware_detection/
│ ├── data/
│ ├── notebooks/
│ ├── src/
│ ├── results/
│ └── models/
│
└── intrusion_detection/
├── data/
├── notebooks/
├── src/
├── results/
└── models/
📊 Datasets
🔹 Malware Detection
CIC-Trap4Phish dataset
79,293 samples
4 document formats
8-class classification
🔹 Intrusion Detection
CIC-IoT dataset
Multi-million IoT traffic records
Includes:
protocol features
TCP flags
traffic statistics
hierarchical labels
⚙️ Methodology
Malware Detection
Data preprocessing & cleaning
Feature alignment across formats
8-class label construction
Model training (7 ML models)
Evaluation + explainability
Intrusion Detection
Streaming preprocessing
Leakage-aware splitting
Stage-1 training (attack type)
Stage-2 training (subtype)
Evaluation + calibration
Explainability + LLM reporting
🤖 Models Used
Malware Detection
Random Forest (Best)
Gradient Boosting
Decision Tree
KNN
SVM
Logistic Regression
Naive Bayes
Intrusion Detection
TabTransformer-based model
Two-stage hierarchical learning
📈 Evaluation Metrics
Accuracy
Precision / Recall / F1
Macro & Weighted F1
Balanced Accuracy
MCC
Confusion Matrix
ROC Curve
LogLoss / ECE
📊 Results Summary
🔹 Malware Detection
Best Model: Random Forest
Test Accuracy: ~98.45%
Strong multi-format generalization
🔹 Intrusion Detection
Stage-1 Accuracy: ~99.98%
Stage-2 Accuracy: ~99.96%
Minimal overfitting
Strong hierarchical classification
🔍 Explainable AI
SHAP → Global & feature importance
LIME → Local prediction explanation
Permutation Importance → Feature validation
Ensures model decisions are transparent and trustworthy
🎯 Applications
Phishing detection systems
Email security filtering
IoT network monitoring
Cyber threat intelligence
Security analytics
## ⚠️ Data Disclaimer
This repository provides a processed and feature-engineered dataset derived from the CIC-Trap4Phish dataset.
The original dataset is publicly available from the Canadian Institute for Cybersecurity (CIC).
All rights belong to the original dataset creators.
```
标签:Apex, C2, CISA项目, DDoS检测, DLL 劫持, IoT流量分析, LIME, Python, SHAP, Tab-Transformer, Transformer, XAI, 二分类, 人工智能, 分层检测, 可解释性AI, 多分类, 大数据处理, 大语言模型, 威胁情报, 实时分析, 开发者工具, 搜索语句(dork), 数据驱动, 文档恶意检测, 无后门, 机器学习, 模型评估, 深度学习, 物联网安全, 特征工程, 用户模式Hook绕过, 端点安全, 结构化查询, 网络安全, 自动化安全, 自定义DNS解析器, 补丁管理, 逆向工具, 钓鱼检测, 隐私保护