HexBrain

Starbucks · Report #232650

Full Api Access and Run All Functions via Starbucks App

Validstatus
mediumseverity
28upvotes
6 Aug 2017disclosed

Summary

When i tried to pentest the starbucks android app, i could not see the traffic between client and the server because of the SSL Pinning.

First, i wanted to SSL Unpinning then continue the testing, however, i released that developers forgot to add /MobileInbox/ path for the ssl validation. (i dont know they forgot or leave it like that)

Currently, I had a request thanks to forgotten/leaving a path for ssl validation. When i have a directory, always i check the sub or parent directory because of that I tried to reach this link directly on browser but i faced a basic http authentication pop-up. There must be a problem because i have an access with burp, then i check the HTTP Headers bingo! there was a Authorization-Token. I added this token automatically when i request a link then second bingo i have an access directly on browser.

Now try to digg sensitive things. I went to homepage and it directed me to /edgeapidoc/index/ . There was a link on that page which /swagger/docs/v1/ . I hoped that was the documents of the API usage. Yeapp that was the documentation of the API usage. I saw all methods of the app, first thing which came in my mind, am i eligible to use this all of things. yeap i was :)

I did not want to change anything on the server, because of that did not use any POST method. I just used almost all GET methods :D all of them were working such as, masked credit card values, api tokens, user informations etc.

How it was found

The tested application is Starbucks Turkey Android App. https://play.google.com/store/apps/details?id=com.starbucks.tr&hl=en

All these things are made without any login. I did not login the app.

  1. I tried to intercept traffic between starbucks app and server with burp suite. I could not be successful because of the ssl pinning.
  2. Before the unpinnig ssl, I look around the app's all screens.
  3. When i look at the messages tab i saw a proccess on my burp history.
  4. Application sent a request to https://crmproxy.protel.com.tr/api/v1/MobileInbox/Limit/20 this url and it took a response.
  5. I evaluated this request then i saw the Authorization: Basic QVBSTlhXTFpUUTo4NGY0NDlmMWYzOWEyMDUz token.
  6. I tried to reach this url via browser however, i couldnt because it wants to basic authentication and i tried the default password which comes to mind but i couldnt be successful.
  7. I remembered when there was a request on burp which has Authorization: Basic QVBSTlhXTFpUUTo4NGY0NDlmMWYzOWEyMDUz token and i tried to add this token in my all request while trying to access via browser.
  8. Bingoooo! It worked! I reach the https://crmproxy.protel.com.tr this api server and i looked around it then i found the api docs.
  9. Finally, i tried to sent all request in api docs, i was successful in all of them.

I added to all screenshots below. If there is any question, i may answer them.

Thank you,

Yunus Y.

This report was disclosed publicly on HackerOne and belongs to its author and the program. See the original