dCTF 2021

CTF Writeup - https://ctftime.org/event/1361

Home Other writeups of dCTF 2021
13 June 2021

Injection

by shreyas-sriram

Our local pharmacy exposed admin login to the public, can you exploit it?

http://dctf1-chall-injection.westeurope.azurecontainer.io:8080/

Solution

http://dctf1-chall-injection.westeurope.azurecontainer.io:8080/

Oops! Page 49 doesn't exist :(
http://dctf1-chall-injection.westeurope.azurecontainer.io:8080/

http://dctf1-chall-injection.westeurope.azurecontainer.io:8080/
validate_login(username, password):
  if username != 'admin': return False

  valid_password = 'QfsFjdz81cx8Fd1Bnbx8lczMXdfxGb0snZ0NGZ'

  return base64.b64encode(password.encode('ascii')).decode('ascii')[::-1].lstrip('=') == valid_password

Flag

dctf{4ll_us3r_1nput_1s_3v1l}
tags: Web