抓包&&分析包

tcpdump 抓包

wireshark的使用

追踪流

可以根据需要,对一条TCP/UDP流进行过滤
在这里插入图片描述

条件过滤

语法格式:
Protocol[.string] [Comparion operator] [value]

  • Protocol:可支持的协议,如eth、ip、arp、tcp、udp等。可以通过以下截图查看可支持的协议有哪些。
  • string:对应协议所支持的条件,如addr、port、flags、len等。
  • Comparion operator:比较运算符,如==、!=、.=、、~、&等。
  • value:要查找的值。

在这里插入图片描述

# 过滤所有包含地址192.168.0.180的数据
ip.addr == 192.168.0.180
# 过滤所有原地址是192.168.0.180的数据
ip.src == 192.168.0.180
# 过滤所有http协议的数据
http
# 过滤所有包含端口30080的数据
ip.dst == 192.168.0.180 && tcp.port == 30080
# 过滤所有http请求中包含“/”的数据
http.request.uri ~ "/"
# 过滤所有http的请求主机中包含"0.180"的数据
http.host matches "0.180"

参考地址:https://zhuanlan.zhihu.com/p/493256880
https://www.wireshark.org/docs/wsug_html_chunked/ChWorkBuildDisplayFilterSection.html
https://link.zhihu.com/?target=https%3A//gitlab.com/wireshark/wireshark/-/wikis/DisplayFilters

在这里插入图片描述

  • Ethernet II : 数据帧帧头信息,数据链路层信息。
  • Internet Protocal:IP头信息,网络层信息。
  • Transmission Control Protocol:TCP头信息,传输层信息。
  • File Transfer Protocol:数据段,应用层信息。

参考资料

wireshark包结构分析-参考地址:
https://blog.csdn.net/swpu_ocean/article/details/80030727
https://blog.csdn.net/firefile/article/details/80537053
https://www.cnblogs.com/bonelee/p/9577115.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值