Skip to content

Chapter 3: NTFS $LogFile

1. Learning Objectives

By the end of this chapter, the reader should be able to:

  • Explain why NTFS maintains $LogFile.
  • Describe the difference between transaction recovery data and investigator-facing event history.
  • Use $LogFile as supporting evidence for file creation, deletion, rename, and metadata activity.
  • Correlate $LogFile findings with the MFT and USN Change Journal.
  • Avoid overstating conclusions from parsed transaction records.

2. Introduction

$LogFile is an NTFS metadata file used for file system recoverability. NTFS records transaction information so the file system can recover to a consistent state after a crash or interruption.

For investigators, $LogFile can provide short-term evidence of file system operations. It may help reconstruct file creation, deletion, rename, and metadata activity near the time of an incident. It is especially useful when a file was deleted quickly or when the MFT and USN Change Journal do not provide enough context by themselves.

$LogFile is not a friendly audit log. It was not designed to answer human investigative questions. It is lower-level, transaction-oriented evidence. Its value depends heavily on parser quality, volume activity, and careful correlation.

3. Why Windows Created This Artifact

NTFS is designed as a recoverable file system. If a system crashes during file system changes, NTFS needs a way to restore consistency. $LogFile supports that need by recording information required to redo or undo file system transactions.

Microsoft's NTFS overview describes NTFS recovery through replaying its transaction log after a crash. In practical terms, the file system records enough transaction information to help complete committed operations or roll back incomplete ones.

This is an integrity feature. The forensic value is secondary.

4. Why Investigators Care

Investigators care about $LogFile because it may preserve evidence of file system operations that are no longer obvious in the current MFT state.

Investigative Need $LogFile Contribution
Recent deletion analysis May show transaction records related to file removal.
Rename reconstruction May help identify rename-related operations.
Metadata change analysis May show updates to file records or indexes.
Timeline refinement Can support ordering of file system activity.
Conflict resolution Can help test MFT and USN interpretations.
Short-lived file investigation May preserve traces after a file is deleted.

The key word is may. $LogFile is finite and overwritten as the volume continues operating.

5. Internal Structure

Only a practical conceptual model is needed for most investigators.

Transaction Records

$LogFile stores transaction-oriented records used by NTFS recovery. These records can include redo and undo information. Redo data supports rolling a committed transaction forward. Undo data supports rolling back incomplete work.

Log Sequence Numbers

Transaction records are ordered using Log Sequence Numbers (LSNs). LSNs help establish sequence within the log. They should not be treated as wall-clock time by themselves.

Circular Behavior

$LogFile has limited space. As new transaction data is written, older data may be overwritten. This makes prompt acquisition important during incident response.

6. Data Stored

Parsed $LogFile output varies by tool, but may include:

  • LSN
  • redo operation
  • undo operation
  • target attribute or record reference
  • MFT record reference
  • filename or index information when recoverable
  • transaction identifiers
  • operation sequence information
  • parser-derived event descriptions

Some parsers convert low-level transaction details into investigator-friendly records such as file create, delete, rename, or index entry update. Treat those descriptions as parser interpretations unless you have validated the underlying operation.

7. Acquisition Methods

$LogFile can be acquired through:

  • full disk or volume image
  • targeted collection of C:\$LogFile
  • forensic triage tooling
  • endpoint response collection with raw NTFS access

Because $LogFile is a protected NTFS metadata file, normal file copy methods may fail or produce incomplete results on a live system. Prefer forensic acquisition tools that can collect protected metadata safely.

Document:

  • volume collected
  • acquisition time in UTC
  • whether the system was live or offline
  • tool and version
  • parser used
  • parser command line or profile
  • hash of the collected file when possible

8. Interpretation

The most important interpretation rule is this:

$LogFile records NTFS transaction activity. It does not directly record user intent, process identity, or malware behavior.

Example observation:

Parsed $LogFile output shows transaction records associated with deletion-related file system operations for an MFT reference that resolves to C:\Users\alex\AppData\Local\Temp\winupdate.exe.

Reasonable inference:

  • NTFS transaction data supports that file system operations related to deletion occurred for that object during the available log window.

Unsupported conclusion:

  • "The attacker deleted the malware manually."

To support that conclusion, correlate with process creation logs, shell artifacts, command history, EDR telemetry, script logs, or user activity artifacts.

9. Strengths

$LogFile has several strengths:

  • Can preserve recent transaction evidence even after file deletion.
  • May reveal file system activity not visible in final MFT state.
  • Useful for reconstructing rename, delete, and index operations.
  • Helps validate USN and MFT interpretations.
  • Valuable in anti-forensics cases where files were quickly staged and removed.
  • Can provide sequence information through LSNs.

It is especially useful when the investigator needs to understand a narrow window of recent file system activity.

10. Weaknesses

$LogFile has major limitations:

  • It is not designed as a forensic audit log.
  • It is overwritten as the system continues operating.
  • It can be difficult to parse correctly.
  • Parser output may simplify complex transaction semantics.
  • It usually does not provide direct process or user attribution.
  • It may not provide easy wall-clock timestamps for every interpreted operation.
  • It requires correlation with MFT and USN data for path and object context.

The investigator should treat $LogFile as powerful supporting evidence, not as a standalone narrative.

11. Common Mistakes

Mistake 1: Treating Parser Events As Raw Facts

Parser output is interpretation layered on top of transaction data. Use it, but understand that labels such as "delete" or "rename" may be derived from lower-level operations.

Mistake 2: Expecting Long Retention

$LogFile is limited and active. On busy systems, useful records can be overwritten quickly.

Mistake 3: Ignoring Object Resolution

Transaction records often need MFT context. If record references cannot be resolved safely, path conclusions become weaker.

Mistake 4: Treating LSN As a Timestamp

LSNs provide ordering within the log. They are not a substitute for normalized timestamps.

Mistake 5: Claiming User Action From File System Recovery Data

$LogFile can support that NTFS recorded a transaction. It does not identify the human or process responsible without corroboration.

12. Questions It Can Answer

$LogFile can often help answer:

  • Did NTFS record recent transaction activity for this file or directory?
  • Is there supporting evidence of deletion, rename, or index changes?
  • Does transaction evidence align with MFT and USN records?
  • Is there evidence of short-lived file system activity?
  • Can recent file system operations be sequenced more precisely?

13. Questions It Cannot Answer

$LogFile cannot answer by itself:

  • Which user caused the transaction.
  • Which process caused the transaction.
  • Whether a file executed.
  • Whether the file was malicious.
  • Whether a parser-derived event label captures the full operation.
  • Whether older activity never happened if records have been overwritten.

14. Evidence Correlation

$LogFile should almost always be used with MFT and USN data.

Correlating Artifact Added Value
MFT Object metadata, parent references, current or residual file state.
USN Change Journal Timestamped file change records and reason flags.
Event Logs Account, service, scheduled task, PowerShell, and security context.
Prefetch / Amcache Execution-related evidence.
LNK / Jump Lists User or shell interaction.
EDR telemetry Process, command line, hash, user session, and network context.

Correlation Map

$LogFile transaction lead
        |
        +--> MFT: resolve file reference and path
        |
        +--> USN: confirm timestamped create/rename/delete sequence
        |
        +--> Execution artifacts: test whether the file ran
        |
        +--> Event logs / EDR: attribute action to process and account

15. Investigation Walkthrough

Scenario

An alert identifies suspicious execution from a temporary directory. By the time the endpoint is collected, the file no longer exists.

Step 1: Check the MFT

Observation:

  • MFT output contains a deleted record with a filename matching winupdate.exe.
  • The reconstructed path points to a user temporary directory.

Inference:

  • The file likely existed previously, but path confidence depends on parent record validity.

Step 2: Check the USN Change Journal

Observation:

  • USN records show creation, data extension, close, and deletion activity for the same file reference.

Inference:

  • NTFS recorded the file being written and later deleted during the available journal window.

Step 3: Use $LogFile for Transaction Support

Observation:

  • Parsed $LogFile output shows transaction records associated with deletion or index removal activity for the same MFT reference.

Inference:

  • $LogFile supports the USN and MFT interpretation that file system deletion-related activity occurred.

Step 4: Correlate Execution

Observation:

  • Prefetch or EDR telemetry shows execution from the same path before deletion.

Inference:

  • The file likely executed before it was deleted.

Step 5: Write the Finding

Precise wording:

The MFT contains a deleted record for C:\Users\alex\AppData\Local\Temp\winupdate.exe. USN records show create, write, close, and delete activity for the same object during the incident window. Parsed $LogFile transaction records support recent deletion-related file system activity. Execution attribution is supported only if corroborated by Prefetch, process telemetry, or another execution artifact.

16. ASCII Timeline

03:22:11  USN: file create / data extend for winupdate.exe
03:22:13  MFT: metadata-change timestamp near file creation
03:23:02  Prefetch / EDR: execution evidence
03:25:40  USN: file delete
03:25:41  $LogFile: transaction records support deletion/index update activity

The timeline is strongest when multiple independent artifacts agree.

17. Investigator's Mindset

Approach $LogFile as transaction support, not a simple timeline source.

Ask:

  • What did the parser infer from the transaction data?
  • Can the MFT resolve the object reference?
  • Does USN evidence provide timestamped change context?
  • Is the relevant activity still within the retained log window?
  • Does any independent source attribute the action to a process or user?
  • Am I stating transaction evidence as a transaction, or overstating it as intent?

Good $LogFile analysis is careful, narrow, and well-correlated.

18. Key Takeaways

  • $LogFile exists for NTFS recoverability.
  • It can preserve recent transaction evidence useful to investigators.
  • It is not a user activity log or process audit log.
  • Parser output may be interpretive and should be validated through correlation.
  • $LogFile is strongest when paired with MFT and USN evidence.
  • It is especially useful for recent deletion, rename, and short-lived file analysis.
  • Avoid claiming attribution or execution from $LogFile alone.

19. Review Questions

  1. Why does NTFS maintain $LogFile?
  2. How is $LogFile different from the USN Change Journal?
  3. Why should parser-derived events be treated carefully?
  4. What artifacts help resolve $LogFile object references?
  5. Why is $LogFile useful in short-lived file investigations?

20. References

  • Microsoft Learn, "NTFS overview": https://learn.microsoft.com/en-us/windows-server/storage/file-server/ntfs-overview
  • Microsoft Learn Answers, "What is C:\$LogFile (NTFS Volume Log)": https://learn.microsoft.com/en-us/answers/questions/2650080/what-is-c-logfile-%28ntfs-volume-log%29
  • NTFS Documentation, "$LogFile": https://flatcap.github.io/linux-ntfs/ntfs/files/logfile.html
  • TZWorks, "$MFT and $LogFile Analysis": https://tzworks.com/prototype_page.php?proto_id=46