Wireshark简介和工具应用
如何开始抓包?
打开wireshark,显示如下网络连接。选择你正在使用的,(比如我正在使用无线网上网),双击
可以先看下自己的ip地址和网关ip地址(看抓包数据时候会用到)

开始抓包
红框状态就是已经开始抓包了

混杂模式和普通模式选择

过滤器
过滤关心的协议

查看TCP三次握手的第一次SYN
查看TCP数据传输完成后四次挥手第一次fin

arp相关的包
如下图,一个典型的ARP报文,路由器问局域网中谁的主机(mac)ip地址是192.168.67.204?
观察下面报文细节:
此时目标MAC地址还是空的

arp欺骗
攻击者B伪造ARP报文(senderIP地址是网关的,senderMAC地址不是网关的),发送给网段内的主机A,那么主机A就会把网关的ip地址和伪造的mac地址缓存到arp缓存表内,导致主机A无法把要发给网关的消息送达网关,致使主机A无法正常访问外网。
攻击者B伪造ARP报文(senderIP地址是主机A的,senderMAC地址不是主机A的),发送给网关,网关就把主机A的ip地址和伪造的mac地址缓存到网关arp缓存表内,导致网关无法给主机A发送消息,致使主机A无法正常访问外网。
UDP
为什么显示是DNS?
因为底层用的UDP封装

http

只关注我发给别人的

只关注我发给别人的 或者 目的ip是我的网关的数据包
只关注我发给别人的 且 目的ip是我的网关的数据包
测试网络行为:ping一下网关,回车之前wireshark记得点击开始抓包

只关注我 某一个IP(无论它是源ip还是目的ip)

ICMP协议分析
ping一下网关,回车之前wireshark记得点击开始抓包
本机先发ping包到网关

下面这条报文是网关回的,Type:0

ping 属于一个通讯协议,是 TCP/IP 协议的一部分。利用 'ping' 命令可以检查网络是否通畅或者查看网络连接速度,便于分析和判定网络故障
使用 ping 命令会发送一个 ICMP(Internet Control Messages Protocol【网络信报控制协议】),接收端在收到此 ICMP 后产生 ICMPecho (ICMP回声应答) ,通过此过程来确定两台网络机器是否连通,时延是多少。
ping是端对端连通,通常用来作为连通可用性的检查,但是某些恶意程序会通过大量执行 ping 命令来抢占网络资源,导致系统变慢,网速变慢(如部分DOS攻击会使用此方式)
原文链接:https://blog.csdn.net/qq_37450949/article/details/119873675
TCP/IP 协议分析

注意:中间的http包占用了很多序列号(包的大小)
学习参考
1.1.4 WireShark安装入门之快速抓包_哔哩哔哩_bilibili