Reversing Google Play Store

    I apologize in advance that quite a bit of technical details about the requests / answers, so far I understand.

    Yes, following the Reverse of the AppStore , I decided to take on the same, but with Google. Google Play Store. (like Bond. James Bond).

    The fun part is that Google is simple and secure. Signatures are used, nonce. And also the service is divided into two components - push and regular. Everything is packed in what would you think? That's right - protobuffers! It's hard to decode, because the binary message format does not describe itself, a lot of heuristics and fun.
    It is funny, however, that, like Apple, SUDDENLY, they spat on the standards (or did I misunderstand?) - gzip is given to the plaintext / binary - in protobuffers, but binary is given to ... gzip!
    image
    Welcome to cat.

    image
    Buying is very easy and effortlessly difficult.

    The first - /fdfe/toc- provides data on the Terms & Conditions of the market and other mandatory nonsense.
    Second - /fdfe/purchaseor /market/api/ApiRequest- get the purchase data (that “buy” button in the market)
    Third - /fdfe/completePurchase- complete the purchase itself;
    Fourth - /fdfe/purchaseStatusor /market/api/ApiRequest- check the purchase status - get nonce and other parameters for the purchase in json;
    Fifth - /market/api/ApiRequest- receive Nonce; purchase details
    Sixth- requesting to /market/api/ApiRequestand receiving some interesting type string ‹ г bе`PxБОі‰‰ эњ- I did not understand what it is.

    It is also not clear why the requests go either to /market/api/ApiRequestor to the /fdfe/*purchase. Maybe I came under a quiet protocol change?

    + big brother is watching you! Periodically, requests for leave /fdfe/log:
    image

    At the same time, a push notification arrives with the information that “your purchase was loaded” or “failed to complete the purchase” - so far I have stopped on this. And without notification, nothing works. Another degree of protection, however.

    It's funny that this whole thing (push) works through TCP with SSL / TLS (I respect), SUDDENLY, according to mtalk.google.com (I was completely sure that there would be something like XMPP), but no - protobuffers in base64 and something else:
    image

    To be continued ... (if, of course, the corporation of good does not ban me)


    PS:
    I managed to emulate and the purchase of recoverable purchases works quite well, but it is very unstable. If you want to help somehow, make, for example, a .proto file for market answers - welcome to the PM.
    PSS:
    I do not work alone, a person with the nickname madkite helps me, I do not know if he is on the hub No along the way.

    Also popular now: