Sokudo: Admin Takeover via Predictable Auth Token
The application issued bearer tokens that were simply the user's login timestamp in a fixed date-time format, with no signing or randomness. Because the public leaderboard exposed every user's last login time, an attacker could craft the admin's token and reach admin-only API endpoints.
medium.com
Published on medium.com
Escalate privileges from a regular user to admin by exploiting a weak token generation mechanism.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the server generated authentication tokens directly from the user's login timestamp instead of using a random, signed value, and it exposed those timestamps publicly.
Impact
An attacker could impersonate the administrator and read the full user list, including emails, roles and personal data.
What the attacker needed
A free regular account; admin last login visible on leaderboard
The fix
Tokens should be generated randomly and cryptographically signed, and login timestamps should not be exposed publicly.
How it was found
- Log in as a regular user and note the bearer token sent with requests.
- Compare the token with the last_login value returned by the API and see they match.
- Read the admin's last login time from the public leaderboard.
- Convert that timestamp into the token format and enumerate hidden admin routes.
- Send a request to the admin users endpoint with the crafted token and receive the user list.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
When you log in, the server gives your browser a token, a short string it shows on later requests to prove who you are. Here that token was just the moment you logged in, written as a date and time, so anyone who could see when the admin last logged in could type the same string and be treated as the admin.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.