This is part of an ELC Tech Network

The iPhone is Bad at Keeping Secrets

newton-virus-objectsqToday an article from TaranFx has been making the rounds talking about a new open source application called SpyPhone that highlights all of the “information vulnerabilities” within the current iPhone SDK. You can check out the article here:

SpyPhone App Steals Personal Data from ALL iPhones

Everyone has probably heard of the problems some users with jailbroken iPhone have been experiencing. Without the boundaries in place from the SDK many users phones have been held hostage by malicious applications taking advantage of the default root password. This application, unlike the others we have heard about, uses only public portions of the API to get all the info it displays. The app displays:

  1. Email Accounts
  2. Wi-Fi Networks
  3. Phone Usage Info and History
  4. Location Information
  5. Safari Searches
  6. YouTube Searches, History and Bookmarks
  7. Photos
  8. Address Book Data
  9. Keyboard Cache

While this is a lengthy list I think it is important not to take the easy road of yelling about security, privacy or whatever else and instead really look at how the app gets all this stuff. SpyPhone’s source can be downloaded at it’s git hub and you can see for yourself how all the magic happens. With a quick look at the source the secret to this application is discovered. The iPhone contains many folders like your Macintosh Computer. Many of these folders are familiar sounding…”Applications”, “Library”, “Root”. If you have the SDK installed on your computer you can look at these folders as the iPhone simulator uses them as well. They are located at

~/Library/Application Support/iPhone Simulator/User

This is where the iPhone keeps all of your data. Going back to SpyPhone’s code, the secret is taking advantage of these folders and the files the contain. If you go a little further into your iPhone Simulator folders you will find:

d8621d8bcc1484ff27acc0fa1784f71d001

In here there are tons of com.apple.SOMETHING.plist files. These files most of the surprising data that SpyPhone is able to grab. Some of it is facilitated by other parts of the SDK (Address Book Access, Photos), but the minor personal information can be found here. He grabs the info using code such as:

Advertisement

NSString *path = @"/Library/Preferences/SystemConfiguration/com.apple.wifi.plist";
 
NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:path];
 
if(!dict) return;
 
NSArray *a = [dict valueForKey:@"List of known networks"];
 
if(!a) return;

NSString *path = @”/Library/Preferences/SystemConfiguration/com.apple.wifi.plist”;
NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:path];
if(!dict) return;
NSArray *a = [dict valueForKey:@"List of known networks"];

if(!a) return;

This line for instance would create an array with all the known networks for the phone the application is being run on. While this is a little concerning I don’t think this is anything to make a big stink out of.  First off I know for a fact Apple gladly rejects applications sniffing around in here. One positive note of having Apple as an overlord is that they really do know every detail about the SDK, and are able to stop applications that abuse the SDK before they get on the store.

But this application brings up the larger issue of the mysterious App Store Approval process. It is incredible that admission to the worlds fastest growing software marketplace is such a mystery. All the code to grab the “sensitive” information that SpyPhone can occur with the user having no knowledge, and while I am sure that Apple has ways of testing these apps and monitoring their access to these PLISTS, I could easily imagine having an application that has that ability but does not execute the ability till I know it is in the app store.

For instance, if I had a small XML Doc online specifying whether to run the method to grab all the users information and had it set to NO for the approval process  and upon getting submitted changed the XML to say YES. I could begin collecting info on all the users who launch my app and the approvers in the App Store would never have seen it. So although I think Apple has a very good handle on how to root out malware, I’m sure there could be many ways to get around it. So I come to my final question, would you rather not have apps be able to use any of this info? No photos, no addresses, no wi-fi examination applications, limited in app mail. Lots of the functions that makes the iPhone awesome are wrapped up in these “security holes”. So what do you guys think? Should Apple close off access to at least the system PLISTS or is this making mountains over mole hills?

This entry was posted in Uncategorized. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

6 Comments

  1. Posted December 5, 2009 at 10:59 pm | Permalink

    I think probably what should happen is that apps don’t get all privileges by default unless they ask for them. For example, if I don’t ask for the permission to view the photos, any attempt at trying to use the photos will fail.

    The asking can be something similar to other platforms where you have to list off the permissions your app uses in some location (probably in the app plist file for the iPhone). This allows the system to configure access to these items when the app is being installed or launched, and it also gives a list to Apple for them to check to see if the developer has asked for reasonable permissions — maybe they could flag apps that ask for all permissions, and contact the developer to make sure that’s what they wanted/needed.

    Another possibility that this could allow is that the users could actually deny the permissions — I’m sure Apple would come up with something elegant in this area, maybe something along the lines of what they do for location right now, maybe something else entirely. But the goal would be to give the user more control over what information is released to apps, especially since they can’t peek inside to see what they are doing with that information.

  2. rahulvyas
    Posted December 7, 2009 at 5:55 am | Permalink

    Hello Collin,
    nice article!
    can you tell me a way to find all the information about phone calls? I mean missed calls and received calls and date/time of calls etc. Any help regarding this appreciated

  3. Posted December 10, 2009 at 2:39 am | Permalink

    Hello ,
    nice article!
    can you tell me away to draw line graph in iphone?
    I got some codes using coreplot and Quartz .So if u got any idea with drawing graph using graph…pls teach me.
    Which one is better to develop?(core plot and Quartz)

  4. Tim
    Posted December 13, 2009 at 11:20 am | Permalink

    It is highly likely that Apple will catch your attempts to access these directories with their pre-screening process. You won’t need to actually run the code that does this, so the “secret” on switch method will likely not work.

    Just like they screen the binary today for access to the private API functions, they can detect code that may attempt access to files on the file system that should not be read.

    Though you may attempt to obfuscate the code that makes these calls, if you are caught you risk losing your development license and access to the SDK and the iTunes store.

    -t

  5. Posted March 8, 2010 at 8:58 pm | Permalink

    We harmonise with all your results and may hungrily look onward to the next updates. Simply declaring thanks will never merely be adequate, for the extraordinary clarity inside your writing. I’ll directly get your feed to stay informed of all posts. Good effort and much results within your internet business endeavors! Cheers!

  6. Posted March 13, 2010 at 10:55 am | Permalink

    Article Marketing is considered one of the best strategy of marketing today. This is a genuinely good method to market your blog or website and therefore make sales. Although article marketing is essentially free to do, it’s still a great idea to buy automation tools. Article spinning and submitter tools are the most effective ones you can acquire that are going to massively help you leverage your article marketing campaigns.

One Trackback

  1. [...] 原文见:The iPhone is Bad at Keeping Secrets   闲谈   安全   [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">