/ / The HOSTS file in the C: WindowsSystem32driversetc folder is corrupted: what to do?

The HOSTS file in the C: WindowsSystem32driversetc folder is corrupted: what should I do?

Today, quite often users of socialnetworks like VKontakte or Odnoklassniki are faced with the problem of logging in The system controls this by means of the HOSTS file, which is located in the C: WindowsSystem32driversetc tree. Unfortunately, it is this service that is most often affected by viruses. Let's try to figure out how to fix the situation.

What files are in the C: WindowsSystem32driversetc directory, and what are they responsible for?

To begin, pay attention to the files that arein this folder. In addition to the desired file, there should be only four more objects here. If there is something else, you can safely say that this is a virus or something like that.

c windows system32 drivers etc

Regarding file functions, for example, the C object:WindowsSystem32driversetcservices and other files, including HOSTS, protocol, lmhosts and networks, are responsible for some user access to certain resources on the Web.

The HOSTS file in question determinesDomain name database mapping to IP addresses. In addition, its use involves speeding up user access to the most frequently visited pages on the Internet bypassing DNS servers, as well as blocking some unwanted resources or banner links. By default, in addition to the descriptive text part, it contains one single record of interest at the end of the text, namely: 127.0.0.1 localhost. Everything! No more additional entries in it should not be.

Check IP-addresses of sites

If we talk about the example of the domainname of the real IP-address of the resource, you can check it in a completely elementary way, using the standard input of the ping command on the command line, after which the URL of the checked resource is indicated with a space.

c windows system32 drivers etc hosts virus

To get the IP of any resource, you mustuse the following combination: ping www. (site name). (domain ownership). For example, for Facebook it will look like ping www.facebook.com. After the command is executed, the desired address and statistics of the so-called ping will be displayed on the screen.

What to do if the file is infected with a virus?

К сожалению, именно файл C:WindowsSystem32driversetcHOSTS viruses infect most often. After that, when a user logs on to the same social network, either he is redirected to the clone site, or a message is issued asking him to pay for the entrance. We will immediately make a reservation: not a single “social sphere” takes money for using the services of a resource. Hence the conclusion: this is a virus (sometimes artificial blocking, which is extremely rare).

c windows system32 drivers etc hosts

If such a trouble has happened, you should startcheck your computer system with an antivirus scanner. In some cases, you should not even use an antivirus installed in the system, since it has already missed the threat, and there is no guarantee that it will detect and remove it as a result of an on-demand scan.

c windows system32 drivers etc hosts cannot be written to

It is better to run some portable utilities.like Dr. Web (best of all Cure IT!) Or KVRT, which does not even require installation. But even such powerful products do not always help, and blocking access to resources, written in the C: WindowsSystem32driversetcHOSTS file, remains and continues to work. Let's see how you can get rid of it.

Manually correct file text

Для начала заходим в саму директорию C:WindowsSystem32driversetc, then select our file and right-click on the menu with the command “Open with ...” (initially the system file itself will not open with a double click, since it has no extension). Now, from the list of available programs, select the standard Notepad and look at the contents of the text.

As a rule, in the infected file canthere are records like 127.0.0.1, after which the addresses of resources of the same “social networks” are indicated (for example, 127.0.0.1 odnoklassniki.ru). This is the first sign that they are produced due to the triggering of malicious code. It turns out that the control elements of the system, referring to the HOSTS file, constantly block the site when trying to access it.

The easiest fix method is to removethe entire content upon further insertion of the original text (it can be taken from another computer or found on the Internet). After that, you just need to save the changes (Ctrl + S) and reload the computer terminal. You can, of course, try to replace the desired file with the original one, but it is unlikely that the system will allow it to be done even with administrative rights. In addition, this option works in about 20-30% of cases.

Issues with hidden HOSTS file and lmhosts.sam object

The problem can often be more serious. The fact is that sometimes when entering the C: WindowsSystem32driversetc directory, the HOSTS file we need is visually missing.

c windows system32 drivers etc services

First, in the "Explorer" should use the menuservice, then select the parameters of the folders where the option to show hidden objects (files and folders) is enabled. In addition, you need to remove the "birdies" from the lines of hiding protected system files and extensions for registered types. Now our file is visible.

However, the real problems begin here.The fact is that when you try to edit or save, the system displays a message stating that the C: WindowsSystem32driversetHOSTS file is not writable. What to do in this case?

Apply drastic measures - delete the HOSTS file,preferably from the Recycle Bin. Quickly remove it, bypassing the "basket", you can combination Shift + Del. Then we right-click on the free space of the window and select the command to create a new text file and call it hosts or HOSTS without an extension, as you wish, it does not matter. We agree with the warning of the system regarding the change of the extension and proceed to editing. As is already clear, the actions further are similar to the previous option - simply insert the original content and save the newly created document. After that, we delete the lmhosts.sam file (namely, it affects the performance of the required host file), and then again we reboot the system.

This option will restore access to your favorite sites that were previously blocked. By the way, this method almost always works.

Instead of an afterword

As can be seen from the above, fix the problem withblocking Internet resources can be quite simple, even without having for this, any special knowledge and skills. However, before proceeding to editing the system object HOSTS, you should make sure that the standard scan of the antivirus software did not give anything. Some users try to use utilities like Microsoft Fix It. Please note that if there is a virus in the system, the files will be infected again, and the corrections will be made just for a while.