Commit Graph
10 Commits
Author SHA1 Message Date
Peijun Zhao 030ced87f9 V5.0 Paper插件架构:深度植入Minecraft服务器进程,实现完美实时防护
核心变更:
- 新增 PaperMC 插件层(14个新文件):主插件入口 AluerPlugin + 10个 Bukkit 事件监听器 + DataBridge 数据桥接 + InternalCommandExecutor 内部命令执行器
- 运行时注入服务器进程,直接访问 Bukkit/Paper API,取消 RCON 中间层
- 9种反作弊实时检测(Speed/Fly/Jesus/NoFall/KillAura/Reach/AutoClicker/Scaffold/Nuker)全部迁移为事件驱动
- 聊天安全(刷屏/广告/钓鱼)与命令滥用检测由 AsyncPlayerChatEvent/PlayerCommandPreprocessEvent 直接拦截
- AlertType 枚举扩展至 47 项告警类型,覆盖反作弊/玩家行为/服务器保护/聊天安全/网络/主机全部维度
- 双模式兼容:serverguard.mode=plugin(嵌入式)| external(传统外部监控),旧模式代码完整保留
- Maven 构建切换为 shade 插件,生成 Paper 插件兼容的扁平 JAR
- 278 项全量测试通过,0 失败
2026-05-16 15:50:48 +08:00
Peijun Zhao 1269d4dfa5 V4.0 安全扩展:29个新模块 + 60项API端点 + 164项新测试全部通过
新增模块(5组29个):

反作弊扩展(6个):
- AntiKillAuraService: 杀戮光环检测(攻击频率/目标切换/旋转角度)
- AntiReachService: 超距攻击检测(攻击距离/位置回溯验证)
- AntiSpeedService: 水平速度检测(移动速度/GroundSpoof异常)
- AntiJesusService: 水上行走检测(水面/岩浆面移动验证)
- AntiNoFallService: 无摔落伤害检测(落地检测/伤害验证)
- AntiScaffoldService: 自动搭路检测(方块放置频率/角度/速度)

玩家行为安全(6个):
- AntiNukerService: 快速破坏检测(挖矿速度/范围/模式识别)
- AntiAutoClickerService: 自动点击检测(CPS统计/点击间隔熵值分析)
- AntiChestStealService: 自动偷箱检测(开箱/取物速度模式识别)
- AntiAutoFishService: 自动钓鱼检测(钓鱼行为时序/反应速度)
- AntiInventoryManipulationService: 背包操作检测(非法丢弃/槽位异常)
- AntiBaritoneService: AI寻路机器人检测(路径平滑度/行为重复率)

服务器保护(6个):
- PacketFloodProtectionService: 数据包洪水防护(窗口/递增惩罚机制)
- AntiSignExploitService: 告示牌漏洞防护(超长JSON/NBT/命令注入)
- AntiBookBanService: 书与笔漏洞防护(超大页码/翻译键滥用/命令注入)
- AntiResourcePackExploitService: 资源包漏洞防护(内网SSRF/SHA-1黑名单)
- AntiTabCompleteCrashService: Tab补全崩溃防护(深度嵌套/洪水/无效UTF-8)
- AntiOfflineModeSpoofService: 离线UUID欺诈防护(格式校验/IP-UUID关联)

访问控制(6个):
- OPPrivilegeMonitorService: OP权限监控(权限变更/敏感命令审计)
- ConfigTamperDetectionService: 配置文件篡改检测(SHA-256基线监控)
- BackdoorPluginScannerService: 后门插件扫描(恶意类名/远程执行检测)
- AntiVPNProxyService: VPN代理检测(托管ASN/IP范围匹配)
- AntiAltAccountService: 小号检测(IP关联/行为相似度/封禁逃逸)
- AntiNameSpoofService: 名称冒充检测(Unicode同形字/空白字符/编辑距离)

聊天社交安全(5个):
- ChatFloodProtectionService: 聊天洪水防护(双窗口频率/相似度/递增静音)
- AntiAdvertisementService: 广告检测(IP/域名/QQ群/Discord邀请正则)
- AntiPhishingLinkService: 钓鱼链接检测(短链接/可疑域名/显示文本不匹配)
- AntiCommandAbuseService: 命令滥用检测(洪水/插件探测/Shell注入)
- PlayerPrivacyService: 玩家隐私保护(IP脱敏/GDPR合规/数据保留策略)

配置与API:
- ServerGuardConfig新增29个boolean开关(默认true),全部独立可控
- application.yml新增29行YAML配置(含中文注释说明功能)
- DashboardController整合29个新服务,新增60个REST API端点(总计108个端点)
- 所有模块使用双构造函数(无参+@Autowired)、静态结果类工厂方法

测试:新增5个测试类164项测试,全部通过(全项目278项/17测试类/159源文件)

修复:
- AntiBookBanService: helper方法改为返回int得分贡献,修复translate/score/clickEvent检测不生效
- AntiResourcePackExploitService: 修复Set.of()中.vbs重复导致ExceptionInInitializer
- AntiTabCompleteCrashService: 深度嵌套得分提高至75(触发blocked阈值)
- AntiOfflineModeSpoofService: 快速UUID切换得分提高至75(触发blocked阈值)
- PacketFloodProtectionService: 重构检测流程,移除提前返回导致的检测屏蔽
2026-05-16 11:47:59 +08:00
Peijun Zhao c60ceda94f V4.0 正式发布:130源文件/114测试全部通过,31个高级扩展安全模块,完整API与专业开发文档
- 版本号从1.0.0升级至4.0.0,pom.xml版本号同步
- 新增 docs/DEVELOPER.md 详细技术开发文档(架构设计/模块详解/API参考/扩展指南)
- 文档用词规范化,去除非专业"超进化"用语,以V4.0和专业表述统一
- README/README_EN/USER_MANUAL/PROJECT_SUMMARY同步更新模块数量和版本信息
- CLI help命令全面重写,200行分类命令参考,覆盖14个功能类别
- 31个高级扩展模块独立开关,配置注释去除版本标签
- 发布产物 release/V4.0/AluerServerGuard-V4.0.jar
2026-05-10 22:36:02 +08:00
Peijun Zhao b271eda8d5 超进化 v3.3: 6个新安全模块 + 31个模块独立开关 + 完整文档与测试
新增6个Minecraft安全模块:
- GeoBlockService: 地理IP封锁(国家黑白名单/高风险MC攻击来源拦截)
- PlayerSessionValidationService: 玩家会话验证(UUID/正版/离线检测/会话重放)
- PluginVerificationService: 插件完整性校验(SHA-256/恶意插件名/25个已知恶意插件)
- ConnectionThrottleService: 连接速率限制(多窗口追踪/递增延迟2s-30s)
- BackupIntegrityService: 备份完整性验证(SHA-256/文件存在性/6h自动扫描)
- AntiSkinSpoofService: 皮肤伪造检测(25个冒充目标/可疑URL/变更频率)

配置独立开关(31个模块全部可单独控制):
- ServerGuardConfig新增SuperEvolutionConfig包含全部31个模块的enabled开关
- application.yml新增完整super-evolution配置段(含中文说明)
- 每个Service注入ServerGuardConfig并在入口检查开关,关闭时跳过检测

DashboardController新增6个API端点 + 全部25个服务重构注入config

测试: V33SecurityTest 29项测试(含23项v3.3 + 6项更正),全部114测试通过

文档: README/README_EN 30+→85+模块,USER_MANUAL新增完整开关配置文档
2026-05-10 22:02:42 +08:00
Peijun Zhao 1d297ba095 超进化 v3.2: Minecraft专属安全模块 — X-ray透视/飞行外挂/物品复制/崩溃漏洞/卡服机检测
新增5个Minecraft反作弊安全模块 + 21项测试 + 5个API端点:
- AntiXrayDetectionService: 钻石/远古残骸挖掘比检测,直线挖掘模式识别
- AntiFlyDetectionService: 垂直/水平速度检测,飞行外挂判定
- AntiDupeDetectionService: 物品堆叠异常/高价值物品暴涨/9种复制方法检测
- CrashExploitProtectionService: 12种崩溃漏洞防护(超大包/NBT炸弹/书与笔攻击等)
- LagMachineDetectionService: Observer链/TNT堆/红石密度/实体泛滥检测
DashboardController新增 /api/security/anti-xray|anti-fly|anti-dupe|crash-exploit|lag-machine 端点
2026-05-10 21:11:00 +08:00
Peijun Zhao f7c590e34e feat: super evolution — 20 new security modules with full test coverage
新增20个超进化安全模块 (17 new services + 1 test suite + Dashboard API):
- JWT认证服务 (JwtAuthService): 基于HMAC-SHA256的token管理
- 反暴力破解 (BruteForceProtectionService): 渐进延迟+三层时间窗口检测
- 反机器人检测 (AntiBotDetectionService): MC玩家名模式+加入速度+多账号检测
- 反向Shell检测 (ReverseShellDetectionService): 50+ reverse shell模式匹配
- ARP欺骗检测 (ARPSpoofDetectionService): MAC变更+网关欺骗+重复MAC检测
- DNS隧道检测 (DNSTunnelDetectionService): 熵值分析+子域名编码+频率监控
- 漏洞签名检测 (ExploitSignatureService): Log4Shell/SQL注入/XSS等15+签名
- SSRF防护 (SSRFProtectionService): 内网IP/云元数据/编码绕过检测
- XXE防护 (XXEProtectionService): XML实体注入+十亿笑攻击检测
- CSP强制执行 (CSPEnforcementService): XSS/Clickjack防御+安全响应头
- 数据库防火墙 (DatabaseFirewallService): SQL注入+危险关键字+堆叠查询检测
- 数据防泄漏 (DataLossPreventionService): 12种敏感数据模式(邮箱/API Key/SSH Key等)
- 内存保护 (MemoryProtectionService): JVM堆监控+GC过载+内存泄漏检测
- 进程注入检测 (ProcessInjectionDetectionService): 线程异常+内存映射+文件描述符
- 安全文件删除 (SecureFileDeletionService): DoD多pass覆写+擦除后删除
- 取证收集器 (ForensicsCollectorService): 进程/网络/文件/日志取证
- 事件响应 (IncidentResponseService): 5套Playbook(DDOS/爆破/入侵/MC漏洞/数据泄露)
- 威胁狩猎 (ThreatHuntingService): 10种主动狩猎规则
- 合规扫描 (ComplianceScannerService): 7大类20+项合规检查
- 反破坏检测 (AntiGriefDetectionService): MC方块破坏/放置/实体/容器监控

API端点: DashboardController新增20+个安全API端点
测试: 64个测试全部通过 (12 existing + 52 new)
2026-05-10 20:36:04 +08:00
Peijun Zhao 4c08566022 feat: ASCII banner + graceful shutdown hook for ServerGuardApplication 2026-05-10 16:03:48 +08:00
Peijun Zhao f28be08211 feat: frontend overhaul - health panel + sparklines + auto-refresh
- Add health status panel with component status dots
- Add auto-refresh toggle with configurable interval (3s/6s/10s/30s)
- Add performance sparkline bars (TPS/CPU/Memory/Players)
- Use useReducer for terminal lines (append/clear)
- Better responsive layout for mobile
- Third ambient background layer for visual depth
- Refined glass-panel hover effects
2026-05-10 16:02:04 +08:00
Peijun Zhao 46d597d6ff feat: critical fixes + health API + webhook + attack reports
- Fix busy-wait loop in ServerGuardService (removed while(true))
- Fix sync blocking on async Future (use thenAccept instead of .get())
- Add startup banner with system info and config validation
- Add HealthService: /api/health, /api/health/live, /api/health/ready
- Add RequestLoggingFilter for HTTP request monitoring
- Add CorsConfig for cross-origin support
- Add WebhookService (Discord/Slack notifications)
- Add AttackReportService with HTML report generation
- New endpoints: /api/attacks/recent, /api/attacks/report, /api/webhook/test
- Upgrade Lombok 1.18.30 to 1.18.38 for Java 25+ compatibility
2026-05-10 15:54:48 +08:00
Peijun Zhao b0aaea9fb3 提交Git 2026-05-10 12:59:00 +08:00