Sniffing an Android app to find API URL

前端 未结 5 963
夕颜
夕颜 2020-12-12 11:00

I\'m curious as to how I could figure out the API URL an Android application (any app I have installed) uses if it makes API calls to some online server (a RESTful service f

相关标签:
5条回答
  • 2020-12-12 11:17
    1. install virtual box and genymotion http://www.2daygeek.com/install-upgrade-oracle-virtualbox-on-ubuntu-centos-debian-fedora-mint-rhel-opensuse/ and http://www.2daygeek.com/install-genymotion-android-emulator-on-ubuntu-centos-debian-fedora-rhel-opensuse-arch-linux-mint/#
    2. Run genymotion . 3 . after that your desire android ADV install .
    3. now start wireshark with root access
    0 讨论(0)
  • 2020-12-12 11:23

    Use debug proxy. Click on the play Button and you will be able to capture URLs and view more details

    https://play.google.com/store/apps/details?id=com.dans.apps.webd

    0 讨论(0)
  • 2020-12-12 11:25

    Download Android +6.0 image for PC from this site: https://www.android-x86.org/.

    For example: https://www.android-x86.org/releases/releasenote-6-0-r3.html

    Make sure that your app works with this Android version -- you can check the minimum Android version on Google Play store --, and don't take a too high number for the Andriod version: the higher the number, the more security constraints is has.

    Install VirtualBox, mount the ISO image, boot Android, and install the app through Google Play.

    Now you have two options:

    1. If traffic is unencrypted, you can log all NIC traffic to a text file. e.g. VBoxManage modifyvm "vm-name" --nictrace1 on --nictracefile1 c:\file.pcap (cf. here)

    2. If traffic is encrypted, you can use a man-in-the-middle approach. An app that allows this is HttpCanary. It will make an VPN connection and redirect your traffic through that VPN. It decrypts and works well, but take care with your private data.

    0 讨论(0)
  • 2020-12-12 11:39

    you can do this with help of WireShark. I am listing steps here

    1. Install WireShark on your computer
    2. now we have to create Android virtual device(AVD) so we will download Android SDK from official site. Android SDK come with emulator for testing
    3. after setting up Android SDK, create a Android virtual Device(AVD) on which we will install app
    4. start that virtual device. you can use command line to start (emulator @<AVD name>)
    5. after creating virtual device install app using adb command adb install app_file_name.apk
    6. now we can start capturing the packets so I will suggest to close other application on your computer which are using network so our captured packets would be more relevant.
    7. now start wireshark with root access
    8. select interface which you want to capture and click start to start capturing.

    9. now start using that app so packets will transfer to and fro and wireshark will capture it.

    10. if you have used app covering all sort of activity then you can stop wireshark to capture packets.

    11. now start main business to analyse packets carefully but not all packets are usefull for our job. so lets filter packets which are relevant for you. lets your IP address is 192.168.0.32 then filter all the packets whose IP is this. so filter expression will be ip.addr==192.168.0.32 apply this filter. still we an apply another filter to list up only relevant packets only so possibly that app is accessing API with HTTP protocol so apply HTTP filter. expression would be http. you can apply both are filter at once ip.addr==192.168.0.32 and http press enter to apply.

    12. see the info carefully for listed packets you will see lot of important details, API keys, cookies etc

    0 讨论(0)
  • 2020-12-12 11:41

    A very fast method.
    Go to PlayStore, search for Packet Capture

    Download, install and run.
    It's easy simple and fast. It will give you details about the APIs, URLs and response with their headers.

    This application follows the concept of Packet Sniffing. Thus, this might not work with much secured applications like WhatsApp, Facebook, Twitter.

    UPDATE 1:
    The Packet Capture is no more available in playstore, try OS Monitor

    UPDATE 2:
    The Packet Capture is available again.

    0 讨论(0)
提交回复
热议问题