r/netsec • u/nibblesec Trusted Contributor • 6d ago
Trivial C# Random Exploitation
https://blog.doyensec.com/2025/08/19/trivial-exploit-on-C-random.html2
u/JaggedMetalOs 5d ago
There was an online poker site with a similar vulnerability like 25 years ago
1
u/smetana- 4d ago
Very cool! You mention in the blog that there's another algorithm that does not seed by time. That one (Xoshiro256**) was only available starting in .NET 6 — possibly the app you were testing was on an older .NET version? It's also possible to crack the new Xoshiro algorithm: system-dot-random-predictor
3
u/jpgoldberg 3d ago
The default RNG in pretty much every language’s standard library is not cryptographically secure. They were never designed to be. Now a-days they typically do offer cryptographically secure RNGs as well. I don’t know specifically about C#, but I’d be surprised if it didn’t.
3
u/albinowax 6d ago
Love it. This vulnerability is almost identical to this Academy lab! https://portswigger.net/web-security/race-conditions/lab-race-conditions-exploiting-time-sensitive-vulnerabilities