People who sell drugs online try hard to hide their identities from the cops, often turning to black markets hidden on the dark net. But some online drug dealers may have outed their real-world locations thanks to the photos used to advertise their illegal wares, researchers say.

The dealers were betrayed by a little bit of data called EXIF that gets attached to images taken with digital cameras or smartphones. If those devices have built-in GPS, EXIF data can include detailed geolocation information — and that's the kind of identifying data people doing illegal things would want to keep on the down-low.

But Harvard seniors Paul Lisker and Michael Rose discovered that some people hawking illicit goods via online black markets uploaded images with that location data intact — essentially sharing a digital map that could help track them down.

"These are very exact data points — if you drilled down, they could help you pinpoint a house," Rose said. 

The researchers plotted the locations they found and posted an interactive map along with their findings on Medium on Tuesday, although they altered the data so it is accurate only within roughly a mile, for privacy reasons. Here's a map of the geotagged locations they found in North America and Europe. The different colors represent various online drug markets:

Lisker and Rose started their research as part of a project for a class on privacy and technology last fall. They relied on data from the Black-Market Archives, a site created by an independent researcher who goes by the pseudonym Gwern that features data scraped from popular drug sites on the dark net since late 2013.

Dark-net black markets can be accessed only by using anonymity tools such as the Tor browser, which help shield users' online activities. But just using Tor isn't always enough to keep people's digital secrets.

Lisker and Rose wrote a computer script that helped them search through the Black-Market Archives and found roughly 7.5 million photos, nearly 2,300 of which included location data. However, only 229 came from unique locations.

That suggests only a very small percentage of sellers were forgetting to remove location information, Rose said. But he said he was surprised to see a good chunk of the geotagged images come from more popular dark-net markets that Rose thought would have automatically stripped out location information from photos posted by users.

For instance, they discovered 52 unique geotagged images posted to Agora, one of the most popular dark-net markets until it went offline last year. However, photos with location data suddenly stopped showing up on the archive of Agora's listings on March 18, 2014, according to the researchers.

"We figured they must have realized, 'Oh no, we have this really big problem,' " Rose said.

Geotagged photos on the black markets show a failure by sellers and the sites — either of which could have removed the location information, according to the researchers. It's also possible that sellers could have altered location information attached to a photo so it pointed somewhere else.

But in many cases the researchers found clusters of images tagged with locations separated by only a few feet.

"This suggests the behavior of sellers who are careless on a regular basis, rather than the occasional forgetfulness of not stripping data or purposeful manipulation," Rose and Lisker wrote in the Medium post.

Because of the limited number of those photos they uncovered, the researchers doubt that scouring dark-net markets for geotagged images would be an efficient way for police to track down people selling illicit goods online.