Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Thread
- 👉 https://twitter.com/sixtyvividtails/status/1960578133616152712
- stats before making public on 2025-09-06: 21 hits
- ## Script
- WinDbg script to find NTFS volumes and show their basic info through VCB.
- Should work fine on win10 22H2 and win11 24H2.
- Input: $t0. Either leave it 0 to show all volumes, or set it to the address of any [ntfs] _FILE_OBJECT to find the volume for that file.
- ```
- r$t0=0; r$t1=0;.foreach(v {#"lock cmpxchg" ntfs!NtfsAllocateBitmapRun L1000}) {.if (@$t1<2) {r$t1=@$t1+1} .elsif (@$t1<9) { r$t1=( v >>18&FF)+( v >>8&FF00) }};
- .if(@$t0){r?$t0=(nt!_FILE_OBJECT*)@$t0;r?$t2=@$t0->Vpb->DeviceObject->DeviceExtension;r$t3=@$t2+8;r$t2=poi(@$t3)}.else{r$t2=ntfs!NtfsData+0x18;r$t3=poi(@$t2)};.while(@$t3!=@$t2){r$t4=@$t3-8;.if(wo(@$t4)!=701){.printf "dt ntfs!_VCB %p : bad VCB\n",@$t4}.else{r?$t5=((nt!_DEVICE_OBJECT*)(@$t4)-1);.while(@@(@$t5->DeviceExtension != @$t4)){r?$t5=(nt!_DEVICE_OBJECT*)((int64)@$t5-0x10)};.printf /D "dt <link cmd=\"dt nt!_DEVICE_OBJECT %p\">nt!_DEVICE_OBJECT</link> %p\ndt ntfs!_VCB %p\n TotalClusters : %p\n FreeClusters : %p\n LowestFreeClusters : %p\n HighestFreeClusters : %p\n ClusterSize : %p\n",@$t5,@$t5,@$t4,qwo(@$t4+128),qwo(@$t4+130),qwo(@$t4+@$t1),qwo(@$t4+@$t1+8),dwo(@$t4+160);r?$t5=@$t5->DeviceObjectExtension->Vpb;??@$t5;!devobj @@(@$t5->RealDevice); .printf "\n"};r$t3=poi(@$t3);}
- ```
- Script looks beautiful, but how does it work? To answer that, we need some theory.
- But first, here's output example:
- ```
- dt nt!_DEVICE_OBJECT ffffb603bc448030
- dt ntfs!_VCB ffffb603bc448180
- TotalClusters : 0000000001dd7689
- FreeClusters : 0000000001397265
- LowestFreeClusters : 00000000012bb0e6
- HighestFreeClusters : 0000000001399be9
- ClusterSize : 0000000000001000
- struct _VPB * 0xffffb603`bc3e9060
- +0x000 Type : 0n10
- +0x002 Size : 0n96
- +0x004 Flags : 1
- +0x006 VolumeLabelLength : 0
- +0x008 DeviceObject : 0xffffb603`bc448030 _DEVICE_OBJECT
- +0x010 RealDevice : 0xffffb603`bc4408a0 _DEVICE_OBJECT
- +0x018 SerialNumber : 0xdc76021a
- +0x01c ReferenceCount : 0x360d
- +0x020 VolumeLabel : [32] ""
- ```
- ## NTFS structures
- One of the most important globals in ntfs.sys is `ntfs!NtfsData`. Its type is ntfs!`_NTFS_DATA` (private, see definition below). This structure isn't even that large, but it holds all kinds of important stuff, including the list head for the chain of Volume Control Block structures.
- Each NTFS volume is represented in memory by its own Volume Control Block (VCB, type ntfs!`_VCB`). A VCB doesn't actually contain raw "disk data", but it does have pointers to a ton of critical volume structures, along with volume statistics.
- All VCBs are linked together through the VCB.`VcbLinks` field, with the list head at ntfs!`NtfsData.VcbQueue`.
- `VcbQueue` field in the NtfsData has quite stable offset at 0x18, so enumerating all VCBs (and thus all volumes) is straightforward.
- The important bit: each VCB is actually a tail of the corresponding nt!`_DEVICE_OBJECT` for the volume (yes, VCB is Device Extension for the volume device). To create a VCB, ntfs!`NtfsInitializeDevice` invokes nt!`IoCreateDevice(DeviceExtensionSize = sizeof(_VCB) + xxx)`.
- On win10 22H2, the DEVICE_OBJECT structure immediately precedes the VCB. On win11 24H2, there's some extra data jammed between them. In any case, DeviceObject.DeviceExtension is set to point exactly at the start of the VCB.
- Besides the VCB, other important structures are:
- - FCB. File Control Block, for every opened file/directory.
- - SCB. Stream Control Block, for every opened stream. Each FCB can have more than one SCB.
- - CCB. Context Control Block, for every _FILE_OBJECT (basically one per handle, unless you dupe it).
- - LCB. Links Control Block. A file may have multiple names (hardlinks), and this ties that together. Links LCBs, CCBs, SCBs, and FCB.
- Keep in mind these are in-memory structures, not on-disk ones. Their layouts can change a lot between OS versions (or even between different ntfs.sys builds).
- But ntfs devs added an extra checkpoint to help you deal with NTFS memory structures. There's two word-sized fields at the start of most of the structs:
- - NodeTypeCode. Fixed identifier for the structure type.
- - NodeByteSize. Size of the structure.
- Some NodeTypeCode values:
- ```
- 0x0700 _NTFS_DATA
- 0x0701 _VCB
- 0x0702 _FCB
- 0x0703..0x0707 _SCB
- 0x0708..0x0709 _CCB
- 0x070B _LCB
- ```
- ## From file handle to VCB
- Let's assume we have a kernel dump, or a live kernel session. We can enumerate all VCB from the top, starting at ntfs!NtfsData, but how to get to a particular VCB from the bottom – from the file handle? EZ enough, knowing that everything is connected.
- First, let's grab a file handle:
- ```
- !handle 0 0 4
- ```
- This [relatively] quickly enumerates handles in the process with PID==4 (System). Once you see one or two handles with GrantedAccess == 00000003, press Ctrl+Break to stop the crawl. Then confirm that the handle with that access is actually a File handle:
- ```
- 0: kd> !handle 00e0 3 4
- PROCESS ffffb603b9484080
- SessionId: none Cid: 0004 Peb: 00000000 ParentCid: 0000
- DirBase: 001ad002 ObjectTable: ffffa50ccf464e80 HandleCount: 2404.
- Image: System
- Kernel handle table at ffffa50ccf464e80 with 2404 entries in use
- 00e0: Object: ffffb603bc8b7650 GrantedAccess: 00000003 (Inherit) Entry: ffffa50ccf49a380
- Object: ffffb603bc8b7650 Type: (ffffb603b94f26c0) File <<< Yes, that's a File handle
- ObjectHeader: ffffb603bc8b7620 (new version)
- HandleCount: 1 PointerCount: 32632
- Directory Object: 00000000 Name: \Windows\System32\config\SYSTEM.LOG2 {HarddiskVolume3}
- ```
- Of course the whole "GrantedAccess == 3" trick is just a rule of thumb to quickly get a valid file handle on an NTFS volume. You can absolutely use your own file handle instead, or skip the shortcut and just grab any handle with Type == File:
- ```
- !handle 0 3 4
- ```
- But this slow path will probably cost you 5 to 15 minutes (I don't know how Microsoft devs managed to make it that slow, even javascript manual handle/objdir parse works like 100 times faster).
- Okay, we have handle. And object address. Simple enter one command:
- ```
- 0: kd> dt ffffb603bc8b7650 nt!_FILE_OBJECT
- +0x000 Type : 0n5
- +0x002 Size : 0n216
- +0x008 DeviceObject : 0xffffb603`bc4408a0 _DEVICE_OBJECT <<< device for \Driver\volmgr (not the one we need!)
- +0x010 Vpb : 0xffffb603`bc3e9060 _VPB <<< pointer to _VPB (see below)
- +0x018 FsContext : 0xffffa50c`cfedca00 Void <<< pointer to _SCB (Stream Control Block)
- +0x020 FsContext2 : 0xffffa50c`cfedcc70 Void <<< pointer to _CCB (Context Control Block)
- +0x028 SectionObjectPointer : 0xffffb603`bc869488 _SECTION_OBJECT_POINTERS
- +0x030 PrivateCacheMap : (null)
- +0x038 FinalStatus : 0n0
- +0x040 RelatedFileObject : (null)
- +0x048 LockOperation : 0 ''
- +0x049 DeletePending : 0 ''
- +0x04a ReadAccess : 0x1 ''
- +0x04b WriteAccess : 0x1 ''
- +0x04c DeleteAccess : 0 ''
- +0x04d SharedRead : 0 ''
- +0x04e SharedWrite : 0 ''
- +0x04f SharedDelete : 0 ''
- +0x050 Flags : 0x40028
- +0x058 FileName : _UNICODE_STRING "\Windows\System32\config\SYSTEM.LOG2"
- +0x068 CurrentByteOffset : _LARGE_INTEGER 0x0
- +0x070 Waiters : 0
- +0x074 Busy : 0
- +0x078 LastLock : (null)
- +0x080 Lock : _KEVENT
- +0x098 Event : _KEVENT
- +0x0b0 CompletionContext : (null)
- +0x0b8 IrpListLock : 0
- +0x0c0 IrpList : _LIST_ENTRY [ 0xffffb603`bc8b7710 - 0xffffb603`bc8b7710 ]
- +0x0d0 FileObjectExtension : (null)
- 0: kd> dt 0xffffb603`bc3e9060 nt!_VPB
- nt!_VPB
- +0x000 Type : 0n10
- +0x002 Size : 0n96
- +0x004 Flags : 1
- +0x006 VolumeLabelLength : 0
- +0x008 DeviceObject : 0xffffb603`bc448030 _DEVICE_OBJECT <<< device for \FileSystem\Ntfs driver (USE THIS ONE!)
- +0x010 RealDevice : 0xffffb603`bc4408a0 _DEVICE_OBJECT <<< device for \Driver\volmgr (again; ignore it now)
- +0x018 SerialNumber : 0xdc76021a <<< yay, 32-bit volume serial number (from the $Boot/VBR, at offset 0x48)
- +0x01c ReferenceCount : 0x360d
- +0x020 VolumeLabel : [32] "" <<< this volume has no label
- ```
- We're almost there. Just need to check out the DeviceObject (not the "RealDevice", just "DeviceObject").
- ```
- 0: kd> !devobj 0xffffb603`bc448030
- Device object (ffffb603bc448030) is for:
- \FileSystem\Ntfs DriverObject ffffb603bc307c00
- Current Irp 00000000 RefCount 0 Type 00000008 Flags 08060000
- SecurityDescriptor ffffa50ccf4f76e0 DevExt ffffb603bc448180 DevObjExt ffffb603bc44ab50
- ExtensionFlags (0x00000800) DOE_DEFAULT_SD_PRESENT
- Characteristics (0000000000)
- AttachedDevice (Upper) ffffb603bc40f8d0 \FileSystem\FltMgr
- Device queue is not busy.
- 0: kd> dt 0xffffb603`bc448030 nt!_DEVICE_OBJECT
- +0x000 Type : 0n3
- +0x002 Size : 0x2b20
- +0x004 ReferenceCount : 0n0
- +0x008 DriverObject : 0xffffb603`bc307c00 _DRIVER_OBJECT
- +0x010 NextDevice : 0xffffb603`bc0b3c20 _DEVICE_OBJECT
- +0x018 AttachedDevice : 0xffffb603`bc40f8d0 _DEVICE_OBJECT
- +0x020 CurrentIrp : (null)
- +0x028 Timer : (null)
- +0x030 Flags : 0x8060000
- +0x034 Characteristics : 0
- +0x038 Vpb : (null)
- +0x040 DeviceExtension : 0xffffb603`bc448180 Void <<< actually points to the VCB, Volume Control Block
- +0x048 DeviceType : 8
- +0x04c StackSize : 10 ''
- +0x050 Queue : <anonymous-tag>
- +0x098 AlignmentRequirement : 3
- +0x0a0 DeviceQueue : _KDEVICE_QUEUE
- +0x0c8 Dpc : _KDPC
- +0x108 ActiveThreadCount : 0
- +0x110 SecurityDescriptor : 0xffffa50c`cf4f76e0 Void
- +0x118 DeviceLock : _KEVENT
- +0x130 SectorSize : 0x200
- +0x132 Spare1 : 1
- +0x138 DeviceObjectExtension : 0xffffb603`bc44ab50 _DEVOBJ_EXTENSION
- +0x140 Reserved : (null)
- ...
- +0x150 [small extra structure here on win11 24H2, absent on win10 22H2]
- ...
- +0x180/+0x150 VCB (pointed to by ^DeviceExtension field right above)
- ```
- So yeah, that's it – we've manually walked our way from a file handle to the VCB. The last bit is just looking up the VCB definition in the private symbols and picking up interesting fields.
- Script uses hardcoded offsets 0x128 and 0x130 for TotalClusters and FreeClusters (i.e. full volume size and free space size). These offsets are good for win10 22H2 and win11 24H2, but they already drift a bit compared to a 2016-era win10 build, as you can see in the structures dump below.
- The script also shows LowestFreeClusters and HighestFreeClusters. Those are closer to the end of the struct, so their offsets jump around a lot. To find their offset, the script disassembles ntfs!NtfsAllocateBitmapRun and picks up the supposedly correct offset from there. Good enough for a quick hack.
- THE END.
- ## Appendix
- Ntfs stuctures defintions I've talked about.
- Note these structures are for an old win10 ntfs.sys from 2016; current win10 22H2 and win11 24H2 may differ substantially.
- Exact OS build for these structs was either 14361 or 14910.
- Key NTFS structure, `NTFS_DATA`. The only instance of this structure is ntfs!`NtfsData` global variable.
- ```
- 0:000> dt -v _NTFS_DATA
- ntfs!_NTFS_DATA
- struct _NTFS_DATA, 76 elements, 0x780 bytes
- +0x000 NodeTypeCode : Uint2B
- +0x002 NodeByteSize : Int2B
- +0x008 DriverObject : Ptr64 to struct _DRIVER_OBJECT, 15 elements, 0x150 bytes
- +0x010 DeviceObject : Ptr64 to struct _DEVICE_OBJECT, 25 elements, 0x150 bytes
- +0x018 VcbQueue : struct _LIST_ENTRY, 2 elements, 0x10 bytes <<<<<< list of [_DEVICE_OBJECT,_VCB]
- +0x028 Resource : struct _ERESOURCE, 17 elements, 0x68 bytes
- +0x090 ShortNameRegKeyValue : Uint4B
- +0x094 CorruptionHandlingDisableRegKeyValue : Uint4B
- +0x098 CorruptionHandlingBypassRegKeyValue : Uint4B
- +0x0a0 Corruption : struct _GLOBAL_CORRUPTION, 6 elements, 0x98 bytes
- +0x138 SpotVerifyTimer : struct _KTIMER, 6 elements, 0x40 bytes
- +0x178 SpotVerifyTimerDpc : struct _KDPC, 11 elements, 0x40 bytes
- +0x1b8 SpotVerifyTimerActivityId : struct _NTFS_ACTIVITY_ID, 2 elements, 0x18 bytes
- +0x1d0 SpotVerifyExpiryItem : struct _WORK_QUEUE_ITEM, 3 elements, 0x20 bytes
- +0x1f0 SpotVerifyExpiryItemActivityId : struct _NTFS_ACTIVITY_ID, 2 elements, 0x18 bytes
- +0x208 SpotVerifyTimeout : Uint4B
- +0x210 OurProcess : Ptr64 to struct _KPROCESS, 38 elements, 0x288 bytes
- +0x218 FreeEresourceSize : Uint4B
- +0x21c FreeEresourceTotal : Uint4B
- +0x220 FreeEresourceMiss : Uint4B
- +0x228 FreeEresourceArray : Ptr64 to Ptr64 to struct _ERESOURCE, 17 elements, 0x68 bytes
- +0x230 CacheManagerCallbacks : struct _CACHE_MANAGER_CALLBACKS, 4 elements, 0x20 bytes
- +0x250 VolumeCheckpointDpc : struct _KDPC, 11 elements, 0x40 bytes
- +0x290 VolumeCheckpointTimer : struct _KTIMER, 6 elements, 0x40 bytes
- +0x2d0 VolumeCheckpointStatus : Uint4B
- +0x2d8 VolumeCheckpointTimerActivityId : struct _NTFS_ACTIVITY_ID, 2 elements, 0x18 bytes
- +0x2f0 VolumeCheckpointItem : struct _WORK_QUEUE_ITEM, 3 elements, 0x20 bytes
- +0x310 TimerStatus : Enum TIMER_STATUS, 2 total enums
- +0x314 IoCoalescingEnabled : UChar
- +0x318 IoCoalescingRegistration : Ptr64 to Void
- +0x320 VolumeCheckpointItemActivityId : struct _NTFS_ACTIVITY_ID, 2 elements, 0x18 bytes
- +0x338 UsnTimeOutTimer : Ptr64 to struct _EX_TIMER, 0 elements, 0x0 bytes
- +0x340 UsnTimeOutTimerActivityId : struct _NTFS_ACTIVITY_ID, 2 elements, 0x18 bytes
- +0x358 UsnTimeOutItem : struct _WORK_QUEUE_ITEM, 3 elements, 0x20 bytes
- +0x378 UsnTimeOutItemActivityId : struct _NTFS_ACTIVITY_ID, 2 elements, 0x18 bytes
- +0x390 Flags : Uint4B
- +0x394 UpcaseTableSize : Uint4B
- +0x398 UpcaseTable : Ptr64 to Wchar
- +0x3a0 UpcaseTableCrc64 : Uint8B
- +0x3a8 DefaultDescriptor : Ptr64 to Void
- +0x3b0 DefaultDescriptorLength : Uint4B
- +0x3b8 NtfsDataLock : struct _FAST_MUTEX, 5 elements, 0x38 bytes
- +0x3f0 EncryptionCallBackTable : struct _ENCRYPTION_CALL_BACK, 18 elements, 0x88 bytes
- +0x478 IsEdpEnabled : UChar
- +0x480 EdpEfsSWHiveAvailableWnfSubscription : Ptr64 to struct _EX_WNF_SUBSCRIPTION, 0 elements, 0x0 bytes
- +0x488 EdpPolicyChangedWnfSubscription : Ptr64 to struct _EX_WNF_SUBSCRIPTION, 0 elements, 0x0 bytes
- +0x490 EdpDplKeysDroppingSubscription : Ptr64 to struct _EX_WNF_SUBSCRIPTION, 0 elements, 0x0 bytes
- +0x498 EdpDplKeysStateSubscription : Ptr64 to struct _EX_WNF_SUBSCRIPTION, 0 elements, 0x0 bytes
- +0x4a0 SystemEtwHandle : Uint8B
- +0x4a8 UbpmEtwHandle : Uint8B
- +0x4b0 DiskFlushContextCompletedSpinLock : Uint8B
- +0x4b8 DiskFlushContextCompletedListHead : struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x4c8 DiskFlushContextCompletedWorkItem : struct _WORK_QUEUE_ITEM, 3 elements, 0x20 bytes
- +0x4e8 DiskFlushContextCompletedWorkItemQueued : UChar
- +0x4f0 FrsConsolidationWorkQueueControl : struct _WORK_QUEUE_CONTROL, 7 elements, 0x78 bytes
- +0x568 DisableDebugCodeFlags : Uint4B
- +0x56c EnableDebugCodeFlags : Uint4B
- +0x570 ReservedCompressionBuffers : struct _NTFS_DATA_COMPRESSION_RESERVED, 4 elements, 0x120 bytes
- +0x690 ReservedUsaBuffers : struct _NTFS_DATA_USA_RESERVED, 2 elements, 0x98 bytes
- +0x728 ZeroPage : Ptr64 to UChar
- +0x730 VirtualDrivesMounted : Uint4B
- +0x738 NextCheckpointTimerTime : union _LARGE_INTEGER, 4 elements, 0x8 bytes
- +0x740 NextCheckpointTime : union _LARGE_INTEGER, 4 elements, 0x8 bytes
- +0x748 OldCheckpointTime : union _LARGE_INTEGER, 4 elements, 0x8 bytes
- +0x750 CompressionLimit : Int8B
- +0x758 CacheCoherencyHitThreshold : Uint4B
- +0x75c RangeTrackTimerCounter : Uint4B
- +0x760 RangeTrackTimerCountLimit : Uint4B
- +0x764 UsnMinutesTimer : Uint4B
- +0x768 MaxFspThreadsPerVolume : Uint4B
- +0x76c FrsConsolidationThreshold : Uint4B
- +0x770 FrsConsolidationBreakTime : Uint4B
- +0x774 FrsConsolidationScanCountPerBreak : Uint4B
- +0x778 MaxOverflowQueueEntries : Uint4B
- +0x77c AsyncCachedReadDisabled : UChar
- +0x77d EnableDirectAccess : UChar
- ```
- Volume Control Block, `VCB`. One structure per volume. Structure created as DeviceExtension for the volume device, pointed to by its `DEVICE_OBJECT.DeviceExtension`.
- ```
- 0:000> dt -v _VCB
- ntfs!_VCB
- struct _VCB, 292 elements, 0x24f8 bytes
- +0x000 NodeTypeCode : Uint2B
- +0x002 NodeByteSize : Int2B
- +0x004 VcbState : Uint4B
- +0x008 VcbLinks : struct _LIST_ENTRY, <<<<< VCB linked into ntfs!NtfsData via this
- +0x018 VcbState2 : Uint4B
- +0x020 RootIndexScb : Ptr64 to struct _SCB, 38 elements, 0x2d0 bytes
- +0x028 UsnJournal : Ptr64 to struct _SCB, 38 elements, 0x2d0 bytes
- +0x028 FirstSystemScb : Ptr64 to struct _SCB, 38 elements, 0x2d0 bytes
- +0x030 MftScb : Ptr64 to struct _SCB, 38 elements, 0x2d0 bytes
- +0x038 Mft2Scb : Ptr64 to struct _SCB, 38 elements, 0x2d0 bytes
- +0x040 LogFileScb : Ptr64 to struct _SCB, 38 elements, 0x2d0 bytes
- +0x048 BitmapScb : Ptr64 to struct _SCB, 38 elements, 0x2d0 bytes
- +0x050 AttributeDefTableScb : Ptr64 to struct _SCB, 38 elements, 0x2d0 bytes
- +0x058 BadClusterFileScb : Ptr64 to struct _SCB, 38 elements, 0x2d0 bytes
- +0x060 ExtendDirectory : Ptr64 to struct _SCB, 38 elements, 0x2d0 bytes
- +0x068 SecurityDescriptorStream : Ptr64 to struct _SCB, 38 elements, 0x2d0 bytes
- +0x070 SecurityIdIndex : Ptr64 to struct _SCB, 38 elements, 0x2d0 bytes
- +0x078 SecurityDescriptorHashIndex : Ptr64 to struct _SCB, 38 elements, 0x2d0 bytes
- +0x080 UpcaseTableScb : Ptr64 to struct _SCB, 38 elements, 0x2d0 bytes
- +0x088 QuotaTableScb : Ptr64 to struct _SCB, 38 elements, 0x2d0 bytes
- +0x090 OwnerIdTableScb : Ptr64 to struct _SCB, 38 elements, 0x2d0 bytes
- +0x098 ReparsePointTableScb : Ptr64 to struct _SCB, 38 elements, 0x2d0 bytes
- +0x0a0 ObjectIdTableScb : Ptr64 to struct _SCB, 38 elements, 0x2d0 bytes
- +0x0a8 VerifyScb : Ptr64 to struct _SCB, 38 elements, 0x2d0 bytes
- +0x0b0 CorruptScb : Ptr64 to struct _SCB, 38 elements, 0x2d0 bytes
- +0x0b8 VolumeDasdScb : Ptr64 to struct _SCB, 38 elements, 0x2d0 bytes
- +0x0c0 DeletedFiles : Ptr64 to struct _SCB, 38 elements, 0x2d0 bytes
- +0x0c8 MftBitmapScb : Ptr64 to struct _SCB, 38 elements, 0x2d0 bytes
- +0x0c8 LastSystemScb : Ptr64 to struct _SCB, 38 elements, 0x2d0 bytes
- +0x0d0 LogFileObject : Ptr64 to struct _FILE_OBJECT, 30 elements, 0xd8 bytes
- +0x0d8 TargetDeviceObject : Ptr64 to struct _DEVICE_OBJECT, 25 elements, 0x150 bytes
- +0x0e0 LogHandle : Ptr64 to Void
- +0x0e8 RootLcb : Ptr64 to struct _LCB, 27 elements, 0xe8 bytes
- +0x0f0 Vpb : Ptr64 to struct _VPB, 9 elements, 0x60 bytes
- +0x0f8 CleanupCount : Uint4B
- +0x0fc CloseCount : Uint4B
- +0x100 ReadOnlyCloseCount : Uint4B
- +0x104 SystemFileCloseCount : Uint4B
- +0x108 ExternalMetadataCleanupCount : Uint4B
- +0x10c DisallowDismountCount : Uint4B
- +0x110 DisallowDeleteCount : Uint4B
- +0x118 TotalClustersCommitted : Int8B
- +0x120 TotalClusters : Int8B
- +0x128 FreeClusters : Int8B
- +0x130 DeallocatedClusters : Int8B
- +0x138 DesiredTrimAlignment : Uint4B
- +0x13c DesiredStreamAlignment : Uint4B
- +0x140 TotalReserved : Int8B
- +0x148 PreviousTotalClusters : Int8B
- +0x150 BigEnoughToMove : Uint4B
- +0x154 DefaultBlocksPerIndexAllocationBuffer : Uint4B
- +0x158 DefaultBytesPerIndexAllocationBuffer : Uint4B
- +0x15c BytesPerCluster : Uint4B
- +0x160 BytesPerFileRecordSegment : Uint4B
- +0x164 SectorSizeInfo : struct _FILE_FS_SECTOR_SIZE_INFORMATION, 7 elements, 0x1c bytes
- +0x180 ClustersPerFileRecordSegment : Uint4B
- +0x184 FileRecordsPerCluster : Uint4B
- +0x188 ClustersPer4Gig : Uint4B
- +0x18c ClustersPerPage : Uint4B
- +0x190 MftStartLcn : Int8B
- +0x198 Mft2StartLcn : Int8B
- +0x1a0 NumberSectors : Int8B
- +0x1a8 PartitionNumberSectors : Int8B
- +0x1b0 VolumeSerialNumber : Int8B
- +0x1b8 VolumeCreationTime : Int8B
- +0x1c0 VolumeLastModificationTime : Int8B
- +0x1c8 VolumeLastChangeTime : Int8B
- +0x1d0 VolumeLastAccessTime : Int8B
- +0x1d8 ClusterMask : Uint4B
- +0x1dc InverseClusterMask : Int4B
- +0x1e0 ClusterShift : Uint4B
- +0x1e4 MftShift : Uint4B
- +0x1e8 MftToClusterShift : Uint4B
- +0x1ec MftReserved : Uint4B
- +0x1f0 MftCushion : Uint4B
- +0x1f8 Tiers : struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x208 DiskTier : Ptr64 to struct _NTFS_STORAGE_TIER, 8 elements, 0x90 bytes
- +0x210 FlashTier : Ptr64 to struct _NTFS_STORAGE_TIER, 8 elements, 0x90 bytes
- +0x218 CheckpointFlags : Uint4B
- +0x220 CheckpointMutex : struct _FAST_MUTEX, 5 elements, 0x38 bytes
- +0x258 CheckpointNotifyEvent : struct _KEVENT, 1 elements, 0x18 bytes
- +0x270 FcbTableMutex : struct _FAST_MUTEX, 5 elements, 0x38 bytes
- +0x2a8 FcbSecurityMutex : struct _FAST_MUTEX, 5 elements, 0x38 bytes
- +0x2e0 ReservedClustersMutex : struct _FAST_MUTEX, 5 elements, 0x38 bytes
- +0x318 AttributeFlagsMask : Uint2B
- +0x31a MajorVersion : UChar
- +0x31b MinorVersion : UChar
- +0x31c UpcaseTableSize : Uint4B
- +0x320 UpcaseTable : Ptr64 to Wchar
- +0x328 UpcaseTableCrc64 : Uint8B
- +0x330 UpcaseInfo : Ptr64 to struct _UPCASE_INFORMATION, 4 elements, 0x20 bytes
- +0x338 Statistics : Ptr64 to struct _FILE_SYSTEM_STATISTICS_EX, 3 elements, 0x240 bytes
- +0x340 MaxDirtyPagesInDirtyPageTable : Uint4B
- +0x348 LastRestartArea : union _LARGE_INTEGER, 4 elements, 0x8 bytes
- +0x350 OpenAttributeTable : struct _RESTART_POINTERS, 6 elements, 0xe0 bytes
- +0x430 LastBaseLsn : union _LARGE_INTEGER, 4 elements, 0x8 bytes
- +0x438 TransactionTable : struct _RESTART_POINTERS, 6 elements, 0xe0 bytes
- +0x518 LastTransactionLsn : union _LARGE_INTEGER, 4 elements, 0x8 bytes
- +0x520 LastTransactionLsnCount : Uint4B
- +0x528 EndOfLastCheckpoint : union _LARGE_INTEGER, 4 elements, 0x8 bytes
- +0x530 OldestLsnAtMount : union _LARGE_INTEGER, 4 elements, 0x8 bytes
- +0x538 CurrentLsnAtMount : union _LARGE_INTEGER, 4 elements, 0x8 bytes
- +0x540 OldestDirtyLsn : union _LARGE_INTEGER, 4 elements, 0x8 bytes
- +0x548 LastRestartAreaAtNonTopLevelLogFull : union _LARGE_INTEGER, 4 elements, 0x8 bytes
- +0x550 FcbTable : struct _RTL_AVL_TABLE, 11 elements, 0x68 bytes
- +0x5b8 ViewIndexNotifyList : struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x5c8 NotifySync : Ptr64 to struct _REAL_NOTIFY_SYNC, 0 elements, 0x0 bytes
- +0x5d0 FileObjectWithVcbLocked : Ptr64 to struct _FILE_OBJECT, 30 elements, 0xd8 bytes
- +0x5d8 FileObjectShrinkingVolume : Ptr64 to struct _FILE_OBJECT, 30 elements, 0xd8 bytes
- +0x5e0 MftZoneStart : Int8B
- +0x5e8 MftZoneEnd : Int8B
- +0x5f0 ClustersRecentlyFreed : Int8B
- +0x5f8 DeallocatedClustersListLengthInTrim : Uint4B
- +0x5fc DeallocatedClustersListLengthToDrain : Uint4B
- +0x600 MaxUnmapBlockDescriptorCount : Uint4B
- +0x604 MaxUnmapLbaCount : Uint4B
- +0x608 MaxTrimDataSetRangesLength : Uint4B
- +0x60c MaxTrimClustersCount : Uint4B
- +0x610 NumberOfInFlightTrim : Int4B
- +0x614 NotifyInFlightTrim : Int4B
- +0x618 DismountWaitingForBitmapScb : UChar
- +0x619 DeallocatedClustersListWaitersHasNewWaiter : UChar
- +0x620 ClearOfInFlightTrim : struct _KEVENT, 1 elements, 0x18 bytes
- +0x638 SyncOnlyBitmapScb : Ptr64 to struct _SCB, 38 elements, 0x2d0 bytes
- +0x640 EarliestTimeForDeallocatedClustersInTrimToDrain : union _LARGE_INTEGER, 4 elements, 0x8 bytes
- +0x648 DeallocatedClustersListWaiters : struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x658 DeallocatedClusterListHead : struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x668 DeallocatedClusters1 : struct _DEALLOCATED_CLUSTERS, 5 elements, 0x40 bytes
- +0x6a8 DeallocatedClusters2 : struct _DEALLOCATED_CLUSTERS, 5 elements, 0x40 bytes
- +0x6e8 MarkUnusedContextQueue : struct _MARK_UNUSED_CONTEXT_QUEUE, 4 elements, 0x40 bytes
- +0x728 DeallocatedClustersListIsNowEmpty : struct _KEVENT, 1 elements, 0x18 bytes
- +0x740 DeallocatedClustersListIsNowPartiallyDrained : struct _KEVENT, 1 elements, 0x18 bytes
- +0x758 ProtectedClustersMcb : struct _BASE_MCB, 5 elements, 0x18 bytes
- +0x770 ProtectedClusterCount : Int8B
- +0x778 UsnJournalInstance : struct _USN_JOURNAL_INSTANCE, 4 elements, 0x20 bytes
- +0x798 FirstValidUsn : Int8B
- +0x7a0 LowestOpenUsn : Int8B
- +0x7a8 UsnJournalReference : struct _MFT_SEGMENT_REFERENCE, 3 elements, 0x8 bytes
- +0x7b0 UsnCacheBias : Int8B
- +0x7b8 NotifyUsnDeleteIrps : struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x7c8 ModifiedOpenFiles : struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x7d8 ModifiedOpenFilesLock : struct _FAST_MUTEX, 5 elements, 0x38 bytes
- +0x810 CurrentTimeOutFiles : Ptr64 to struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x818 AgedTimeOutFiles : Ptr64 to struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x820 CurrentTimeOutFilesRangeTrack : Ptr64 to struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x828 AgedTimeOutFilesRangeTrack : Ptr64 to struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x830 TimeOutListA : struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x840 TimeOutListB : struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x850 TimeOutListRangeTrackA : struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x860 TimeOutListRangeTrackB : struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x870 DeleteUsnData : struct _NTFS_DELETE_JOURNAL_DATA, 4 elements, 0x18 bytes
- +0x888 Resource : struct _ERESOURCE, 17 elements, 0x68 bytes
- +0x8f0 SystemFileDefragResource : struct _ERESOURCE, 17 elements, 0x68 bytes
- +0x958 LogHeaderReservation : Uint4B
- +0x95c NotifyCount : Uint4B
- +0x960 ViewIndexNotifyCount : Uint4B
- +0x964 DeviceChangeCount : Uint4B
- +0x968 SecurityCacheById : [128] Ptr64 to Ptr64 to struct _SHARED_SECURITY, 4 elements, 0x20 bytes
- +0xd68 SecurityCacheByHash : [128] Ptr64 to struct _SHARED_SECURITY, 4 elements, 0x20 bytes
- +0x1168 NextSecurityId : Uint4B
- +0x116c QuotaState : Uint4B
- +0x1170 QuotaFlags : Uint4B
- +0x1174 QuotaOwnerId : Uint4B
- +0x1178 QuotaDeleteSecquence : Uint4B
- +0x117c QuotaControlDeleteCount : Uint4B
- +0x1180 QuotaControlTable : struct _RTL_AVL_TABLE, 11 elements, 0x68 bytes
- +0x11e8 QuotaControlLock : struct _FAST_MUTEX, 5 elements, 0x38 bytes
- +0x1220 QuotaFileReference : struct _MFT_SEGMENT_REFERENCE, 3 elements, 0x8 bytes
- +0x1228 AdministratorId : Uint4B
- +0x122c ObjectIdState : Uint4B
- +0x1230 QuotaControlTemplate : Ptr64 to struct _QUOTA_CONTROL_BLOCK, 8 elements, 0x38 bytes
- +0x1238 AttributeDefinitions : Ptr64 to struct _ATTRIBUTE_DEFINITION_COLUMNS, 7 elements, 0xa0 bytes
- +0x1240 Tunnel : struct TUNNEL, 4 elements, 0x58 bytes
- +0x1298 SparseFileUnit : Uint4B
- +0x129c SparseFileClusters : Uint4B
- +0x12a0 MaxClusterCount : Int8B
- +0x12a8 LfsWriteData : struct _LFS_WRITE_DATA, 4 elements, 0x18 bytes
- +0x12c0 AcquireFilesCount : Uint4B
- +0x12c4 LogFileFullCount : Uint4B
- +0x12c8 CleanCheckpointMark : Uint4B
- +0x12cc UnhandledLogFileFullCount : Uint4B
- +0x12d0 CleanCheckpointCount : Uint4B
- +0x12d4 FuzzyCheckpointCount : Uint4B
- +0x12d8 AlmostOverflowedDPTCount : Uint4B
- +0x12dc OverflowedDPTCount : Uint4B
- +0x12e0 CheckpointInjectionCount : Uint4B
- +0x12e4 WaitForCcLoggedDataActivityCount : Uint4B
- +0x12e8 FlushOldestFOCount : Uint4B
- +0x12ec RestartVersion : Uint4B
- +0x12f0 OatEntrySize : Uint4B
- +0x12f4 OatFlags : Uint4B
- +0x12f8 QueuedCloseCount : Uint4B
- +0x1300 SpareVpb : Ptr64 to struct _VPB, 9 elements, 0x60 bytes
- +0x1308 OnDiskOat : Ptr64 to struct _RESTART_POINTERS, 6 elements, 0xe0 bytes
- +0x1310 OpenAttributeData : struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x1320 VolumeObjectId : [16] UChar
- +0x1330 CachedRuns : struct _NTFS_CACHED_RUNS, 13 elements, 0x40 bytes
- +0x1370 LastBitmapHint : Int8B
- +0x1378 HashTable : struct _NTFS_HASH_TABLE, 5 elements, 0x118 bytes
- +0x1490 MftReserveFlags : Uint4B
- +0x1498 Overflow : struct _VCB_OVERFLOW, 5 elements, 0x70 bytes
- +0x1508 TransactionsDoneEvent : struct _KEVENT, 1 elements, 0x18 bytes
- +0x1520 CheckpointOwnerThread : Ptr64 to Void
- +0x1528 DirtyPageTableSizeHint : Uint4B
- +0x1530 ShrinkVolumeBoundary : Int8B
- +0x1538 ShrinkNumberSectors : Uint8B
- +0x1540 ReservedUsaMapping : struct _RESERVED_MAPPING, 2 elements, 0x40 bytes
- +0x1580 ReservedResidentMapping : struct _RESERVED_MAPPING, 2 elements, 0x40 bytes
- +0x15c0 ReservedUsaBuffers : Ptr64 to struct _NTFS_DATA_USA_RESERVED, 2 elements, 0x98 bytes
- +0x15c8 BugCheckOnCorrupt : UChar
- +0x15c9 DisableUnusedClustersHint : UChar
- +0x15cc VolumeBitmapFlags : Uint4B
- +0x15d0 RepairThread : Ptr64 to Void
- +0x15d8 RepairQueueSpinLock : Uint8B
- +0x15e0 RepairQueue : struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x15f0 RepairQueueCount : Uint4B
- +0x15f4 RepairFlags : Uint4B
- +0x15f8 RepairThreadEvent : struct _KEVENT, 1 elements, 0x18 bytes
- +0x1610 RepairCompletionWaiterCount : Uint4B
- +0x1618 RepairCompletionEvent : struct _KEVENT, 1 elements, 0x18 bytes
- +0x1630 RepairThreadDoneWaiterCount : Uint4B
- +0x1638 RepairThreadDoneEvent : struct _KEVENT, 1 elements, 0x18 bytes
- +0x1650 RepairLogScb : Ptr64 to struct _SCB, 38 elements, 0x2d0 bytes
- +0x1658 ReservedBitmapBuffer : Ptr64 to Void
- +0x1660 ReservedMftBitmapBuffer : Ptr64 to Void
- +0x1668 ReservedPageFileBuffer : Ptr64 to Void
- +0x1670 ReservedPageFileMapping : Ptr64 to Void
- +0x1678 ReservedPageFileLock : struct _FAST_MUTEX, 5 elements, 0x38 bytes
- +0x16b0 EmptyFileRecord : Ptr64 to struct _FILE_RECORD_SEGMENT_HEADER, 13 elements, 0x34 bytes
- +0x16b8 TxfVcb : struct _TXF_VCB, 18 elements, 0x368 bytes
- +0x1a20 EncryptedPageFileCount : Uint4B
- +0x1a24 VcbExtendedCharState : Uint4B
- +0x1a28 MountTime : union _LARGE_INTEGER, 4 elements, 0x8 bytes
- +0x1a30 MountEvent : struct _KEVENT, 1 elements, 0x18 bytes
- +0x1a48 LffOccurred : Uint4B
- +0x1a4c BusType : Enum _STORAGE_BUS_TYPE, 21 total enums
- +0x1a50 VendorId : struct _UNICODE_STRING, 3 elements, 0x10 bytes
- +0x1a60 ProductId : struct _UNICODE_STRING, 3 elements, 0x10 bytes
- +0x1a70 DriverId : struct _UNICODE_STRING, 3 elements, 0x10 bytes
- +0x1a80 DriverVersion : struct _UNICODE_STRING, 3 elements, 0x10 bytes
- +0x1a90 MaxTransferLength : Uint4B
- +0x1a94 MaxDiscontinuousPages : Uint4B
- +0x1a98 UsesPIO : UChar
- +0x1a99 SupportsSyncIo : UChar
- +0x1a9a DeviceType : UChar
- +0x1a9b DeviceTypeModifier : UChar
- +0x1a9c SupportsCommandQueuing : UChar
- +0x1aa0 DeviceNumber : Uint4B
- +0x1aa4 NumberOfDataCopies : Uint4B
- +0x1aa8 Corruption : struct _VOLUME_CORRUPTION, 14 elements, 0x210 bytes
- +0x1cb8 SdsCompaction : struct _VOLUME_SDS_COMPACTION, 3 elements, 0x40 bytes
- +0x1cf8 NextCheckpointTime : union _LARGE_INTEGER, 4 elements, 0x8 bytes
- +0x1d00 ViewCountHeader : struct _VIEW_COUNT_HEADER, 8 elements, 0x168 bytes
- +0x1e68 SupportedFeaturesFlags : Uint4B
- +0x1e70 SupportedFeaturesLastRefreshTick : Uint8B
- +0x1e78 MaxFileSize : Int8B
- +0x1e80 VolumeGuid : struct _GUID, 4 elements, 0x10 bytes
- +0x1e90 VolumeCorrelationId : struct _GUID, 4 elements, 0x10 bytes
- +0x1ea0 OriginalVolumeCorrelationId : struct _GUID, 4 elements, 0x10 bytes
- +0x1eb0 DeviceName : struct _UNICODE_STRING, 3 elements, 0x10 bytes
- +0x1ec0 VolumeName : struct _UNICODE_STRING, 3 elements, 0x10 bytes
- +0x1ed0 VolumeNameResource : struct _ERESOURCE, 17 elements, 0x68 bytes
- +0x1f38 PnpNotificationEntry : Ptr64 to Void
- +0x1f40 NestingLevel : Uint4B
- +0x1f48 RangeTrack : struct _VCB_RANGETRACK, 4 elements, 0x80 bytes
- +0x1fc8 TPMap : struct _RTL_BITMAP, 2 elements, 0x10 bytes
- +0x1fd8 TPMapResolution : Uint8B
- +0x1fe0 TPMapResolutionInClusters : Uint4B
- +0x1fe4 TPMapFlags : Uint4B
- +0x1fe8 TPMapFailure : Uint4B
- +0x1ff0 OriginalBytesInFirstTPMapBit : Uint8B
- +0x1ff8 BytesInFirstTPMapBit : Uint8B
- +0x2000 BytesInLastTPMapBit : Uint8B
- +0x2008 HeatData : struct _TIERING_HEAT_DATA, 2 elements, 0x8 bytes
- +0x2010 OriginalHeatMeasurementFlags : Uint4B
- +0x2014 VolumeGuidForHeat : struct _GUID, 4 elements, 0x10 bytes
- +0x2024 PurgeFailures : Uint4B
- +0x2028 StatsLock : struct _EX_PUSH_LOCK, 7 elements, 0x8 bytes
- +0x2030 DiskFullHistory : struct _NTFS_THROTTLE_HISTORY, 4 elements, 0x30 bytes
- +0x2060 LowestFreeClusters : Int8B
- +0x2068 HighestFreeClusters : Int8B
- +0x2070 FreeSpaceLastLoggedTime : Int8B
- +0x2078 EnumOnMountItemToDelete : struct _WORK_QUEUE_ITEM, 3 elements, 0x20 bytes
- +0x2098 VcbCloseItem : struct _WORK_QUEUE_ITEM, 3 elements, 0x20 bytes
- +0x20b8 AsyncCloseList : struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x20c8 AsyncCloseActive : UChar
- +0x20c9 ReduceDelayedClose : UChar
- +0x20cc AsyncCloseCount : Uint4B
- +0x20d0 DelayedCloseCount : Uint4B
- +0x20d8 DelayedCloseList : struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x20e8 CloseDataLock : struct _FAST_MUTEX, 5 elements, 0x38 bytes
- +0x2120 TelemetryData : struct _NTFS_VOLUME_TELEMETRY_DATA, 43 elements, 0x3d8 bytes
- ```
- File Control Block, `FCB`. Created for every opened file/directory.
- ```
- 0:000> dt -v _FCB
- ntfs!_FCB
- struct _FCB, 41 elements, 0x138 bytes
- +0x000 NodeTypeCode : Uint2B
- +0x002 NodeByteSize : Int2B
- +0x004 FcbState : Uint4B
- +0x008 FileReference : struct _MFT_SEGMENT_REFERENCE, 3 elements, 0x8 bytes
- +0x010 FcbState2 : Uint4B
- +0x014 CleanupCount : Uint4B
- +0x018 CloseCount : Uint4B
- +0x01c ReferenceCount : Uint4B
- +0x020 BaseExclusiveCount : Uint2B
- +0x022 SystemFileExId : Uint2B
- +0x022 EaModificationCount : Uint2B
- +0x028 LcbQueue : struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x038 ScbQueue : struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x048 ExclusiveFcbLinks : struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x058 Vcb : Ptr64 to struct _VCB, 292 elements, 0x24f8 bytes
- +0x060 NonpagedFcb : Ptr64 to struct _FCB_NONPAGED, 7 elements, 0x158 bytes
- +0x068 PagingIoResource : Ptr64 to struct _ERESOURCE, 17 elements, 0x68 bytes
- +0x070 Info : struct _DUPLICATED_INFORMATION, 10 elements, 0x38 bytes
- +0x0a8 InfoFlags : Uint4B
- +0x0ac LinkCount : Uint2B
- +0x0ae TotalLinks : Uint2B
- +0x0b0 CurrentLastAccess : Int8B
- +0x0b8 StreamFileCreationLock : struct _EX_PUSH_LOCK, 7 elements, 0x8 bytes
- +0x0c0 SharedSecurity : Ptr64 to struct _SHARED_SECURITY, 4 elements, 0x20 bytes
- +0x0c8 QuotaControl : Ptr64 to struct _QUOTA_CONTROL_BLOCK, 8 elements, 0x38 bytes
- +0x0d0 UpdateLsn : union _LARGE_INTEGER, 4 elements, 0x8 bytes
- +0x0d8 TxfMetaDataLsn : union _CLS_LSN, 2 elements, 0x8 bytes
- +0x0e0 TxfDirectoryLsn : union _CLS_LSN, 2 elements, 0x8 bytes
- +0x0e8 TxfUserDataLsn : union _CLS_LSN, 2 elements, 0x8 bytes
- +0x0f0 OwnerId : Uint4B
- +0x0f4 DelayedCloseCount : Uint4B
- +0x0f8 SecurityId : Uint4B
- +0x0fc NonTransModifyCleanupCount : Uint4B
- +0x100 Usn : Int8B
- +0x108 FcbUsnRecord : Ptr64 to struct _FCB_USN_RECORD, 9 elements, 0x110 bytes
- +0x110 FcbContext : Ptr64 to struct _FCB_CONTEXT, 1 elements, 0x1 bytes
- +0x118 TxfRmcb : Ptr64 to struct _TXF_RMCB, 35 elements, 0x2358 bytes
- +0x120 TxfFileId : Int8B
- +0x120 TxfSystemFileListNext : Ptr64 to struct _FCB, 41 elements, 0x138 bytes
- +0x128 TxfFcb : Ptr64 to struct _TXF_FCB, 21 elements, 0xa0 bytes
- +0x130 FileContextSupport : Ptr64 to Void
- ```
- Stream Control Block, `SCB`. Creted for every opened stream. Each FCB can have more than one SCB.
- ```
- 0:000> dt -v _SCB
- ntfs!_SCB
- struct _SCB, 38 elements, 0x2d0 bytes
- +0x000 Header : struct _FSRTL_ADVANCED_FCB_HEADER, 19 elements, 0x68 bytes
- +0x068 EofLock : struct _FSRTL_EOF_LOCK, 7 elements, 0x28 bytes
- +0x090 EofGeneration : Int4B
- +0x098 FcbLinks : struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x0a8 Fcb : Ptr64 to struct _FCB, 41 elements, 0x138 bytes
- +0x0b0 Vcb : Ptr64 to struct _VCB, 292 elements, 0x24f8 bytes
- +0x0b8 State : Uint4B
- +0x0bc NonCachedCleanupCount : Uint4B
- +0x0c0 CleanupCount : Uint4B
- +0x0c4 CloseCount : Uint4B
- +0x0c8 PurgeFailureModeEnableCount : Uint4B
- +0x0cc ReturnPurgeFailureEnableCount : Uint4B
- +0x0d0 CacheCoherencyHitCount : Uint4B
- +0x0d4 ShareAccess : struct _SHARE_ACCESS, 7 elements, 0x1c bytes
- +0x0f0 AttributeTypeCode : Uint4B
- +0x0f8 AttributeName : struct _UNICODE_STRING, 3 elements, 0x10 bytes
- +0x108 FileObject : Ptr64 to struct _FILE_OBJECT, 30 elements, 0xd8 bytes
- +0x110 NonpagedScb : Ptr64 to struct _SCB_NONPAGED, 10 elements, 0x48 bytes
- +0x120 McbStructs : union NTFS_MCB_INITIAL_STRUCTS, 2 elements, 0x60 bytes
- +0x180 Mcb : struct _NTFS_MCB, 6 elements, 0x30 bytes
- +0x1b0 DefragCount : Uint4B
- +0x1b4 CompressionUnit : Uint4B
- +0x1b8 SparseOverAllocateSize : Uint4B
- +0x1bc AttributeFlags : Uint2B
- +0x1be CompressionUnitShift : UChar
- +0x1bf PadUchar : UChar
- +0x1c0 ValidDataToDisk : Int8B
- +0x1c0 ValidDataInDax : Int8B
- +0x1c8 TotalAllocated : Int8B
- +0x1d0 CcbQueue : struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x1e0 ScbSnapshot : Ptr64 to struct _SCB_SNAPSHOT, 15 elements, 0x68 bytes
- +0x1e8 EncryptionContext : Ptr64 to Void
- +0x1f0 Persist : Uint4B
- +0x1f8 CreateSectionThread : Ptr64 to Void
- +0x200 TxfScb : Ptr64 to struct _TXF_SCB, 22 elements, 0xe8 bytes
- +0x208 EncryptionOnCloseContext : Ptr64 to Void
- +0x210 MarkHandleDisallowWritesCount : Uint4B
- +0x218 ScbType : union <unnamed-tag>, 3 elements, 0xb0 bytes
- ```
- Context Control Block, `CCB`. Created for every _FILE_OBJECT (basically one per handle, unless you dupe the handle).
- ```
- 0:000> dt -v _CCB
- ntfs!_CCB
- struct _CCB, 32 elements, 0xd0 bytes
- +0x000 NodeTypeCode : Uint2B
- +0x002 NodeByteSize : Int2B
- +0x004 Flags : Uint4B
- +0x008 Flags2 : Uint4B
- +0x010 FullFileName : struct _UNICODE_STRING, 3 elements, 0x10 bytes
- +0x020 LastFileNameOffset : Uint2B
- +0x022 EaModificationCount : Uint2B
- +0x024 NextEaOffset : Uint4B
- +0x028 ScbLinks : struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x038 LcbLinks : struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x048 Lcb : Ptr64 to struct _LCB, 27 elements, 0xe8 bytes
- +0x050 TxfFo : Ptr64 to struct _TXF_FO, 15 elements, 0x48 bytes
- +0x058 TypeOfOpen : UChar
- +0x059 Reserved : UChar
- +0x05a WriteExtendCount : Uint2B
- +0x05c OwnerId : Uint4B
- +0x060 LastOwnerId : Uint4B
- +0x064 UsnSourceInfo : Uint4B
- +0x068 AccessFlags : Uint2B
- +0x06a Alignment : Uint2B
- +0x070 FileObject : Ptr64 to struct _FILE_OBJECT, 30 elements, 0xd8 bytes
- +0x078 ReadCopyNumber : Uint4B
- +0x080 EncryptionOnCloseContext : Ptr64 to Void
- +0x088 IndexContext : Ptr64 to struct _INDEX_CONTEXT, 14 elements, 0x170 bytes
- +0x090 QueryLength : Uint4B
- +0x098 QueryBuffer : Ptr64 to Void
- +0x098 QueryLayoutContext : Ptr64 to struct _QUERY_FILE_LAYOUT_CCB_CONTEXT, 5 elements, 0x20 bytes
- +0x0a0 IndexEntryLength : Uint4B
- +0x0a8 IndexEntry : Ptr64 to struct _INDEX_ENTRY, 8 elements, 0x10 bytes
- +0x0b0 FcbToAcquire : union <unnamed-tag>, 2 elements, 0x8 bytes
- +0x0b8 MftScanFileReference : struct _MFT_SEGMENT_REFERENCE, 3 elements, 0x8 bytes
- +0x0c0 EnumQueue : struct _LIST_ENTRY, 2 elements, 0x10 bytes
- ```
- Links Control Block, `LCB`. A file may have multiple names (hardlinks), and LCB ties that together. Links LCBs, CCBs, SCBs, and FCB.
- ```
- 0:000> dt -v _LCB
- ntfs!_LCB
- struct _LCB, 27 elements, 0xe8 bytes
- +0x000 NodeTypeCode : Uint2B
- +0x002 NodeByteSize : Int2B
- +0x004 LcbState : Uint4B
- +0x008 ScbLinks : struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x018 Scb : Ptr64 to struct _SCB, 38 elements, 0x2d0 bytes
- +0x020 TxfNumWriters : Uint4B
- +0x028 Fcb : Ptr64 to struct _FCB, 41 elements, 0x138 bytes
- +0x030 FcbLinks : struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x040 IgnoreCaseLink : struct _NAME_LINK, 2 elements, 0x28 bytes
- +0x068 ExactCaseLink : struct _NAME_LINK, 2 elements, 0x28 bytes
- +0x090 CcbQueue : struct _LIST_ENTRY, 2 elements, 0x10 bytes
- +0x0a0 ParentDirectory : struct _MFT_SEGMENT_REFERENCE, 3 elements, 0x8 bytes
- +0x0a8 Info : struct _DUPLICATED_INFORMATION, 10 elements, 0x38 bytes
- +0x0e0 FileNameLength : UChar
- +0x0e1 Flags : UChar
- +0x0e2 FileName : [1] Wchar
- +0x0a0 OverlayParentDirectory : struct _MFT_SEGMENT_REFERENCE, 3 elements, 0x8 bytes
- +0x0a8 Alignment : struct _DUPLICATED_INFORMATION, 10 elements, 0x38 bytes
- +0x0a8 QuickIndex : struct _QUICK_INDEX, 4 elements, 0x18 bytes
- +0x0c0 ReferenceCount : Uint4B
- +0x0c4 InfoFlags : Uint4B
- +0x0c8 HashValue : Uint4B
- +0x0cc CleanupCount : Uint4B
- +0x0d0 FileNameAttr : Ptr64 to struct _FILE_NAME, 5 elements, 0x44 bytes
- +0x0e0 OverlayFileNameLength : UChar
- +0x0e1 OverlayFlags : UChar
- +0x0e2 OverlayFileName : [1] Wchar
- ```
- The regular and familiar `DEVICE_OBJECT`. In public symbols.
- ```
- 0: kd> dt -v nt!_DEVICE_OBJECT
- struct _DEVICE_OBJECT, 25 elements, 0x150 bytes
- +0x000 Type : Int2B
- +0x002 Size : Uint2B
- +0x004 ReferenceCount : Int4B
- +0x008 DriverObject : Ptr64 to struct _DRIVER_OBJECT, 15 elements, 0x150 bytes
- +0x010 NextDevice : Ptr64 to struct _DEVICE_OBJECT, 25 elements, 0x150 bytes
- +0x018 AttachedDevice : Ptr64 to struct _DEVICE_OBJECT, 25 elements, 0x150 bytes
- +0x020 CurrentIrp : Ptr64 to struct _IRP, 23 elements, 0xd0 bytes
- +0x028 Timer : Ptr64 to struct _IO_TIMER, 6 elements, 0x30 bytes
- +0x030 Flags : Uint4B
- +0x034 Characteristics : Uint4B
- +0x038 Vpb : Ptr64 to struct _VPB, 9 elements, 0x60 bytes
- +0x040 DeviceExtension : Ptr64 to Void <<<< points to VCB
- +0x048 DeviceType : Uint4B
- +0x04c StackSize : Char
- +0x050 Queue : union <anonymous-tag>, 2 elements, 0x48 bytes
- +0x098 AlignmentRequirement : Uint4B
- +0x0a0 DeviceQueue : struct _KDEVICE_QUEUE, 7 elements, 0x28 bytes
- +0x0c8 Dpc : struct _KDPC, 11 elements, 0x40 bytes
- +0x108 ActiveThreadCount : Uint4B
- +0x110 SecurityDescriptor : Ptr64 to Void
- +0x118 DeviceLock : struct _KEVENT, 1 elements, 0x18 bytes
- +0x130 SectorSize : Uint2B
- +0x132 Spare1 : Uint2B
- +0x138 DeviceObjectExtension : Ptr64 to struct _DEVOBJ_EXTENSION, 16 elements, 0x70 bytes
- +0x140 Reserved : Ptr64 to Void
- ```
- `DEVOBJ_EXTENSION`, pointed to by `DEVICE_OBJECT.DeviceObjectExtension`. Not to be confused with `DEVICE_OBJECT.DeviceExtension`. In public symbols.
- ```
- 0: kd> dt -v nt!_DEVOBJ_EXTENSION
- struct _DEVOBJ_EXTENSION, 16 elements, 0x70 bytes
- +0x000 Type : Int2B
- +0x002 Size : Uint2B
- +0x008 DeviceObject : Ptr64 to struct _DEVICE_OBJECT, 25 elements, 0x150 bytes
- +0x010 PowerFlags : Uint4B
- +0x018 Dope : Ptr64 to struct _DEVICE_OBJECT_POWER_EXTENSION, 14 elements, 0x60 bytes
- +0x020 ExtensionFlags : Uint4B
- +0x028 DeviceNode : Ptr64 to Void
- +0x030 AttachedTo : Ptr64 to struct _DEVICE_OBJECT, 25 elements, 0x150 bytes
- +0x038 StartIoCount : Int4B
- +0x03c StartIoKey : Int4B
- +0x040 StartIoFlags : Uint4B
- +0x048 Vpb : Ptr64 to struct _VPB, 9 elements, 0x60 bytes
- +0x050 DependencyNode : Ptr64 to Void
- +0x058 InterruptContext : Ptr64 to Void
- +0x060 InterruptCount : Int4B
- +0x068 VerifierContext : Ptr64 to Void
- ```
- Volume Parameter Block, `VPB`. In public symbols.
- ```
- 0: kd> dt -v nt!_VPB
- struct _VPB, 9 elements, 0x60 bytes
- +0x000 Type : Int2B
- +0x002 Size : Int2B
- +0x004 Flags : Uint2B
- +0x006 VolumeLabelLength : Uint2B
- +0x008 DeviceObject : Ptr64 to struct _DEVICE_OBJECT, 25 elements, 0x150 bytes
- +0x010 RealDevice : Ptr64 to struct _DEVICE_OBJECT, 25 elements, 0x150 bytes
- +0x018 SerialNumber : Uint4B
- +0x01c ReferenceCount : Uint4B
- +0x020 VolumeLabel : [32] Wchar
- ```
Advertisement
Add Comment
Please, Sign In to add comment