4

将Android/iOS上的流量转发到Wireshark分析

 2 years ago
source link: https://o0xmuhe.github.io/2021/12/15/%E5%B0%86Android-iOS%E4%B8%8A%E7%9A%84%E6%B5%81%E9%87%8F%E8%BD%AC%E5%8F%91%E5%88%B0Wireshark%E5%88%86%E6%9E%90/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

将Android/iOS上的流量转发到Wireshark分析

背景&&需求

迫于要分析一些SDK里的协议,需要抓到所有的流量来分析交互过程,所以有了这篇记录,主要是基于实时监控Android设备网络封包做的尝试,然后使用相同的思路扩展到了iOS上。

tcpdump---nc---端口转发---nc----wireshark
|------手机------| |-------PC端-------|

Android

手机必须root

  • tcpdump
tcpdump -l -n -s 0 -v -w - | nc -l -p  11233
adb forward tcp:11233 tcp:11233 && nc 127.0.0.1 11233 | wireshark -k -S -i -

手机必须越狱

tcpdump -l -n -s 0 -v -w - | nc -l -p 11233
~  iproxy 11233 11233
Creating listening port 11233 for device port 11233
~  nc 127.0.0.1 11233 | wireshark -k -S -i -

实时监控Android设备网络封包


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK