【Azure 环境】在Windows环境中抓取网络包(netsh trace)后,如何转换为Wireshark格式以便进行分析

简介: 【Azure 环境】在Windows环境中抓取网络包(netsh trace)后,如何转换为Wireshark格式以便进行分析

问题描述

如何在Windows环境中,不安装第三方软件的情况下(使用Windows内置指令),如何抓取网络包呢?并且如何转换为Wireshark 格式呢?

 

操作步骤

1) 以管理员模式打开CMD,使用 netsh trace start capture=yes 命令开始抓取网络包,当需要停止时候,使用 netsh trace stop 指令。

## 开始抓取
netsh trace start capture=yes 
## 停止抓取
netsh trace stop
####执行结果
C:\LBWorkSpace\tool\nettrace1\newworktrace>netsh trace start capture=yes
Trace configuration:
-------------------------------------------------------------------
Status: Running
Trace File: C:\Users\xxxx\AppData\Local\Temp\NetTraces\NetTrace.etl
Append: Off
Circular: On
Max Size: 512 MB
Report: Off
C:\LBWorkSpace\tool\nettrace1\newworktrace>netsh trace stop
Merging traces ... done
Generating data collection ... done
The trace file and additional troubleshooting information have been compiled as "C:\Users\xxxx\AppData\Local\Temp\NetTraces\NetTrace.cab".
File location = C:\Users\xxxx\AppData\Local\Temp\NetTraces\NetTrace.etl
Tracing session was successfully stopped.

 

如果之抓取指定IP地址的网络包,可以使用如下命令:

netsh trace start capture=yes IPv4.Address=X.X.X.X

 

抓取动画效果为:

 

 

2) 使用 etl2pcapng.exe  工具进行格式转换,使用命令:

etl2pcapng.exe nettrace.etl nettrace.cap

 

3) 双击 nettrace.cap 打开 WireShark查看网络包,使用 ip.addr == xxx.xxx.xxx.xxx 多包中的内容进行过滤

ip.addr == xxx.xxx.xxx.xxx  or ip.addr == xxx.xxx.xxx.xxx

 

 

附录一:根据IP地址过滤Wireshark文件包,只导出特定的IP网络包

1)在Filter 输入框中输入过滤的IP地址: 如 ip.addr == 27.xxx.xxx.xxx

2)选择 File -->  Export Specified Packets --> Save

 

 

 

参考资料

etl2pcapng.exe 工具下载地址:https://files.cnblogs.com/files/lulight/etl2pcapng.zip

Wireshark 下载地址:https://www.wireshark.org/#download

How can I perform a packet capture in Windows with built-in utility? https://www.sonicwall.com/support/knowledge-base/how-can-i-perform-a-packet-capture-in-windows-with-built-in-utility/170905204545360/

 

相关文章
|
20天前
|
Linux C++ Windows
【Azure 应用服务】Azure App Service(Windows)环境中如何让.NET应用调用SAP NetWeaver RFC函数
【Azure 应用服务】Azure App Service(Windows)环境中如何让.NET应用调用SAP NetWeaver RFC函数
【Azure 应用服务】Azure App Service(Windows)环境中如何让.NET应用调用SAP NetWeaver RFC函数
|
2天前
|
SQL JavaScript 数据库
sqlite在Windows环境下安装、使用、node.js连接
sqlite在Windows环境下安装、使用、node.js连接
|
20天前
|
Java 应用服务中间件 Windows
【App Service for Windows】为 App Service 配置自定义 Tomcat 环境
【App Service for Windows】为 App Service 配置自定义 Tomcat 环境
|
20天前
|
PHP Windows
【Azure App Service for Windows】 PHP应用出现500 : The page cannot be displayed because an internal server error has occurred. 错误
【Azure App Service for Windows】 PHP应用出现500 : The page cannot be displayed because an internal server error has occurred. 错误
|
17天前
|
Windows
Windows 10找不到恢复环境
Windows 10找不到恢复环境
16 0
|
20天前
|
网络安全 API 数据安全/隐私保护
【Azure App Service】.NET代码实验App Service应用中获取TLS/SSL 证书 (App Service Windows)
【Azure App Service】.NET代码实验App Service应用中获取TLS/SSL 证书 (App Service Windows)
|
20天前
|
Shell PHP Windows
【Azure App Service】Web Job 报错 UNC paths are not supported. Defaulting to Windows directory.
【Azure App Service】Web Job 报错 UNC paths are not supported. Defaulting to Windows directory.
|
20天前
|
应用服务中间件 nginx Windows
【Azure 应用服务】在App Service for Windows中实现反向代理
【Azure 应用服务】在App Service for Windows中实现反向代理
|
20天前
|
安全 Windows
【Azure 云服务】当Windows系统发布新的安全漏洞后,如何查看Azure云服务(Cloud Service)的实例是否也更新了安全补丁呢?
【Azure 云服务】当Windows系统发布新的安全漏洞后,如何查看Azure云服务(Cloud Service)的实例是否也更新了安全补丁呢?
|
2天前
|
安全 算法 网络安全
网络安全与信息安全:关于网络安全漏洞、加密技术、安全意识等方面的知识分享
【9月更文挑战第11天】在数字化时代,网络安全与信息安全已成为我们生活中不可或缺的一部分。本文将探讨网络安全漏洞、加密技术以及安全意识等方面的知识,并提供一些实用的技巧和建议,帮助读者提高网络安全防护能力。
25 12