Skip to content

Commit fcf781b

Browse files
committed
updated finearts blog
1 parent 8f7e677 commit fcf781b

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

source/_posts/web_exploitation_at_finearts.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,19 @@ It is clearly visible that we have different features such as creating and viewi
2929

3030
Creating a new artist or an artwork via the admin panel gave us a `401 unauthorized error`. Therefore, we decided to use BurpSuite to capture the request. Using Burp Suite, we captured the request and quickly found a JSON Web Token (JWT) in the request headers. Using [jwt.io](https://jwt.io/), we decoded the Json Web Token and got the following payload.
3131

32-
33-
![jwt](../assets/finearts/jwt.png)
32+
![jwt](../assets/finearts/original_jwt.png)
3433

3534

3635
It’s clearly visible that the JWT payload has a special value `UserRole` which was set to `user` by default. This means that any new user created via the admin panel would be assigned the role `user` which doesn’t have enough privileges to create new artists and artworks. Therefore, we decided to perform privilege escalation in order to gain elevated privileges (for example, admin).
3736

3837

3938
We tried common exploits of JWT such as `Weak Key Attack` and it worked. We used jwt_tool to crack the JWT and the signature key we found was surprisingly empty which is a bad practice in terms of web security.
4039

40+
![jwt_crack](../assets/finearts/jwt_cracked.png)
4141

42+
Hence we modified the token using [jwt.io](https://jwt.io/) and changed the `UserRole` to admin and forged the token as given below.
4243

43-
44-
45-
![jwt_crack](../assets/finearts/jwt_cracked.png)
44+
![forged_jwt](../assets/finearts/forged_jwt.png)
4645

4746
We sent the same request again with the forged token. And yesss we added the artwork successfully.
4847

74.9 KB
Loading

0 commit comments

Comments
 (0)