Privilege Escalation by algorithm confusion when server public key is exposed and JWT token algorithm is RS256(Change the algorithm from RS256 or asymmetric hashing algorithm attack to HS256 or symmetric algorithm) This is not just only an algorithm confusion, it confuses you too. Yes, I am not kidding :) Before going to understand the exploitation part, first understand what is RS256 and HS256 RS256 (Asymmetric Algorithm): It uses the private and public keys. The private key is never shared with anyone and this key is used for generating the signature. The server sends the JWT token by adding the signature to it. Public key is used by the JWT token receiver, who used this key to verify the signature. HS256 (Symmetric Algorithm): It is a symmetric key hashing algorithm that uses one secret key . The key is used for both generating the signature and validating the signature. The secret key is shared with both parties. Let's assume a scenario where you r...
A blog is all about cyber security, WAPT, VAPT, API Security Testing, Scripts, Automation and Random stuff