概要
TryHackMe「Biohazard」のWalkthroughです。
Task1
Q2.How many open ports?
ポートスキャンを実行します。
$ nmap -Pn -T4 -sVC -A -p- 10.10.115.227 -oN nmap_result
PORT STATE SERVICE VERSION
21/tcp open ftp vsftpd 3.0.3
22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 2048 c9:03:aa:aa:ea:a9:f1:f4:09:79:c0:47:41:16:f1:9b (RSA)
| 256 2e:1d:83:11:65:03:b4:78:e9:6d:94:d1:3b:db:f4:d6 (ECDSA)
|_ 256 91:3d:e4:4f:ab:aa:e2:9e:44:af:d3:57:86:70:bc:39 (ED25519)
80/tcp open http Apache httpd 2.4.29 ((Ubuntu))
|_http-server-header: Apache/2.4.29 (Ubuntu)
|_http-title: Beginning of the end
ポートの稼働状況が分かりました。
| ポート | サービス | バージョン |
|---|---|---|
| 21 | ftp | vsftpd 3.0.3 |
| 22 | ssh | OpenSSH 7.6p1 |
| 80 | http | Apache httpd 2.4.29 |
A.3
Q3.What is the team name in operation
80番ポートにアクセスし、Webサイトを確認します。
A.STARS alpha team
Task2
Q1.What is the emblem flag
/mansionmainが分かったのでアクセスし、ソースコードから/diningRoomを発見しました。
Yesのリンクがあるのでクリックするとフラグを入手できます。
A.emblem{fec832623ea498e20bf4fe1821d58727}
Q2.What is the lock pick flag
再度/diningRoomへアクセスするとコメントアウトから文字列を入手できました。
base64でデコードすると/teaRoom/パスを発見しました。
$ echo "SG93IGFib3V0IHRoZSAvdGVhUm9vbS8=" | base64 -d
How about the /teaRoom/
/teaRoom/へアクセスすると、/teaRoom/master_of_unlock.htmlパスを発見しました。
/teaRoom/master_of_unlock.htmlへアクセスし、フラグを入手できました。
A.lock_pick{037b35e2ff90916a9abf99129c8e1837}
Q3.What is the music sheet flag
/teaRoom/ページから/artRoom/パスを発見したのでアクセスします。
YESのリンクを踏むとルートのマッピングページへ遷移しました。
/barRoom/へアクセスするとlockpickのフラグが求められたので、先ほど入手したフラグを入力します。
新たなページに遷移しました。
READのリンクを踏むと文字列を得られました。
base32でデコードするとフラグを入手できました。
$ echo "NV2XG2LDL5ZWQZLFOR5TGNRSMQ3TEZDFMFTDMNLGGVRGIYZWGNSGCZLDMU3GCMLGGY3TMZL5" | base32 -d
music_sheet{362d72deaf65f5bdc63daece6a1f676e}
A.music_sheet{362d72deaf65f5bdc63daece6a1f676e}
Q4.What is the gold emblem flag
Hint.You thought there is only one slot?
Bar roomページにmusic_sheetフラグを入力するとSecret bar roomページに遷移しました。
YESのリンクを踏むとフラグを入手できました。
A.gold_emblem{58a8c41a9d08b8a4e38d02a4d7ff4843}
Q5.What is the shield key flag
Hint.Blaise de Vigenère
Secret bar roomページを更新すると入力フォームが表示されました。
gold_emblemフラグを入力しましたが、正解ではないようです。
/diningRoom/へアクセスし、gold_emblemフラグを入力すると暗号化された文字列が表示されました。
Vigenere暗号がヒントから分かっているので復号します。
/diningRoom/the_great_shield_key.htmlへアクセスし、フラグを入手できました。
A.shield_key{48a7a9227cd7eb89f0a062590798cbac}
Q6.What is the blue gem flag
Hint.Check the source
/diningRoom2F/へアクセスし、ソースコードから文字列を得られました。
Vigenere暗号で復号するとsapphire.htmlを得られました。
/diningRoom/sapphire.htmlへアクセスし、フラグを入手できました。
A.blue_jewel{e1d457e96cac640f863ec7bc475d48aa}
Q7.What is the FTP username
Hint.You need all 4 crests
blue_jewelフラグを入力すると、crest 1を入手できました。
base64->base32の順で解読に成功しました。
$ echo "S0pXRkVVS0pKQkxIVVdTWUpFM0VTUlk9" | base64 -d | base32 -d
RlRQIHVzZXI6IG
/galleryRoom/へアクセスし、EXAMINEのリンクを踏むとcrest 2を得られました。
base32->base58の順でデコードに成功しました。
$ echo "GVFWK5KHK5WTGTCILE4DKY3DNN4GQQRTM5AVCTKE" | base32 -d | base58 -d
h1bnRlciwgRlRQIHBh
/armorRoom/ページにアクセスし、shield_keyを入力します。
READのリンクを踏むとcrest 3を得られました。
base64->binary->hexの順で解読に成功しました。
/attic/へアクセスし、shield_keyを入力します。
READのリンクを踏むとcrest 4を得られました。
base58->hexの順で解読に成功しました。
crest 1~4を合わせ、base64でデコードするとFTPの認証情報を得られました。
$ echo "RlRQIHVzZXI6IGh1bnRlciwgRlRQIHBhc3M6IHlvdV9jYW50X2hpZGVfZm9yZXZlcg==" | base64 -d
FTP user: hunter, FTP pass: you_cant_hide_forever
A.hunter
Q8.What is the FTP password
Hint.You need all 4 crests
A.you_cant_hide_forever
Task3
Q1.Where is the hidden directory mentioned by Barry
FTPに接続し、複数ファイルを確認できたので全てダウンロードします。
ftp> dir
229 Entering Extended Passive Mode (|||21294|)
150 Here comes the directory listing.
-rw-r--r-- 1 0 0 7994 Sep 19 2019 001-key.jpg
-rw-r--r-- 1 0 0 2210 Sep 19 2019 002-key.jpg
-rw-r--r-- 1 0 0 2146 Sep 19 2019 003-key.jpg
-rw-r--r-- 1 0 0 121 Sep 19 2019 helmet_key.txt.gpg
-rw-r--r-- 1 0 0 170 Sep 20 2019 important.txt
226 Directory send OK.
important.txtから隠しディレクトリが分かりました。
Jill,
I think the helmet key is inside the text file, but I have no clue on decrypting stuff. Also, I come across a /hidden_closet/ door but it was locked.
From,
Barry
A./hidden_closet/
Q2.Password for the encrypted file
Hint.Three picture, three hints: hide, comment and walk away
001-key.jpgからも文字列を得られました。
$ steghide extract -sf 001-key.jpg
Enter passphrase:
wrote extracted data to "key-001.txt".
$ cat key-001.txt
cGxhbnQ0Ml9jYW
また、002-key.jpgのPCommentフィールドから文字列を得られました。
$ exiftool 002-key.jpg
ExifTool Version Number : 12.70
File Name : 002-key.jpg
Directory : .
File Size : 2.2 kB
File Modification Date/Time : 2019:09:19 01:08:31-04:00
File Access Date/Time : 2024:11:06 09:54:22-05:00
File Inode Change Date/Time : 2024:11:06 09:54:22-05:00
File Permissions : -rw-r--r--
File Type : JPEG
File Type Extension : jpg
MIME Type : image/jpeg
JFIF Version : 1.01
Resolution Unit : None
X Resolution : 1
Y Resolution : 1
Comment : 5fYmVfZGVzdHJveV9
Image Width : 100
Image Height : 80
Encoding Process : Progressive DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)
Image Size : 100x80
Megapixels : 0.008
さらに、003-key.jpgのCommentフィールドからjpeg-recompressを使用したことが分かりました。
$ exiftool 003-key.jpg
ExifTool Version Number : 12.70
File Name : 003-key.jpg
Directory : .
File Size : 2.1 kB
File Modification Date/Time : 2019:09:19 01:19:17-04:00
File Access Date/Time : 2024:11:06 09:54:23-05:00
File Inode Change Date/Time : 2024:11:06 09:54:23-05:00
File Permissions : -rw-r--r--
File Type : JPEG
File Type Extension : jpg
MIME Type : image/jpeg
JFIF Version : 1.01
Resolution Unit : None
X Resolution : 1
Y Resolution : 1
Comment : Compressed by jpeg-recompress
Image Width : 100
Image Height : 80
Encoding Process : Progressive DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)
Image Size : 100x80
Megapixels : 0.008
binwalkで003-key.jpgからZIPファイルとテキストファイルを入手できました。
$ binwalk -e 003-key.jpg
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
0 0x0 JPEG image data, JFIF standard 1.01
1930 0x78A Zip archive data, at least v2.0 to extract, uncompressed size: 14, name: key-003.txt
2124 0x84C End of Zip archive, footer length: 22
$ ls -la _003-key.jpg.extracted
total 16
drwxr-xr-x 2 kali kali 4096 Nov 6 10:09 .
drwxr-xr-x 4 kali kali 4096 Nov 6 10:09 ..
-rw-r--r-- 1 kali kali 216 Nov 6 10:09 78A.zip
-rw-r--r-- 1 kali kali 14 Sep 19 2019 key-003.txt
$ cat _003-key.jpg.extracted/key-003.txt
3aXRoX3Zqb2x0
001~3-key.jpgから得られた文字列を合わせ、base64でデコードするとパスワードを得られました。
$ echo "cGxhbnQ0Ml9jYW5fYmVfZGVzdHJveV93aXRoX3Zqb2x0" | base64 -d
plant42_can_be_destroy_with_vjolt
A.plant42_can_be_destroy_with_vjolt
Q3.What is the helmet key flag
Hint.key 1 + key 2 + key 3 is not enough. You need to do something
helmet_key.txt.gpgをインポートするとhelmet_key.txtを得られました。
$ gpg helmet_key.txt.gpg
gpg: WARNING: no command supplied. Trying to guess what you mean ...
gpg: AES256.CFB encrypted data
gpg: encrypted with 1 passphrase
ファイルからフラグを入手できました。
$ cat helmet_key.txt
helmet_key{458493193501d2b94bbab2e727f8db4b}
A.helmet_key{458493193501d2b94bbab2e727f8db4b}
Task4
Q1.What is the SSH login username
Hint.You missed a room
/studyRoom/へアクセスし、helmet_keyを入力します。
EXAMINEをクリックするとdoom.tar.gzをダウンロード出来ました。
解凍し、ファイルからSSHのユーザー名を取得できました。
$ tar -zxvf doom.tar.gz
eagle_medal.txt
$ cat eagle_medal.txt
SSH user: umbrella_guest
A.umbrella_guest
Q2.What is the SSH login password
以前判明した/hidden_closet/へアクセスし、helmet_keyを入力します。
EXAMINEのリンクへ遷移するとSSHのパスワードを得られました。
A.T_virus_rules
Q3.Who the STARS bravo team leader
A.Enrico
Task5
Q1.Where you found Chris
SSH接続し、.jailcell/chris.txtからJillとChrisの会話を確認できました。
Jill: Chris, is that you?
Chris: Jill, you finally come. I was locked in the Jail cell for a while. It seem that weasker is behind all this.
Jil, What? Weasker? He is the traitor?
Chris: Yes, Jill. Unfortunately, he play us like a damn fiddle.
Jill: Let's get out of here first, I have contact brad for helicopter support.
Chris: Thanks Jill, here, take this MO Disk 2 with you. It look like the key to decipher something.
Jill: Alright, I will deal with him later.
Chris: see ya.
MO disk 2: albert
A.jailcell
Q2.Who is the traitor
A.Weasker
Q3.The login password for the traitor
Hint.How you decipher the shield_key?
先ほどのCloset roomから遷移できるMO_DISK1.txtを確認します。
Keyを.jailcell/chris.txtの内容から判明したalbertで、Vigenere暗号を解くとweaskerアカウントのパスワードを入手できました。
A.stars_members_are_my_guinea_pig
Q4.The name of the ultimate form
weaskerにログインし、/home/weasker/weasker_note.txt の内容を確認します。
Weaker: Finally, you are here, Jill.
Jill: Weasker! stop it, You are destroying the mankind.
Weasker: Destroying the mankind? How about creating a 'new' mankind. A world, only the strong can survive.
Jill: This is insane.
Weasker: Let me show you the ultimate lifeform, the Tyrant.
(Tyrant jump out and kill Weasker instantly)
(Jill able to stun the tyrant will a few powerful magnum round)
Alarm: Warning! warning! Self-detruct sequence has been activated. All personal, please evacuate immediately. (Repeat)
Jill: Poor bastard
A.Tyrant
Q5.The root flag
sudo -lで確認すると全て許可されています。
$ sudo -l
[sudo] password for weasker:
Matching Defaults entries for weasker on umbrella_corp:
env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin
User weasker may run the following commands on umbrella_corp:
(ALL : ALL) ALL
root権限を取得できました。
$ sudo /bin/bash
root@umbrella_corp:~#
/root/root.txtからフラグを入手できました。
In the state of emergency, Jill, Barry and Chris are reaching the helipad and awaiting for the helicopter support.
Suddenly, the Tyrant jump out from nowhere. After a tough fight, brad, throw a rocket launcher on the helipad. Without thinking twice, Jill pick up the launcher and fire at the Tyrant.
The Tyrant shredded into pieces and the Mansion was blowed. The survivor able to escape with the helicopter and prepare for their next fight.
The End
flag: 3c5794a00dc56c35f2bf096571edf3bf
A.3c5794a00dc56c35f2bf096571edf3bf








































