简体   繁体   中英

How to capture all network data in a android device like fiddler in pc?

Is there a way to analyse network traffic in a android device and log it in SD card? For example this app will run in background as a proxy making all network pass through it and based on some filters (eg: facebook data, whatsapp data) inspect data that is being sent and received and log it in a text file.

I don't know of a way to save the data to an SD card but you can capture all traffic from an Android device by configuring Fiddler on a PC that's in the same network .

In Fiddler, on your PC, go to Tools > Fiddler Options > Connections

Check Allow remote computers to connect

Check the Fiddler server's IP

In the Android device's WiFi settings, configure a proxy. Use your Fiddler server's IP and port as the Proxy hostname and Proxy port respectively.

This should make the traffic from your Android device appear in Fiddler.

Check the link at the beginning of this answer for a more detailed description and screenshots.

I think you are looking into TCPDump. But this cannot be run as a regular user, you will need to become root to executing it.

Note also that the tcpdump binary is not even published with stock images (my Cyanogenmod does not even contain this).

Here are some examples: http://danielmiessler.com/study/tcpdump/

Some applications on Google Play allow you to capture traffic without rooting your device. One of these is Grey Shirts' Packet Capture .

They work by running on the device as a VPN service. Forcing all traffic to go through it while logging it as well. You can then view the logs on the app's UI (It might be possible to pull the session log from the SD card to open it on Wireshark. Haven't tried that).

The app also allows you to install its own root CA certificate so you can view SSL encrypted packets decrypted (just remember to delete the certificate once you're done capturing traffic). This works as longs as the app does not usecustomized trusted CAs .

Note that you will not be able to capture all traffic with an app running as a VPN service. Name resolutions made by apps for example will not pass through the VPN.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM