Using linux (Ubuntu) to remove viruses and spyware when all else has failed in Windows
FOLLOWING THESE INSTRUCTIONS CAN MAKE THINGS WORSE. ANY TIME YOU DEAL WITH VIRUSES, THERE IS A CHANCE YOU can lose IMPORTANT DATA. PLEASE BACKUP ANYTHING THAT IS IMPORTANT. THIS CAN BE DONE FROM UBUNTU.
Before we do anything...
Lets make sure you really need to do all this linux stuff. There are a variety of antivirus programs out there. In my experience, most do not do a good job of preventing an infection and don't find all the existing ones either. The two I use are "ESET NOD32 Antivirus" and "Malwarebytes Anti-Malware". If you don't have these installed, get them. ESET has a free 30-day trial and Malwarebytes has a free version. Both of these almost always prevent an infection and do a great job of finding and destroying an existing infection. It's worth the money to buy them. Also Avast antivirus works too, but I only use it in linux for bad Windows infections. Avast has a free "Home Version" too, which requires a quick and free registration to get the license. Try at least one of these before going through the trouble of the linux stuff below. Some bad viruses wont let you install any of these while it still exist, so the linux route might be the only route to "cure" your machine.
Note: the free Malwarebytes does not run in the background, while the
full version does. It must be running in the background to prevent
infections, but you can still scan your hard disk. ESET's free version does run in the background, but will expire after 30 days.
Linux is perfect for the job. Especially Ubuntu Linux. You can download a CD image from their site, burn it to disk, reboot and it just works. No need to install it on your hard disk or mess with the hard disk at all (other than when you remove the viruses). No need to install drivers. All your devices should work fine automatically. The Ubuntu CD runs from the system memory and when you reboot, it all disappears, like it was never there. Can't do that in Windows or OSX. If you don't know this already, linux will be the #1 operating system sometime in the near future. It's easier to use than the others and it's free (and no viruses!). If you really need to, you can put the image on a USB drive and boot from that. I have a ASUS Eee netbook, which has no CD drive. So I had to use the USB method.
The most important reason linux works great for removing viruses is that the viruses won't be running in linux. A really bad virus will prevent most antivirus programs from running or from doing its job in Windows. So the virus will remain hidden on your computer as long as Windows is running. When you start linux, the virus wont start, because it's only made for Windows and starts when Windows starts. Windows wont be running at all, just linux, so the virus wont be running either, which means we can use an antivirus program in linux to remove it from Windows.
If none of that makes sense, it's fine. As long as you can follow the instructions below, you'll be OK.
Getting Ubuntu Linux
Ubuntu linux is free. To get it, you can download it from their site or from bittorrent. I prefer the bittorrent method because it's faster, but you don't have to do that. Note: The current Ubuntu when I wrote this article is version 10.10.
Choose your download method below:
To get it from bittorrent:
- Go to your favorite torrent search site
- Search for "Ubuntu desktop"
- There will be several options. Choose the "Ubuntu Desktop 32-bit" version and make sure it's the CD, not the DVD. The CD should be about 700mb
- Start your bittorrent program and open the torrent you just downloaded.
- After you download the ISO file, burn it to a CD. If you need/want the USB option, you need to download the USB installer. The link for that is below.
- You should now have a CD or USB stick with a bootable Ubuntu on it
To get it from Ubuntu's site:
- Click the link above
- Follow the instructions (download it and create a CD or USB stick). If you choose CD, every time you shutdown Ubuntu, it will erase all settings and you will have to setup your wireless network and install the antivirus every time you start Ubuntu. If you choose USB Stick and then use the installer, you can have it save everything you do to the USB Stick and avoid redoing everything each time. You have to set a persistence option in the USB installer for it to save anything or it will be just like the CD. I would do the USB option if you plan on doing this a lot.
- You should have a CD or USB stick with a bootable Ubuntu now
Now you are ready to start Ubuntu
So you should have a CD or USB stick ready to go. You should be able to restart your computer and it will boot to Ubuntu automatically with the CD. If it doesn't or your using the USB stick, you may have to tell it to boot to it yourself. You can do this by setting your boot order in the system BIOS (have the USB stick in plugged in when you do this). Have the CD or USB start before your hard disk. If you don't know how to do that, Google it. Try "your computer model bios boot order how to" in Google. Of course, where it says "your computer model", you should type your model. Example "Dell dimension 8200 bios boot order how to" for a dell dimension 8200 computer.
OK, Ubuntu is loading
So it's loading. You will be asked if you want to test it or install it. Choose to Test it. You will see the desktop start to load. Ignore any messages about restricted drivers. We don't need that. You will need the internet. If you are using a wireless network, click the wireless signal bars on the top-right of the screen, to the right of the clock. The time might be wrong, but we don't care about that right now. Click your network from the list and type the password. It will ask you to type another password for the "Keyring Password". You can just click "OK" and then click "Use unsafe password". Now you got internet.
Installing antivirus and scanning
THIS WOULD BE A GOOD TIME TO BACKUP IMPORTANT FILES. YOU CAN BURN THEM TO CD/DVD OR COPY TO USB (NOT THE UBUNTU USB). DO THIS BEFORE RUNNING ANTIVIRUS PROGRAMS.
Finally we can get to business. Follow these steps:
- Open Firefox and go to www.avast.com
- Find Linux Home Edition. IF you can't find it, search for it in the search box at the top of the page
- Make sure you get DEB package and save it
- When it's done, find it and double click it
- A window will pop up, click "Install". It will install pretty quick. Close the window when it's done
- Click on the "Applications" button in the top-right corner and choose "Accessories" and then 'Avast"
- It will ask for a license number and there will be a button to click to get it. Click the Button.
- It will open Firefox and bring you to a registration page. It's free. Follow instructions. Make sure you choose "for home use", because it's not for institutional use
- Wait for the e-mail. It can take 15 minutes. Go outside and get some fresh air.
- When you get the e-mail, copy and paste the license number to Avast and start it. Save the e-mail! It's a pain in the butt to get one each time you install.
- Update the virus definitions
- Now your Windows hard disk is not mounted yet. You need to click on "Places" the top of the screen and click "xxxMB media", where xxxMB is the size of our drive. If you have more than one and don't know which has Windows, click them all. Close or minimize any windows that pop up when you do that.
- Now, in Avast, click "Selected folders" and then click the green "+" to the right. Click the "/" folder. Then click the "media" folder. Click "OK"
- Start the scan and wait. It will take a while, but it's worth it.
It's done scanning
Avast should have found at least one virus and you can remove it now. After that, you can close Avast and restart the computer. To restart, click the ubuntu logo in the top-right corner and choose restart. When Ubuntu is done shutting down, it will pop out the CD. If you're using the USB stick, take it out right when the computer restarts and beeps or it will start Ubuntu again. We want Windows to start this time. Ubuntu froze for me when it was supposed to restart. If that happens, it's cool (no pun intended). Just take the CD out or USB and hit the reset button.
It's not over yet. Avast doesn't always get everything and if you have one virus, you probably have many. We need to run Malwarebytes and ESET NOD32 once Windows is done loading. Scan with both and remove anything they find. You'll want to reboot again. You probably want to rescan again, just to be sure. Now you should be good. If not you can try it all over again or just toss the damn thing in a pool or from a tall building. Or better yet, install Ubuntu and get rid of Windows.
Note: You can also try ClamAV in Ubuntu if Avast failed you (www.clamav.net)
Links you might try:
- Scan a Windows PC for Viruses from a Ubuntu Live CD - How-To Geek
Same instructions I gave you, but with screen shots. Good reading
- Fix a Windows Virus with Ubuntu? - Ubuntu Forums
[ubuntu] Fix a Windows Virus with Ubuntu? Security Discussions
- How to Use Ubuntu to Fix Your Windows PC
This link has a list of Windows problems Ubuntu can fix and a short description of each.
- Ubuntu homepage
- ESET - Antivirus Software
Not as good as Avast, but it can only help if Avast doesn't