iT邦幫忙

2025 iThome 鐵人賽

DAY 28
0

🧂 前言

接續昨天的內容,今天會分享 Boss Of The SOC v1 Q11~ Q20 的解題過程,學習 Threat Hunting 的流程,解題平台同樣會使用 CyberDefender


情境

本次實作實驗聚焦在 APT(高階持續性威脅)情境與勒索軟體情境。你將扮演 Alice Bluebird 的角色——剛被聘為 Wayne Enterprises 的 SOC 分析師,負責偵測與防禦各類網路攻擊。

場景 1(APT):

今天是 Alice 在 Wayne Enterprises 安全部門(Security Operations Center,SOC)的第一天。Lucius 叫 Alice 坐下並給她第一個任務:一份來自高譚市警察局(Gotham City Police Department, GCPD)的備忘錄。GCPD 發現線上有證據(http://pastebin.com/Gw6dWjS9)顯示網站 www.imreallynotbatman.com 在 Wayne Enterprises 的 IP 位址空間內被入侵。該駭客組織有多重目標……但他們的作案手法之一是篡改網站以羞辱被害者。Lucius 要求 Alice 判定 www.imreallynotbatman.com(Wayne 企業執行長的個人部落格)是否確實遭到入侵。

在此情境中,使用者社群在瀏覽 Wayne Enterprises 網站時回報看到下列被篡改的圖片,且部分回報提到「P01s0n1vy」。若你不熟悉,P01s0n1vy 是一個曾針對 Wayne Enterprises 的 APT 組織。你作為 Alice 的目標是調查該網站篡改事件,並嘗試依照 Lockheed Martin Kill Chain 重建攻擊流程。

場景 2(勒索軟體):

在第二個情境中,你的一位使用者在 Windows 桌面上看到一張圖片,表示系統上的檔案已被加密,必須付款才能取回檔案。看起來 Wayne Enterprises 有一台主機感染了 Cerber 勒索軟體,你的目標是調查這起勒索事件。


Q11 : Web Defacement: This attack used dynamic DNS to resolve to the malicious IP. What is the fully qualified domain name (FQDN) associated with this attack?

這題想要問是哪個 FQDN 在進行攻擊

在 Q10 可以看到 192.168.250.70 對 prankglassinebracket.jumpingcrab.com 請求圖片,而prankglassinebracket.jumpingcrab.com 就是我們想要的答案

ans : prankglassinebracket.jumpingcrab.com


Q12: Web Defacement: What IP address has Po1s0n1vy tied to domains that are pre-staged to attack Wayne Enterprises?

從 Q11 我們可以得到他去請求的 FQDN 叫做 prankglassinebracket.jumpingcrab.com ,我們可以再確認一下這個 FQDN 的 IP 是什麼

index=botsv1 sourcetype=stream:http src_ip=192.168.250.70
| table src_ip,dest_ip,site,src_headers

最下方可以看到 23.22.63.114 對應的 FQDN 就是 prankglassinebracket.jumpingcrab.com ,23.22.63.114 在Q5 我們確定它是在進行暴力破解登入後台,因此23.22.63.114 就是我們這題的答案

ans : 23.22.63.114


Q13 : Web Defacement: Based on the data gathered from this attack and common open-source intelligence sources for domain names, what is the email address most likely associated with the Po1s0n1vy APT group?

這題需要利用前面蒐集到的資料獲得 Po1s0n1vy APT 組織相關的電子郵件地址

總結一下我們目前得到的

  • 23.22.63.114 : (prankglassinebracket.jumpingcrab.com) : 暴破密碼,送圖片
  • 40.80.148.42 : 掃描網頁漏洞

接下來我將23.22.63.114丟進 VirusTotal ,可以看到它之前解析為Po1s0n1vy.com

而在情境敘述中的備忘錄也有提到Po1s0n1vy.com這個網站

接下來可以使用 whoxy 這個網站,它可以幫我們查關於這個網域的資訊,另外也可以查詢誰之前擁有了這個網域。

查詢結果如下

https://www.whoxy.com/po1s0n1vy.com#history

這邊可以看到 Email 是lillian.rose@po1s0n1vy.com

這邊不是其他的email 是因為題目給的格式是*******.****@**********.***

ans : lillian.rose@po1s0n1vy.com


Q14 : Web Defacement: GCPD reported that common TTP (Tactics, Techniques, Procedures) for the Po1s0n1vy APT group, if initial compromise fails, is to send a spear-phishing email with custom malware attached to their intended target. This malware is usually connected to Po1s0n1vy's initial attack infrastructure. Using research techniques, provide the SHA256 hash of this malware.

題目說 GCPD 報告指出 Po1s0n1vy 如果初始的攻擊失敗,接下來會寄釣魚信件並戴上惡意附件,而這個惡意附件的程式會常常與 Po1s0n1vy 的基礎攻擊設施做溝通,想問這個惡意程式的 SHA256

在 VirusTotal 中,關於 IP 會顯示之前出現惡意軟體與這個 IP 連線的功能,因此我們將23.22.63.114 丟進 VirusTotal 中,並選擇 Relation 頁面。

那經過嘗試答案會是 MirandaTateScreensaver.scr.exe ,點進去後就會拿到這個惡意程式的 sha256

ans : 9709473ab351387aab9e816eff3910b9f28a7a70202e250ed46dba8f820f34a8


Q15 : Web Defacement: What is the special hex code associated with the customized malware discussed in the previous question? (Hint: It's not in Splunk)

這題想要得知前一題的惡意程式的special hex code

這題會需要看VirusTotal 的Community 頁面,因為有些人會在這邊貼出報告以及special hex code

ans : 53 74 65 76 65 20 42 72 61 6e 74 27 73 20 42 65 61 72 64 20 69 73 20 61 20 70 6f 77 65 72 66 75 6c 20 74 68 69 6e 67 2e 20 46 69 6e 64 20 74 68 69 73 20 6d 65 73 73 61 67 65 20 61 6e 64 20 61 73 6b 20 68 69 6d 20 74 6f 20 62 75 79 20 79 6f 75 20 61 20 62 65 65 72 21 21 21


Q16 : Web Defacement: One of Po1s0n1vy's staged domains has some disjointed "unique" whois information. Concatenate the two codes together and submit them as a single answer.

題目說Po1s0n1vy 暫時架設的 domain 當中包含兩段分開出現的「唯一代碼/字串」,把那兩段代碼 串接成一個單一答案 提交

我們在 Q13 時用 VirusTotal 掃描這個 IP 它之前關聯的 domain,總共有以下 domain

我們每個都可以用 whoxy 查看

答案會在 waynecorpnc.com 中,但是現在已經找不到該domain 的詳細資訊了,所以我參考了其他人的 writeup ,答案會在 company_name 與 mailing_address 中

source : https://jk105.gitlab.io/infosec/post/cyberdefenders_bossofthesoc1/

ans : 31 73 74 32 66 69 6E 64 67 65 74 73 66 72 65 65 62 65 65 72 66 72 6F 6D 72 79 61 6E 66 69 6E 64 68 69 6D 74 6F 67 65 74


Q17 : Web Defacement: One of the passwords in the brute force attack is James Brodsky's favorite Coldplay song. Hint: we are looking for a six-character word on this one. Which is it?

這題問的是爆破的密碼中有一個是James Brodsky's favorite Coldplay song ,要找出那個密碼

這題我們可以嘗試使用 splunk 的 lookup 功能,Splunk 的 lookup 是一種 查表功能,可以把外部資源(例如 CSV、KV Store 或自定義資料表)中的欄位值與事件資料中的欄位做匹配,然後把匹配到的欄位值加入到事件資料中以豐富資料內容

首先我們需要先獲得 Coldplay 的所有歌,Kaggle 網站中有人有整理出來,可以免費下載

接下來我們要匯入到 splunk 中,選擇Settings->Lookups

進入 Lookups頁面後我們要先新增 Lookup table ,點擊第一個的 Add new ,將剛剛的下載的 CSV 檔丟入

按下 Save 之後要記得改權限,預設應該是 Private ,要記得改成 Global 。

接下來要定義這個表的路徑以及欄位輸出方式

點選 Lookups 的首頁的第二行Add new ,接下來去指定剛剛丟進去的 csv 表,要記得開啟進階選項把 Case sensitive match 取消勾選

接下來就可以回到search 頁面使用 lookup 語法,匹配欄位資料

index=botsv1 dest_ip=192.168.250.70 sourcetype=stream:http http_method=POST uri=/joomla/administrator/index.php
| rex field=form_data "passwd=(?<pass>\w+)"
| lookup Coldplay name as pass output duration
| search duration=*
| table pass duration

lookup 的語法解說如下

  • lookup Coldplay:呼叫名為 Coldplay 的 lookup 表格
  • name as pass:將當前搜尋結果中的pass欄位對應到對應表的name欄位
  • output duration:從 lookup 表格輸出 duration 欄位至事件資料

而加上search duration=* 是因為只有被對應到的 pass 會出現duration,因此加上這個保證出來的會是匹配到的

題目提示是六個字,因此是答案是yellow

ans : yellow


Q18 : Web Defacement: What was the average password length used in the password brute-forcing attempt? (Round to a closest whole integer. For example "5" not "5.23213")

題目想要我們計算出所有嘗試的密碼長度

要計算 password 的平均長度,我們會需要使用到 eval 與 stats 幫助我們計算,eval 提供了基本的運算操作以及豐富的函式,官方doc

index=botsv1 dest_ip=192.168.250.70 sourcetype=stream:http http_method=POST uri=/joomla/administrator/index.php
| rex field=form_data "passwd=(?<pass>\w+)"
| eval length = len(pass) 
| stats avg(length) as avglength 
| eval rounded = round(avglength, 0)

我們將pass提取出來後,使用len計算每一個pass 的長度,接下來用stats 提供的avg 計算所有欄位的平均長度,最後在使用 eval 的 round 幫我們做四捨五入操作

答案計算出來為 6

ans : 6


Q19 : Web Defacement: How many seconds elapsed between the brute force password scan identified the correct password and the compromised login? Round to 2 decimal places.

題目想要問識別出正確密碼到被成功登入之間經過了多少秒

我們在 Q9 得知了被爆破出來的密碼是 batman,因此我們先用 search 語法將 batman 密碼的請求先篩出來

index=botsv1 dest_ip=192.168.250.70 sourcetype=stream:http http_method=POST uri=/joomla/administrator/index.php
| rex field=form_data "passwd=(?<pass>\w+)"
| search pass="batman"

Time 欄位相減的秒數為 92.17

ans : 92.17


Q20 : Web Defacement: How many unique passwords were attempted in the brute force attempt?

題目想要問攻擊者嘗試了多少種密碼

這邊我們可以使用 stats 當中 dc 這個函式,dc 是 Splunk 中的去重計數函式 ,全稱為 "distinct count"

index=botsv1 dest_ip=192.168.250.70 sourcetype=stream:http http_method=POST uri=/joomla/administrator/index.php
| rex field=form_data "passwd=(?<pass>\w+)"
| stats dc(pass) as "attempt"

答案出來為412

ans : 412


總結

今天分享了 Boss Of The SOC v1 的Q11~Q20 解題過程,今天體驗到 Threat Hunting 的過程並不只是單純看SIEM 找攻擊證據,也需要配合 OSINT 找出 APT 組織訊息,並且今天也學到了更多的 Splunk 搜尋的用法,語法越來越多,感覺做筆記真的挺重要的,像是我在做今天的內容時會忘記一些語法怎麼用然後就會往回看昨天寫的內容,明天會把剩下的題目分享完


上一篇
Day27 Boss Of The SOC v1 上
下一篇
Day29 Boss Of The SOC v1 下
系列文
Blue 了 Blue 了!只會看封包與log的我錯了嗎!30
圖片
  熱門推薦
圖片
{{ item.channelVendor }} | {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言