0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Cookie Monster Secret Recipe Easy Web

Posted at

問題文からわかること

  • Cookie見たらわかる

F12ブラウザ開発者ツールからわかること

適当にログインフォームに入力し、ログイン試行するとCookieがいくつか格納される
secret_recipeがキーのCookieが怪しそう。
CyberChefで定番のBASE64デコードしてフラグ獲得

解答

base64.デコード前
cGljb0NURntjMDBrMWVfbTBuc3Rlcl9sMHZlc19jMDBraWVzX0FDOEZDRDc1fQ%3D%3D
base64.デコード後
picoCTF{c00k1e_m0nster_l0ves_c00kies_AC8FCD75}
ÃÜ

ログイン後、Cookieの情報でユーザ認証を行うので、Cookieが漏洩するのは非常にマズい。
そのため、属性をCookieのKeyごとに設定できる。
JavaScriptからアクセスできないようにするHttpOnly属性や、TLS通信のときだけCookieを送信するSecure属性などが設定できます。
しかし、今回のサイトでは何れも属性が付いていないので、怪しいブラウザ拡張機能からセッション情報を抜き取られたり、XSS攻撃をしやすくなるみたいです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?