Prevent virus from launching from USB to your PC
I wrote small batch file that will prevent viruses from getting launched from your USB drive to your PC.
What it does is that it modifies the file attributes and then delete autorun.inf
How to use:
1. open Notepad application. (Go to start-> run then type notepad)
2. Copy paste these text:
attrib -r -a -s -h
dir
del autorun.inf
save it to clean.bat .
3. Save it inside your flash drive (USB drive)
From now on, instead of opening directly your USB drive, you need to use the command line first and launch the batch file from there.
So from now on you need to:
1. Insert your flash drive
2. Cancel all attempt by the OS to open you flash drive.
3. Go to command line (Go to start then run then type cmd). This should launch
a black window.
4. Find the drive letter that is assigned to your USB drive (say H:)
5. In the command line, type H: then hit enter. This will change the director to where your USB drive is located.
6. type clean or clean.bat. This should execute all the lines above and delete the autorun file.
You can also type dir and see if there are other files that looks suspicious. They are suspicious because you don't know how those file got there.
I know this looks complicated but this is safer than just opening the USB drive without checking.
Of course you can just go ahead and scan you USB drive with and anti-virus.:)
Tuesday, March 03, 2009
Subscribe to:
Post Comments (Atom)
0 comments