Disinfect virus infected pendrives using Linux
Saturday, February 20th, 2010Everytime you share your flash drive or portable hard disk with your Windows friends don’t you get a dozen of viruses & other malwares in return? Due to your friends folly of not keeping their antivirus softwares up-to-date you have to pay in the form of an infected windows environment. To counter this, I have developed almost a full proof solution. Now I no longer need to be paranoid when plugging shared pendrives or external hard disks.
When you receive the flash drive or portable hard disk from your friend, don’t plug it directly into Windows. If you have any Linux distro installed boot into it. If you don’t have one, then boot from a Live CD. Any distro will do as long as it boots into a live environment or at a shell. Once you boot into the distro, mount & open the pendrive or portable hard disk. Now list all files of the pendrive in a shell or in a graphical file manager like Nautilus.

You should now notice some files & folders with weird names. These are the viruses. Now simply delete them all. Also delete the ‘autorun.inf’ which when infected instructs the viruses to load as soon as the pendrive is plugged in. With such approach, I’m sure you won’t even need to scan the pendrive into your Windows environment with an antivirus(though I do not recommend doing so). Offcourse viruses embedded into compressed files(zip,rar etc) won’t go away & still can infect your windows environment. Same holds true for macro viruses hidden inside a word document. The logic behind this is very simple that Windows viruses can’t execute themselves under Linux. The above procedure will come to rescue when you don’t have an antivirus installed & should be used only as a precautionary measure. You should still install & keep an updated antivirus software if you use Microsoft Windows.







