AadityaZenith/CyberSentinel-EDR

GitHub: AadityaZenith/CyberSentinel-EDR

一个基于 Python 的端点检测与响应系统,提供进程监控、哈希扫描、威胁检测与自动化响应等端点安全防护能力。

Stars: 0 | Forks: 0

# 🛡️ CyberSentinel-EDR
![CyberSentinel](https://img.shields.io/badge/CyberSentinel-EDR-red?style=for-the-badge&logo=security&logoColor=white) ![Python](https://img.shields.io/badge/Python-3.8+-blue?style=for-the-badge&logo=python) ![License](https://img.shields.io/badge/License-MIT-green?style=for-the-badge) ![Status](https://img.shields.io/badge/Status-Active-brightgreen?style=for-the-badge) **一个基于 Python 的强大端点检测与响应 (EDR) 系统** *实时监控、检测和响应威胁* [功能](#-features) • [安装](#-installation) • [使用](#-quick-start) • [架构](#-architecture) • [贡献](#-contributing)
## 🎯 概述 CyberSentinel-EDR 是一个全面的端点安全解决方案,旨在提供实时的威胁检测和响应能力。它使用 Python 构建,结合了高级进程监控、威胁情报和自动化事件响应功能,以保护您的端点免受复杂的攻击。 ``` ┌─────────────────────────────────────────────┐ │ CyberSentinel-EDR System │ ├─────────────────────────────────────────────┤ │ ✓ Process Monitoring │ │ ✓ Threat Detection & Analysis │ │ ✓ Hash-based Scanning │ │ ✓ Incident Logging & Forensics │ │ ✓ Automated Response Actions │ └─────────────────────────────────────────────┘ ``` ## ✨ 功能 ### 🔍 进程监控 - **实时进程跟踪**:监控端点上所有正在运行的进程 - **进程树分析**:可视化父子进程关系 - **命令行检查**:捕获并分析进程参数 - **资源监控**:跟踪 CPU、内存和 I/O 使用情况 ### 🚨 威胁检测 - **行为分析**:检测可疑的进程行为模式 - **异常检测**:识别偏离正常系统行为的活动 - **威胁情报集成**:与已知的恶意软件特征码进行交叉比对 - **机器学习就绪**:为基于 ML 的高级检测奠定基础 ### 🔐 哈希扫描 - **支持 MD5, SHA-1, SHA-256**:支持多种哈希算法 - **文件完整性监控**:跟踪关键文件的更改 - **恶意软件数据库集成**:与威胁情报数据库进行比对 - **白名单功能**:维护受信任的文件哈希 ### 📋 事件日志 - **全面的事件记录**:记录所有安全事件的详细日志 - **取证证据保留**:为调查提供完整的审计跟踪 - **结构化日志格式**:导出为 JSON/CSV 以便分析 - **可搜索的数据库**:快速检索和分析事件 ### ⚡ 自动化响应 - **进程终止**:自动终止恶意进程 - **隔离操作**:隔离可疑文件 - **网络隔离**:阻断可疑的网络连接 - **警报生成**:实时安全警报和通知 ## 📊 系统架构 ``` ┌──────────────────────────────────────────────────────┐ │ CyberSentinel-EDR │ ├──────────────────────────────────────────────────────┤ │ │ │ ┌────────────────┐ ┌────────────────┐ │ │ │ Process Monitor │ │ Thread Handler │ │ │ └────────────────┘ └────────────────┘ │ │ │ │ │ │ └──────────┬───────┘ │ │ │ │ │ ┌──────────▼──────────┐ │ │ │ Event Aggregator │ │ │ └──────────┬──────────┘ │ │ │ │ │ ┌────────────────┼────────────────┐ │ │ │ │ │ │ │ ┌──▼───────────┐ ┌─▼──────────────┐ │ │ │ │ Threat Engine│ │ Hash Scanner │ │ │ │ └──────────────┘ └────────────────┘ │ │ │ │ │ │ ┌───────────────────────────▼──┐ │ │ │ Response Engine │ │ │ │ (Alert/Quarantine/Kill) │ │ │ └───────────────────────────────┘ │ │ │ │ │ ┌──────────▼──────────┐ │ │ │ Logging & Analytics │ │ │ └─────────────────────┘ │ │ │ └──────────────────────────────────────────────────────┘ ``` ## 🚀 安装 ### 前置条件 - Python 3.8 或更高版本 - 管理员/Root 权限(用于进程监控) - Linux、Windows 或 macOS 操作系统 ### 快速安装 ``` # Clone the repository git clone https://github.com/AadityaZenith/CyberSentinel-EDR.git cd CyberSentinel-EDR # Create virtual environment python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install dependencies pip install -r requirements.txt # Run the system python -m CyberSentinel_EDR ``` ### Docker 安装(推荐) ``` # Build Docker image docker build -t cybersentinel-edr . # Run container docker run --privileged -d --name cybersentinel cybersentinel-edr ``` ## 🎮 快速开始 ### 基本用法 ``` from CyberSentinel_EDR import EDRSystem # Initialize the EDR system edr = EDRSystem() # Start monitoring edr.start_monitoring() # Check current threats threats = edr.get_active_threats() for threat in threats: print(f"⚠️ Threat detected: {threat}") # Respond to threat edr.quarantine_process(threat.pid) ``` ### 配置 创建一个 `config.yaml` 文件: ``` monitoring: enabled: true interval: 5 # seconds process_tracking: true threats: enable_behavioral_analysis: true enable_ml_detection: false threat_level_threshold: 7 logging: level: INFO format: json retention_days: 90 response: auto_response: true actions: - terminate - alert - log ``` ## 📈 关键指标 | 功能 | 状态 | 详情 | |---------|--------|---------| | **进程监控** | ✅ 活跃 | 实时跟踪所有端点 | | **威胁检测** | ✅ 活跃 | 行为 + 基于特征码的检测 | | **哈希扫描** | ✅ 活跃 | 支持 MD5、SHA-1、SHA-256 | | **事件日志** | ✅ 活跃 | 全面的取证日志记录 | | **自动化响应** | ✅ 活跃 | 终止、隔离、阻断操作 | | **仪表板** | 🔄 开发中 | 基于 Web 的监控界面 | | **API** | 🔄 开发中 | 用于集成的 RESTful API | | **机器学习** | 📋 计划中 | 高级威胁预测 | ## 🔧 配置选项 ### 监控特定进程 ``` edr.add_process_whitelist(['explorer.exe', 'svchost.exe']) edr.add_process_blacklist(['ransomware.exe', 'backdoor.exe']) ``` ### 自定义威胁规则 ``` edr.add_threat_rule({ 'name': 'suspicious_registry_access', 'condition': 'registry_path contains "HKLM\\Run"', 'severity': 'HIGH', 'action': 'alert' }) ``` ### 启用哈希扫描 ``` edr.enable_hash_scanning(algorithms=['MD5', 'SHA-256']) edr.add_hash_database('/path/to/malware_hashes.db') ``` ## 📊 输出示例 ### 实时监控 ``` [2024-06-17 14:23:45] System Status: HEALTHY [2024-06-17 14:23:46] Processes Monitored: 347 [2024-06-17 14:23:47] Active Threats: 0 [2024-06-17 14:23:48] Events Logged: 1,234 ``` ### 威胁检测警报 ``` ╔════════════════════════════════════════════════════╗ ║ ⚠️ THREAT DETECTED ║ ╠════════════════════════════════════════════════════╣ ║ Type: Suspicious Process Behavior ║ ║ Process: powershell.exe (PID: 5432) ║ ║ Severity: HIGH ║ ║ Hash: a3f4d7e2c8b9f1e6d4a7b3c9e1f4a6d8 ║ ║ Action: QUARANTINED ║ ║ Timestamp: 2024-06-17 14:25:32 UTC ║ ╚════════════════════════════════════════════════════╝ ``` ## 📚 文档 - [安装指南](docs/installation.md) - [配置指南](docs/configuration.md) - [API 参考](docs/api-reference.md) - [威胁规则](docs/threat-rules.md) - [故障排除](docs/troubleshooting.md) ## 📋 需求 ``` psutil>=5.8.0 # System and process monitoring requests>=2.26.0 # HTTP library for threat intel pyyaml>=5.4.0 # Configuration parsing cryptography>=3.4.8 # Hash and encryption functions ``` ## 📄 许可证 该项目基于 **MIT License** 授权 - 有关详细信息,请参阅 [LICENSE](LICENSE) 文件。 ``` MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software... ``` ## 🎓 作者 **创建者:** [AadityaZenith](https://github.com/AadityaZenith) ## 💡 路线图 ### 2024 年第三季度 - [ ] 基于 Web 的仪表板 - [ ] 实现 REST API - [ ] 多端点管理控制台 ### 2024 年第四季度 - [ ] 基于机器学习的检测 - [ ] 威胁情报源集成 - [ ] 移动监控应用 ### 2025 年 - [ ] 基于云的分析 - [ ] 高级取证功能 - [ ] 集成 SIEM 平台 ## 📞 支持与联系 | 渠道 | 链接 | |---------|------| | **Issues** | [GitHub Issues](https://github.com/AadityaZenith/CyberSentinel-EDR/issues) | | **Discussions** | [GitHub Discussions](https://github.com/AadityaZenith/CyberSentinel-EDR/discussions) | | **电子邮件** | [联系作者](https://github.com/AadityaZenith) |
标签:AMSI绕过, EDR, Python, Qt, x64dbg, 威胁检测, 安全, 恶意代码分类, 无后门, 终端防护, 脆弱性评估, 请求拦截, 超时处理, 逆向工具