zoukankan      html  css  js  c++  java
  • 【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

    当在复杂的环境中面临问题,格物之道需:浊而静之徐清,安以动之徐生。 云中,恰是如此!

  • 相关阅读:
    安卓系统的文件管理神器Solid Explorer(v2.2)
    地月距离竟然如此遥远
    Android在争议中逃离Linux内核的GPL约束【转】
    gearman
    PHP基础学习
    函数式编程
    有向图的实现
    无向图的实现
    百度地图API获取数据
    python队列的实现
  • 原文地址:https://www.cnblogs.com/lulight/p/15626008.html
Copyright © 2011-2022 走看看