Unguessable sabia ui token (1.0.6) #1

Merged
lucasrguerra merged 1 commits from fix/token-ui into main 2026-11-03 14:50:31 +00:00
Owner

What

The sabia ui token was SystemTime::now() in nanoseconds. Another user or process on the same machine could guess it by trying values around the startup time, then control the API: captures, deauthentication, Evil Twin.

  • The token is now 32 bytes from getrandom, the OS CSPRNG, which also works on the Windows CLI.
  • The 3 checks compare in constant time (token_ok).
  • Version 1.0.6, with CHANGELOG in EN and PT-BR. The desktop app does not use this token.

Verified

  • scripts/check.sh passes, and so do the new unit tests.
  • I ran sabia ui for real: the printed link returns 200, and requests with no token or a wrong token return 401.

🤖 Generated with Claude Code

## What The `sabia ui` token was `SystemTime::now()` in nanoseconds. Another user or process on the same machine could guess it by trying values around the startup time, then control the API: captures, deauthentication, Evil Twin. - The token is now 32 bytes from `getrandom`, the OS CSPRNG, which also works on the Windows CLI. - The 3 checks compare in constant time (`token_ok`). - Version 1.0.6, with CHANGELOG in EN and PT-BR. The desktop app does not use this token. ## Verified - `scripts/check.sh` passes, and so do the new unit tests. - I ran `sabia ui` for real: the printed link returns 200, and requests with no token or a wrong token return 401. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
lucasrguerra added 1 commit 2026-11-03 14:16:31 +00:00
fix(ui): generate the sabia ui token from the OS CSPRNG
CI / Format and clippy (pull_request) Successful in 30s
CI / Tests (Linux) (pull_request) Successful in 29s
CI / Dependency audit (pull_request) Successful in 17s
CI / Check desktop app (Linux) (pull_request) Successful in 1m13s
bcc4178e89
The token was the startup time in nanoseconds, guessable by another local
user or process within a small window, which would hand over the API
(captures, deauth, Evil Twin). It is now 32 random bytes from getrandom,
checked in constant time. Release 1.0.6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lucasrguerra merged commit fd7435cc68 into main 2026-11-03 14:50:31 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ciberfauna/sabia#1