Writeup Log

Origins

pcap ファイルが提供されるので、これを解析していく。

## Task 1

What is the attacker’s IP address?

怪しそうなアクセスをざっとみていく。ここだけではないが、USER を総当りしていそうなアクセスがあるので、これが怪しそうなことがわかる。

text
121	21.566142	15.206.185.207	172.31.45.144	FTP	80	Request: USER ftpuser
122	21.566142	15.206.185.207	172.31.45.144	FTP	80	Request: USER backup 
123	21.566142	15.206.185.207	172.31.45.144	FTP	80	Request: USER backup 
124	21.566142	15.206.185.207	172.31.45.144	FTP	83	Request: USER svcaccount
125	21.566142	15.206.185.207	172.31.45.144	FTP	80	Request: USER backup 
126	21.566142	15.206.185.207	172.31.45.144	FTP	80	Request: USER backup 
127	21.566142	15.206.185.207	172.31.45.144	FTP	83	Request: USER svcaccount
128	21.566142	15.206.185.207	172.31.45.144	FTP	83	Request: USER svcaccount
  • 15.206.185.207

## Task 2

It’s critical to get more knowledge about the attackers, even if it’s low fidelity. Using the geolocation data of the IP address used by the attackers, what city do they belong to?

Geo Location を検索してくれるサイトを使う。今回は以下のサイトを利用したが、お好きなサイトを使えばよい。

https://www.geolocation.com/ja/index?ip=15.206.185.207#ipresult

  • Mumbai

## Task 3

Which FTP application was used by the backup server? Enter the full name and version. (Format: Name Version)

ftp でフィルタすると、冒頭あたりで以下のデータが流れていることがわかる。

text
68	21.224494	172.31.45.144	15.206.185.207	FTP	86	Response: 220 (vsFTPd 3.0.5)
  • vsFTPd 3.0.5

## Task 4

The attacker has started a brute force attack on the server. When did this attack start?

ip.src_host == 15.206.185.207 でフィルタして、一番最初のアクセスを取ると、 UTC Arrival Time: May 3, 2024 04:12:54.303476000 UTC となっているので、ここを開始点として考えて良さそうである。

  • 2024-05-03 04:12:54

## Task 5

What are the correct credentials that gave the attacker access? (Format username:password)

ざっとみて Login successful となっているパケットをみつけて、その TCP Stream をみると、以下の組み合わせで成功していることがわかる。

text
USER forela-ftp

331 Please specify the password.

PASS ftprocks69$

230 Login successful.
  • forela-ftp:ftprocks69$

## Task 6

The attacker has exfiltrated files from the server. What is the FTP command used to download the remote files?

知っていればよいが、知らなくとも先程の TCP Stream を見てダウンロードしてそうな command を特定すればよい。取得した TCP Stream をみると、以下のやり取りが行われている。

text
220 (vsFTPd 3.0.5)

USER forela-ftp

331 Please specify the password.

PASS ftprocks69$

230 Login successful.

SYST

215 UNIX Type: L8

FEAT

211-Features:
 EPRT
 EPSV
 MDTM
 PASV
 REST STREAM
 SIZE
 TVFS
211 End

EPSV

229 Entering Extended Passive Mode (|||63192|)

LIST

150 Here comes the directory listing.
226 Directory send OK.

EPSV

229 Entering Extended Passive Mode (|||40790|)

NLST

150 Here comes the directory listing.
226 Directory send OK.

TYPE I

200 Switching to Binary mode.

SIZE Maintenance-Notice.pdf

213 27855

EPSV

229 Entering Extended Passive Mode (|||9759|)

RETR Maintenance-Notice.pdf

150 Opening BINARY mode data connection for Maintenance-Notice.pdf (27855 bytes).
226 Transfer complete.

MDTM Maintenance-Notice.pdf

213 20240503034329

SIZE s3_buckets.txt

213 268

EPSV

229 Entering Extended Passive Mode (|||23530|)

RETR s3_buckets.txt

150 Opening BINARY mode data connection for s3_buckets.txt (268 bytes).
226 Transfer complete.

MDTM s3_buckets.txt

213 20240503034852

EPSV

229 Entering Extended Passive Mode (|||15028|)

STOR /home/cyberjunkieX0X/HACKED.txt

550 Permission denied.

QUIT

221 Goodbye.

例えばこのあたりはダウンロードしていそうなので、RETR だとわかる。

text
RETR Maintenance-Notice.pdf

150 Opening BINARY mode data connection for Maintenance-Notice.pdf (27855 bytes).
226 Transfer complete.
  • RETR

## Task 7

Attackers were able to compromise the credentials of a backup SSH server. What is the password for this SSH server?

ダウンロードしたファイルに何かが書かれている気がするので、Export Object から Maintenance-Notice.pdfs3_buckets.txt を取得する。

PDF の方に以下の文言が記載されている。

For team members requiring urgent access to the backup SSH servers during the maintenance period, you can use the temporary password “B@ckup2024!” - kindly ensure this information is handled securely and do not share it outside of our team.

  • **B@ckup2024!**

## Task 8

What is the s3 bucket URL for the data archive from 2023?

先程ダウンロードしたテキストファイルには以下の内容が書かれている。

text
https://2023-coldstorage.s3.amazonaws.com # bulk data from 2023, if required anything from here contact simon or alonzo. Retention period is 4 years
https://2022-warmstor.s3.amazonaws.com # pending audit, email alonzo at [email protected] for any clearance
  • https://2023-coldstorage.s3.amazonaws.com

## Task 9

The scope of the incident is huge as Forela’s s3 buckets were also compromised and several GB of data were stolen and leaked. It was also discovered that the attackers used social engineering to gain access to sensitive data and extort it. What is the internal email address used by the attacker in the phishing email to gain access to sensitive data stored on s3 buckets?

これも先程のファイルから以下だと推察できる。