How to Change File Metadata (Access/Modification Date)

Nov 6, 2015 10:25 AM
Nov 6, 2015 10:49 AM
635823749987124951.jpg

In this tutorial I am going to show you how to change some file metadata, this could be very useful if you want to edit or access a file and remove any evidence of your changes.

In this introduction we are going to change simple files metadata, just dates.

Step 1: Copy of the Original File

First of all we have to copy the original file that we want to edit, this is because we are going to copy its metadata into our new edited file.

So suppose that I have downloaded a text file, or that we have localized it in a remote system.

#cp myDocument.txt myDocument2.txt

We can see the actual metadata with exiftool, which is built in Kali:

#exiftool myDocument.txt

635823733589456691.jpg

Step 2: Edit the File and Copy the Original Metadata

Now we can access the file, edit it and everything you want.

If we take a look to the actual metadata we can see that they have been changed, obviously.

635823734182961192.jpg

Once it has been modified we just have to copy the original metadata to remove any hint.

touch myDocument2.txt -r myDocument.txt

Lets take a look at the new dates:

635823734441262896.jpg

Step 3: Delete the Original File

At this point we have edited the file and it has the original access and modification date. We just have to delete the original file.

We can do it with the simple command rm, but if we want to be more prudent: secure file delete

Step 4: Changing Other Metadata and Other Files

In another tutorial I will explain how to edit more complex metadata in another kind of files such as PDF, PNG, JPEG...

Comments

No Comments Exist

Be the first, drop a comment!