gecsemax/cuchulainn-ids

GitHub: gecsemax/cuchulainn-ids

一款用 C 语言编写的高性能开源网络入侵检测系统,以零分配架构和极低延迟实现多协议深度流量检测。

Stars: 0 | Forks: 0

**CuChulainn IDS v5.1** 是最终的开源版本。**5.2 及以上版本** 在商业许可下提供。 联系 [![LinkedIn](https://img.shields.io/badge/LinkedIn-Max_Gecse-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/max-gecse/) 获取企业授权和支持。 # 🛡️ **CuChulainn IDS v5.1** ![CuChulainn 作者信息](https://img.shields.io/badge/Code-Max%20Gecse%20%E2%80%94%20Human%20Authored-darkgreen?style=for-the-badge) ![CuChulainn](https://img.shields.io/badge/CuChulainn-IDS-003b24?style=for-the-badge&logo=codeforces&logoColor=00ff99)

CuChulainn IDS Benchmark

![Human-Written Code](https://img.shields.io/badge/Code-Human--Written-blueviolet?style=for-the-badge) ![Version](https://img.shields.io/badge/Version-5.1-green?style=for-the-badge) ![License](https://img.shields.io/badge/License-Apache%202.0-blue?style=for-the-badge) ![Build](https://img.shields.io/badge/Build-Passing-success?style=for-the-badge) ![Author](https://img.shields.io/badge/Author-Max%20Gecse-darkred?style=for-the-badge) ![Human-Written Code](https://img.shields.io/badge/Code-Human--Written-blueviolet?style=for-the-badge) ![Architecture](https://img.shields.io/badge/Architecture-Zero--Allocation%20C-orange?style=for-the-badge) ![AVX-512](https://img.shields.io/badge/CPU-AVX--512-critical?style=for-the-badge) ![Event Loop](https://img.shields.io/badge/Capture-AF__PACKET%20%2B%20epoll-yellow?style=for-the-badge) ![Protocols](https://img.shields.io/badge/Protocols-14%2B-lightblue?style=for-the-badge) ![TLS](https://img.shields.io/badge/TLS-ClientHello%20Parser-blue?style=for-the-badge) ![DNS](https://img.shields.io/badge/DNS-Entropy%20%2B%20Tunneling-purple?style=for-the-badge) ![HTTP](https://img.shields.io/badge/HTTP-1.1%20%2F%202.0-orange?style=for-the-badge) ![Latency](https://img.shields.io/badge/Latency-0.22ms-red?style=for-the-badge) ![CPU](https://img.shields.io/badge/CPU%20Usage-2.1%25%20@%2010Gbps-brightgreen?style=for-the-badge) ![Packet Loss](https://img.shields.io/badge/Packet%20Loss-0%25-success?style=for-the-badge) ![Detection Rate](https://img.shields.io/badge/Detection-97%25-brightgreen?style=for-the-badge) ![Zero-Day](https://img.shields.io/badge/Zero--Day%20Detection-96%25-yellowgreen?style=for-the-badge) ![False Positives](https://img.shields.io/badge/False%20Positives-%3C0.5%25-blue?style=for-the-badge) ![Memory](https://img.shields.io/badge/Memory-58MB-lightgrey?style=for-the-badge) Version | License | Build | Author | Human‑Written Code Architecture | AVX‑512 | Capture Protocols | TLS | DNS | HTTP Latency | CPU | Packet Loss Detection | Zero‑Day | False Positives Memory ![Human-Written Code](https://img.shields.io/badge/Code-Human--Written-blueviolet?style=for-the-badge) # CuChulainn IDS v5.1 Apache 2.0 许可证 作者:Max Gecse CuChulainn IDS 是一个用 C 语言编写的网络入侵检测系统。 该项目专注于可预测的性能、低延迟以及透明的内部架构。 5.1 版本是最终的开源版本。后续版本在商业许可下提供。 ## 概述 CuChulainn IDS 提供协议感知的数据包检测,具有紧凑且可审计的代码库。 该系统在热路径中避免动态内存分配,并使用直接的处理管道: - 使用内存映射环形缓冲区的 AF_PACKET 捕获 - 基于 epoll 的事件循环 - 确定性协议解析器 - 可选的 AVX-512 加速模式匹配 - 评分和警报模块 目标是保持实现的简单性、可维护性,并适用于那些可预测行为比功能复杂性更重要的环境。 ## 协议支持 CuChulainn IDS 包含以下协议的解析器: - TLS(ClientHello 检查) - DNS - HTTP/1.1 - HTTP/2 - SMTP - IMAP - POP3 - SIP - FTP - NTP - MQTT - SSH - QUIC(启发式) - CoAP(启发式) 每个解析器都会提取检测逻辑所需的最少字段集。 ## 检测 检测层结合了: - 轻量级启发式算法 - 每协议异常检查 - 可选的基于机器学习的评分(离线训练模型) 已实现检查的示例: - TLS:SNI 异常,格式错误的 ClientHello 模式 - DNS:基于熵的隧道指示 - HTTP/1.1:可疑的 URI 模式 - HTTP/2:帧级别的违规 - 邮件协议:基本的网络钓鱼/抓取指示 该系统有意保持保守,以减少误报。 ## 性能特征 性能取决于硬件和流量概况。 在现代 x86-64 系统上的典型行为: - 在持续负载下 CPU 使用率低 - 在高数据包速率下吞吐量稳定 - 亚毫秒级的处理延迟 - 零分配的热路径 该项目包含一份基准测试报告,描述了测试环境和方法论。 ## 构建 ``` git clone https://github.com/gecsemax/cuchulainn-ids cd cuchulainn-ids make ``` 要求: - Linux - GCC 或 Clang - 可选:支持 AVX-512 的 CPU ## 运行 ``` sudo ./cuchulainn -i eth0 ``` 选项: ``` -i Network interface -r Read packets from pcap -o Write alerts to file ``` 在执行期间,程序会打印协议检测结果、提取的字段以及评分结果。 ## 仓库结构 ``` src/ main.c protocol_parser.c tls.c dns.c http1.c http2.c smtp.c imap.c pop3.c ... include/ protocol_parser.h docs/ benchmark-report.md architecture.md LICENSE README.md ``` ## 项目状态 CuChulainn IDS v5.1 稳定且受维护。 未来的开发(v5.2+)将在商业许可下继续进行。 如需企业授权或支持,请联系作者。 ## 许可证 Apache License 2.0 版权所有 (c) 2026 Max Gecse ``` ```
标签:AF_PACKET, AVX-512, CuChulainn, DNS分析, epoll, HTTP解析, NIDS, TLS解析, 企业安全, 入侵检测系统, 安全数据湖, 客户端加密, 容器化, 开源安全工具, 时间线生成, 网络安全, 网络安全产品, 网络流量分析, 网络资产管理, 逆向工程平台, 隐私保护, 零内存分配