實驗三 ethereal 的使用 介紹 ethereal 、 抓取 packets. 實驗設備與材料 pc 1 台...

Post on 20-Dec-2015

235 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

實驗三 Ethereal 的使用

介紹 Ethereal 、 抓取 packets

實驗設備與材料 PC 1 台

自己是 192.168.0.177 Server 是 140.138.173.34

安裝 Ethereal 、 WinSCP 或 WS-FTP 、Putty 或 Netterm 。

安裝 Ethereal 之前,請安裝 WinPcap ,再接著安裝 Ethereal 。

Ethereal Wireshark (前稱 Ethereal )是一個網路封包分析軟體, 可以擷取網路封包並盡可能分析出最為詳細的網路封包資料。 網路管理員使用 Ethereal 來檢測網路問題 網路安全工程師使用 Ethereal 來檢查資訊安全相關問題

開發者使用 Ethereal 來為新的通訊協定除錯 普通使用者使用 Ethereal 來學習網路協定的相關知識

Ethereal 的原理 要求 Ethernet card 把所有的 frames 送往 Ethereal, Ethereal 會解出各 protocol 及其欄位的意義。

使用 Ethereal 進入 Ethereal 主程式後,直接點選

Capture->Interface ,設定網路卡。 選 Prepare

設定 Options 若無設定 filter ,則所有封包都會被抓進來,此時可利用 Display filter 進行篩選。

開始抓封包後,會出現一個統計封包種類與數量的小視窗可供參考。選擇 Stop 即可停止抓封包。

Examples of Capture Filters (1/2) Example Ethernet: capture all traffic to and from the

Ethernet address 08:00:08:15:ca:fe ether host 08:00:08:15:ca:fe Example IP: capture all traffic to and from the IP

address 192.168.0.10 host 192.168.0.10

Examples of Capture Filters (2/2) Example TCP: capture all traffic to and from the TCP po

rt 80 (http) of all machines tcp port 80 Examples combined: capture all traffic to and from 192.168.0.1

0 except http host 192.168.0.10 and not tcp port 80

Name of Capture Filter 設定抓封包條件的名稱

FIlter name :可任意命名,例如 Test-1 。 Filter string :請輸入 host 140.138.173.34 選取 Save 便會以 Test-1 為名儲存以上所設定的 filter 。

按 NEW 之後,可讓 Test-1 出現在上方的名單中。下次重新開啟 Ethereal 便可直接使用。

實驗步驟 – ICMP (1/2) Ping 140.138.173.34 –c 3

找出所有與此命令相關 request-reply 的封包 觀察 Ethernet frame

ipconfig /all 看自己的 MAC address arp /a 看對方的 MAC address

觀察 IP datagram IP addresses, protocol type

觀察 ICMP packet type, code, etc. 說明相關的欄位

實驗步驟 – ICMP (2/2) tracert 140.138.173.34

找出所有與此命令相關的封包 說明 tracert 尋找路徑的方式 and How d

o you know that.

實驗步驟 – TCP (1/3) telnet 140.138.173.34

先用 netstat –a -n 看 connections 觀察 3-way initial handshacking 觀察輸入密碼的狀況 Keyin “a” 觀察 “ a” 是否有送到對方 觀察對方的回應 觀察 3-way finish handshacking

實驗步驟 – TCP (2/3) 可以使用 NetTerm, putty ( 選 telnet), 或

開始 -> 執行 -> cmd telnet 140.138.173.34

telnet 140.138.173.34 446 無法連上此 port number 觀察 TCP 連線不成功 , 觀察對方的回應 , 測試的次數與時間間隔

實驗步驟 – TCP (3/3) A bbs site: 140.138.2.235

元智大學風之塔 telnet 140.138.2.235

觀察 account 與 password Note: telnet 是每 keyin 一個 character 就送出一個 packet.

實驗步驟 – UDP 向 DNS 查詢 Hinet 的 IP address. nslookup www.hinet.net. nslookup www.hinet.net

觀察 resolver 向 DNS 詢問 www.hinet.net.yzu.edu.tw, www.hinet.net.edu.tw, www.hinet.net.tw, www.hinet.net.

實驗步驟 – WWW PuTTY 是一個像 telnet 的工具

學校網站 140.138.36.91 及 80 port Raw 的格式 Never 不關閉視窗

GET / HTTP/1.0 ( 兩個 Enter) 取得學校網站首頁

實驗步驟 – POP3 and SMTP (1/2) 使用 PuTTY 測試 POP3 與 SMTP 命令 . 連線到 smpt.yzu.edu.tw 郵件伺服器 , port

=25, raw data SMTP

HELO dominic MAIL From:s92717@mail.yzu.edu.tw RCPT To: s92717@mail.yzu.eud.tw data (Your mail)

實驗步驟 – POP3 and SMTP (2/2) 連線到 pop3.yzu.edu.tw, port=110 POP3

User u854307 PASS xxxxxx LIST RETR 1 Quit

使用 Google 尋找相關的命令 pop3 command & smtp command

實驗步驟 – FTP 開始 -> 執行 -> cmd

ftp 140.138.173.34 User: wrlai Password: xxxxxx ls get abc bye

參考文件 Web site 140.138.137.171 網站上的投影片。

Google 自行下載相關軟體與通訊協定。 蒐尋 RFC http://www.rfc-editor.org/rfcsearch.ht

ml

實驗報告 執行上述各個實驗步驟,以建立基本的

概念。 再以 Ethereal 抓取各個實驗步驟中傳

送的 packets ,說明以上各種協定的運作方式。

成績計算 依據說明 protocol 運作的完整性、使用功能的多寡決定成績。

ICMP 、 TCP 、 UDP 一定要有。 WWW 、 POP3 、 SMTP 、 FTP 中至少選一種。

top related