You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The purpose of this challenge is to demonstrate the MITRE Top 25 programming flaw: 'Improper Verification of Cryptographic Signature'.
2
+
3
+
> *"The product does not verify, or incorrectly verifies, the cryptographic signature for data."*
4
+
> - From MITRE [CWE 347](https://cwe.mitre.org/data/definitions/347.html)
5
+
6
+
The developer of the vulnerable application has implemented authentication using JSON Web Tokens (JWT), but has missed an important aspect of the token verification process. Find a way to elevate your privileges after you have logged in, so that you assume the role of "admin" in the application.
### Solution for "Improper Verification of Cryptographic Signature" challenge
2
+
3
+
Systems that utilize JWT authentication must perform several checks on the token supplied in the request to have a robust authentication mechanism:
4
+
5
+
- The supplied token signature matches the signature calculated for the body based on the secret only available to the server side application
6
+
- The token is not expired
7
+
- If the system implements token revocation, that the token is not revoked
8
+
9
+
To pass this challenge:
10
+
11
+
- Locate the JWT associated to your login
12
+
- Modify the token so that the role assigned to the token is "admin" - one useful tool that may help here is [jwt.io](https://jwt.io/)
13
+
- Submit the modified token to the server to elevate your permissions to admin - notice that the application doesn't validate the JWT signature calculated for the body
0 commit comments