3 ms·
Well, let's assume I can wave a magic wand and predict the next PRNG output. These are the hypothetical next steps to abuse this capability: 1. Create pas
by sarciszewski 12y ago
Well, let's assume I can wave a magic wand and predict the next PRNG output.
These are the hypothetical next steps to abuse this capability:
1. Create password resets for a non-admin user account whose inbox I can read.
2. Predict the next token that will be issued.
3. Request a password reset for the blog owner.
4. Use predicted token to change the admin password.
The solution is to use a true CSPRNG with access to high-quality entropy (i.e. /dev/urandom) rather than relying on a userspace RNG based on mt_rand(), uniqid(), and fast cryptographic hash functions.
The lion's share of criticism I've received is that the userspace CSPRNG is good enough to stop this attack. I subscribe to the "use urandom" school of thought that even the most paranoid yet well-informed crypto experts subscribe to.
The rest of the criticism I've received was in the realm of "why bother, just SQLi one of the horribly written WordPress plugins they'll inevitably install?"