Rootless-Ghost/log-analyzer

GitHub: Rootless-Ghost/log-analyzer

一款面向SOC分析师的Python安全日志分析工具,支持Windows和Linux日志解析,自动检测暴力破解等可疑行为并生成报告。

Stars: 1 | Forks: 0

# 📁 日志分析器 (Log Analyzer) 一款基于 Python 的安全日志分析工具,专为 SOC 分析师设计。用于解析日志文件、检测可疑活动并生成可操作的报告。 ![Python](https://img.shields.io/badge/Python-3.9+-blue?logo=python) ![License](https://img.shields.io/badge/License-MIT-yellow)
## 功能特性 - **日志解析**:支持 Windows 安全事件日志(.evtx, .csv)和 Linux auth 日志 - **威胁检测**:识别可疑模式,包括: - 登录失败尝试(暴力破解检测) - 非正常时段登录 - 权限提升事件 - 账户锁定 - **报告生成**:生成清晰、易读且带有严重性评级的报告 ## 演示 ### 分析输出 ![Log Analyzer Demo](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/19d9aee70c105746.png) ## 安装说明 ``` git clone https://github.com/YOUR_USERNAME/log-analyzer.git cd log-analyzer pip install -r requirements.txt ``` ## 使用方法 ``` # 分析 Windows Security Event Log (CSV export) python src/log_analyzer.py --input samples/security_log.csv --type windows # 分析 Linux auth log python src/log_analyzer.py --input /var/log/auth.log --type linux # 生成 HTML report python src/log_analyzer.py --input samples/security_log.csv --type windows --report html ``` ## 项目结构 ``` log-analyzer/ ├── src/ │ ├── log_analyzer.py # Main script │ ├── parsers/ # Log parsing modules │ ├── detectors/ # Detection rule modules │ └── reporters/ # Report generation ├── samples/ # Sample log files for testing ├── output/ # Generated reports ├── tests/ # Unit tests ├── config.yaml # Configuration file ├── requirements.txt └── README.md ``` ## 检测规则 | 规则 | 描述 | 严重性 | |------|-------------|----------| | 暴力破解 (Brute Force) | 5 分钟内来自同一来源的 5 次以上登录失败 | 高 (High) | | 非正常时段登录 (Off-Hours Login) | 凌晨 12 点至 5 点之间的成功登录 | 中 (Medium) | | 权限提升 (Privilege Escalation) | 用户被添加到管理员/特权组 | 高 (High) | | 账户锁定 (Account Lockout) | 检测到账户锁定事件 | 中 (Medium) | ## 路线图 - [x] 项目搭建 - [ ] Windows 事件日志解析器 (CSV) - [ ] 基础检测规则 - [ ] 终端输出 - [ ] HTML 报告生成 - [ ] Linux auth.log 解析器 - [ ] IP 信誉查询 (VirusTotal/AbuseIPDB) - [ ] 通过配置文件自定义检测规则 ## 许可证 MIT 许可证 - 详情请参阅 [LICENSE](LICENSE)
由 [Rootless-Ghost](https://github.com/Rootless-Ghost) 构建
标签:AMSI绕过, EVTX解析, Linux Auth日志, PE 加载器, Python, Windows安全日志, 免杀技术, 协议分析, 威胁检测, 安全运营, 异常登录, 扫描框架, 无后门, 暴力破解检测, 权限提升, 红队行动, 结构化查询, 网络安全, 自动化安全, 隐私保护