CyberDefender - CorporateSecrets (Part 3)
Challenge: https://cyberdefenders.org/blueteam-ctf-challenges/33 Part 1: https://hackmd.io/@SBK6401/r18z7VIm6 Part 2: https://hackmd.io/@SBK6401/ByFhEE8X6 Part 4: https://hackmd.io/@SBK6401/H1rAEV87p
:::spoiler TOC [TOC] :::
Tools:
- FTK Imager
- Registry Explorer
- RegRipper
- HxD
- DB Browser for SQLite
- HindSight
- Event Log Explorer
- MFTDump
==Q19==
Which user installed LibreCAD on the system?
Exploit
我是直接看該檔案在哪個user的資料夾來判斷,當然這個做法有點問題
:::spoiler Flag
Flag: miriam.grapes
:::
==Q20==
How many times “admin” logged into the system?
Recon
呈第14題
Exploit
不過我不知道為甚麼答案是21,然後我只有找到20個,看了4672也沒有紀錄(怪怪的)

:::spoiler Flag
Flag: 21
:::
==Q21==
What is the name of the DHCP domain the device was connected to?
Recon
直接看SYSTEM/ControlSet001/Services/Tcpip/Parameters/Interfaces/

:::spoiler Flag
Flag: fruitinc.xyz
:::
==Q22==
What time did Tim download his background image? (Oh Boy 3AM . Answer in MM/DD/YYYY HH:MM format (UTC).)
Recon
原本的直覺是像第18題一樣把db file export出來看他的網路操作行為,不過其實可以直接看他下載的file,看他的create time就好
Exploit

:::spoiler Flag
Flag: 04/05/2020 03:49
:::
==Q23==
How many times did Jim launch the Tor Browser?
Exploit
直接把Jim的NTUSER.dat export出來後用timeline explorer看userassist,不過我不確定為甚麼答案是2,因為我查到的都是3
還有另外一個方法是看prefetch,從FTK中export出TOR.EXE-4B50033F.pf,用PECmd.exe解析,但這個更怪了,結果顯示只有執行過一次,所以prefetch參考就好
:::spoiler
1 |
|
:::
:::spoiler Flag
Flag: 2
:::
==Q24==
There is a png photo of an iPhone in Grapes’s files. Find it and provide the SHA-1 hash.
Recon
看了第一個hint才知道有stego的成分在裡面,首先要找到藏圖片的檔案是哪一張,我判斷是samplePhone.jpg這一張
Exploit
有了圖片之後就是最擅長的misc基本操作,結果在binwalk的時候發現有附加檔案在裡面,就直接foremost提出來
1 |
|

:::info
也可以像1直接用$ binwalk --dd=".*" samplePhone.jpg,一樣可以解壓縮出原本的圖片
:::
:::spoiler Flag
Flag: 537fe19a560ba3578d2f9095dc2f591489ff2cde
:::
==Q25==
When was the last time a docx file was opened on the device? (An apple a day keeps the docx away. Answer in UTC, YYYY-MM-DD HH:MM:SS)
Recon
我原本的直覺是想可以parse $MFT或是該檔案的lnk去看他的改動時間,但很不幸的MFT沒有這筆資料(?),另外也沒有lnk檔案,所以只能通靈,以下解題過程是參考解完的hint
Exploit
直接看RecentDocs的資訊就找的到了,該紀錄在Jim的NTUSER.DAT中,Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs

:::spoiler Flag
Flag: 2020-04-11 23:23:36
:::
==Q26==
How many entries does the MFT of the filesystem have?
Exploit
我是直接在/root的地方export出$MFT file,然後去看magic header(FILE0)的數量有多少(219811),但這樣不準確(不清楚為甚麼),我記得之前@Jimmy說過
$MFT長度一段就是1024 Bytes(0x400)
所以我想說可以把最後出現的位置除已0x400可能就是答案$\to 0xd6aac00/0x400=219819.0$

- 方法一
不過以上的方法是確實可行的,因為計算entries不是只要看有多少有紀錄的File,而是整個$MFT有多少空間,意思是我們要看最後位址是多少再除以0x400,而不是只算到最後一個FILE0的地方就直接除已0x400
該檔案的最後位址是在0xd6bfff0
$(0xd6bfff0+0x10)/0x400 = 219904.0$
加上0x10是因為要算出完整的0x400才算一個,也就是我們要算最後一個就要padding - 方法二
後來參考1才知道比較正確的解法
- clone mftdump
- create python 2 environment
- dump mft file
1
2$ conda activate py27 $ python mftdump.py "MFT" > MFTdumpOutput.txt - 看解出多少entries再扣掉最前面兩行不算的部分
$219906-2=219904$
:::spoiler Flag
Flag: 219904
:::
==Q27==
Tim wanted to fire an employee because they were ……?(Be careful what you wish for)
Exploit
呈第15題,直接看Tim的瀏覽紀錄就會知道了
:::spoiler Flag
Flag: stinky
:::