Leanpub Header

Skip to main content

The NTFS File System

Architecture, Internals, and Implementation of the New Technology File System

This book is 100% completeLast updated on 2026-07-30

Go beyond the NTFS API and learn how the filesystem really works. This book explains NTFS from its on-disk structures to a complete working implementation, giving you the knowledge to understand and build one of the world's most sophisticated filesystems.

Minimum price

$19.00

$29.00

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

PDF
EPUB
WEB
APP
133
Pages
About

About

About the Book

This book teaches the NTFS filesystem from first principles through full implementation. You will learn how every component works on disk, why the design choices were made, and how to build a working NTFS parser, reader, writer, allocator, directory manager, journaling subsystem, and metadata handler. Each chapter builds directly on the previous one, culminating in a minimal but functional NTFS implementation. The book is written for experienced software developers, operating system engineers, and computer science students who want deep, production-level understanding of one of the most sophisticated filesystems ever designed.

Author

About the Author

Steve Publications

Steve is a technology professional with more than 20 years of experience in software development, server infrastructure, cybersecurity, vulnerability research and reverse engineering. Throughout his career, he has designed, secured, analyzed and tested complex software and infrastructure, with a particular focus on understanding how systems fail and how they can be made more secure.

Outside of work, Steve enjoys sharing knowledge with the technology community. He collaborates with researchers, industry experts and technology professionals to write practical books covering software development, cybersecurity, cloud computing, networking, DevOps, artificial intelligence and enterprise technologies. His books focus on practical learning through clear explanations, real-world examples and hands-on exercises. With more than two decades of industry experience, his goal is to help IT professionals, students and technology enthusiasts build useful skills and stay current in a rapidly changing industry.

We believe readers deserve to know how our books are created. Most of our authors are not native English speakers, so we use AI to help translate, proofread manuscripts, fix grammar, improve sentence structure and make technical explanations easier to read. AI is used as an editing tool only. It does not replace the research, technical knowledge or hands-on experience behind our books. Some of our authors also prefer to remain anonymous for privacy or professional reasons. In those cases, we publish their work under a different name. The author's name may be different, but the quality of the content and our review process remain the same.

Every book is written, reviewed and maintained by experienced technology professionals, with contributions from our private technical community of more than 420 engineers and researchers. We spend far more time validating technical accuracy and keeping our content up to date than generating text. We are always interested in working with experienced professionals who have deep expertise in a particular technology or domain. If you would like to publish a book with us or help review an existing manuscript, we'd love to hear from you. Send us a message describing your area of expertise. We are especially interested in niche technologies, specialized skills and emerging topics that are underrepresented in existing technical literature.

If you look through the contents of our books, you'll see practical examples, detailed explanations and material that is regularly updated. Our goal is to publish books that professionals can actually rely on, not low-effort AI-generated content. If you ever feel that one of our books does not meet that standard, Leanpub offers a 60-day money-back guarantee. Feel free to request a refund if you are not satisfied with your purchase.

Contents

Table of Contents

Architecture, Internals, and Implementation of the New Technology File System

Introduction: The Architecture of Persistence

  1. Why NTFS Matters
  2. The Book’s Approach
  3. How to Read This Book

Chapter 1: Volume Layout and the Boot Sector

  1. Sectors, Clusters, and Volume Geometry
  2. The Boot Sector Structure
  3. BIOS Parameter Block Fields
  4. Parsing the Boot Sector (Code)
  5. Volume Identification and Signatures
  6. Walkthrough: Parsing a Real Boot Sector

Chapter 2: The Master File Table

  1. MFT Architecture and Location
  2. File Record Segment Header
  3. Attribute Types and the Type Registry
  4. Resident Attributes
  5. Non-Resident Attributes
  6. Parsing File Records (Code)
  7. Walkthrough: Reading MFT Records

Chapter 3: Core Attributes - Standard Information, Filename, Security

  1. The $STANDARD_INFORMATION Attribute
  2. The $FILE_NAME Attribute and Unicode Filenames
  3. Security Descriptors and DACLs
  4. SID Structure and Parsing
  5. Building the Metadata Handler (Code)

Chapter 4: Data Attributes and Runlists

  1. The $DATA Attribute
  2. Runlist Encoding and Decoding
  3. Parsing Non-Resident Data (Code)
  4. Sparse Files and Zero Runs
  5. Compression on NTFS
  6. Walkthrough: Decoding Runlists and Reading File Data

Chapter 5: Directories and B+ Tree Indexing

  1. The $INDEX_ROOT Attribute
  2. B+ Tree Architecture in NTFS
  3. Index Entries and Collation Rules
  4. The $INDEX_ALLOCATION Attribute
  5. Directory Traversal (Code)
  6. Walkthrough: Listing Directory Contents

Chapter 6: Allocation Structures - Bitmaps, Clusters, and the Allocator

  1. The $BITMAP Attribute
  2. Cluster Allocation Strategies
  3. Free Space Search Algorithms
  4. Bad Cluster Management ($BAD_CLUSTERS)
  5. Building the Allocator (Code)

Chapter 7: Links, Reparse Points, and Extended Attributes

  1. Hard Links and MFT Reference Counting
  2. Symbolic Links and Junction Points
  3. Reparse Points and the Filter Architecture
  4. Alternate Data Streams (ADS)
  5. Object IDs and Extended Attributes
  6. Parsing Reparse Points (Code)

Chapter 8: Transaction Logging and Recovery

  1. The NTFS Log File ($LogFile)
  2. Write-Ahead Logging Protocol
  3. Log Record Formats
  4. Crash Recovery Algorithm
  5. Building the Journaling Subsystem (Code)

Chapter 9: Special Files and System Metadata

  1. The Metadata File Registry
  2. $Volume and Volume Flags
  3. $AttrDef - Attribute Definitions
  4. $Quota - Disk Quotas
  5. $UpCase and $Extend Tables

Chapter 10: The USN Journal and Change Tracking

  1. USN Journal Architecture
  2. USN Record Formats
  3. Querying the Journal
  4. Forensic and Monitoring Applications

Chapter 11: Encryption, Quotas, and Advanced Features

  1. Encrypting File System (EFS) Architecture
  2. FVEK and DEK Encryption Scheme
  3. Disk Quota Enforcement
  4. Volume Caching Considerations
  5. Consistency Checking (chkdsk Logic)

Chapter 12: Version Evolution and Compatibility

  1. NTFS 1.0 - Windows NT 3.1
  2. NTFS 1.1 and 1.2 - Incremental Improvements
  3. NTFS 3.0 - The Major Leap
  4. NTFS 3.1 and Later Evolutions
  5. Cross-Version Compatibility Matrix
  6. Interoperability with Other Platforms

Conclusion: The Complete Implementation

  1. What We Built
  2. What a Production Implementation Needs
  3. Where to Go Next

References

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub