From the course: Security Tips: Protecting Sensitive Information

File metadata

- [Instructor] Metadata, or data about data, is an important part of files. Metadata can include information like when a file was created or updated, who took a photo, who created a document, and more. Many files, especially media files like video, audio, and photos include huge amounts of metadata. Videos and photos often include information about what camera was used to create the media, what color profile the file uses, and they frequently include other information, like a physical or geographic location, and other tags for various purposes. Metadata holds information that's useful to us when we work with the files, but if we intend to share a file with others, we may not want them to have that metadata. As an example here, let's take a look at this photo that I took a little while ago. Here on Windows, I can open the file on the photos app to view it. I can click the three dots here in the top right of the window, and choose to view file info, to find out more information about it. And here in the sidebar, I can see that this photo was taken on April 27th, 2019, at 11:15 a.m. There's some details about the photo, and I can see that it was taken with my iPhone XS. Scrolling down further, I can see precisely where the photo was taken. This photo, for example, I took at Balboa Park, in San Diego. That's a public place, and so, sharing that information, even the precise coordinates that put me at the botanic garden, doesn't say anything really private about me by itself. Lots of people go to the park and take pictures of flowers. But if I had taken the photo at my house, or at someone else's house, or at a sensitive work site, or something like that, you can see how easily that information could be shared unintentionally, and it could be the case that sharing the combination of my location and the time and date might reveal something too, like that I was attending a particular event, or was in the proximity of a certain person, or that I wasn't at some other location at that particular time. All this information, the location, the camera details, and so on are stored within this image file. For our personal use, this metadata is really useful. The photo management software can use the data to automatically classify this photo into an album for San Diego, or for 2019, or for those taken with the back camera of a smartphone of a particular model. But because metadata is part of the file, it goes along wherever the file is sent, and that may not be what I want. For example, imagine that I entered my photo into an online photo contest. Unless the people running the contest removed personal data from the image, depending on how the judging and gallery website worked, the metadata might be there for anyone viewing the image to discover. To avoid that situation, we can protect our sensitive information by removing it from metadata. I can remove sensitive information from the metadata of a file here in Windows by opening up the properties for a file, and going to details. Here I can see the file's metadata, and down at the bottom of this window, there's a link to remove the information. I'll click it, and here I have the option to create a copy removing all information, or to remove particular pieces of information. I'll choose the first option and click OK. Here's the copy with the sensitive information removed. I'll take a look at its properties, and we can compare with the original file. I'll scroll down to the camera section, and I can see that the camera maker and model, along with some other information, was removed from the file. Scrolling down further, I can also see that the GPS information was completely removed from this copy of the file. On a Mac, I can remove geodata from photos using the built-in preview app, opening a photo, and then opening the information palette, with Cmd + I, I can navigate to the information area and find the GPS tab. Then here at the bottom, there's an option to remove location info. Once that's done, I'd save the file and it wouldn't have location information anymore. It can be useful to make a copy of the image first, if you want to preserve the GPS data on the original. Many apps where we work with files that have metadata assume that we want the metadata to be there, so many of them don't let you remove the metadata wholesale. Though, if you do need to do that, there's a program called ExifTool that can help. ExifTool is a command-line application that can be installed on Windows, Mac OS and Linux. It's available from exiftool.org, and I'll install it here on my Windows system. I'll demo the Windows executable version. And I'll copy it here to my desktop. I'll rename the file to make it a little bit easier to use. And I'll open up my terminal. I'll move to my desktop, and then I'll run the ExifTool application with ./exiftool.exe, and the path to a file. In this case it'll be exercisefiles\orchid.jpg. Here in the output, I can see quite a bit of information, including GPS information. But using ExifTool, we can change this. Changes to metadata are applied to the file, so it's best to make a copy and make changes to that if you want to preserve the metadata in the original file. I'll make a copy of my orchid.jpg file, and I'll call it orchid2share.jpg, then I'll run ExifTool again, and I'll use the option -gps:all=. This will change all of the GPS fields to be empty, and I'll provide the name of the file. Then I'll run ExifTool to take a look at the file again. And I can see that the GPS information has been removed. I can also remove all information from this file by running ExifTool with the option all= and the filename. And once again, when I take a look at it with ExifTool again, now there's no additional metadata, only information derived directly from the photo itself. If you're using a mobile device, one quick tip for helping to ensure a photo doesn't include the original metadata is to take a screenshot of the original, and then use that screenshot as the photo you share. This is useful for social media postings, and things like that, where the full resolution isn't always necessary. For more control over EXIF data on mobile devices, especially for working with full-size images and videos, search your device's app store for apps that can display and remove EXIF data. Different kinds of metadata have different sensitivity levels. Geolocation is often very sensitive, date and time, or camera model can be somewhat sensitive, and things like resolution or focal length probably aren't going to communicate very much personal information about you, but again, you'll need to make decisions about what to share and what not to share based on your requirements. All kinds of files have metadata, but photos and videos are particularly full of it. Take some time to explore the file properties of your files and see what kind of data comes along with them. Many tools we might use to share files can strip this metadata when we share a file. Social media sites, for example, can perform this function on photos and videos, but it's a process that's often transparent to us, so we don't know whether the information was actually removed, or if it's still available in some form. And other tools often have options within them that can remove sensitive metadata. If there's sensitive information that could be revealed, it's better to be certain we've handled it correctly ourselves, rather than rely on others to do that for us. Handling of metadata varies by platform, and by file type, and application. We've seen an example of removing metadata from a photo, but take time to explore other files you may have, and explore applications you use to see how they handle sensitive metadata. Just knowing that metadata exists, and knowing how to explore and change it in various applications, can help you be more aware of metadata and how to control it in your own workflow.

Contents