How To Delete Meta-Data From Files To Maintain Your Privacy/Anonymity(PersSec107)


You've probably heard of how photos can have GPS location and camera model but did you know there are many more examples of files containing information that can identify you. In this tutorial I'm going to show you the hidden dangers within every file you send and how to remove that information. Let's get started.

Ways Files Can Betray You:

  • Photos/Videos often contain GPS, Time Taken, & the model or serial number of the camera.
  • Photos can sometimes contain changes made to them as well as previous thumbnails. Meaning if you black something out(meaning it's most likely sensitive) an attacker can see the original information.
  • Office-type documents often contain a step-by-step history of the entire document(meaning if you're writing something and thought you erased something sensitive in the document) an attacker can go through those changes.
  • On Windows machines a unique Machine ID(often appearing as DESKTOP-3MFG4H5 or similar) is assigned to every file(this number is stored on Microsoft's servers meaning if it's found in a file they can be forced to give it to law enforcement)
  • User name information is stored in every file in both Windows & Linux

Luckily addressing these issues is very simple. The solution is very simple


  • Linux virtual machine(go to my tutorial here if you need to create one)
  • The following items installed(go in terminal and type):
    • sudo apt-get update && sudo apt-get install exiftool mat mat2 ffmpeg libreoffice gimp obs-studio

      Getting Rid of History in Document/Image Files


  • Copy file to Linux machine(if not created on it).
  • Open it and select all text in the file and cut/copy it.
  • Open new file and paste text in. Save file as docx(any of the formats is fine but this is closest one to office file)
  • Proceed to next part of tutorial


  • Copy file over to Linux Machine(if not created on machine)
  • Open file in Gimp(type gimp in terminal)
  • Hit Ctl+Shift+E to export. In the options that pop up make sure the following are UNSELECTED

Deleting Meta-Data from files

Now we're almost finished. We simply need to run the Meta-Data Anonymization Toolkit by going into terminal and type:

  • mat2 filename

where filename is your files name.

If you have multiple files(for example all .png in a folder) you want to clean you can type:

  • mat2 *.png (This will clean all files ending in .png)

You will now see a file(or files) containing "cleaned" in them.

  • Now delete all files except for the cleaned ones. And that's all there is to it.


It is hard to delete meta-data in certain videos. For videos the MAT-2 only works with the following formats(MP4, AVI, WMA). If you have a file that is NOT in one of those formats the best you can do is open OBS-Studio(terminal: obs-studio) and save the video file as either .MP4, AVI, or WMA and then run MAT-2 against it.

I hope you enjoyed this tutorial and now feel safer in knowing that your files are private. Many black-hat hackers and other bad actors have been caught due to meta-data. Many freedom fighters have as well. It's my hope if your intentions are good that this information helps you stay safe and free. Don't forget to upvote and follow and stay tuned as this series on Personal Security is about to wrap up and we're going to start getting into all things hacking(from the most basic to the most advanced) as well as other topics.

Comments 3

Hello. Currently there are a lot of curation groups and whales curating amazing content, there's no need to buy votes. The downvote you received is to discourage the buying of votes from bidbots. We kindly invite you to join us on the #NewSteem attitude, where good content receives votes and the organic content get the most attention. Buying votes hurts you, other authors and the Steem Ecosystem in general, please don't do it.

08.10.2019 11:32

Seems like this downvote was an honest mistake after reviewing it. Sorry for the misunderstanding!

08.10.2019 12:22