我正在尝试调试LWM2M协议问题。我需要知道COAP服务器和COAP客户端之间传输的是什么消息。由于流量是使用DTLS加密的,因此我需要在wireshark中提供预共享密钥才能查看有效负载。Wireshark正在成功解密负载,但我看不到底层的COAP协议消息。我只看到了原始数据(“应用程序数据”):
但是,当我尝试在虚拟设置上嗅探未加密的COAP流量时,我可以正确地看到COAP消息:
如何在加密后使用wireshark查看COAP协议流量?
发布于 2021-02-19 02:33:11
问题是您使用的是COAP而不是IANA-registered port of 5684的非标准端口号,并且Wireshark COAP解析器的proto_reg_handoff_coap()
函数只使用该固定的、不可配置的端口(DEFAULT_COAPS_PORT
)注册到DTLS解析器。有一些可能的方法可以解决这个问题和/或解决它。
- Add Files: Choose your file, i.e., `file.pcapng`.
- Taskname: Anonymize Files.
- Payload: Deselect _"Remove all unknown layers..."_ as you want to keep everything.
- PCAPng: Action=Passthrough, as there's no need to replace original comments here.
- Layer 4, UDP: Action=Replace. Select _"Replace UDP ports by list"_, then choose _Add_. Enter 57845 for the _Original_ port number and 5684 for the _Replacement_ port number, then click _Add_.
- Select _Okay_.
- Select _Run_.
- When the **Status** indicates, _"Task complete"_, you should be able to open the newly created packet capture file, named `file_anon.pcapng`, in Wireshark and Wireshark should now recognize the payload as COAP.
免责声明:我自己还没有测试过,但它应该可以工作。
https://stackoverflow.com/questions/66264012
复制相似问题