Prevent Autorun.inf Virus from running in your Computer

Autorun.inf is mostly used by hackers to run and spread malicious software or malwares and viruses in computers. Most people especially those who are not so familiar with this type of file are victimized.

In my own experience when I was surfing the net in an Internet Cafe and plugged in my USB Drive to the PC I was using. I was there to do some research and surfing other stuffs without any problem. Later on when I went home and plugged in my USB Drive into my PC I've noticed that all folder's and documents on my USB were all gone but found out that those was just hidden.

And when I was able to retrieve back all files and documents I've noticed this "Autorun.inf" folder in my USB. I tried to delete the folder but failed because it's having a read-only attribute.

So here's what I did:
1.) Open "Run", type in "cmd". To open the command prompt window.
2.) In the Command Prompt window, type in the Drive letter of the USB removable drive followed with colon e.g. ( E: ). You can check the drive letter in "My Computer".
3.) Type in attrib -r -h -s "Autorun.inf", to clear all attributes of the "Autorun.inf" file.
4.) Type in erase Autorun.inf, to completely delete the file.

And that doesn't end there. To prevent hackers or other malwares putting this file into your machine we need to create a replica of the autorun.inf file.
To do this, we need to create a folder also named autorun.inf and set read-only and hidden attribute and make sure and remember not to delete this folder by yourself. Otherwise, your USB drive might get infected by the autorun.inf virus again.

1.) In the command prompt window, type in md autorun.inf to create the directory or folder.
2.) Type in attrib +r +h +s autorun.inf /s /d , to set a read-only, hidden and system attribute of  the folder.

You can also do this on your local hard drives.

The purpose of doing this is that windows won't allow having a file with the same file name in one directory. So if malware's tries to put the autrorun.inf on your USB or hard drives, it will not be created because we already have the folder also named as autorun.inf.

Comments

Popular posts from this blog

How to Create a Configuration.INI Files in VB6

How to Make Windows Form Transparent using Visual Basic 6/VB6

How to Set Windows Form Always on Top of Other Applications in VB6