如何在Wireshark上捕获移动电话流量?


当前回答

作为Wireshark的替代品/ Android的伙伴,您可以尝试我的开源应用程序PCAPdroid。在非根设备上,它使用VPNService捕获流量,但有一些限制。在根设备上,它的工作方式类似于用户友好的tcpdump。

您可以直接在应用程序中分析连接和数据包负载,也可以将流量以PCAP格式导出到PC上使用Wireshark进行分析。它还有许多其他很酷的功能,试试看吧!

其他回答

作为Wireshark的替代品/ Android的伙伴,您可以尝试我的开源应用程序PCAPdroid。在非根设备上,它使用VPNService捕获流量,但有一些限制。在根设备上,它的工作方式类似于用户友好的tcpdump。

您可以直接在应用程序中分析连接和数据包负载,也可以将流量以PCAP格式导出到PC上使用Wireshark进行分析。它还有许多其他很酷的功能,试试看吧!

以下是一些建议:

For Android phones, any network: Root your phone, then install tcpdump on it. This app is a tcpdump wrapper that will install tcpdump and enable you to start captures using a GUI. Tip: You will need to make sure you supply the right interface name for the capture and this varies from one device to another, eg -i eth0 or -i tiwlan0 - or use -i any to log all interfaces For Android 4.0+ phones: Android PCAP from Kismet uses the USB OTG interface to support packet capture without requiring root. I haven't tried this app, and there are some restrictions on the type of devices supported (see their page) For Android phones: tPacketCapture uses the Android VPN service to intercept packets and capture them. I have used this app successfully, but it also seems to affect the performance with large traffic volumes (eg video streaming) For IOS 5+ devices, any network: iOS 5 added a remote virtual interface (RVI) facility that lets you use Mac OS X packet trace programs to capture traces from an iOS device. See here for more details For all phones, wi-fi only: Set up your Mac or PC as a wireless access point, then run wireshark on the computer. For all phones, wi-fi only: Get a capture device that can sniff wi-fi. This has the advantage of giving you 802.11x headers as well, but you may miss some of the packets Capture using a VPN server: Its fairly easy to set-up your own VPN server using OpenVPN. You can then route your traffic through your server by setting up the mobile device as a VPN client and capture the traffic on the server end.

前提条件:您的计算机上已经安装了adb和wireshark,并且您的android设备已经root。

下载tcpdump到~/Downloads adb push ~/下载/tcpdump /sdcard/ 亚行壳 苏根 Mv /sdcard/tcpdump /data/local/ cd /数据/地方/ Chmod +x tcpdump ./tcpdump -vv -i any -s 0 -w /sdcard/dump.pcap 在捕获足够多的包后按CTRL+C。 退出 退出 Adb拉/sdcard/dump。pcap ~ /下载/

现在您可以使用Wireshark打开pcap文件。

对于Android手机,我使用tPacketCapture: https://play.google.com/store/apps/details?id=jp.co.taosoftware.android.packetcapture&hl=en

这个应用程序是一个救生员,我正在调试我的Android应用程序上SSL/TLS握手失败的问题。试图设置自组网,这样我就可以在我的笔记本电脑上使用wireshark。这对我没用。这个应用程序很快让我捕捉网络流量,分享到我的谷歌驱动器上,这样我就可以下载到我的笔记本电脑上,在那里我可以用Wireshark检查它!太棒了,不需要根!

与让你的PC成为无线接入点类似,但更简单的方法是使用反向系带。如果你刚好有一部HTC手机,在网络/移动网络共享设置下,他们有一个很好的反向绑定选项,叫做“互联网传输”。它通过你的PC路由你所有的流量,你可以在那里运行Wireshark。