Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Fake file size


ghost's Avatar
0 0

I was wondering that if there was some way to change or fake the size of a file in windows Xp without changing its content(compressing/zipping/deleting-adding lol),like when you get into the properties of the file/folder you'll see that its about 5Gb where the original file is just a txt. or the opposite,like a huge file that is about 300mbs appearing like 1mb in the properties…without the use of external softwares


Uber0n's Avatar
Member
0 0

If you use certain software you can change file creation date and last modified date etc, but I don't know how to change the file size without actuallt changing the file… :whoa:


mido's Avatar
Member
0 0

I actually don't know, but maybe changing file headers, etc…

Or adding many hidden HEX values.


Uber0n's Avatar
Member
0 0

mido wrote: Or adding many hidden HEX values.

But those are included in the filesize… Perhaps you could add an EOF of some kind? Or maybe that just cuts the rest of the file :p


ghost's Avatar
0 0

… and how's that possible ?


jaggedlancer's Avatar
The Localhost Hacker
20 0

I actually read up on this a while back and read something to do with making a sparse file i cant remember the rest though and im not even sure if it works but meh ;)


ghost's Avatar
0 0

yeah i was reading couple of days ago about parsing,but i didnt get its concept.anybody knows what is parsing and how it might be used ?


What_A_Legend's Avatar
...Legend?
0 0

It can be done and it's done by using sprase as stated above, but this will only work with NTFS, not sure how its done but google is the best place to start as ever.


ghost's Avatar
0 0

Cant the parsing be done without external softwares ? oh and i tried GooGle about parsing … and i still dont get what is parsing.help please ?


What_A_Legend's Avatar
...Legend?
0 0

You can do it with some code, this code how ever is not mine and I have not tested it.

The following piece of code generates a test.txt file of 15,9 TB (NOTE: NTFS only, disclaimer: never tested on non NTFS systems!).

{
HANDLE h = CreateFile("Test.txt", GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL);

DWORD dw;
DeviceIoControl(h, FSCTL_SET_SPARSE, NULL, 0, NULL, 0, &dw, NULL);

LONG lDist = 4095;
SetFilePointer(h, 0, &lDist, FILE_BEGIN);
SetEndOfFile(h);

CloseHandle(h);

return 0;
}```

this is curtosy of this thread http://www.codeguru.com/forum/archive/index.php/t-324134.html

ghost's Avatar
0 0

i was just looking at that thread 1 hour ago.i wasn't interested cause im not in C.Any vb codes ?


ghost's Avatar
0 0

Just a thought, If the application had space set aside to store data, could you cut that out and tac-on the stored saved/input data as you go? You would have to know where it is stored. And that sounds like it might be a job for an assembly language.

edit: this wouldn't be a virus by any chance would it? You might be able to have it copy its self into RAM when the file is checked, so it doesn't read as hard drive space.