Wireshark 操作
免費且開源 網路偵錯、分析等等 Introduction
UI
UI Menu Main toolbar Filter toolbar Packet List pane Packet Details pane Packet Bytes pane
Filter
Filter
OSI
OSI
Capture skills
MAC
ether src {Host MAC Address} ether dst {Host MAC Address}
IP
src host {IP Address} dst host {IP Address} 捕捉來源來自 {IP Address} Host 上資料 dst host {IP Address} 捕捉目的來自 {IP Address} Host 上資料
Port
udp port 67 portrange 1-80 捕捉來自/到達 Port 67 的 UDP 資料 捕捉來自/到達 Port 1-80 的 UDP/TCP 資料
Tool
Display filter
點選 Expression
Endpoints 端點指的是網路上收發資料的個裝置;會話指的是兩個端點之間的通訊。
Statistic -> Endpoint
Conversations
欄位 Address A 表示會話發起點,欄位 Address B 表示會話目的地。 透過檢視看到發送的封包流量,再透過篩選器去過濾。
Protocol Hierarchy 對一個陌生的捕捉流量結果,有時必須借助流量中的協定分布狀況來判斷。透過 wireshark 的協定的階層式統計可以發掘 TCP、IP、DHCP 和其它協定的流量分別占用了多少。
Statistics -> Protocol Hierarchy
Flow Graph 對於檢視資料隨時間而流動的過程,圖中裡資訊可以更清楚看出裝置之間如何通訊。
Statistics -> Flow Graph
ARP Example
Hardware address length Protocol address length Opcode ARP Header Offsets Octet 1 2 3 Bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Hardware type Protocol type 4 32 Hardware address length Protocol address length Opcode 8 64 Source hardware address 96 Source protocol address 128 Destination hardware address 160 Destination protocol address … 192 Data
ICMP Example
進一步劃分 ICMP 的類型,該欄位用來尋找產生錯誤的原因 分 1 ~ 15 ICMP Header Offsets Octet 1 2 3 Bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Type Code Checksum 4 32 Rest of Header Code 進一步劃分 ICMP 的類型,該欄位用來尋找產生錯誤的原因 分 1 ~ 15
Tracert nkust 並察看結果
TCP Example
Client 向 Server 發送 SYN(Seq = 100,SYN = 1) SYN+ACK Server 收到 Client 請求,回覆(Ack=100+1) Server 向 Client 發送 SYN(seq=300)建立連線請求 Client 向 Server 發送 ACK,用來確認雙方進入 ESTABLISHED https://notfalse.net/7/three-way-handshake Seq 為請求序號 Ack 為確認序號 SYN、ACK 是 TCP 封包中的 控制位元 (Control Bits)
Acknowledgment number (if ACK set) TCP Header Offsets Octet 1 2 3 Bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Source port Destination port 4 32 Sequence number 8 64 Acknowledgment number (if ACK set) 96 Data offset Reserved 0 0 0 N S C W R E C E U R G A C K P S H R S T S Y N F I N Window Size 128 Checksum Urgent pointer (if URG set) 20 ... 160 ... Options (if data offset > 5. Padded at the end with "0" bytes if necessary.) ...
IP Example
MF=1(後面還有分片) MF=0(該資料包的最後一個分片) DF=0(允許分片)
PUZZLE #3 ANN’S APPLETV http://forensicscontest.com/2009/12/28/anns-appletv
What is the MAC address of Ann’s AppleTV? 00:25:00:fe:07:c4 What is the MAC address of Ann’s AppleTV?
What User-Agent string did Ann’s AppleTV use in HTTP requests? User-Agent:AppleTV/2.4\r\n What User-Agent string did Ann’s AppleTV use in HTTP requests?
HTTP -> Requests hack What were Ann’s first four search terms on the AppleTV (all incremental searches count)?
What was the title of the first movie Ann clicked on? http.request.uri.query.parameter contains Hackers 後面題目比較進階,所以就不接下去 What was the title of the first movie Ann clicked on?
https://notfalse.net/7/three-way-handshake https://en.wikipedia.org/wiki/IPv4 https://github.com/CCH0124/Network/tree/master/wireshark https://cch0124.github.io/arp/ http://forensicscontest.com/puzzles