Click here to Skip to main content
15,886,026 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am investigating how to find out physical address from start offset to end offset.

For example:
1) There is a 70GB storage. (F:\)
2) There are four 17GB files. 17GB-1.bin, 17GB-2.bin, 17GB-3.bin, 17GB-4.bin
3) copy 17GB-1.bin, 17GB-2.bin, 17GB-3.bin and 17GB-4.bin to 70GB storage.

I found out sector address of file with IOCTL_VOLUME_LOGICAL_TO_PHYSICAL.

start offset is physicalOffsets.PhysicalOffset [0].Offset.
end offset is physicalOffsets.PhysicalOffset [0].Offset + filesize.


Any way to find a large file offset on start address and end offset?


Any help is highly appreciated.

What I have tried:

F:\17GB-1.bin start offset and end offset are correct.
F:\17GB-2.bin start offset and end offset are correct.
F:\17GB-3.bin start offset and end offset are correct.
F:\17GB-4.bin start offset is correct, but end offset is wrong.
Posted
Updated 7-Jun-22 16:24pm
v4
Comments
[no name] 7-Jun-22 19:31pm    
You can't take the start physical sector and add the file size to find the end physical sector. Although that might actually work if the file is stored contiguous. File physical sectors are typically scattered all around.

Also, the first sentence in your question is pure gibberish. You ask: "I am investigating how to find out physical address of MFT entry" and then you proceed to ask about the start/end physical sectors by using a manual calculation.
[no name] 8-Jun-22 0:55am    
Thanks for updating your question. I am still having trouble understanding what exactly you are trying to do. But I think you might be looking for FSCTL_GET_RETRIEVAL_POINTERS

https://docs.microsoft.com/en-us/windows-hardware/drivers/ifs/fsctl-get-retrieval-pointers
gsegria 8-Jun-22 11:08am    
I use FSCTL_GET_RETRIEVAL_POINTERS to get LCN to translation to physical offset, but I cannot get full raw data and offset from these api. Any way to parsing MFT to get raw data and data offset?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900