JWT Authentication Bypass via kid Header Path Traversal

preview_player
Показать описание
👩‍🎓👨‍🎓 Learn about JSON Web Token (JWT) vulnerabilities. In order to verify the signature, the server uses the 'kid' (key ID) parameter in JWT header to fetch the relevant key from its filesystem. To solve the lab, we'll forge a JWT that provides access to the admin panel, then delete the user carlos.

Overview:
0:00 Intro
0:13 Recap
0:38 JWT header parameter injections
1:30 Injecting self-signed JWTs via the kid parameter
3:30 Other interesting JWT header parameters
5:02 Lab: JWT authentication bypass via kid header path traversal
6:11 Solution #1: python
7:32 Solution #2: burp suite
10:45 Solution #3: jwt_tool
13:39 How to prevent JWT attacks
14:22 Additional best practice for JWT handling
14:44 Conclusion

Рекомендации по теме
Комментарии
Автор

FIRST ! I am appreciative of all the JWT attack coverage.

MichaelCooter
Автор

One possible way is also in Burp Suite -> JSON Web Token -> Attack -> Sign with Empty Key -> Send to /admin.

ShahriyarRzayev
Автор

I'm wondering whether using a kid value in JWT for path traversal actually happens in real-world applications? From my understanding, kid is typically just an ID used to look up the key, not a file path.
Also, are there any clear signs that a server is reading a file from the filesystem based on the kid value?

nhoclahola
Автор

hey bro it seems my jwt editor extension is not working. whenever i try to resign with the key i generated it just doesnt get resigned.
i found another way to solve this.

sumanth
Автор

I have one Jwt token.. It was free token... And and i need to modify that to vip token... Is this possible to edit??? If signature changed the server said token not provided in return response

niranjantechintelugu
Автор

I've figured that out why it says 302. It's because of `?id=weiner` . You need to remove it and send the request.
Or
You have to directly send the request to /admin

rahisec
visit shbcf.ru