lab1-1 Wireshark_Intro_v7.0

Lab1-1 Getting Started

1 Getting Wireshark

http://www.wireshark.org/download.html 下载并安装Wireshark。

2 Running Wireshark

Wireshark初始界面:

image-20221127193758653

双击接口名称即可进入对应接口进行抓包,如进入WLAN接口:

image-20221127194333009

抓包界面可大致分为以下五部分:

image-20221127200002502

  1. 命令菜单:常用的是”文件“和”捕获“菜单。“文件”菜单可以保存抓包数据,也可以打开以前的抓包数据文件,还有退出Wireshark应用程序等。“捕获”菜单可以允许我们开始或停止抓包。
  2. 数据包列表窗口:显示每一个捕获包的一行摘要,包括包号、数据包被捕获的时间、数据包的源地址和目的地址、协议类型以及数据包中包含的特定于协议的信息。
  3. 包头详细信息窗口:提供了包列表窗口中选中的包的详细信息。这些详细信息包括以太网帧(假设数据包通过以太网接口发送/接收)和包含该数据包的IP数据报的信息。
  4. 数据包内容窗口:以ASCII和十六进制格式显示捕获帧的全部内容。
  5. 包过滤显示区域:可以在其中输入协议名或其他信息,以便过滤包列表窗口(以及包头和包内容窗口)中显示的信息。

3 Taking Wireshark for a Test Run

试运行Wireshark来学习其使用流程。

  1. 打开浏览器。

  2. 打开Wireshark软件。

  3. 选择“捕获”下拉菜单并选择“选项”,打开”Wireshark·捕获选项“。

    image-20221127202204806

  4. 选中要开始抓包的接口,然后点击”开始“。

  5. 开始抓包之后,选择“抓包”下拉菜单并选择“停止”,可以停止抓包(但是现在先不要停止抓包)。

  6. 当Wireshark正在运行时,在浏览器中打开:http://gaia.cs.umass.edu/wireshark-labs/INTRO-wireshark-filel.html。为了显示此页面,浏览器将在 gaia.cs.umass.edu 与HTTP服务器联系,并与服务器交换HTTP消息以下载此页面。包含这些HTTP消息的以太网帧(以及通过以太网适配器的所有其他帧)将被Wireshark捕获。

  7. 在浏览器显示下面的页面后,点击停止按钮,现在可以在已捕获包列表中看到通过这个网络接口的所有的数据包。

    image-20221127203421287

  8. 在应用显示过滤器窗口中输入“http”,然后选择Apply(在输入“http”的右侧)。这将导致在包列表窗口中只显示HTTP消息。

    image-20221127203915269

  9. 查看HTTP GET信息。当选择HTTP GET消息时,将在报文报头窗口中显示以太网帧、IP数据报、TCP段和HTTP消息报头信息。

    image-20221127204445952

  10. 退出Wireshark。

4 What to hand in(Questions)

1. List 3 different protocols that appear in the protocol column in the unfiltered packet-listing window in step 7 above.

如下图,OICQ,TCP,UDP。

image-20221127204731876

2. How long did it take from when the HTTP GET message was sent until the HTTP OK reply was received? (By default, the value of the Time column in the packet-listing window is the amount of time, in seconds, since Wireshark tracing began. To display the Time field in time-of-day format, select the Wireshark View pull down menu, then select Time Display Format, then select Time-of-day.)

如下图,约为0.241秒。

image-20221127205727136

3. What is the Internet address of the gaia.cs.umass.edu (also known as wwwnet.cs.umass.edu)? What is the Internet address of your computer?

如图,gaia.cs.umass.edu 的地址为128.119.245.12,本机地址为172.25.192.244。

image-20221127205827144

4. Print the two HTTP messages (GET and OK) referred to in question 2 above. To do so, select Print from the Wireshark File command menu, and select the “Selected Packet Only” and “Print as displayed” radial buttons, and then click OK.

如果,点击”确定“即可打印。

image-20221127210357704


lab1-1 Wireshark_Intro_v7.0
http://ztrura.com/2022/12/29/CNLab1-1/
作者
ztrura
发布于
2022年12月29日
许可协议