Max
Max

Reputation: 85

How to create a protected timestamp?

Very often some people try to change file timestamps. (for different purposes). For example, JPG files which they can use in court to prove something. (and not only in court) So here is my question. If there's any possibility to create an unmodifiable timestamp to prevent that? As far as I know if the application creates date and time in a standart (SetFileTime function) way it's impossible to find out whether it was changed. Are there any ways to create a PROTECTED TIMESTAMP? Please, clarify that. Thank you in advance.

Upvotes: 1

Views: 385

Answers (1)

deceze
deceze

Reputation: 522085

A timestamp is just data stored on the hard disk, in whatever meta file attribute it's stored in. Data on the hard disk is just bits and bytes. Computers are machines that modify bits and bytes, that's all they do all day long, including timestamps on hard disks in file meta information. As long as a person has physical access and full privileges on a computer, he can modify anything and everything as long as he knows how to.

You can only make it harder, but never impossible. For instance, you can embed some timestamp inside the file format itself. If this is sufficiently obfuscated or possibly cryptographically linked to the file integrity itself in a way that any tampering with the file data could be detected, you may be on to something. Specifically for images you may want to include a visual timestamp physically in the image itself; though anyone who knows how to use Photoshop can easily tamper with this too.

In practice it's hardly possible to do this, unless the file in question or the machine in question has some specific restrictions in the scenario you're talking about. In that case the answer may range from something like user permission restrictions on the file system level to cryptographically signed file formats; that very much depends on the scenario.

Upvotes: 1

Related Questions