Imitation Crab
by shreyas-sriram
Flag should be modified to fit the rgbCTF format (rgbCTF{flag}, underscores between words)
Site : http://challenge.rgbsec.xyz:7939/
Solution
- Going through the source code, there is an
EventListenerforkeyup - This listener has a
fetchcall to/searchas seen below
fetch('/search', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ 'char': e.keyCode }), }) - Visit
/robots.txt, find a path to aharfile
/static/export.har - Download the
harfile from http://challenge.rgbsec.xyz:7939/static/export.harGoogle : The HTTP Archive format, or HAR, is a JSON-formatted archive file format for logging of a web browser's interaction with a site. - It is known that there is a
POSTrequest to/searchas shown above - Thus searching for
postinexport.harreveals the following
"postData": { "mimeType": "application/json", "text": "{\"char\":<char-code>}" } - Parsing all the
<char-code>data and converting to string reveals the flag
Flag
rgbCTF{H4R_F1L3S_4R3_2UP3R_US3FU1}