astro-dally/side_channel_attack_detection
GitHub: astro-dally/side_channel_attack_detection
基于 AI 的操作系统内核侧信道攻击检测系统,利用硬件性能计数器和多种机器学习模型实现从数据采集、特征工程到实时监控的完整检测流水线。
Stars: 0 | Forks: 0
# 侧信道攻击检测
## 概述
本仓库包含 **AI-Based Side-Channel Attack Detection in OS Kernels**(基于 AI 的操作系统内核侧信道攻击检测)项目的完整代码、数据、演示文稿和研究报告。本项目构建了一个完整的 pipeline,其功能如下:
- 在 Linux(Ubuntu 24.04 LTS、Fedora 40)上使用 `perf` 以 50 毫秒的采样间隔收集硬件性能计数器 (HPC)。
- 跨发行版标准化异构的 perf 输出。
- 构造丰富的时序和统计特征集。
- 训练和评估三个模型家族(Random Forest、SVM、CNN-LSTM)。
- 提供用于实时推理的 runtime 监控器。
本仓库的组织结构便于轻松复现结果并在 GitHub 上发布。
## 仓库结构
```
.
├── Research_Results/ # Plots, figures, exported CSVs, and PDF report assets
├── data/ # Raw perf logs (large files – optional, .gitignore recommended)
├── data_extraction_code/ # Scripts for data collection (collector.sh) & C programs (attacker.c, victim.c)
├── documents/ # Additional project documentation
├── notebooks/ # Jupyter notebooks (side_channel_attack_detection_pipeline.ipynb, generated HTMLs)
├── presentation/ # HTML slide deck (progress_report_presentation.html) and assets
├── report/ # IEEE-style LaTeX paper (main.tex) and exported PDFs/HTMLs
├── runtime/ # Real-time monitoring script (realtime_hpc_monitor.py)
├── generate_presentation.py # Helper script to (re)generate the HTML deck
├── Makefile # Build shortcuts for compiling the LaTeX report
├── README.md # This file
├── requirements.txt # Python package dependencies
├── .gitignore # Ignored files & directories
└── LICENSE # MIT License
```
## 快速入门
### 前置条件
- **Python 3.11+** 以及 `requirements.txt` 中列出的包(`pandas`、`scikit-learn`、`torch`、`torchvision`、`matplotlib`、`seaborn`、`numpy`、`jupyter`)。
- **LaTeX** 发行版(TeX Live 或 MiKTeX),需包含 `latexmk` 和标准宏包(`IEEEtran`、`hyperref`、`graphicx`)。
- 用于克隆仓库的 **Git**。
- **不**需要 **Node.js**——演示文稿由纯 HTML/CSS/JS 构成。
### 安装
```
# 克隆 repo
git clone https://github.com//side_channel_attack_detection.git
cd side_channel_attack_detection
# 安装 Python 依赖(推荐使用虚拟环境)
python -m venv venv
source venv/bin/activate # on macOS/Linux
pip install -r requirements.txt
```
## 构建报告
LaTeX 论文位于 `report/` 目录中。可以通过一个简单的 Makefile 目标将其编译为 PDF:
```
make pdf
```
输出的 `report/main.pdf` 是一篇 IEEE 格式的论文,其中包含从 `Research_Results/` 链接的所有图表。
## 运行演示文稿
直接在浏览器中打开 HTML 演示文稿,或者在本地启动服务器:
```
# 快速本地服务器 (Python 3)
python -m http.server --directory presentation 8000
# 然后导航至 http://localhost:8000/progress_report_presentation.html
```
键盘导航(←/→ 箭头键)和 **Previous** / **Next** 按钮均可开箱即用。
## 数据与结果
所有生成的图表均存储在 `Research_Results/` 目录下。本仓库**不会**追踪体积庞大的原始 perf 日志——它们已被列入 `.gitignore` 以保持仓库轻量化。如果需要原始数据,请使用 `data_extraction_code/` 中的脚本生成(完整工作流请参见 notebook)。
## 许可证
本项目基于 MIT License 授权——详情请参见 `LICENSE` 文件。
标签:anomaly detection, Apex, CNN-LSTM, Fedora, HPC, Linux内核安全, perf, Python, TGT, 人工智能, 侧信道攻击检测, 凭据扫描, 后端开发, 命令控制, 子域名枚举, 异常检测, 操作系统内核, 支持向量机, 攻防演练, 数据科学, 数据采集, 无后门, 时间序列分析, 机器学习, 深度学习, 特征工程, 用户模式Hook绕过, 硬件性能计数器, 系统安全, 网络安全, 资源验证, 逆向工具, 随机森林, 隐私保护