Search code examples
apisecurityfiddlermobile-applicationcharles-proxy

Hide Request/Response header for get request from fiddler or other debug proxy apps


I have mobile app which heavily depends on apis response, I was using charles proxy and fiddler to see the api calls made by my app and I have noticed for one of get api call I am able to see full url with all request parameters(which is fine) and request headers(which include secure keys).

So using those info anyone can execute that api outside of mobile app. my app has millions of user and if someone run script to increase traffic it also increase load on server. so is there any way I can secure or hide those keys ?

I am able to think only one way of doing it is

encryption on both app and api side

is there any better way of doing it ?


Solution

  • You can implement certificate or public-key pinning in your app (for the leaf or the root-CA-certificate). This makes it harder for an attacker to use a proxy and intercept HTTPS traffic. However with XPosed and SSL-Unpinning module this will still work.

    Also keep in mind that APK files can be decompiled easily, therefore you don't have to attack the network traffic.

    Therefore the next step is to harden your app to make it resistent against manipulation via XPosed or Frida. Note that good harding frameworks cost a lot of money. Usually the protection offered is raising with the cost.

    See also this related question.