LibreAuth

Hardening — Anti-Cheat · Anti-RE · Anti-Inject

Production-grade client protection for LibreAuth — maximize bypass resistance in your build.

WARN
No system is 100% unhackable — the goal is to make attacks costly and slow enough to deter attackers.

Three-Layer Overview

LayerProtects AgainstYour Client
ServerReplay, session hijack, forged hashHandled by LibreAuth — verify signed responses
WireMITM sending forged JSON success responsesEd25519 verify + AES enckey
BinaryRE, binary patching, DLL injection, debuggerObfuscator + hardening.hpp + hash on init

Wire — MITM / Fake API Protection

  1. Verify X-Signature-Ed25519 + timestamp before parsing JSON — see Response Signing
  2. Send 35-char enckey on init → AES-encrypted body
  3. Do not embed Application Secret in the client — use Ed25519 public key only
  4. HTTPS only · pin certificate in native client when possible

Hash Check — Binary Patch Protection

  1. Build release → LibreAuth Protect L3 seal / obfuscate → then compute MD5
  2. Client sends hash= on every init call
  3. Even a 1-byte jmp/nop patch → MD5 changes → server rejects

Fix errors: Hash troubleshooting

Reverse Engineering — Making RE Harder

Server protects the wire · but attackers can open the exe in x64dbg if the client is not hardened:

TechniquePurpose
Native L3 (LibreAuth)SecureLoader sealed payload + LA1 gate + CreateProcess
String encryptionAPI URL, ownerid, app name, Ed25519 pubkey — decrypt briefly at runtime then wipe
Control-flow obfuscationSplit auth logic across multiple functions · avoid a single login block
Integrity self-checkHash .text section before init — exit if patched
Split auth moduleSeparate auth DLL · load from resource · self-sign the DLL
Anti-dumpDo not keep license key / session as plain strings in memory for long
WARN
Never hardcode keys or webhooks in the client — attackers can dump strings unless obfuscated

Anti-Inject — DLL / Hook / Debugger Protection

Attackers often inject DLLs or attach debuggers to bypass auth — hardening.hpp runs multi-layer runtime checks:

  1. Call la_guard::RunChecksWithUrl(apiUrl) before init() and every 30–60 seconds
  2. Inspect fail reason: la_guard::FailName(la_guard::LastFail())
  3. Development on a VM: contact your maintainer for dev-build guidance
  4. Call check() heartbeat alongside the guard loop

Anti Fake API — Local Auth Bypass

Local emulators redirect traffic to 127.0.0.1:5000 — server never sees those requests. Defense is client-side:

Multi-language Hardening

API surface matches C++: RunChecks(blockVm), RunChecksWithUrl, LastFail / FailName, optional ExeMd5Hex / Hwid. Every SDK exposes RunChecks; non-Windows hosts return true (same as C++ #else).

Kernel-driver parity remains C++ only. Call RunChecks before Init/Login on Windows clients.

C++ — Hardening Snippet

Minimal client bootstrap using the public headers hardening.hpp + libreauth.hpp (DNS freshness comes from trust.hpp, pulled in by hardening.hpp):

#include "hardening.hpp"
#include "libreauth.hpp"

int main() {
    const char* api = "https://your-host/api/1.4/";
    if (!la_guard::RunChecksWithUrl(api)) {
        return 1;
    }

    la::Client app("MyApp", "OWNER_ID_10", "1.0", api);
    app.Init(la_guard::ExeMd5Hex());
    app.License("KEY", la_guard::Hwid());

    while (running) {
        if (!la_guard::RunChecksWithUrl(api)) break;
        Sleep(45000);
    }
    return 0;
}

Files: sdk/cpp/hardening.hpp · sdk/cpp/shield.hpp · sdk/cpp/trust.hpp · sdk/cpp/bind.hpp · C++ setup · C++ Pack (Enterprise)

C++ — Optional Kernel Guard (advanced)

An OPTIONAL WDM sample driver (sdk/cpp/kernel/) adds a kernel vantage point that usermode cannot spoof: kernel-debugger detection and soft ObRegisterCallbacks protection of the loader's own PID. The usermode bridge sdk/cpp/kernel_bridge.hpp fails soft — if the driver is absent the loader continues with the usermode hardening.hpp guard only (no tamper).

WARN
Kernel drivers require EV signing for retail Windows. Test-signing is lab-only and must not ship. This is defensive license protection, not persistence.

Build/steps: sdk/cpp/kernel/README.md · bridge: sdk/cpp/kernel_bridge.hpp

C# / Unity / WPF

FiveM / Lua

Pre-Release Checklist

#Item
1Client verifies Ed25519 on every response
2Send exe MD5 on init when hash check is enabled
3enckey + AES on wire
4Obfuscate binary + encrypt credential strings
5Anti-debug + anti-inject loop (hardening.hpp / equivalent)
6check() heartbeat + HWID on every request
INFO
Anti-tamper: Anti-Tamper · Signing: Response Signing · Ops: Operations · Pack: C++ Pack