Files
OpenAntiSpoof-Pro/README.md
T

6.0 KiB


OpenAntiSpoof-FullOpsec
by notme_ssa


jak hack deobf2 deobf


How it works

1. Startup & Wiring

  • AntiSpoofPlugin loads config.yml and brands-and-channels.yml via ConfigManager, initializes per-player storage/logging (PlayerStorageManager, PlayerLogManager), SurgeGuardManager, and exposes the AntiSpoofAPI bridge (ApiLifecycle + EventBus).
  • Starts the embedded NanoHTTPD resource-pack server (ProbeHttpServer) when key-spoof-probe, identity-linker, or asset-probe is enabled, optionally initializes the Pcap4J TCP/OS sniffer (OsFingerprintManager), registers Bukkit + PacketEvents listeners, binds /antispoof, and hooks PlaceholderAPI when present.

2. Player Join & Signal Collection

  • Configuration & Handshake Trace (BrandChannelListener): intercepts Handshake virtual host, Configuration/Play plugin messages (minecraft:brand, minecraft:register, client API channels), CLIENT_SETTINGS locale, and 1.20.5+ SELECT_KNOWN_PACKS ([ConfigTrace]).
  • Sign & Anvil Translation/Keybind Probes (TranslationProbeManager): dispatches 4-line Sign double-probes with randomized canary keys (key.antispoof.<rand8>), hex nonces, and vanilla baselines (fallback: "⟦%3$s|%2$s|%1$s⟧"), plus auto-closing Anvil NAME_ITEM probes (\t<nonce>).
  • 3-Phase Key-Spoof RP Probe Lab (KeySpoofRpProbeManager):
    • Phase 1: 1.20.6 vanilla edge keys (item.minecraft.mace) + nested mod translate/keybind inside chat.type.text with arguments.
    • Phase 2: pushes a temporary server resource pack overriding mod keys (key.meteor-client.open-gui, category.meteor-client) and placing custom keys inside mod namespaces (assets/meteor-client/lang/, assets/opsec/lang/).
    • Phase 3: calls removeResourcePack, waits 80 ticks (4s) for clean client reload, and verifies cache eviction.
  • Differential Bitmap Font Asset Probe (AssetProbeLabManager):
    • Runs an A/B control pack (0_CONTROL_MISSING_BITMAP pointing at a guaranteed missing PNG -> FAILED_RELOAD) against real mod texture paths (e.g. meteor-client:meteor.png -> assets/meteor-client/textures/meteor.png).
    • On Vanilla, missing mod textures return FAILED_RELOAD; on modded clients (even with OpSec Key Spoof active), existing mod JAR textures load cleanly and return SUCCESSFULLY_LOADED.
  • Command-Book Verification Probe (CommandBookProbeManager): declares a synthetic command node (/asverify_<nonce>) via WrapperPlayServerDeclareCommands and opens a verification Written Book with ClickEvent(RUN_COMMAND) to test for client-side command-book blockers.
  • Additional Subsystems: IdentityLinkerManager (HTTP cache alt-linking), ResourcePackIntegrityListener (ACCEPTED -> SUCCESSFULLY_LOADED < 5ms timing anomaly check), ProxyDetectionManager (RTT delta heuristic), OsDetectorService / OsFingerprintManager (passive TCP/OS fingerprinting), ActiveReconScanner, and ClientApiHookManager (Lunar, Badlion, Feather, LabyMod, Bedrock/Geyser).

3. Detection Logic

  • Brand, Channel & Virtual Host Checks (BrandChannelListener):
    • Flags missing brands (NO_BRAND), unknown brands (UNKNOWN_BRAND), blocked virtual hosts (BLOCKED_VIRTUAL_HOST), blocked channels (BLOCKED_CHANNEL), missing required channels (MISSING_REQUIRED_CHANNELS), and vanilla-brand + modded-channel mismatches (VANILLA_WITH_CHANNELS).
  • Translation, Keybind & Asset Probes (TranslationProbeManager, KeySpoofRpProbeManager, AssetProbeLabManager, CommandBookProbeManager):
    • Detects unspoofed mod keys via Sign/Anvil translation & keybind probes, detects spoofed fallback/canary mismatches, detects OpSec-protected clients via Bitmap Font A/B Asset Probe (ASSET_DETECTED), and flags blocked verification books (COMMAND_BOOK_BLOCKED).
  • Proxy & OS Analysis (ProxyDetectionManager, OsFingerprintManager):
    • Evaluates ping samples against handshake RTT (POSSIBLE_PROXY, SUSPECTED_PROXY) and fingerprints client OS via TCP SYN signatures when Pcap4J is enabled.

4. Violation, Alert & Punishment Pipeline

AntiSpoofPlugin.flagPlayer(player, violationType, reason)
  ├─ isBypassed(uuid) || player.hasPermission("antispoof.bypass") -> skip
  ├─ Record violation on PlayerProfile & increment weighted threat level
  ├─ PlayerLogManager -> append structured FLAG entry + JSON snapshot
  ├─ notifyStaff -> broadcast formatted alert to online staff (antispoof.alerts)
  ├─ EventBus -> AntiSpoofAPI dispatches ViolationReportedEvent
  └─ If PunishmentRule.isPunish() && !commands.isEmpty():
       ├─ Dispatch AntiSpoofPrePunishmentEvent (cancellable)
       └─ If not cancelled -> execute configured console punishment commands

5. Commands, GUI & Placeholders

  • Commands (AntiSpoofCommand, 29 subcommands): /antispoof <gui|alerts|guard|channels|brand|host|os|mods|translate|keybind|keyspoof|assetlab|check|proxy|runcheck|runmods|runbook|stopmods|verify|search|client|logs|listchannels|listbrands|reload|config|help>.
  • Staff GUI: MainMenuGui, ConfigGui, ClientBrandsGui, PlayerListGui, PlayerInfoGui, and LogSnapshotGui for live inspection and live config toggling.
  • PlaceholderAPI (AntiSpoofPlaceholderExpansion): %antispoof_brand%, %antispoof_version%, %antispoof_locale%, %antispoof_os%, %antispoof_proxy%, %antispoof_threat%, %antispoof_mods%, %antispoof_channels%, %antispoof_bedrock%, %antispoof_flagged%.

How to build

Prerequisites

  • Java Development Kit: JDK 21+ (compiled with --release 21)
  • Paper / Folia 1.20.6 + PacketEvents 2.7.0+

Building OpenAntiSpoof-FullOpsec

Run from this folder:

.\gradlew.bat clean build --no-daemon

Output JAR: build/libs/AntiSpoof-1.5.0.jar