LoginSignup
0
0

More than 3 years have passed since last update.

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

Last updated at Posted at 2020-12-24

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

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

[Day 23] Blue Teaming: The Grinch strikes again!

ストーリー

Best Festival Companyの騒動は続いています。エルフ・McEagerは、ネットワーク内のすべてのエンドポイントに影響を及ぼす可能性のあるランサムウェア攻撃に関する、多数の電子メールと電話を受け取りました。McEagerは、マルウェアに感染したエンドポイントにはバックアップコピーがないことを知っていますが、幸いにも彼のワークステーションではバックアップが有効になっています。

タスク

マルウェアを調査し、ファイルを元の状態に復元します。

Day 23 - #1.

Decrypt the fake 'bitcoin address' within the ransom note. What is the plain text value?

デスクトップ上にあるランサムノート(脅迫文)RansomNote.txtファイルの内容を確認します。

As you were calmly looking at your documents I encrypted all the workstations at Best Festival Company just now. Including yours McEager! Send me lots and lots of money to my bitcoin address (bm9tb3JlYmVzdGZlc3RpdmFsY29tcGFueQ==) and MAYBE I'll give you the key to decrypt. >:^p

お前が冷静に書類を見ていたように、俺は今、Best Festival Companyのすべてのワークステーションを暗号化した。McEagerも含めてな。
私のビットコインアドレス(bm9tb3JlYmVzdGZlc3RpdmFsY29tcGFueQ==)にどんどんお金を送ってくれれば、解読の鍵を渡してあげるよ。>:^p

ビットコインアドレスとして示された文字列はBASE64でエンコードされた文字列のようにみえます。
Pythonでデコードを試みます。

>>> import codecs
>>> strings = b"bm9tb3JlYmVzdGZlc3RpdmFsY29tcGFueQ=="
>>> codecs.decode(strings, "base64")
b'nomo{BLOCKED}pany

Day 23 - #2.

At times ransomware changes the file extensions of the encrypted files. What is the file extension for each of the encrypted files?

C:\Users\Administrator\Documentsフォルダのファイルを確認してみます。変更された拡張子を確認できます。

C:\Users\Administrator\Documents>tree /f
Folder PATH listing
Volume serial number is 8418-A87A
C:.
│   RansomNote.txt
│
├───database
│       db.txt
│
└───vStockings
    ├───elf1
    │       elf1.txt.grinch
    │       teeth.jpg.grinch
    │
    ├───elf2
    │       elf2.txt.grinch
    │       scrooged.jpg.grinch
    │
    └───elf3
            elf3.txt.grinch
            Red-Ryder-BB-gun-Rifle.jpg.grinch

Day 23 - #3.

What is the name of the suspicious scheduled task?

schtasksコマンドにて、ローカルコンピューター上のすべてのタスクを表示させます。

c:\>schtasks

Folder: \
TaskName                                 Next Run Time          Status
======================================== ====================== ===============
Amazon Ec2 Launch - Instance Initializat N/A                    Ready
GoogleUpdateTaskMachineCore              N/A                    Disabled
GoogleUpdateTaskMachineUA                N/A                    Disabled
opidsfsdf                                N/A                    Ready
ShadowCopyVolume{7a9eea15-0000-0000-0000 12/24/2020 12:00:00 PM Ready

Day 23 - #4.

Inspect the properties of the scheduled task. What is the location of the executable that is run at login?

schtasks /query /vコマンド構文でタスクの詳細を表示します。このとき、|パイプで繋げてfindstr "opidsfsdf"コマンド構文を渡します。これにより、疑わしいタスクの詳細のみを表示させることができます。

c:\>schtasks /query /v | findstr "opidsfsdf"
ELFSTATION4      opidsfsdf                                N/A                    Ready           Interactive only        12/24/2020 7:12:49 AM             0 ELFSTATION4\Admi C:\Users\Administrator\Desktop\opidsfsdf.exe       N/A                                      >:^P                                                                             Enabled                Disabled                                 Stop On Battery Mode, No Start On Batteries      Administrator                            Disabled                       72:00:00                                 Scheduling data is not available in this format.                                 At logon time                N/A          N/A        N/A        N/A                                         N/A                                         N/A                      N/A                  N/A                            N/A

c:\>

Day 23 - #5.

There is another scheduled task that is related to VSS. What is the ShadowCopyVolume ID?

Day 23 - #4と同様の手順です。今回はfindstr "ShadowCopyVolume"コマンド構文にて表示の絞り込みを行います。

c:\>schtasks /query /v | findstr "ShadowCopyVolume"
ELFSTATION4      ShadowCopyVolume{7a9eea15-0000-0000-0000 12/24/2020 12:00:00 PM Ready           Interactive/Background  12/24/2020 7:00:00 AM             0 ELFSTATION4\Admi C:\Windows\system32\vssadmin.exe Create Shadow /Au %systemroot%\system32                    N/A                                                                              Enabled                Disabled                                                                                  SYSTEM                                   Disabled                       72:00:00                                 Scheduling data is not available in this format.                                 Weekly                       7:00:00 AM   12/11/2020 N/A        MON, TUE, WED, THU, FRI                     Every 1 week(s)                             Disabled                 Disabled             Disabled                       Disabled

c:\>

Day 23 - #6.

Assign the hidden partition a letter. What is the name of the hidden folder?

ドライブ文字の削除によって隠したパーティションを表示します。「ディスクの管理」(diskmgmt.msc)ユーティリティを管理者権限で実行します。
隠しパーティション(Backup)を右クリック。[Change Drive Letter and Paths(ドライブ文字とパスの変更)]を選択し、[Add(追加)]をクリックしてこの隠しパーティションにドライブ文字を割り当てます。

hidden partition.png

隠しフォルダーを一覧表示するには、dir /a:hdコマンドを使用します。dirコマンドとの出力の違いを確認しておきます。

Z:\>dir
 Volume in drive Z is Backup
 Volume Serial Number is DC05-3142

 Directory of Z:\

12/11/2020  07:56 AM    <DIR>          database
12/11/2020  07:56 AM    <DIR>          vStockings
               0 File(s)              0 bytes
               2 Dir(s)     984,027,136 bytes free

Z:\>dir /a:hd
 Volume in drive Z is Backup
 Volume Serial Number is DC05-3142

 Directory of Z:\

12/11/2020  07:29 AM    <DIR>          $RECYCLE.BIN
12/11/2020  10:31 AM    <DIR>          confidential
12/24/2020  07:00 AM    <DIR>          System Volume Information
               0 File(s)              0 bytes
               3 Dir(s)     984,027,136 bytes free

Day 23 - #7.

Right-click and inspect the properties for the hidden folder. Use the 'Previous Versions' tab to restore the encrypted file that is within this hidden folder to the previous version. What is the password within the file?

ファイルを復元して、パスワードを確認します。

Previous Versions.png

original.png

これにて、23日目のミッションが終了です。

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