Header Banner
Null Byte Logo
Null Byte
wonderhowto.mark.png
Cyber Weapons Lab Forum Metasploit Basics Facebook Hacks Password Cracking Top Wi-Fi Adapters Wi-Fi Hacking Linux Basics Mr. Robot Hacks Hack Like a Pro Forensics Recon Social Engineering Networking Basics Antivirus Evasion Spy Tactics MitM Advice from a Hacker

How to Change File Metadata (Access/Modification Date)

Crime scene investigation with evidence markers on pavement.

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.

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

Terminal window displaying file directory and error message.

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.

Terminal commands displayed on a computer screen.

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:

Terminal commands displaying system information with highlighted output.

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

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...

Apple's iOS 26 and iPadOS 26 updates are packed with new features, and you can try them before almost everyone else. First, check Gadget Hacks' list of supported iPhone and iPad models, then follow the step-by-step guide to install the iOS/iPadOS 26 beta — no paid developer account required.

Related Articles

Comments

No Comments Exist

Be the first, drop a comment!