iT邦幫忙

2018 iT 邦幫忙鐵人賽
DAY 20
1
Security

鯊魚咬電纜:30天玩Wireshark系列 第 25

[Day 20] 解解題 Puzzle #6: Ann’s Aurora

  • 分享至 

  • twitterImage
  •  

今天好冷,大家記得保暖啊,不過同時還是來乖乖寫第六個題組,這次的題組名稱是「Puzzle #6: Ann’s Aurora」,讓我們恭喜Ann重返主角寶座,也請大家先去看個故事前情提要跟下載這次要觀察的封包吧(網址:http://forensicscontest.com/2010/05/21/puzzle-6-anns-aurora)。
小提醒,這題的封包檔案可能因為包含病毒,所以會被防毒軟體視為威脅所以下載不下來(至少我的MSE是這樣),所以如果覺得有疑慮的話,就開個沙箱或虛擬機再下載吧,或是想要冒著風險把防毒關掉再下載也是很有膽識的做法。

第一題:What was the full URI of Vick Timmes’ original web request? (Please include the port in your URI.)
這一題可以利用下「http.request」的過濾參數,找到第1個封包,就可以得到答案是http://10.10.10.10:8080/index.php 。

https://ithelp.ithome.com.tw/upload/images/20180108/20107304lMHZclivo3.png

第二題:In response, the malicious web server sent back obfuscated JavaScript. Near the beginning of this code, the attacker created an array with 1300 elements labeled “COMMENT”, then filled their data element with a string. What was the value of this string?
這一題因為要找下載的檔案,所以先下「http.request.method ="GET"」的過濾式,以找到下載的js檔案,找到後點右鍵Follow>TCP Stream,就會看到一串js的程式碼,其中會看到下面這一段程式碼:
var UWnHADOfYHiHDDXj = "COMMENT";
var ...
for (i = 0; i < 1300; i++)
{
...
...uzHPHqLrRFSzQuPusTnQyqpQwVpARdlR[i].data = "vEI";
}
這段程式碼蠻容易懂的,稍微看一下後會發現程式會在陣列的每個元素結尾都加上「vEI」的字串,這也就是這一題的答案。

https://ithelp.ithome.com.tw/upload/images/20180108/20107304KoDJDui1cP.png

第三題:Vick’s computer made a second HTTP request for an object.
a. What was the filename of the object that was requested?
首先先下「http.request.method ="GET"」的過濾式,接著根據題目描述找到第二個封包,從封包列表的Info欄位就可以得到這一題的答案,也就是「index.phpmfKSxSANkeTeNrah.gif」。

https://ithelp.ithome.com.tw/upload/images/20180108/20107304yiJCHIOI4b.png

b. What is the MD5sum of the object that was returned?
這題可以使用之前講過的匯出方法來取得,也就是從功能列選擇File>Eexport object>HTTP,接著在列表中選擇index.phpmfKSxSANkeTeNrah.gif後選擇Save as,另存成自己喜歡的檔名後,就可以取得檔案的MD5 Hash值是 df3e567d6f16d040326c7a0ea29a4f41。

第四題:When was the TCP session on port 4444 opened? (Provide the number of seconds since the beginning of the packet capture, rounded to tenths of a second. ie, 49.5 seconds?
根據題意,我們先下「tcp.port == 4444」的過濾條件,接著看過濾出來的第一個封包的Time欄位就是答案啦,雖然實際上欄位的值是1.265851,但因為題目要我們四捨五入到小數第一位,所以答案就是1.3秒。

https://ithelp.ithome.com.tw/upload/images/20180108/20107304bbM8NOPwxw.png

第五題:When was the TCP session on port 4444 closed? (Provide the number of seconds since the beginning of the packet capture, rounded to tenths of a second. ie, 49.5 seconds)
這一題跟上一題一樣,需要先下「tcp.port == 4444」的過濾條件,接著直接滑到封包列表的最下面,找到最後一個tag是[FIN, ACK]的封包,在去對照該封包的Time欄位,可以得到87.587154這個時間,就可以得到答案囉,但因為題目要我們四捨五入到小數第一位,所以答案就是87.6秒。
另外也可以直接使用「tcp.port == 4444 && tcp.flags.ack==1 && tcp.flags.fin==1」這個過濾式,可以比較快找到目標封包。

https://ithelp.ithome.com.tw/upload/images/20180108/20107304EZl1LL0l1o.png

第六題:In packet 17, the malicious server sent a file to the client.
a. What type of file was it? Choose one: Windows executable/GIF image/PHP script/Zip file/Encrypted data
首先找到第17個封包,並使用右鍵Follow>TCP Stream功能,接著就可以看到檔案的ASCII編碼,這時候我們發現這個檔案的標頭包含MZ…跟this program cannot run in the DOS mode… 等字串,因此可以判斷是標準Windows執行檔的檔頭,所以這題的答案就是Windows executable。

https://ithelp.ithome.com.tw/upload/images/20180108/20107304BVBo9y3kjv.png

b. What was the MD5sum of the file?
延續上一題的Follow>TCP Stream視窗,直接使用Save as功能將他存下來,檔名隨便你寫,反正不會影響MD5值,接著就可以取得檔案的MD5 Hash值,也就是b062cb8344cd3e296d8868fbef289c7c。

第七題:Vick’s computer repeatedly tried to connect back to the malicious server on port 4445, even after the original connection on port 4444 was closed. With respect to these repeated failed connection attempts:
a. How often does the TCP initial sequence number (ISN) change? (Choose one.)Every packet/Every third packet/Every 10-15 seconds/Every 30-35 seconds/Every 60 seconds
根據題意,我們先下一個「tcp.port == 4445」的過濾式,並一個一個觀察每一個封包sequence number的變化.發現他是有規律的,而且是每隔3個封包就會更改一次sequence number,由0改為1,並持續以每隔3個封包換一次的頻率循環來變化,如下面兩張圖所示,所以這一題的答案就是Every third packet。

https://ithelp.ithome.com.tw/upload/images/20180108/20107304VhbBVj6BEq.pnghttps://ithelp.ithome.com.tw/upload/images/20180108/20107304ohfWCHI5w8.png

b. How often does the IP ID change? (Choose one.)Every packet/Every third packet/Every 10-15 seconds/Every 30-35 seconds/Every 60 seconds
跟上一題一樣,需要先下一個「tcp.port == 4445」的過濾式,接著在Packet Detail中InterfaceIdentification的欄位觀察每個封包中的ID數字變化,接著可以發現他是每個封包都會一直在變,所以這題的答案就是Every packet。

c. How often does the source port change? (Choose one.)Every packet/Every third packet/Every 10-15 seconds/Every 30-35 seconds/Every 60 seconds
跟上一題一樣,需要觀察「tcp.port == 4445」過濾式的結果,接著在Packet Detail的Transmission Control ProtocolSource Port的欄位看每個封包的值改變的頻率為何,而經過觀察,我們可以發現Soruce Port的值大概每10-15秒就會改變一次,因此這題的答案就是Every 10-15 seconds。

第八題:Eventually, the malicious server responded and opened a new connection. When was the TCP connection on port 4445 first successfully completed? (Provide the number of seconds since the beginning of the packet capture, rounded to tenths of a second. ie, 49.5 seconds)
這一題一樣是下「tcp.port == 4445」的過濾式,並在封包列表觀察第從紅黑底色(連線建立失敗的封包)變成藍色底色(連線建立成功的封包)的第一個封包時間,也就是連線開始建立的時間,就可以得到答案約是123.7秒。

https://ithelp.ithome.com.tw/upload/images/20180108/20107304YSOoi8f06X.png

第九題:Subsequently, the malicious server sent an executable file to the client on port 4445. What was the MD5 sum of this executable file?
這一題指的檔案跟第六題所取出的檔案是一樣的,所以答案就是b062cb8344cd3e296d8868fbef289c7c。

第十題:When was the TCP connection on port 4445 closed? (Provide the number of seconds since the beginning of the packet capture, rounded to tenths of a second. ie, 49.5 seconds)
這題跟第五題有點類似,就只差在Port不一樣,所以就仿照第五題的做法,直接先下「tcp.port == 4445」的過濾條件,接著直接滑到封包列表的最下面,找到最後一個tag是[FIN, ACK]的封包,在去對照該封包的Time欄位,可以得到198.441346這個時間,就可以得到答案囉,但因為題目要我們四捨五入到小數第一位,所以答案就是198.4秒。
一樣的,也可以直接使用「tcp.port == 4445 && tcp.flags.ack==1 && tcp.flags.fin==1」這個過濾式,可以比較快找到目標封包。

https://ithelp.ithome.com.tw/upload/images/20180108/20107304kLkYp2t9Y0.png


上一篇
[Day 19] 在封包中搜尋字串是否搞錯了什麼
下一篇
[Day 21] Wireshark動作太慢?來試試tshark吧
系列文
鯊魚咬電纜:30天玩Wireshark51
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 則留言

0
hihijhoho2
iT邦新手 5 級 ‧ 2018-01-10 14:17:24

台主寫的越來越多而且越來越詳細耶
好喜歡你有時後貼的bonus

WLLO iT邦新手 4 級 ‧ 2018-01-10 20:48:37 檢舉

謝謝支持喔
如果對文章有什麼建議也都很歡迎告訴我喔

我要留言

立即登入留言