【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/

 

相关文章
|
8月前
|
安全 Linux 网络安全
Nipper 3.9.0 for Windows & Linux - 网络设备漏洞评估
Nipper 3.9.0 for Windows & Linux - 网络设备漏洞评估
225 0
Nipper 3.9.0 for Windows & Linux - 网络设备漏洞评估
|
11月前
|
监控 安全 网络协议
恶意软件无处逃!国内版“Manus”AiPy开发Windows沙箱工具,进程行为+网络传输层级监控! 头像 豪气的
NImplant.exe 是一款后渗透测试工具,可实现远程管理与持久化控制。其优点包括无文件技术、加密通信和插件扩展,但也存在被检测风险及配置复杂等问题。为深入分析其行为,我们基于 aipy 开发了 Windows 沙箱工具,针对桌面上的 NImplant.exe 进行多维度分析,涵盖进程行为、网络连接(如 TCP 请求、目标 IP/域名)、文件控制等,并生成传输层监控报告与沙箱截图。结果显示,aipy 工具响应迅速,报告清晰易读,满足分析需求。
|
11月前
|
网络协议 安全 测试技术
Windows为何在高速网络环境频繁“失速”?
本文深入剖析了企业在高速网络环境中,因Windows系统限制导致传输速率下降的问题,包括接收缓冲区、安全软件及老旧设备等因素,并提供四步定位法及优化方案,助力企业突破传输瓶颈,提升效率。
|
安全 Ubuntu Linux
Nipper 3.8.0 for Windows & Linux - 网络设备漏洞评估
Nipper 3.8.0 for Windows & Linux - 网络设备漏洞评估
534 0
Nipper 3.8.0 for Windows & Linux - 网络设备漏洞评估
|
XML 安全 网络安全
Nipper 3.7.0 Windows x64 - 网络设备漏洞评估
Nipper 3.7.0 Windows x64 - 网络设备漏洞评估
268 0
Nipper 3.7.0 Windows x64 - 网络设备漏洞评估
|
Kubernetes Shell Windows
【Azure K8S | AKS】在AKS的节点中抓取目标POD的网络包方法分享
在AKS中遇到复杂网络问题时,可通过以下步骤进入特定POD抓取网络包进行分析:1. 使用`kubectl get pods`确认Pod所在Node;2. 通过`kubectl node-shell`登录Node;3. 使用`crictl ps`找到Pod的Container ID;4. 获取PID并使用`nsenter`进入Pod的网络空间;5. 在`/var/tmp`目录下使用`tcpdump`抓包。完成后按Ctrl+C停止抓包。
502 12
|
安全 Windows
【Azure Cloud Service】在Windows系统中抓取网络包 ( 不需要另外安全抓包工具)
通常,在生产环境中,为了保证系统环境的安全和纯粹,是不建议安装其它软件或排查工具(如果可以安装,也是需要走审批流程)。 本文将介绍一种,不用安装Wireshark / tcpdump 等工具,使用Windows系统自带的 netsh trace 命令来获取网络包的步骤
446 32
|
C# Windows
【Azure App Service】在App Service for Windows上验证能占用的内存最大值
根据以上测验,当使用App Service内存没有达到预期的值,且应用异常日志出现OutOfMemory时,就需要检查Platform的设置是否位64bit。
335 11
|
安全 Windows
怎样利用 Windows XP实现网络统一关机
怎样利用 Windows XP实现网络统一关机
怎样利用 Windows XP实现网络统一关机

热门文章

最新文章