r/netsecstudents • • 16d ago

I built an on-device behavioral engine that decides human vs bot — then walled the whole site in front of it [open verification, public vectors]

Full disclosure: this is my own project (solo dev, Bern). Posting because

r/netsec is the crowd I'd want poking holes in it.

EDNA (openos.space) is a behavioral-biometric engine that runs 100% in the

browser: 16 channels (timing entropy, path curvature, scroll pauses, touch

contact area, typing bursts, corrections...). It classifies human vs bot

continuously, never sends raw biometrics anywhere — the device emits verdicts

and hash patterns only.

What I'd actually like eyes on:

- Verification suite: github.com/sebklaey/EDNA-verification — 90/90

deterministic checks, 7/7 DOM-listener checks, seeded vectors. Expected

outcomes published. Independent runs can be logged publicly.

- Injection resistance: synthetic JS events are rejected (0/3000 accepted in

our tests). CDP-dispatched mouse events are detected via provenance

(no trackpad/touch characteristics) and capped low even with organic-looking

curves. Mouse-only devices can't fully verify — deliberate.

- Challenge-response v1.1 (rhythm / hold / move) as the second gate.

- Backend: everything account-scoped sits behind a Supabase edge function

that fails closed without valid account keys. Anon access is restricted by

design.

- The edge wall: every non-API URL is behind a Cloudflare Pages middleware.

Bot/AI UAs get 403 + one line of text, nothing else. Search engines

whitelisted, /mcp + /v1 + /oauth exempt (product API, fail-closed).

Honest limit, printed on the site: statistical mimicry is an open boundary.

If you can beat it, I want the repro.

Happy to answer technical questions — architecture, threat model, vectors.

1 Upvotes

2 comments sorted by

1

u/sarusongbird 15d ago

If the entire (or the bulk of the) access control decision is made on the user-controlled device, how do you prevent malicious users from simply submitting (or re-submitting) a pass result?

1

u/PossibilityQueasy949 2d ago

Good question - the short version: the device verdict is a signal, not a credential. A bare 'pass' submission is rejected by design. Concretely:

  1. Signed pattern, not a verdict bit. The client doesn't send human=true. It emits a signed hash pattern over the 16 channels (per-device key, EDNA identity). The server-side checks re-derive plausibility from the pattern itself - entropy cross-consistency, channel correlation, timing histograms. Fabricated patterns fail the same deterministic checks as the verification suite (github.com/sebklaey/EDNA-verification); a synthetic pattern is just another bot.
  2. Freshness / anti-replay. Verdicts are session-scoped, continuously re-evaluated, and single-use: they carry a monotonic sequence anchored in the signed hash chain. Resubmitting an old verdict = replayed seq/hash, detected server-side. The material expires in seconds, not sessions.
  3. Server-verified second gate. Anything account-scoped runs challenge-response v1.1 (rhythm/hold/move) with a server-issued nonce: single-use, time-bound, verified against expected biomechanical bounds. A recorded answer to an old challenge is worthless; solving a fresh one live is exactly the 'human in the loop' property we want.
  4. Fail-closed backend. Account actions go through a Supabase edge function that fails closed without valid account keys - no anonymous verdict submission path exists at all.

Honest boundary: a fully rooted/modified client could emit valid-looking signed data continuously - that's the fundamental client-trust limit, same as any on-device attestation. The mitigation is that trust is never durable: re-verification is continuous, the second gate is server-bound, and anomalies accumulate in confidence scoring rather than granting a permanent key. If you can replay a captured pattern past the server checks, I want the repro - that's exactly what the verification repo's public logging is for.