mental-health
Challenge
A web app whose source (served at ?src) gated something behind a nonce derived in a loop. Interestingly, the hash algorithm came from a user supplied parameter (lol).
| |
Solution
Because $_GET["a"] feeds straight into PHP’s hash($algo, ...), we control the algorithm and can pick a weak/cheap one to make the resulting nonce predictable. From there the path was the usual stored XSS plus a CSRF request to exfiltrate against the now known nonce.