laenix/vsentry
GitHub: laenix/vsentry
面向中小企业的开源 SIEM + SOAR 平台,整合日志采集、威胁检测、事件管理与自动化响应能力。
Stars: 5 | Forks: 0
# VSentry - SIEM + SOAR 平台
中文版
VSentry 是一个开源的 SIEM(安全信息和事件管理)+ SOAR(安全编排、自动化和响应)平台,专为中小型企业设计。
## 🚀 功能特性
### 核心 SIEM 功能
- **日志采集与摄取** - 支持 Token 认证的 HTTP API
- **日志存储** - 基于 VictoriaLogs 的高性能存储
- **日志查询** - 使用 LogSQL 搜索和分析日志
- **自定义表** - 使用流字段定义自定义日志分组
- **OCSF 支持** - 符合开放网络安全框架 (OCSF) 规范的日志标准化
### 检测与响应
- **检测规则** - 创建基于 Cron 调度的规则
- **事件管理** - 跟踪和管理安全事件
- **SOAR 自动化** - 使用 React Flow 实现可视化工作流自动化
### 集成
- **连接器 (Connectors)** - 预置 24+ 种安全工具的集成
- **采集器 (Collectors)** - 构建支持 OCSF 输出的原生 Go Agent,适用于 Windows、Linux 和 macOS
### 系统管理
- **用户管理** - 支持基于角色的多用户访问控制
- **系统设置** - 配置外部 URL 和参数
## 📸 截图
### 1. 仪表盘
Real-time security overview with alerts, severity distribution, and recent activity
### 2. 日志 - 查询与分析
Powerful LogSQL-based log query with time range filtering, real-time search, and multiple view modes
### 3. 规则 - 检测规则
Rules list page showing all detection rules and their status
Create/Edit rules with LogSQL expressions, cron scheduling (down to seconds), and severity levels
### 4. 事件
Security incident center: auto-generated alerts when logs match rules, showing status, severity, count
Incident detail modal: view raw logs, severity, status; support acknowledge/resolve actions
### 5. 自动化 - SOAR
Visual workflow orchestration connecting detection rules to response actions (HTTP, email, conditions)
### 6. 摄取 - 日志端点
Log endpoint management: generate API addresses and auth tokens for collectors to push logs
### 7. 采集器 - 日志 Agent
Build cross-platform log collectors (Windows/Linux/macOS) with one-click config generation
Select template and configure collector: choose data sources, mapping rules, target endpoint
Windows Event Collector: Native Go agent, zero-dependency deployment, OCSF format output
Linux Event Collector: Native Go agent, supports syslog, auditd, and OCSF format output
### 8. 设置
System administration: user management, collector config, appearance settings
## 🏗️ 架构
```
┌─────────────────────────────────────────────────────────────┐
│ Go + Gin (Port 8088) │
│ ┌─────────────────┐ ┌─────────────────────────────────┐ │
│ │ React SPA │ │ REST API + Ingest Endpoint │ │
│ │ (Static Files) │ │ (Auth, Rules, Playbooks...) │ │
│ └─────────────────┘ └─────────────────────────────────┘ │
└─────────────────────────┬───────────────────────────────────┘
│
┌─────────────────┼─────────────────┐
│ │ │
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌─────────────┐
│ VictoriaLogs │ │ SQLite │ │ Collector │
│ (Log Storage) │ │ (Metadata) │ │ Agents │
│ :9428 │ │ │ │ (Push) │
└───────────────┘ └───────────────┘ └─────────────┘
```
## 📦 快速开始
### 前置条件
- Go 1.25+
- Node.js 18+
- Docker & Docker Compose (可选)
### 使用 Docker Compose (推荐)
```
# 克隆仓库
git clone https://github.com/laenix/vsentry.git
cd vsentry
# 启动所有服务
make docker-up
# 访问 http://localhost:8088
# 默认登录:admin / admin123
```
### 手动设置
#### 后端
```
cd backend
# 构建
go build -o vsentry .
# 运行
./vsentry
```
#### 前端
```
cd frontend
# 安装依赖
npm install
# 开发
npm run dev
# 生产构建
npm run build
```
## 🔧 配置
### 使用环境变量 (推荐)
使用 Docker Compose 运行时,您可以使用环境变量覆盖设置:
```
# 方法 1:使用 .env file
echo "EXTERNAL_URL=http://your-server-ip:8088" > .env
docker-compose up -d
# 方法 2:直接命令行
EXTERNAL_URL=http://192.168.1.100:8088 docker-compose up -d
```
**可用环境变量:**
| 变量 | 描述 | 默认值 |
|----------|-------------|---------|
| `EXTERNAL_URL` | 用于生成 Collector 端点的外部 URL | `http://localhost:8088` |
| `VICTORIALOGS_URL` | VictoriaLogs 服务 URL | `http://victorialogs:9428` |
| `JWT_SECRET` | JWT 密钥 | `your-secret-key-change-in-production` |
### 使用配置文件
配置文件路径:`backend/config/config.yaml`
```
server:
port: "8080"
external_url: "http://localhost:8088"
victorialogs:
url: "http://localhost:9428"
database:
path: "vsentry.db"
jwt:
secret: your-secret-key-change-me
```
## 🌐 API 端点
| 路径 | 方法 | 描述 |
|------|--------|-------------|
| `/api/login` | POST | 用户登录 |
| `/api/ingest/collect` | POST | 日志摄取 (需 Token) |
| `/api/ingestmanager/*` | * | 摄取管理 |
| `/api/connectors/*` | * | 第三方集成 |
| `/api/collectors/*` | * | Collector 构建器 |
| `/api/customtables/*` | * | 自定义表定义 |
| `/api/rules/*` | * | 检测规则 |
| `/api/incidents/*` | * | 事件管理 |
| `/api/playbooks/*` | * | SOAR 自动化 |
| `/api/users/*` | * | 用户管理 |
| `/api/select/logsql/query` | POST | 日志查询 (需认证) |
| `/api/select/logsql/hits` | POST | 查询命中数 |
## 📁 项目结构
```
vsentry/
├── backend/ # Go backend (Gin + GORM)
│ ├── controller/ # HTTP handlers
│ ├── model/ # Data models
│ ├── middleware/ # Auth middleware
│ ├── ingest/ # Log ingestion
│ ├── automation/ # SOAR engine
│ └── config/ # Configuration
├── frontend/ # React frontend
│ ├── src/
│ │ ├── pages/ # Page components
│ │ ├── services/ # API services
│ │ └── lib/ # Utilities
│ └── public/ # Static assets
├── config/ # Sample configs
├── scripts/ # Utility scripts
├── docs/ # Documentation
├── docker-compose.yml # Docker compose
├── nginx.conf # Nginx config
├── Makefile # Build automation
└── README.md # This file
```
## 🔌 支持的集成
### 安全工具
- Palo Alto Networks
- CrowdStrike
- AWS CloudTrail
- Azure Sentinel
- GCP Cloud Logging
- Splunk
- Elasticsearch
- FortiGate
- Cisco Umbrella
- Mimecast
### 更多
请查看 `backend/controller/connector.go` 获取完整列表。
## 📝 许可证
本项目基于 MIT 许可证授权 - 详情请参阅 [LICENSE](LICENSE) 文件。
## 🙏 致谢
- [VictoriaMetrics](https://victoriametrics.com/) - 日志存储
- [Gin](https://gin-gonic.com/) - Web 框架
- [React Flow](https://reactflow.dev/) - 工作流自动化 UI
由 [Boris Xu](https://github.com/laenix) 用 ❤️ 构建
标签:AMSI绕过, CISA项目, Go, OCSF, OISF, PE 加载器, React, Ruby工具, SOAR, Syscalls, TCP/UDP协议, VictoriaLogs, 中小企业安全, 事件管理, 可视化工作流, 威胁检测, 子域名变形, 安全信息与事件管理, 安全运营, 扫描框架, 搜索引擎爬取, 日志审计, 日志收集, 日志管理, 用户管理, 网络安全, 网络安全审计, 自动化攻击, 自动化攻击, 自动化规则, 请求拦截, 速率限制, 隐私保护