17 Feb
Few days ago I found out about PenProtector which claims to protect all removable disks from additions of new files. PenProtector prevents the writing on pendrive of viruses, trojans, dialers and any other type of executable that would use the removable disk to replicate it self. PenProtector cost €3,90 and I bought a copy to see what it really does. From my observation, PenProtector creates a “block” file to fill up the remaining free space on the USB flash drive. When there is no space left on the removable drive, virus won’t be able to copy itself to to drive or infect any executable files.

Honestly, it is not worth buying PenProtector because there are a few FREE ways to write protect a USB flash drive by creating a fake dummy file to fill up the removable disks free space.
First, you have to know how much free space is left on the USB drive. Plug in the drive, go to My Computer, right click on the drive letter and select Properties. Take note of the “Free space” that is in bytes. My USB drive has 1,300,594,688 free space, so I will need to create a dummy file that has the exact file size.

The best and easiest way is to use fsutil, a command line tool included in Windows. Open up command prompt from Start Menu > Accessories and type the following command:
fsutil file createnew F:\IamDummy 1300594688

You will see that your USB flash drive’s LED is blinking meaning the file is being created. Now my pen drive has 0 free space and virus won’t be able to get in. You can change 1300594688 to the size that you want in bytes. F: is the letter of my USB flash drive and IamDummy is the file name. When you want to copy files into the USB removable drive, simply delete the dummy file. When you’re done, create the dummy file again using the fsutil command.

If you’re looking for a graphical tool to create dummy fake files, here are a few that I found. Some are slower, and some with NTFS restriction, so you might want to test it out to see which you prefer to use.
1. NOD32 Dummy File Creator

NOD32 Dummy File Creator Utility is meant to create dummy files in a specified folder to immunize a system against particular worms. Same concept as DiskHeal which creates autorun.inf file so the virus won’t have the chance to overwrite it. Supports setting file attributes (hidden, system, archive, read-only) to the dummy file on both NTFS and FAT drives.
2. DonationCoder’s Dummy File Creator (DFC)

This tool is able to create dummy files of any arbitrary size filled with a specify hex byte value.
3. Nikko Dummy File Creator

A simple program which creates files of any size with ease. This program also has a built-in random function, so users can choose to create either compressible or non-compressible files. Can create multiple fake files from batch list file.
Here is another example why you’d want to use these fake dummy file creators. To earn 1 point in RapidShare, we will need to upload a 5MB file for people to download. Let’s say you have a 3MB file and short of 2MB. Instead of searching for it on your hard drive or on the Internet, you can just create one yourself. You can also fool your friends by messing up their hard drive space, test drive transfer speed by moving dummy files, prevent data recovery by filling the free spaces and etc… I’m sure there are more.
Technorati Tags: dummy, file, fsutil, create, writeprotect
: Copying this article to your website is strictly NOT allowed. However, if you like this article, you can use the HTML code below to directly link to this article.
Looking for a USB Flash Drive with Read Only or Write Protect Switch Logon to Windows Using Your USB Flash Drive Magically Encrypt and Protect your Pendrive Data with USB Flash Security How To Check and Test USB Flash Drive Test and Detect Fake or Counterfeit USB Flash Drives Bought from eBay with H2testw How to Make Windows Autorun USB Flash Drives Test Read and Write Speed of USB Flash Drives with USBDeview
Have computer technical problems? Get FREE help from Raymond.CC FORUM
46 Responses for "Create Fake Dummy File on USB Flash Drive to Enable Write Protect and Prevent Modification"
Very Useful Tool
Thanks Raymond
Very helpful Raymond.
This is what I’ve been looking for.
Hi Raymond
Nice tool. Thanks anyway …..
I think this will check all the virus from infecting the pen drives, great article…tx.
What if any of those portable programs needs to write on the flash drive?
Excellent tips Ray! Extremely useful
hey its gud but i had a problm my pen driv doesnt hav a write protect switch but it shows always protected what to do restore it…
Great tool!!
Thanks
If there any virus yet that it can search for dummies files and delete them?
mksparse in another one .
Wouldnt this reduce the lifespan of the drive?
Also, i doubt it would be too hard to create a virus that deletes this, or other files, first.
nice idea! thnx raymond
It might be efective but i dont see this as option for me, i cant imagine myself deleting and making dummy files 3+ a day everyday
raymond, in case i want to move file into the pendrive , then i need to delete the dummy file. my question is, will the virus infects the pendrive at that time? thanks
Great tip mate, thanks!
What if the virus deletes files on the USB ?
Deleting or formatting is very easy.
Thanks Ray!
Nice. I like learning new dos commands and great tools too!!!
Raymond is funny
what about a virus that deletes usb files ?
lol
Sam Ahmed
Alexandria,Egypt.
Clearly some of you don’t know how does a virus infects a USB flash drive.
If the virus deletes the files in USB drives, it is a destructive one and doesn’t infect the drive.
But if the virus creates autorun.inf file in USB drives, it will try to do it silently without the user knowing it. It also doesn’t touch any of the files in the USB drives.
So who is funnier now?
thx ray…
but i have a question , if my usb pen is protected from writing and some of my portable tool need to extract some file to run properly !?
I assume that you wouldn’t be able to defragment that flash drive until removing the dummy file first?
@Raymond:
What about kitnis question: \”raymond, in case i want to move file into the pendrive , then i need to delete the dummy file. my question is, will the virus infects the pendrive at that time? thanks\”
Regards.
Utilizing Windows’ native fsutil tool for the purpose is a brilliant idea. I wonder why almost all of us haven’t thought about it. Thanks a lot, Raymond!
that’s rite..
it’s two different thing Sam Ahmad… =)
Every time we have to create & delete in USB which is Time consuming!
But nice app to fool some one!
great way , thanks for the tip!
thankssssssssss ray ………..
u r gr8 again,,,,,,,,,,,,,,,,,,,,
Good Info ,thanks Raymond
Very useful tool. Thanks for the share, Raymond
very good Idea.
Can fsutil automatically get remaining space from Flash disk and Is there any batch commands to run this computation?
thanks this new information of us and great article
Already got one software that do this automatically. just put it at ur usb it will automatically calculate free space and fill it with dummy.
this is very nice! i always thank you raymond!
great tips, never think it be4 ..
why not just use truecrypt it has a read-only option on mount
Thanks for the wonderful tips, this is what I am always looking for. thank you.
Great idea and very good tip for carrying secure data. But you may not run potable appilications from your USB.!! Free space is required to create temp files to run portable application from usb drive.
Special Thanx for your wonderful service.
I have been learning a lot from you.
Keep up the good work.
Regarding…..’Raymond February 17th, 2009 at 11:52 pm’ My concern is that an antivirus program will automatically delete my “Hack Tools” I use to retrieve information ( RockXP, is often flagged and deleted, there are others). Still your ‘dummy’ file is cleaver.
Cheers.
This is one of the best article that I ever seen!
I have a very strange request from client. I would be very thankfull if someone could help me out.
The scenario is: I have a server with some media file assigned to unique id’s and the server is conected to a series of USB flash drives port (20). Now, a user comes down & plugin his/her USB drive. Every USB drive has an .txt file, the .txt file names are nothing but the unique id’s which are already stored on server.
Once the user plugin he’s/her USB drive, the server should be able to read the .txt file name(unique id) and get all the media files from the server and copy it to USB flash drive. Once its done we shouls close the port.
Just to let you guys know, no monitor will be there and once we copy the files to USB it should intimate the User.
I know it sounds strange. Again any help / direction would be truly appreciated.
Thanks
Sagar
Good tip. It is flawed, however, for large capacity drives (8GB or larger) with more than 4GB of free space. The reason? The FAT32 filesystem only supports files up to a few bytes less than 4GB. So if you have a 32GB flash drive with 20GB free, you would need to create multiple dummy files. Just a little annoying, but still entirely feasable.
Good idea, I have the same conern regarding malware, but on top of that I know some AV products consider some of my portable security applications to be a risk and delete them. Unfortunately this doesn’t solve the delete issue
Use ansav anti virus , these USB virus are comming from asia so this ansav is created by asian and will recognize and solve all of yous usb misery
After reading this Article. I have this idea to create a good Trick in Vbscript.
‘—————-DummyFileCreator.vbs—————
‘Made by Hackoo
‘web site http://hackoo.ifrance.com
Dim WshShell,FSO,Drv,Dtype,Dfree,DfreeMB,Dtot
Dim Dname,Dpct,Dused,Dserial,Dinfo
Set WshShell=WScript.CreateObject(”WScript.Shell”)
Set FSO=CreateObject(”Scripting.FileSystemObject”)
For each Drv in FSO.Drives
If Drv.DriveType=0 Then Dtype=”Unknown ”
If Drv.DriveType=1 Then Dtype=”Removable”
If Drv.DriveType=2 Then Dtype=”Fixed ”
If Drv.DriveType=3 Then Dtype=”Network ”
If Drv.DriveType=4 Then Dtype=”CD-ROM ”
If Drv.DriveType=5 Then Dtype=”RAM Disk ”
If Drv.IsReady Then
If Drv.DriveType=1 Then
Dfree=Drv.FreeSpace
DfreeMB=FormatNumber(Drv.FreeSpace/(1024^2),0)&” MB”
Label=Drv.DriveLetter
end if
end if
Next
MsgBox “Espace Libre dans Le Flash Disk “&Label&”:\”&” est Environ de ” &DfreeMB,64,”Espace Libre”
WshShell.run “cmd /c fsutil file createnew “&Label&”:\IamDummy ” &Dfree&”",0,True
WshShell.Run “cmd /C attrib +h +s “&Label&”:\IamDummy”,0,TRUE
‘——————————————————-
And This Code is used to delete The Fake Dummy File and so let you write into your pendrive.
‘—————-NoDummyFile.vbs—————-
‘Made by Hackoo
‘web site http://hackoo.ifrance.com
Dim WshShell,FSO,Drv,Dtype,Dfree,DfreeMB,Dtot
Dim Dname,Dpct,Dused,Dserial,Dinfo,filespec
Set WshShell=WScript.CreateObject(”WScript.Shell”)
Set FSO=CreateObject(”Scripting.FileSystemObject”)
filespec=”IamDummy”
For each Drv in FSO.Drives
If Drv.DriveType=0 Then Dtype=”Unknown ”
If Drv.DriveType=1 Then Dtype=”Removable”
If Drv.DriveType=2 Then Dtype=”Fixed ”
If Drv.DriveType=3 Then Dtype=”Network ”
If Drv.DriveType=4 Then Dtype=”CD-ROM ”
If Drv.DriveType=5 Then Dtype=”RAM Disk ”
If Drv.IsReady Then
If Drv.DriveType=1 Then
Dfree=Drv.FreeSpace
DfreeMB=FormatNumber(Drv.FreeSpace/(1024^2),0)&” MB”
Label=Drv.DriveLetter
end if
end if
Next
If (fso.FileExists(Label&”:\IamDummy”)) Then
Set MyFile = fso.GetFile(Label&”:\IamDummy”)
MyFile.Delete
End If
MsgBox “Espace Libre dans Le Flash Disk “&Label&”:\”&” est Environ de ” &DfreeMB,64,”Espace Libre”
Leave a reply