Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

How Do You Detect Timestamp Manipulation?

Timestomping is detected by comparing the two sets of NTFS timestamps, checking sub-second precision, and testing whether a file’s claimed age fits its position in the file system.

Illustration for the cybersecurity term Timestamp Manipulation Detection
Home / Blog / Cybersecurity Terms / How Do You Detect Timestamp Manipulation?
17 November 2026

How Do You Detect Timestamp Manipulation?

How Do You Detect Timestamp Manipulation?

Timestomping is the alteration of file timestamps to make a malicious file blend into its surroundings. An attacker who drops a web shell into a directory where every other file dates from 2019 will set the new file’s dates to match, because an analyst sorting by modification time would otherwise find it in seconds. MITRE ATT&CK records the technique as T1070.006.

It is also one of the easier anti-forensic techniques to defeat, because NTFS stores more timestamps than most tools change.

Two Sets of Timestamps, One Weakness

Every file record in the Master File Table holds timestamps in two separate attributes:

The common tooling, including the Meterpreter timestomp module and ordinary PowerShell property assignment, writes only the first set. The detection rule follows directly: where the $STANDARD_INFORMATION creation time is earlier than the $FILE_NAME creation time, something has rewritten it. A file cannot have been created before its own name entry existed.

Parse both with MFTECmd and review the output in Timeline Explorer:

MFTECmd.exe -f C:\Cases\$MFT --csv C:\Cases\out --csvf mft.csv

Precision Tells You Too

Windows stores file times as 100-nanosecond intervals since 1601. Genuine timestamps therefore carry an essentially random sub-second component. Many timestomping tools accept a value with second or minute granularity and write it with the fractional part set to zero.

A directory in which one file was created at exactly 14:32:00.0000000 while every other file carries a messy fractional value is a strong indicator. Some tools now copy the full precision from a donor file instead, so the absence of the pattern does not clear a file, but its presence is persuasive.

Position in the File System

MFT record numbers are allocated roughly in order as files are created, and reused only when earlier records are freed. A file claiming a creation date of 2018, sitting in a record number allocated among files genuinely created last month, is inconsistent with its own claim.

The same logic applies to sequence numbers and to the physical location of data runs on the volume. None of this is conclusive alone, because record reuse is real, but it narrows a list of candidates quickly.

Corroborate With Records the Attacker Missed

The strongest evidence comes from sources outside the file record:

Advanced tools such as SetMace can modify $FILE_NAME values and even journal entries, so a thorough examination never relies on one indicator. The practical approach is to test several and report the weight of the combined picture rather than a single rule.

Use It as a Hunting Technique

Timestomping is worth looking for proactively rather than only during an investigation. Scanning a web root or a system directory for files whose two timestamp sets disagree, or whose creation times carry zeroed sub-second values, takes minutes and frequently surfaces a web shell that signature-based scanning missed.

Because the technique is designed to defeat exactly the sort of chronological reconstruction described in timeline analysis, detecting it is not a side exercise. It determines whether the timeline you have built reflects what happened or what the attacker wanted it to look like, which is a distinction that matters as much to a court as it does to the response team. Our analysts run these checks as a matter of course within Investigation and Incident Response Services.

FAQ – Frequently Asked Questions

What Is Timestomping?

Timestomping is the deliberate alteration of a file’s timestamps so that it appears to have been created or modified at a different time, usually to match the surrounding files and avoid attention during a chronological review. It is classified by MITRE ATT&CK as technique T1070.006 under indicator removal, and it is a common step after dropping a web shell or a persistent binary.

Why Does Comparing Two NTFS Timestamp Sets Work?

NTFS records times in both the $STANDARD_INFORMATION and $FILE_NAME attributes of each file record. The Windows API lets software set the first set but provides no supported way to write the second, which the kernel maintains during creation, rename, and move operations. Most tooling therefore changes only one set, and the resulting inconsistency is detectable.

Can an Attacker Defeat These Checks Entirely?

Tools exist that write $FILE_NAME values directly and attempt to clean journal entries, so a determined and well-equipped attacker can defeat individual indicators. Defeating all of them consistently across every artefact is considerably harder. This is why examiners combine attribute comparison, sub-second precision analysis, MFT record ordering, and journal corroboration rather than relying on one test.

Is Timestamp Manipulation Worth Hunting for Proactively?

Yes. Scanning web roots, system directories, and user temporary folders for files whose two timestamp sets disagree, or whose creation times have zeroed fractional seconds, is quick and regularly finds persistence that antivirus scanning has missed. It works particularly well on internet-facing servers, where web shells are the most common form of persistence.

Related Terms

You May Be Interested In These

What Are Reverse and Bind Shells?

Cybersecurity Terms

17 November 2026

What Are Reverse and Bind Shells?

Read More
What Is Sliver?

Cybersecurity Terms

17 November 2026

What Is Sliver?

Read More