LoginSignup
2
0

More than 3 years have passed since last update.

[TryHackMe] Advent of Cyber 2, Day 1 - Walkthrough -

Last updated at Posted at 2020-12-02

本稿では、TryHackMeにて提供されている「Advent of Cyber 2」ルームに関する攻略方法(Walkthrough)について検証します。
「Advent of Cyber 2」は「free room」(無料)で提供されています。購読を必要とせずに仮想マシンを「展開(Deploy)」することができます。

『Advent of Cyber 2』のWalkthroughインデックスを「[TryHackMe] Advent of Cyber 2に参加してみた」にて公開しました。

[Day 1] Web Exploitation: A Christmas Crisis

ストーリー

クリスマスの危機.png

"The Best Festival Company"の新しいOpenVPNサーバーがハッキングされた。これは危機的状況です!
攻撃者は社内インフラストラクチャの様々な箇所に損害を与えました -- Santa's Christmas Control Centreを使用し、組み立てラインを停止させたこともその一つです!
クリスマスまで残りわずか24日。ラインを稼働させなければ、プレゼントがありません!
あなたは"Santa"のアカウントを取り戻し(パスワードを変更したハッカーを蹴散らせ!)、組み立てラインを再稼働させなければなりません。さもなくれば、クリスマスが台無しになります!

Day 1 - #1.

Deploy your AttackBox (the blue "Start AttackBox" button) and the tasks machine (green button on this task) if you haven't already. Once both have deployed, open FireFox on the AttackBox and copy/paste the machines IP into the browser search bar.

まずは、Santa's Christmas Control Centreにアクセスします。[Deploy]ボタンをクリックします。
ブラウザにて割り振られたIPアドレスにアクセスします。Christmas Control Centreのログイン画面が表示されます。
login.png

初回アクセス時には、アカウントを登録します。ここではvavenger:p@33w0rdを指定し、Register!ボタンをクリックします。
登録したアカウントでログインを試みます。[VIEW CONSOLE]画面に遷移します。
Christmas_Console.png

Day 1 - #2.

What is the name of the cookie used for authentication?

ブラウザとしてFirefoxを使用しています。開発ツールを起動します。キーボードショートカットはCtrl + Shift + Iです。
[Storage]タブを選択します。コンソール左側の[Cookies]メニューを選択します。[Name]列に注目します。
cookie.png

Day 1 - #3.

In what format is the value of this cookie encoded?

Cookieの値をコピーします。

auth:"7b22636f6d70616e79223a22546865204265737420466573746976616c20436f6d70616e79222c2022757365726e616d65223a22766176656e676572227d"

CyberChef[Magic]レシピを使って判定します。
hexdump.png

Hexdump(16進ダンプ)と判定されました。解答は「16進数」の英語表記です。

Day 1 - #4.

Having decoded the cookie, what format is the data stored in?

CyberChefによって得られた結果は次のとおりです。

{"company":"The Best Festival Company", "username":"vavenger"}

{ ... }の中に、変数名と値がコロン(:)で区切られています。また、カンマ(,)で連結され、複数の変数名と値のペアが指定されています。
すなわち、「JavaScript Object Notation」です。解答は短縮表記です。

Day 1 - #5.

What is the value of Santa's cookie?

usernamesantaに変更します。

{"company":"The Best Festival Company", "username":"santa"}

この値をCyberChef[To Hex]レシピを使って変換します。このとき、DelimiterNoneを指定します。
cyberchef.png

次の値が得られました。

7b22636f6d70616e79223a22546865204265737420466573746976616c20436f6d70616e79222c2022757365726e616d65223a2273616e7461227d

Day 1 - #6.

What is the flag you're given when the line is fully active?

Cookieの改ざん」によって、Christmas Control Centreの認証をバイパスすることを検討します。
登録したアカウントvavenger:p@33w0rdでログインします。Firefox開発ツールを起動します。
[Storage]タブを選択します。コンソール左側の[Cookies]メニューを選択します。
[Value]の項目をダブルクリックします。これによりCookieの値を編集することができます。
"username":"santa"にて生成した値と置き換えます。
Browser Developer Tools.png

ページを再読み込みします。[VIEW CONSOLE]画面から[CONTROL CONSOLE]画面に遷移したことが確認できます。
control_console.png

すべてのControlにおけるActive?Yesに変更すると、フラグが表示されます。
これにて、組み立てラインの再稼働に成功しました。

1日目のミッションが終了です。

参考になるTryHackMeのルーム

Walkthrough

2
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
2
0