WebページのURLと、Admin BotのURLが与えられた。
WebページにアクセスするとPHPのソースコードが表示され、
Cookieのsecretが指定の値、かつリクエストボディが指定の要素を含むJSONであるPOSTリクエストを受け取ると、
JSONで指定したURLにflagを送るようになっていることが読み取れた。
Admin Botは、指定したURLにアクセスしてくれるものだった。
正確には、ただPOSTリクエストを送るだけでなく、返されるscriptタグの中身を実行できる形で表示させないといけない。
調査の結果、HTMLのformタグに属性enctype="text/plain"を指定することで、
特殊文字をエンコードせずに送信させ、それによってJSONを送信させることが可能であることがわかった。
enctype属性 ≪ form要素 ≪ メタデータ ≪ 要素 ≪ HTML5入門
これを利用し、以下のHTMLファイル (example.comのかわりに
An URL of a web page and an URL of Admin Bot were given.
The web page showed a PHP source code.
Reading that, I found that it will send a flag to an URL specified in JSON
when it receives a POST request with secret with a specific value in the Cookie
and the request body is a JSON with a specific entry.
The Admin Bot will access URLs specified by the user.
Strictly speaking, not just sending a POST request but displaying the responce in a way in which what in the script tag in the response will be executed.
After some studying, I found that we can have it send a JSON by adding an attribute enctype="text/plain" to a HTML form tag
to have it send data without encoding special characters.
Using this, I succeeded to have it send the flag to RequestBin as the request body
by putting this HTML file (use the domain of an endpoint of example.com)
to a place which is accessible from the Internet and sending its URL to the Admin Bot.