Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Adversaries may modify file time attributes to hide new files or changes to existing files.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 47% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 20% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 45% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 178% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 348% | 0% |
> Sub-technique of: T1070
Adversaries may modify file time attributes to hide new files or changes to existing files. Timestomping is a technique that modifies the timestamps of a file (the modify, access, create, and change times), often to mimic files that are in the same folder and blend malicious files with legitimate files.
In Windows systems, both the $STANDARD_INFORMATION ($SI) and $FILE_NAME ($FN) attributes record times in a Master File Table (MFT) file. $SI (dates/time stamps) is displayed to the end user, including in the File System view, while $FN is dealt with by the kernel.
Modifying the $SI attribute is the most common method of timestomping because it can be modified at the user level using API calls. $FN timestomping, however, typically requires interacting with the system kernel or moving or renaming a file.
Adversaries modify timestamps on files so that they do not appear conspicuous to forensic investigators or file analysis tools. In order to evade detections that rely on identifying discrepancies between the $SI and $FN attributes, adversaries may also engage in “double timestomping” by modifying times on both attributes simultaneously.
In Linux systems and on ESXi servers, threat actors may attempt to perform timestomping using commands such as touch -a -m -t <timestamp> <filename> (which sets access and modification times to a specific value) or touch -r <filename> <filename> (which sets access and modification times to match those of another file).
Timestomping may be used along with file name Masquerading to hide malware and tools.
Platforms: ESXi, Linux, macOS, Windows
The following tests are from Atomic Red Team and provide actionable ways to test this technique:
Stomps on the access timestamp of a file
Supported Platforms: linux, macos
bashtouch -a -t 197001010000.00 #{target_filename}
Dependencies:
Stomps on the modification timestamp of a file
Supported Platforms: linux, macos
bashtouch -m -t 197001010000.00 #{target_filename}
Dependencies:
Stomps on the create timestamp of a file
Setting the creation timestamp requires changing the system clock and reverting. Sudo or root privileges are required to change date. Use with caution.
Supported Platforms: linux, macos Elevation Required: Yes
bashNOW=$(date +%m%d%H%M%Y) date 010100001971 touch #{target_filename} date "$NOW" stat #{target_filename}
Modifies the modify and access timestamps using the timestamps of a specified reference file.
This technique was used by the threat actor Rocke during the compromise of Linux web servers.
Supported Platforms: linux, macos
bashtouch #{target_file_path} touch -acmr #{reference_file_path} #{target_file_path}
Modifies the file creation timestamp of a specified file. This technique was seen in use by the Stitch RAT. To verify execution, use File Explorer to view the Properties of the file and observe that the Created time is the year 1970.
Supported Platforms: windows
powershellGet-ChildItem "#{file_path}" | % { $_.CreationTime = "#{target_date_time}" }
Dependencies:
If Atomic Red Team tests are not applicable, manually verify the technique by:
No specific mitigations documented for this technique.
| Finding | Severity | Impact | | ------------------------------ | -------- | --------------- | | Timestomp technique applicable | High | Defense Evasion |
| CWE ID | Title | | ------- | ---------------------------- | | CWE-693 | Protection Mechanism Failure |
Other measured skills in the registry, with their headline benchmark lift.