The Apple Core

Jason D. O'Grady & David Morgenstern

Your iPhone is tracking you (and has been for a while)

By | April 21, 2011, 9:00am PDT

Summary: Two researchers caused a stir yesterday when they published an article about a hidden file in iOS 4 that records the position of your device to a plain SQL file. But is it old news?

Two O’Reilly media researchers, Alasdair Allan and Pete Warden, caused quite a stir yesterday when they published an article about a hidden file in iOS 4 that regularly records the position of your device. All iPhones running iOS 4.0 or later log your location to a file called “consolidated.db” (a plain SQL file) which contains latitude-longitude coordinates and a timestamp.

This information was published in December 2010 and had been known even earlier – but it largely flew under the radar.

In February 2011 Sean Morrissey and Alex Levinson previewed Lantern 2.0, which harvested data from consolidated.db, at the DoD Cyber Crimes Conference in Washington, DC:

Lantern 2.0 has been on the market for months now and performs the same functionality Mr. Warden’s utility does and much more. We correlate geolocational data embedded in images and third party application. We give you a geolocational timeline of events in list view showing much more than baseband logs within consolidated.db.

The problem is that Lantern is a commercial forensics application that sells for $600-$700 so it’s out of reach of the average user. If you’d like to see the effects of consolidated.db in action, simply download Warden’s open source, proof-of-concept OS X application iPhone Tracker and run it.

All iPhones appear to log your location to a file called “consolidated.db.” This contains latitude-longitude coordinates along with a timestamp. The coordinates aren’t always exact, but they are pretty detailed. There can be tens of thousands of data points in this file, and it appears the collection started with iOS 4, so there’s typically around a year’s worth of information at this point.

iPhone Tracker automatically finds the file in your last iPhone backup, and plots your location over time on a map. You can zoom in on specific areas on the map and even watch a time lapse animation of your phone’s location on a “heat map.” It even includes a dragable slider bar that lets you look at a specific moment in time. (Hint: you need to drag the little bar on the zoom meter, clicking + and - doesn’t work)

A screenshot of my iPhone Tracker heat map is posted at the top of the story. Here’s one of the duo’s demo videos:

Washington DC to New York from Alasdair Allan on Vimeo.

It’s amazing that this file is just sitting, unencrypted on your hard drive and available to anyone with access to your Mac (or its backups). What makes it even more nefarious is that this file stores almost a year’s worth of data dating back to whenever you installed iOS 4, which was released on June 21, 2010. And the data file is almost impossible to delete and it persist across device upgrades and backups and restores.

So what to do?

A. Don’t Panic.

there’s no immediate harm that would seem to come from the availability of this data. Nor is there evidence to suggest this data is leaving your custody. But why this data is stored and how Apple intends to use it — or not — are important questions that need to be explored.

B. Protect yourself by encrypting your backups through iTunes (click on your device within iTunes and then check “Encrypt iPhone Backup” under the “Options” area).

Apple needs to respond to the concerns brought up by researchers about consolidated.db immediately. It should start by pushing out a maintenance release that, at minimum, encrypts and hides the file.

More on the topic:

Update: Andy Ihnatko reinforces my Don’t Panic advice:

  • This database isn’t storing GPS data. It’s just making a rough location fix based on nearby cell towers. The database can’t reveal where you were…only that you were in a certain vicinity. Sometimes it’s miles and miles off. This implies that the logfile’s purpose is to track the performance of the phone and the network, and not the movements of the user.
  • A third party couldn’t get access to this file without physical access to your computer or your iPhone. Not unless you’ve jailbroken your iPhone and didn’t bother resetting its remote-access password…or there’s an unpatched exploit that would give Random Person On The Internet root access to your phone.
  • It’s pretty much a non-issue if you’ve clicked the “Encrypt iPhone Backup” option in iTunes. Even with physical access to your desktop, a no-goodnik wouldn’t be able to access the logfile.

Update 2: The forensic community has known about the consolidated.db file for a while now and has been using it. Alex Levinson notes that he’s provided data from pre-iOS 4 iPhones to law-enforcement:

Through my work with various law enforcement agencies, we’ve used h-cells.plist on devices older than iOS 4 to harvest geolocational evidence from iOS devices.

Kick off your day with ZDNet's daily e-mail newsletter. It's the freshest tech news and opinion, served hot. Get it.

Topics

Jason O'Grady is a journalist and author specializing in mobile technology. He has published six books on Apple and mobile gadgets and his PowerPage blog has been publishing for over 15 years.

Disclosure

Jason D. O'Grady

Jason D. O'Grady is the creator and editor of O'Grady's PowerPage, which has been publishing mobile technology news since 1995. He maintains an advertising relationship with the following legacy advertisers on the PowerPage:

  • Amazon Associates
  • Google Adsense
  • Tekserve
  • Advertising on the PowerPage is brokered by a third-party agency (BackBeat Media) and he recuses himself from these negotiations.

Biography

Jason D. O'Grady

Jason D. O'Grady developed an affinity for Apple computers after using the original Lisa, and this affinity turned into a bona-fide obsession when he got the original 128 KB Macintosh in 1984.

He started writing one of the first Web sites about Apple (O'Grady's PowerPage) in 1995 and is considered to be one of the fathers of blogging. He has been a frequent speaker at the Macworld Expo conference and a member of the conference faculty. He also co-founded the first dedicated PowerBook User Group (PPUG) in the United States.

After winning a major legal battle with Apple in 2006, he set the precedent that independent journalists are entitled to the same protections under the First Amendment as members of the mainstream media.

O'Grady is the author of The Nexus One Pocket Guide, The Droid Pocket Guide, The Google Phone Pocket Guide, and The Garmin nuvi Pocket Guide (Peachpit Press), the author of Corporations That Changed the World: Apple Inc. (Greenwood Press), and a contributor to The Mac Bible (Peachpit Press). In addition, he has contributed to numerous Mac publications over the years, including MacWEEK, Macworld, and MacPower (Japan).

When he's not writing about Apple for ZDNet at The Apple Core, he enjoys spending time with his family in New Jersey.

Related Discussions on TechRepublic

Did you know you can take part in these discussions with your ZDNet membership?
72
Comments

Join the conversation!

Just In

RE: Your iPhone is tracking you (and has been for a while)
jackson1984-24316069205748857739440257893812 10th Oct
I've to many thanks for this epic internet site .I most surely nfl wholesale liked every single minor minimal little bit of it. I've you bookmarked your web site site to test out for the ongoing stuff you compose.
0 Votes
+ -
My spies tell me...
Robert Hahn 21st Apr 2011
The file appears to be a cache of the GPS coordinates of cell towers that the iPhone (or iPad) hears. When a cell tower comes into range, the cache is checked to see if its location is known. If not, an online data base is queried, and the coordinates are added to the file.

The cache is used to perform "assisted GPS," in which the cache speeds up knowing approximately where you are, and 'real' GPS is used only to fine tune the data.

This makes location-dependent apps work a lot faster than they otherwise would.
@Robert Hahn

I wouldn't know if that theory was correct or not but it does sound plausible.
@Robert Hahn

Interesting. I read (and we know how reliable on-line information is) that the data stored is an approximation of your location, based on the triangulation of cell sites, as opposed to the cell site location.

What you're saying makes sense, since the data isn't being relayed to anyone else.
0 Votes
+ -
@Robert Hahn
http://technolog.msnbc.msn.com/_news/2011/04/21/6508416-government-officials-want-answers-to-secret-iphone-tracking

Until Apple answers, anything somebody says here is just speculation or a guess.
0 Votes
+ -
Lying greedy corporations out for evil!
Robert Hahn 21st Apr 2011
@Will Farrell When Apple answers, people will say that they're lying. Meanwhile, a data base table named CellLocations that contains the known locations of cell towers just might be what it says it is.
@Robert Hahn
This is something new?? Smartphones have been tracking pretty much since inception. So apps are built to enhance your experience and iPhone grabs significant market share and bam a stunning (not really) revelation. Even then who cares, use a credit card, atm, your car with OnStar, satellite radio, etc they all know where you are and track usage. I travel a lot and I get an email when I use my atm in a city that is a fair distance from where I was that morning or a day earlier. How did the bank know they track the data. A lot of fuss for what?
0 Votes
+ -
Relax, Apple is NOT Google
iPad-awan 21st Apr 2011
Like the article said: there's no "evidence to suggest this data is leaving your custody"

Apple is not in the business of selling your personal data.
0 Votes
+ -
Right
Peter Perry 21st Apr 2011
@iPad-awan Last time I checked they were implementing ad based services of their own and somebody has to pay for mobile me as well as hosting free apps.
@Peter Perry

Last time I checked, MobilMe was not a free service. What does it have to do with this?
0 Votes
+ -
@iPad-awan

Even so, the fact that the user was not informed of this and given an option to disable it is wrong. If the iPad/iPhone wound up in the wrong hands it could be a disaster.
@iPad-awan LOL. You serious?

If you actually believe that, then Steve Jobs must have you brainwashed.
0 Votes
+ -
@iPad-awan , you are surely aware that "no evidence" doesn't mean it isn't happening...

Besides, Apple may not sell your data today, but nothing stops them from selling it tomorrow. And now that everyone knows this data is there, expect malware (which some may regard to be legitimate apps) to take advantage of it immediately.
@rgcustomer
Since the file is local to the device, and Apple does not have access to it. how, exactly, are you claiming they will do that?
@iPad-awan: But Google (not Apple) is the one with the logo: Do no harm.
@Roque Mocan Any company founded by a guy that totally screwed over the friend and coincidently brains behind the technology that started the company is never going to adopt a "Do no harm" mantra.
0 Votes
+ -
RE: Your iPhone is tracking you (and has been for a while)
DeusXMachina Updated - 26th Apr 2011
@ITSamurai

Apple was founded by BOTH of them. Equally. Steve Jobs was kicked out of Apple, so there is no continuous timeline here.
@iPad-awan
By that logic, it's okay for the goverment to be tracking us.
I guess they need more articles in how bad the iPhone is? Maybe because there are other phones that can?t match the iPhone in sales? If the phone was literally phoning home it would be one thing, but nothing suggests that it is.
0 Votes
+ -
@Rick_K

Are you actually saying you find this acceptable?
@Michael Kelly

What is unacceptable about it?
0 Votes
+ -
@Rick_K
because it's a billion dollar industry? That's the only reason I can see why someone would make a big deal out of it.

Why do you hate anything that isn't Apple made, and why do you hate anybody who doesn't buy Apple products?
0 Votes
+ -
@Will Farrell
Cause he's an apple fanboy wink
  • Flagged
More important than demonizing the iPhone and Apple is exposing the way that other phones do this, and how to protect against it. Do any of you believe for a second that the iPhone is the only one? Come, now. We are smarter than that.
0 Votes
+ -
Why worry?
BobsYourUnclw 21st Apr 2011
There is NO CHANCE whatsoever any government agency would EVER use illegal data against a person in the US.

http://ridgewoodblog.blogspot.com/2011/04/michigan-state-police-downloading-cell.html
"State police there are using a high-tech "toy" that enables them to extract information from the cell phones of motorists stopped for routine traffic violations."

And only those with something to hide have anything to fear. Now, just what were you doing at 2am cruising the high drug trafficking area of town Saturday night.

Homeland security, with it's ability to get any data warrantlessly and from any agency it wants...

http://americaswatchtower.com/2009/04/14/homeland-security-classifies-returning-us-veterans-as-potential-terrorist-threat/
"This paper basically lumped in people who are either pro second amendment, anti abortion, anti illegal immigration, or pro smaller government"

Again, only those who are guilty have anything to hide, so just what were you doing at that Tea Party Rally/Union Rally?

Absolute power corrupts absolutely, knowledge is power, so why is everyone OK with a PROVEN way this is getting from your phone into the hands of a "benevolent" 3rd party (in this case, the police)? Also, the story already stated that this has been extracted for law enforcement. But yes, they were all guilty anyway, only those with something to hide can have a problem with this.
@BobsYourUnclw

And being that no "agency" (or agent) has access to this data, since it is stored locally, what exactly is your point? They can subpoena Apple til they are blue in the face, without writing an update to the entire OS that enables them to access the file remotely, there is nothing the government can do, other than get a court ordered warrant for your actual phone, at which point you probably have FAR bigger worries.
0 Votes
+ -
Follow the first link.
BobsYourUnclw 23rd Apr 2011
@DeusXMachina
In WI, police are already accessing all your data for routine traffic stops. What I can't understand is why this is "legal" but if it spreads to others...

That was the point.
0 Votes
+ -
All this tracking crap only works
HollywoodDog 21st Apr 2011
if you carry and use a mobile phone. Don't carry a mobile phone.
Man survived a good long time before everyone had mobile phones.
0 Votes
+ -
But but but...
BobsYourUnclw 21st Apr 2011
@HollywoodDog
How will your friends know you are at Starbucks if you don't tweet your location all the time! That is critical information! grin
0 Votes
+ -
But it does work
LadyGray Updated - 21st Apr 2011
Get your teenager to carry a mobile phone . . . and don't tell them about the location file . . .
I'm amazed that this discussion has re-emerged after many months, but now folks are totally ignoring the more-ominous implications due to Apple ALSO logging location data ON THEIR OWN SERVERS ? for every call made from an iPhone ? including coordinates for GPS-capable devices.

This "news" inadvertently surfaced last fall, when Apple quietly dissed Google's location services in favor of hosting their own lookup servers. Now, every time an iPhone user texts, tweets or talks, that event is indelibly recorded on APPLE'S OWN SERVERS ? mirroring & extending beyond any information captured by the respective carriers!

Even if Apple took the "Do No Evil" pledge (which they haven't) there are many possible scenarios where Apple might be legally compelled to release this data as evidence in criminal proceedings.

iPhone users need to be really careful about avoiding miss-dials or letting friends borrow the iPhone to make a quick call. Also, be wary of using caller id, to call-back a number you don't recognize...
@deltadan
Since ALL telecos store this data, what the heck is your point?!?
0 Votes
+ -
Politicians are running scared.
faxmonkey 21st Apr 2011
I can guarantee you that staffers are trying to delete this data from their bosses phones as we speak.
0 Votes
+ -
Message has been deleted.
Droid101 Updated - 23rd Apr 2011
@Droid101
News flash, Google does it too, but they store the data on THEIR servers.

Whoops.

Also, you apparently didn't even RTFA. There is NO way given the data stored, that anyone could use tho data in that way.

Not surprised at your failure to comprehend that, though.
Seriously... if this app they produced lets you see the data so easily, what's to stop any app maker from accessing it? Or any webpage you visit?

If you aren't scared of this, then frankly you're an idiot.

If you still have an iPhone after this, you aren't thinking clearly.

I don't get it.
0 Votes
+ -
This still makes me laugh every time.
BobsYourUnclw 21st Apr 2011
@Droid101
Warning, there is some rough language.
http://www.youtube.com/watch?v=DaxU0ut5tUw

Gotta have one with the "wifi's" and the bigger gbs.
0 Votes
+ -
What a load of garbage...
NoAxToGrind 21st Apr 2011
@NoAxToGrind
Clearly you don't get it either.

(Hint: Congress holding hearings has no bearing on them "getting it".)
0 Votes
+ -
we do in this country if these talkbacks are any indication of the thinking ability of the average American.

It's a freaking database file used on your phone to provide geotagging, and location services. It's not some sinister conspiracy to track your every movement by Apple because, as much as this might bruise your precious little ego, you just aren't that important.
@frgough@... Shill. Go collect your paycheck.
@Droid101

And you are?
0 Votes
+ -
Just to feed the paranoid...
msalzberg 21st Apr 2011
Whatever you do, don't take any pictures with your smartphones. With the geotagging GPS data and the additional photographic evidence of your whereabouts, and then left completely unencrypted on you phone, computer, or uploaded to a photosharing website, you're in big trouble.
0 Votes
+ -
@msalzberg
You can turn that off, smart guy. Very easily, actually.

This thing you cannot turn off and worse yet, you would never know it was turned on unless you were told by these people who dug it up.
@Droid101

Actually, I've known about it for years. From Apple. It it a per se consequence of the servicen being provided on the phone. Anyone who knows the first thing about geotagging services knew about it ages ago.
0 Votes
+ -
Message has been deleted.
xiaojiektii Updated - 22nd Apr 2011
0 Votes
+ -
Message deleted by user
Martmarty Updated - 22nd Apr 2011
[deleted]
Before everyone gets their ******* in a wade over this subject you may want to read:
https://alexlevinson.wordpress.com/2011/04/21/3-major-issues-with-the-latest-iphone-tracking-discovery/
0 Votes
+ -
Great article, except it isn't.
BobsYourUnclw 21st Apr 2011
@RicD_
Point 1, It isn't being sent anywhere. Read my post, then decide if that matters.
Point 2, it isn't new
Point 3, it isn't new

Point 2 and 3, simply because few knew of it, we all LEARNED of it now. Does the fact that some knew it existed before mean those learning of it now have no right to complain?

And Point 1, we don't know for sure. It may not be sent from the phone to Apple, but is it uploaded from your PC to Apple? As other bloggers have posted, Apple's Eula says they can send anything, anytime, anyhow they want.
0 Votes
+ -
RE: Your iPhone is tracking you (and has been for a while)
DeusXMachina Updated - 26th Apr 2011
@BobsYourUnclw

1) Others knowing about it means that the whole conspiracy angle is BS.
2) No it is NOT uploaded by Apple from the PC. This does not need to be speculated upon unless, like yourself, you are uninformed.
3) No, Apple's EULA does NOT say that. In this regard you are simply a liar. Care to differ? Please post the EXACT location in the EULA and the corresponding text.
0 Votes
+ -
For DeusXMachina
BobsYourUnclw 23rd Apr 2011
Done, and therefore not only am I not lying, I have proven conclusively that you are an idiot. It took me 33 seconds to extract this using Google.


(from the iPhone EULA,)


(b) Location Data. Apple and its partners and licensees may provide certain services through your iPhone that rely upon location information. To provide these services, where available, Apple and its partners and licensees may transmit, collect, maintain, process and use your location data, including the real-time geographic location of your iPhone. The location data collected by Apple is collected in a form that does not personally identify you and may be used by Apple and its partners and licensees to provide location-based products and services. By using any location-based services on your iPhone, you agree and consent to Apple's and its partners' and licensees' transmission, collection, maintenance, processing and use of your location data to provide such products and services. You may withdraw this consent at any time by not using the location-based features or by turning off the Location Services setting on your iPhone. Not using these features will not impact the non location-based functionality of your iPhone. When using third party applications or services on the iPhone that use or provide locaiton data, you are subject to and should review such third party's terms and privacy policy on use of location data by such third party applications or services.
0 Votes
+ -
RE: Your iPhone is tracking you (and has been for a while)
jackson1984-24316069205748857739440257893812 10th Oct
I've to many thanks for this epic internet site .I most surely nfl wholesale liked every single minor minimal little bit of it. I've you bookmarked your web site site to test out for the ongoing stuff you compose.

Join the conversation!

Formatting +
BB Codes - Note: HTML is not supported in forums
  • [b] Bold [/b]
  • [i] Italic [/i]
  • [u] Underline [/u]
  • [s] Strikethrough [/s]
  • [q] "Quote" [/q]
  • [ol][*] 1. Ordered List [/ol]
  • [ul][*] · Unordered List [/ul]
  • [pre] Preformat [/pre]
  • [quote] "Blockquote" [/quote]
ie8 fix

The best of ZDNet, delivered

ZDNet Newsletters

Get the best of ZDNet delivered straight to your inbox

Facebook Activity

White Papers, Webcasts, & Resources
ie8 fix
ie8 fix