How To Remove Metadata From Files

lakshay arora
2 min readJul 25, 2020

--

Many times we are sending files around us, photos, documents, videos and many more. Let’s assume we want to ask in a vulnerable forum anything and uploading a picture which was taken by android, uploaded on computer and finally uploaded on website. Are you sure that you have disabled GPS?
Many times we have activated location for Instagram, Google Maps, Snapchat but whenever we took a photo and don’t want to share any additional information we have to remove the metadata.

Detect and remove metadata

What are metadata?

Metadata means “data about data” or data that describes other data. The prefix “meta” typically means “an underlying definition or description” in technology circles

Metadata makes finding and working with data easier — allowing the user to sort or locate specific documents. Some examples of basic metadata are author, date created, date modified, and file size. Metadata is also used for unstructured data such as images, video, web pages, spreadsheets, etc.

Web pages often include metadata in the form of meta tags. Description and keywords meta tags are commonly used to describe content within a web page. Search engines can use this data to help understand the content within a page.

Metadata can be created manually or through automation. Accuracy is increased using manual creation as it allows the user to input relevant information. Automated metadata creation can be more elementary, usually only displaying basic information such as file size, file extension, when the file was created, for example.

Metadata can be stored and managed in a database, however, without context, it may be impossible to identify metadata just by looking at it. Meta data tells a lot of apps, for example what type of mobile phone we have, which camera we have, which android version we have, GPS data and a lot of other small information.

How to remove metadata?

A pre-installed tool in ParrotOS called mat2(metadata anonymization toolkit) is used for such things.

$ apt-get install mat mat2 -y

OR

You can download it from the command:

git clone https://github.com/atenart/mat2

This tool uses many file types:

$ mat2 -l

— list works also.
(for a better overview):

$ mat2 -l | tr -d ")(" | awk '{print $3}'

Check if you have harmful metadata on your file:

$ mat2 --show photo.jpg 
No metadata found in photo.jpg

To remove metadata from a file:

$ mat2 photo.jpg DEBUG: Cleaning photo.jpg

And as you can see if you list your directory again, you have a photo.cleaned.jpg.

Can metadata used for tracking your location?

Definitely yes, if you leave GPS coordinates it's not hard to locate you.

--

--

lakshay arora
lakshay arora

Written by lakshay arora

Hi! I am a B.Tech student, whose enjoys reverse engineering and digital forensics. I relish reading anything and everything about cybersecurity.

No responses yet