101 mobile app API requests

How to discover, capture and emulate mobile app API requests.

API Data

Introduction

The main goal of this post is to describe the steps to discover and use a mobile app API (own or third party).

I divided the problem in the following steps, each of it will be future blog entries:

  1. API Discovering: Find the request made from a mobile app.

    1.1 Problem How do I capture the app API requests?
    1.1 Solution Use a data-network packet analyzer

    1.2 Problema OK, I can see the requests but the are encrypted …
    1.2 Solución Man in the middle with custom certificates. Only on iOS.

  2. API Authentication: Is OK to know how to make the APIs calls, but they are useless if we don´t know how to emulate them. We need to discover how the app authenticate through the server.

    2.1 Problem How do I find the authentication data?
    2.1 Solution Reverse engineering: Use Mobile app (.apk) decompiler.

    2.2 Problem I can’t read the code.
    2.2 Solution How to follow the decompiled methods and variables.

  3. Use the API

    Once we know how to make and authenticate the API requests, we only need to try.