Andriod利用wireshark抓包

  1. 工具准备

  2. 环境安装

    1. Andriod先root工具

    2. 使用adb shell push tcpdump /data/local/.spa

    3. 使用adb shell push nc /data/local/.get

    4. PC端安装wiresharkio

    5. 把nmap中的ncat.exe拷贝到wireshark目录map

  3. 抓包

    • Andriod执行db

      • 网络:adb shell /data/tcpdump -n -s 0 -w - | nc -l -p 8899
      • 文件:adb shell /data/local/tcpdump -p -v -s 0 -w /sdcard/capture.pcap
    • PC端执行wireshark

      • 网络:

        • adb forward tcp:8899 tcp:8899

        • ncat.exe 127.0.0.1 8899 | wireshark -k -S -i -

      • 文件:

        • adb pull /sdcard/capture.pcap c:/

        • 使用wireshark打开capture.pcap

相关文章
相关标签/搜索