Wireshark TS | Packet Challenge 之 HTTP 案例分析 2

前言

来自于 Sharkfest Packet Challenge 中的一个数据包案例,Sharkfest 是 Wireshark 官方组织的一年一度的大会,致力于在 Wireshark 开发人员和用户社区之间分享知识、经验和最佳实践。印象中早期是一年一次,近几年发展成一年两次,一次貌似固定在美国,一次会在其他地区,像是欧洲或亚洲。Packet Challenge 是大会其中一个比较有意思的活动环节,通过一系列数据包案例设置关卡,参会人员进行分析挑战,测试综合分析能力。


题目信息

本次案例为 Sharkfest 2019 EU Packet Challenge 中的第一个题目 Some HTTP,数据包跟踪文件为 SomeHTTP.pcapng

主要描述如下:

Something to get you warmed up.

  1. What is the server IP address?
  2. What is the hostname of the website requested by the browser?
  3. What is the HTTP status code given by the web server?
  4. What is the FQDN of the location the web server redirects to?
  5. How many packets have a FIN flag set?

确实如 Something to get you warmed up 形容,本题真的挺简单。


数据包信息

数据包跟踪文件基本信息如下:

λ capinfos SomeHTTP.pcapng
File name:           SomeHTTP.pcapng
File type:           Wireshark/... - pcapng
File encapsulation:  Ethernet
File timestamp precision:  microseconds (6)
Packet size limit:   file hdr: (not set)
Number of packets:   8
File size:           1708 bytes
Data size:           1105 bytes
Capture duration:    2.409586 seconds
First packet time:   2014-03-04 01:19:57.323591
Last packet time:    2014-03-04 01:19:59.733177
Data byte rate:      458 bytes/s
Data bit rate:       3668 bits/s
Average packet size: 138.13 bytes
Average packet rate: 3 packets/s
SHA256:              59c3cb5bf2b529696e719088935b9911ba8b2666d4cb8c878317c0db8d6ba8b6
RIPEMD160:           5bba0f38317692a8ff1e5efe4430450366fe1c51
SHA1:                7315e55f08c58a06ba142f12c020055ecb5bd62b
Strict time order:   True
Capture comment:     https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9848
Number of interfaces in file: 1
Interface #0 info:
                     Name = \Device\NPF_{1859BC84-0689-4EE4-9F7F-85D093A8F58B}
                     Encapsulation = Ethernet (1 - ether)
                     Capture length = 65535
                     Time precision = microseconds (6)
                     Time ticks per second = 1000000
                     Time resolution = 0x06
                     Operating system = 32-bit Windows 7 Service Pack 1, build 7601
                     Number of stat entries = 1
                     Number of packets = 8

Winows 7 系统上直接通过 Wireshark 捕获,无截断,捕获数据包数量 8 个,捕获持续时间为 2.4 秒,平均速率 3668 bps 。

会话信息和专家信息显示如下,仅一条 TCP 流 0 ,服务端 HTTP 80 端口,无告警级别信息,基本正常。

image.png

image.png


数据包分析

展开数据包文件信息,如下,

image.png

1. What is the server IP address?

服务器 IP 地址是什么?


分析步骤

步骤无,答案一目了然。

分析答案

服务器 IP 地址是:212.58.246.91 。


2. What is the hostname of the website requested by the browser?

浏览器请求的网站的主机名是什么?


分析步骤

客户端 No.4 HTTP GET 请求,展开数据包细节如下

image.png

λ tshark -r SomeHTTP.pcapng -Y "http.host"
    4   0.806199     10.0.2.4 → 212.58.246.91 HTTP 499 GET / HTTP/1.1

λ tshark -r SomeHTTP.pcapng -Y "http.host" -T fields -e http.host
www.bbc.co.uk

分析答案

浏览器请求的网站的主机名是:www.bbc.co.uk 。


3. What is the HTTP status code given by the web server?

Web 服务器给出的 HTTP 状态码是什么?


分析步骤

服务器端 No.5 HTTP Response 响应,展开数据包细节如下

image.png

λ tshark -r SomeHTTP.pcapng -Y "http.response.code"
    5   1.609608 212.58.246.91 → 10.0.2.4     HTTP 252 HTTP/1.1 302 Found  (text/html)

λ tshark -r SomeHTTP.pcapng -Y "http.response.code" -T fields -e http.response.code
302

分析答案

Web 服务器给出的 HTTP 状态码是:302 。


4. What is the FQDN of the location the web server redirects to?

Web 服务器重定向到的位置的 FQDN 是什么?


分析步骤

同样还是服务器端 No.5 HTTP Response 响应,展开数据包细节如下

image.png

λ tshark -r SomeHTTP.pcapng -Y "http.location"
    5   1.609608 212.58.246.91 → 10.0.2.4     HTTP 252 HTTP/1.1 302 Found  (text/html)

λ tshark -r SomeHTTP.pcapng -Y "http.location" -T fields -e http.location
https://hotspot.inmarsat.com/index?origUrl=http%3A%2F%2Fwww.bbc.co.uk%2F

λ tshark -r SomeHTTP.pcapng -Y "http.location" -T fields -e http.location | awk -F "/" '{print $3}'
hotspot.inmarsat.com

分析答案

Web 服务器重定向到的位置的 FQDN 是:hotspot.inmarsat.com。


5. How many packets have a FIN flag set?

有多少数据包设置了 FIN 标志位?


分析步骤

通过显示过滤表达式 tcp.flags.fin==1 可知

image.png

λ tshark -r SomeHTTP.pcapng -Y "tcp.flags.fin==1" | wc -l
2

分析答案

有多少数据包设置有 FIN 标志位:2 个。

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值