Initial commit: SynapseAiAnticheat v3.2 source, Maven, and IDEA setup

This commit is contained in:
xoo0524tw committed 2026-12-02 20:37:39 +08:00
commit a9337d2628
59 files changed
+9541

No files matched your search

+67
View File
@@ -0,0 +1,67 @@
# SynapseAiAnticheat (v3.2)
**SynapseAiAnticheat** is a hybrid Minecraft anticheat plugin for **Spigot, Paper, and Purpur** (`1.16.5 – 1.20.4+`) that combines deterministic kinematic/combat checks with an embedded **ONNX Runtime** neural network (`anticheat_model.onnx`) and a multi-signal Risk Engine.
> **Disclaimer:** This repository contains source code recovered through static & behavioral reverse engineering of `SynapseAiAnticheat-3.2.jar` for educational, security research, and interoperability analysis purposes.
---
## 1. Original Obfuscation & Reverse-Engineering Summary
### Obfuscation Profile
- **Protection strength:** Light / un-obfuscated bytecode.
- The distributed JAR (`SynapseAiAnticheat-3.2.jar`) retained original package structures (`net.synapselabs.anticheat.*`), class names, method/field names, debug line tables, and embedded resources (`plugin.yml`, `config.yml`, `messages_en.yml`, `messages_ru.yml`, `anticheat_model.onnx`).
- `com.microsoft.onnxruntime:onnxruntime` (`1.17.1`) was shaded directly into the plugin JAR without relocation.
### Reverse-Engineering Workflow
1. **Archive & Dependency Inspection:** Identified the Maven coordinates, Paper API (`1.20.1-R0.1-SNAPSHOT`) target, Java 17 bytecode level, and shaded ONNX Runtime dependency.
2. **Decompilation & Reconstruction:** Extracted and reconstructed all 46 plugin classes under `net.synapselabs.anticheat.*` along with all YAML/ONNX resources into a clean Maven project (`pom.xml`).
3. **Behavioral Equivalence Verification:** Cross-checked enum ordinals, `FeatureSchema` assembly/defaults, `RiskEngine` / `RiskAccumulator` scoring math, and `PlayerRecordCodec` serialization round-trips against the original JAR's runtime behavior.
---
## 2. Recovered Architecture & Features
### Core AI & Risk Engine (`net.synapselabs.anticheat.engine`)
- **ONNX Neural Inference (`AiInferenceEngine`, `InferenceService`):** Loads `anticheat_model.onnx` into RAM via ONNX Runtime (`<0.3 ms` target inference latency) and performs asynchronous combat classification with Platt-style calibration.
- **32-Feature Kinematic Schema (`FeatureSchema`, `FeatureVector`, `CombatTracker`, `KinematicHistory`):** Extracts 32 combat features (`combat.v3`) per hit, including reach distance, angle offset, 1t/2t/5t yaw & pitch deltas/acceleration/jerk, raycast hit/angle error, hitbox edge proximity, GCD sensitivity & snap detection, attack interval variance, strafe-rotation correlation, and knockback deviation.
- **Multi-Signal Risk Engine (`RiskEngine`, `ContextEngine`, `RiskAccumulator`, `HardCombatChecks`, `LagCompensator`):** Combines weighted signals (`HARD_SNAP`, `HITBOX_MISS`, `REACH`, `AIM_CONSISTENCY`, `KINEMATIC_ROBOTIC`, `SILENT_ROTATION`, `UNNATURAL_JERK`, `PERFECT_COOLDOWN_SYNC`, `AI_MODEL`) with ping/TPS/context modifiers and exponential time-decay (`30s` half-life) into `LEGIT`, `SUSPICIOUS`, and `CHEAT` verdicts.
### Modular Gameplay Checks (`net.synapselabs.anticheat.checks`)
- **`AutoClickerCheck`:** CPS ceiling and click-interval standard deviation check.
- **`FastBreakCheck`:** Block-break speed multiplier check.
- **`FastPlaceCheck`:** Block-placement rate (blocks/sec) check.
- **`FastInteractCheck`:** Minimum eat and bow-draw tick validation.
### Administration, Integrations & Tooling
- **GrimAC Hybrid Bridge (`GrimAcBridge`):** Reflection-based integration that ingests GrimAC flags into `ThreatState` and boosts suspicion.
- **Punishment & Freeze System (`PunishmentManager`, `FreezeManager`):** Supports `AUTO` detection (LiteBans, AdvancedBan, LibertyBans, Essentials, Bukkit), custom commands, shadow mode, auto-kick/cancel thresholds, and player freeze/interrogation workflows.
- **Staff UX (`AdminGuiManager`, `AlertManager`, `OverheadDisplayManager`, `LanguageManager`):** 54-slot chest dashboard & per-player inspection GUI, clickable alerts, overhead `TextDisplay` threat indicators, and English/Russian (`en` / `ru`) localization.
- **Telemetry, Dataset & Notifications (`DatasetManager`, `DebugManager`, `VisualDebugRenderer`, `AuditLogManager`, `DiscordWebhookService`, `UpdateChecker`):** Combat dataset CSV recording/export, hitbox/raycast debug rendering, file logging, Discord webhook embeds, and GitHub release checks.
---
## 3. Build & Usage
### Prerequisites
- **Java Development Kit (JDK) 17** or newer (compiled with `--release 17`)
- **Apache Maven 3.8+** (or IntelliJ IDEA with its bundled Maven)
### Building with Maven
```bash
mvn clean package
```
The shaded plugin JAR will be generated at:
```text
target/SynapseAiAnticheat-3.2.jar
```
### Opening in IntelliJ IDEA
1. Open the project root directory in **IntelliJ IDEA**.
2. IntelliJ will automatically recognize `pom.xml` and the shared `.idea/` project configuration (UTF-8 encoding, Java 17 language level, Paper & Spigot Maven repositories, and `-Xpkginfo:always` compiler flag).
3. Select a **JDK 17** SDK in **File → Project Structure → Project SDK** if prompted, then run the **Maven `package`** lifecycle goal.
### Server Installation
1. Place `target/SynapseAiAnticheat-3.2.jar` into your server's `plugins/` folder (Paper/Purpur/Spigot `1.16.5 – 1.20.4+`).
2. Start the server and run `/aiac` in-game to complete the initial language selection (`setup_completed: true`).
3. Configure thresholds, punishment mode, Discord webhook, and checks in `plugins/SynapseAiAnticheat/config.yml`.