Howettblog®

Friday, December 19, 2008

iTunes App Store Hacking

Last night, I tried to figure out how the iTunes App Store (as accessed from the iPod Touch) worked.
I was able to simulate the app store experience, and here are the few notes I took on the matter.

All replies from the App Store are gzip-compressed.
If any of these steps fails, the connection is terminated.
  1. The device queries phobos.apple.com for a "bag" (ix=2), which contains a signature and a signing key.
  2. The device sends a non-binary plist (XML property list) of its current applications to a WebObject called "availableSoftwareUpgrades"
  3. The app store replies with a list of all the information for those applications. It is up to the iPod itself to determine whether/not there are upgrades.
  4. Periodically, the device makes a request to metrics.apple.com (which replies 100 Continue instead of 200 OK), which I believe is for stats tracking.
  5. The device reads software categories and loads icons (WebObject viewFeaturedSoftwareCategories)
  6. The device loads the contents of a category (WebObject viewGenre)
  7. The device loads an application's information descriptor (WebObject viewSoftware). This for some reason contains the text to be used in the price display, as well as the "INSTALL" or "BUY NOW" text.
  8. The device initiated a secure connection to download an application. This is where I had to stop my research, as I couldn't track this.


Tools used:
  • curl (Commandline URL Fetcher)
  • Wireshark (packet capturer/analyzer)
  • Apache (Web Server, used here to serve fake App Ptore pages)
  • A single firewall rule on my router to redirect all traffic coming from the iPod back to my computer (iptables -t nat -A PREROUTING -s ipod -p tcp -j DNAT --to 192.168.254.1. Note: I couldn't redirect to a computer inside the router's network, so I had to hook up via WiFi to the router AND via Ethernet to the modem)


Not much useful information into the app loading process was gleaned from this, unfortunately, though I did manage to snap some "neat" screenshots of my meddling.


Applications are signed, though, so even if this was an exploitable vector, the device would need to be jailbroken first, thus making this useless.
Neat nonetheless.

Labels: , , , ,

2 Comments:

Post a Comment



<< Home