In the Redis:
set "admin" "User"
set "admin_password" "prod_has_a_different_password"
set "fake_flag" "I told you"
set "flag_" "byuctf{test_flag}"
JSON.SET admin_options $ '["hints", "fake_flag", "flag_"]'
In the python
def getAdminOptions(username):
adminOptions = []
if username != None and username == "admin":
db = redis.Redis(host=HOST, port=6379, decode_responses=True)
adminOptions = db.json().get("admin_options", "$")[0]
return adminOptions
We can create an account (/register
)
With this account we can get the admin password
/register
)Franklin D. Roosevelt
Intercept
tab in burpsuite, change the request body with : famous_person=admin_password
Then we have the admin password :
admin_password: "I_HopeYou4re8admin_iLoveTechn070g_9283910"
Log again with the admin account And intercept the request when you get the admin flag
byuctf{al1w4ys_s2n1tize_1nput-5ed1s_eik4oc85nxz}