Discordのアカウント Canary と Canary Admin が指定された。
とりあえず、StegBot と同様に /info を送ってみることにした。
Canary へのDMで /info を送ると、ソースコードとしてGitHubのURLが提示された。
app/app.ts から、CanaryへのDMで /create コマンドを送ることで、アクセスされるとDMで通知が来るURLを作れることがわかった。
さらに、Cookieに指定のデータを入れた状態で、ここで作られるURLと同じホストのパス /flag にアクセスすることで、flagが得られそうであることも読み取れた。
また、admin/app.ts から、Canary Admin にDMでURLを送ると /flag に送るべきCookieをセットした状態でアクセスするが、
http://(指定のドメイン) または https://(指定のドメイン) から始まるURLへのアクセスは拒否されることがわかった。
さて、URLにはドメイン名の前に認証情報を入れることができることが知られている。
Canary で作成したURLのドメイン名の前に hoge:fuga@ を加えたURLを Canary Admin に渡すと、
Canary からCookieを含むヘッダの情報が送られてきた。
/flag にアクセスし、
Accounts on Discord Canary and Canary Admin were specified.
To begin with, I decided to try sending /info like I did in StegBot.
Sending /info to Canary as DM, it posted an URL for GitHub as the source code.
Reading app/app.ts, I found that sending a /create command as a DM for Canary will create an URL accesses to that are notified via DM.
I also found that accessing /flag on the same host as the created URL with a Cookie including specified data will reveal the flag.
Reading admin/app.ts, I found that sending an URL to Canary Admin as DM will cause the URL be accessed with the Cookie to send to /flag.
However, accesses to URLs begin with http://(the specified domain) or https://(the specified domain) are refused.
It is known that we can add information for authentication before the domain name of the URL.
Sending an URL created by Canary with hoge:fuga@ added before the domain name to Canary Admin,
headers including the Cookie were sent from Canary.
I obtained the flag by accessing /flag and using "Edit and Resend" in the