Mutt
Professional
- Messages
- 1,459
- Reaction score
- 1,109
- Points
- 113
Good day, in this article we will analyze a program such as mat2, its installation and an example of use.
Description of mat2:
mat2 is a metadata stripping tool supporting a wide range of commonly used files (office documents, images, audio, ebooks, archives, videos, HTML), written in python3. Basically, this is a library used by the command line interface of the same name and as an extension to nautilus.
Be careful, mat2 does not clean the files themselves, instead it creates a file with the word "cleaned" appended to its name between the name and its extension. For example, if the file is named "filename.png", then a new file named "filename.cleaned.png" will be created.
Homepage:
0xacab.org
Author: Julien Voisin
What is metadata?
Metadata is information that characterizes other information. Metadata is used to describe, document basic information. For example, in a jpg picture, the main information is the picture itself, and the metadata is information about the shooting time, camera, flash, autofocus, GPS coordinates, and so on. For a Word document, the main information is the text of the document and its formatting, and the metadata is information about the author, the time the document was created, the time of editing, the number of words, the person who made the changes, and so on.
Basically, metadata answers the who, what, when, where, why, and how questions about every aspect of the data that is being documented.
The metadata inside the file can tell a lot about you.
Cameras record data about when the photo was taken and which camera was used. Office documents such as PDF or Office automatically add author and company information to documents and spreadsheets.
It is possible that you do not want to disclose this information on the network. This is exactly the job of MAT2: getting rid of metadata as much as possible.
Notes on metadata discovery
While using the --show flag, MAT2 works very well to show the found metadata, if nothing is shown it does not mean that the file is clean of metadata. There is no reliable way to discover all possible metadata for complex file formats.
Therefore, you should not rely on the presence of metadata when deciding whether your file should be cleaned up or not.
Lightweight Notes
By default, mat2 does its best to remove all metadata, even if the contents of the file are affected. For example, text in PDF will no longer be able to be selected, compressed images must be compressed again ... Since some users do not need such strictness and they want mat2 to change the contents of the files, the -L flag has been added for this , which will make it so that mat2 will not change the contents of the file, but as a result, some of the metadata will not be removed.
Installing mat2 in Kali Linux:
Installation in Kali is done with one command:
Installation in BlackArch
The program is preinstalled in BlackArch.
mat -s 20201004_111222.jpg
Clear image from all metadata:
mat 20201004_111222.jpg
Mat2 reference:
Usage:
Options:
Positional arguments:
files - files to process
Optional arguments:
-h , --help show help and quit
-v, --version show version and exit
-l, --list display a list of all supported file formats
--check-dependencies to check there whether all necessary MAT2 dependence
-V, --verbose show more detailed information on the status of
--unknown-members policy how to handle the unknown members of the archive in the style of the file (as policy can be specify: abort, omit, keep) [Default: abort]
-s, --show show all harmful metadata that MAT2 found without removing it
-L, --lightweight only remove SOME metadata
Politicians:
abort- interrupt work
omit- skip
keep- save
Description of mat2:
mat2 is a metadata stripping tool supporting a wide range of commonly used files (office documents, images, audio, ebooks, archives, videos, HTML), written in python3. Basically, this is a library used by the command line interface of the same name and as an extension to nautilus.
Be careful, mat2 does not clean the files themselves, instead it creates a file with the word "cleaned" appended to its name between the name and its extension. For example, if the file is named "filename.png", then a new file named "filename.cleaned.png" will be created.
Homepage:
jvoisin / mat2 · GitLab
mat2 is a metadata removal tool, supporting a wide range of commonly used file formats, written in python3: at its core, it's a library, used by an eponymous...
What is metadata?
Metadata is information that characterizes other information. Metadata is used to describe, document basic information. For example, in a jpg picture, the main information is the picture itself, and the metadata is information about the shooting time, camera, flash, autofocus, GPS coordinates, and so on. For a Word document, the main information is the text of the document and its formatting, and the metadata is information about the author, the time the document was created, the time of editing, the number of words, the person who made the changes, and so on.
Basically, metadata answers the who, what, when, where, why, and how questions about every aspect of the data that is being documented.
The metadata inside the file can tell a lot about you.
Cameras record data about when the photo was taken and which camera was used. Office documents such as PDF or Office automatically add author and company information to documents and spreadsheets.
It is possible that you do not want to disclose this information on the network. This is exactly the job of MAT2: getting rid of metadata as much as possible.
Notes on metadata discovery
While using the --show flag, MAT2 works very well to show the found metadata, if nothing is shown it does not mean that the file is clean of metadata. There is no reliable way to discover all possible metadata for complex file formats.
Therefore, you should not rely on the presence of metadata when deciding whether your file should be cleaned up or not.
Lightweight Notes
By default, mat2 does its best to remove all metadata, even if the contents of the file are affected. For example, text in PDF will no longer be able to be selected, compressed images must be compressed again ... Since some users do not need such strictness and they want mat2 to change the contents of the files, the -L flag has been added for this , which will make it so that mat2 will not change the contents of the file, but as a result, some of the metadata will not be removed.
Installing mat2 in Kali Linux:
Installation in Kali is done with one command:
Code:
sudo apt install mat2
Installation in BlackArch
The program is preinstalled in BlackArch.
Code:
sudo pacman -S mat2
Examples of running mat2:
Find metadata in file 20201004_111222.jpg, but don't delete it (-s):mat -s 20201004_111222.jpg
Clear image from all metadata:
mat 20201004_111222.jpg
Mat2 reference:
Usage:
Code:
mat2 [-h] [-v] [-l] [--check-dependencies] [-V] [- unknown-members policy] [-s | -L] [files [files ...]]
Options:
Positional arguments:
files - files to process
Optional arguments:
-h , --help show help and quit
-v, --version show version and exit
-l, --list display a list of all supported file formats
--check-dependencies to check there whether all necessary MAT2 dependence
-V, --verbose show more detailed information on the status of
--unknown-members policy how to handle the unknown members of the archive in the style of the file (as policy can be specify: abort, omit, keep) [Default: abort]
-s, --show show all harmful metadata that MAT2 found without removing it
-L, --lightweight only remove SOME metadata
Politicians:
abort- interrupt work
omit- skip
keep- save