mkb2091 / blockconvert

Malware, advert and tracking blacklist
MIT License
119 stars 14 forks source link

Hosts file should not be used on Windows 10, will break Internet #87

Open jerkstorecaller opened 3 years ago

jerkstorecaller commented 3 years ago

Windows nearly chokes on hosts files of 1MB, and it seems this issue is exponential, because blockconvert's 50MB hosts file appears to break Windows perpetually.

If you put the 50MB hosts file in c:/windows/system32/drivers/etc/hosts, the DNS Client service will begin using 25% CPU perpetually. No DNS lookups will work. You can't even open the start menu to search for a program because apparently that relies on network lookups too.

A working fix if you opened this can of worms:

  1. open regedit, go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Dnscache, and change the value of the Start key from 2 to 4, then reboot. (Note: now a difference service will begin using 100% CPU, WinHTTP Proxy whatever, ignore it)
  2. Now the DNS Client shouldn't be running. Open a command prompt with admin rights, replace the hosts file (you kept a backup right?). Create an empty file if you have to.
  3. In regedit, change the Start value back to 2, and reboot. You should be back to normal.

What a joke of an OS.

mkb2091 commented 3 years ago

Really sorry you had to go through that. I've added a warning next to the download link.

Would booting into a different OS allow you to edit and repair the file without needing to enter safe mode?

jerkstorecaller commented 3 years ago

Possibly, I don't know.

The SecureBoot security feature makes it non-trivial to boot into a different OS. I failed to boot a Ubuntu from USB. To achieve this I had to disable Bitlocker (Windows' built in full-disk-encryption that is enabled by default these days, and which also integrates SecureBoot).

To disable Bitlocker (which btw I also had to do when I tried rebooting in Windows safe mode to remove the hosts file), you can't just go in UEFI and change asetting. After you do this, you will be asked to enter the decryption key, which is saved on Microsoft's website. So gotta go on a different computer, go to https://aka.ms/recoverykeyfaq, log in with MS account (not sure how people without a Microsoft account can do it), write down a huge decryption key, enter it on the target Windows computer.

ThisNekoGuy commented 4 months ago

Is opening as empty for me for some reason; is there a reason why?

ThisNekoGuy commented 4 months ago

@mkb2091 I was going to use this via AdAway on Android but I can't because it was emptied as part of a CSS commit?