Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows.filescan reports all files to be of size 216 #1040

Open
kevthehermit opened this issue Nov 15, 2023 · 1 comment
Open

windows.filescan reports all files to be of size 216 #1040

kevthehermit opened this issue Nov 15, 2023 · 1 comment

Comments

@kevthehermit
Copy link
Contributor

Describe the bug
windows.filescan reports all files to be of size 216

Context
Volatility Version: 2.5.0
Operating System: Ubuntu 22.04
Python Version: 3.10.12
Suspected Operating System: Windows 10
Command: vol -f /mnt/d/Projects/dump.raw windows.filescan

To Reproduce
Run the plugin on any dump for windows 10

  1. Use command vol -f /mnt/d/Projects/dump.raw windows.filescan

Expected behavior
The correct Size is reported

Example output

Volatility 3 Framework 2.5.0

Offset	Name	Size

0x910b71893a20	\Windows\System32\svchost.exe	216
0x910b73217210	\$Secure:$SDS:$DATA	216
0x910b732174f0	\$Secure:$SII:$INDEX_ALLOCATION	216
0x910b732177d0	\Windows\System32\drivers\stornvme.sys	216
0x910b73217940	\$Mft::$BITMAP	216
0x910b73217ab0	\:$I30:$INDEX_ALLOCATION	216
0x910b732181e0	\$MftMirr	216
0x910b73218630	\$LogFile	216
0x910b73218a80	\$Mft	216
0x910b73218d60	\Windows\System32\DriverStore\FileRepository\basicdisplay.inf_amd64_fc93ae411c02f280\BasicDisplay.sys	216
0x910b73218ed0	\$BitMap	216
0x910b734020a0	\$Extend\$RmMetadata\$TxfLog:$I30:$INDEX_ALLOCATION	216
0x910b73402380	\Windows\System32\drivers\dumpfve.sys	216
0x910b73402660	\$Extend\$UsnJrnl:$J:$DATA	216
0x910b73402940	\Device\HarddiskVolume3\$Extend\$RmMetadata\$TxfLog\$TxfLog	216
0x910b73402ab0	\$Directory	216

Additional information
Dump files correctly saves and extracts the correct size of file object

@ikelos
Copy link
Member

ikelos commented Nov 15, 2023

So dumpfiles walks the pages that make up the contents of the stored file, whereas filescan just reads the Size member of the fileobject. This is a short and therefore will not be able to talk about files larger than 65535 bytes anyway. Looks like to get the accurate size we'll need to do the same thing as dumpfiles to walk the pages...

That'll be the code in either CONTROL_AREA or in SHARED_CACHE_MAP

Blech, looks like you go through the FileObject's SectionObjectPointer... Not fun. 5:S

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants