Challenge
https://fare-evasion.chal.uiuc.tf/
Analysis
https://chuajianshen.github.io/2024/06/29/UIU2024/ Doing CTRL+U and viewing the source shows: What we know is that:
- It uses JWT tokens
- It provides the passenger signing key
- There is a SQL injection through the kid header with md5, and uses latin1 encoding for the response
- We have to get conductor key to sign our token to get flag The vulnerability is this: Since md5 is evaluated in raw form, it can contain characters with special meaning to MySQL.
Changing the kid header to 129581926211651571912466741651878684928 will leak the conductor key. After getting this key, we can forge our token to obtain the flag.