大网数据广告活动
服务器运维问答

How can NETSH be used to sniff and collate network traffic?

· 52CE 我爱测

I am trying to capture all network traffic and view it in a human-readable way. To begin packet capture with netsh, I am running the following command. netsh trace start scenario=NetConnection capture=yes report=yes persistent=no…

问题原文

原帖链接 · jsc · CC BY-SA 3.0

I am trying to capture all network traffic and view it in a human-readable way.

To begin packet capture with netsh, I am running the following command.

netsh trace start scenario=NetConnection capture=yes report=yes persistent=no maxsize=1024 correlation=yes traceFile=net-trace.etl

I then use QuickPHP to host a form that takes a username and password and posts it to itself. The trace is then stopped with netsh trace stop.

To inspect the captured traffic, the following command is run.

netsh trace convert input=net-trace.etl output=net-trace-dump.txt dump=txt

When I read the dumped traffic, the entries are unintelligible and I cannot see the traffic to the QuickPHP server on 127.0.0.1. Additionally, when I import the .etl file into Microsoft Network Monitor, the traffic is clumped into a single clump and the QuickPHP traffic still cannot be found.

I have been able to run a capture with Microsoft Network Monitor and see the QuickPHP traffic.

How can NETSH be used to capture the network traffic and viewed, either in a dumped text file or Microsoft Network Monitor, in a similar way to a capture from Microsoft Network Monitor?

Thank you very much in advance for your help!

已采纳解答

原帖链接 · Ryan Ries · CC BY-SA 3.0

Just use netsh trace start capture=yes without any of the other stuff. This gets you just a basic packet capture that you can view in Network Monitor.

You don't need to use the ETW providers like NetConnection unless you're troubleshooting a Windows Filtering Platform problem or something.

You don't need the convert command at all.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-07-05)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。