Little tip if disabling/enabling Hosts File

I think I'm being optimistic in thinking this tip isn't already known by everyone and his uncle, but this is something I tried out of curiosity, it works, and it might be useful to some.

Thanks to JD's observations a while back, I now disable my Hosts File to check particular sites (eg hosting sites), before posting on the forum. There are some nasty ads on some of these places.

So I have a shortcut on my desktop straight to the Hosts File. Trouble was, every time I renamed it to disable it, it reverted to a "notepad" type file which was a flaming nuisance to change back to the "hosts" type.

I found that by making the file "read only" in the right click properties menu, I could rename it back and forth without it reverting to a "notepad" file.

Only a small thing, but it's saved me a lot of time.

...thinking this tip isn't already known by everyone and his uncle...

:lol: I know the feeling, Dennis. Every time I make a "momentous discovery", it turns out that everyone here knew it, there are 12 websites that describe it, and Doug Knox has a script for it.

Thanks for the tip. I'll use it. :)

I found that by making the file "read only" in the right click properties menu

That's one of the basic things you should do security wise (to set HOSTS file "read only").

It's true Dennis that just like Login says the "discovery" you make is something others always seemed to have used for years. :)

At the risk of everyone saying "I've been doing that for years" or even "why bother!" ...does anyone else start a scan running, and then press the start button and leave the menu up to prevent the screensaver coming on?

Hazel, if I used a screensaver (monitor switchoff), I'd do that, as I've never heard that one.

Reminds me, I use another little tip of yours posted on here a little while back, i.e. ocassionally switch off at the mains and shortly thereafter hold the pc on switch. Why? Here.

That's one of the basic things you should do security wise (to set HOSTS file "read only").

How will that affect SpyBot 1.5s procedure of updating the hosts file pretty often? I am only using the spybot hosts file, letting the app update it at will.

Thanks.

How will that affect SpyBot 1.5s procedure of updating the hosts file pretty often?

Not sure, but i think that the HOSTS file should not be then in "read only" mode, letting SpyBot's HOSTS update to write to it. I'm not using that feature, so i can't tell for sure.

That's one of the basic things you should do security wise (to set HOSTS file "read only").

The only thing though is read-only doesn't really protect it against a malicious attack which can remove the read-only attributes or replace the HOSTS file altogether with a malicious/hijacked one. Locking the HOSTS file, or at the very least having some anti-malware software monitor it is better, albeit not totally necessary in my opinion.

I personally have my HOSTS files (yes plural, I simply merge them with a batch file) stored on another hdd and when updating them I update them on that other hdd and then use a batch file installer to copy them to the proper location. That's I why I never worry about a HOSTS file hijack or even a false positive relating to the HOSTS file anymore.

---------

Spybot-S&D sets the HOSTS file to read-only anyways and always has to my knowledge so updating it won't be an issue at all.

The only thing though is read-only doesn't really protect it against a malicious attack which can remove the read-only attributes or replace the HOSTS file altogether with a malicious/hijacked one.

Yes that's true, but it's still at least an small layer of security...

Locking the HOSTS file

How can you lock the HOSTS file?

Yes that's true, but it's still at least an small layer of security...

How can you lock the HOSTS file?

I thought the program HostsMan (always resident) was able to do that. That is if I'm remembering correctly because I haven't used it for a very long time.

:lol: I know the feeling, Dennis. Every time I make a "momentous discovery", it turns out that everyone here knew it, there are 12 websites that describe it, and Doug Knox has a script for it.

Thanks for the tip. I'll use it. :)

If you're following this thread, it seems we're getting nearer and nearer your observation. :(

How can you lock the HOSTS file?

It appears that you can do it here as well.

20071123132833.jpg

If you have IE tweaks checked, it gives you the above option.

20071123132833.jpg

If you have IE tweaks checked, it gives you the above option.

It just puts the HOSTS file to "read only" mode, but it doesn't lock it anyway. That option can be easily undone.

Andavari: So is HostsMan actually able to lock it?

So is HostsMan actually able to lock it?

Dunno for sure as I didn't test it for long since it isn't my type of thing. I'm not sure if it's locking it when it stays resident, or if it's calling it locked meaning "read-only."

Of course read-only and locked are two different things.

Of course read-only and locked are two different things.

Yes, i know that and it's true. I don't think that the HOSTS file can be actually locked. Anyway, it's still recommened to set it to "read only" mode, as it gives at least some kind of protection.

It would be nice, if it could be possible to "gray out" the option after it's set to "read only". That way it wouldn't be so easy to undone it.

It just puts the HOSTS file to "read only" mode, but it doesn't lock it anyway. That option can be easily undone.

Andavari: So is HostsMan actually able to lock it?

Of course you're right CeeCee. What on earth had me thinking that "Lock Hosts File Read Only" meant that Spybot would lock the Hosts File to read only. :blink:

Trouble is, there's probably a lot of folk who think that this actually does what it says.

Temporarily installed HostsMan an hour ago, but can't find any way to lock the Hosts file. I may have missed something, but I don't think I did.

What on earth had me thinking that "Lock Hosts File Read Only" meant that Spybot would lock the Hosts File to read only.

That Spybot option is misleading, as it says "Lock".

I may have missed something, but I don't think I did.

I don't think so either. I think that HOSTS file simply cannot be really locked.

Hi Dennis

:) , I use (Bluetack's Hosts Manager) instead of using Spybot.

Read Only ? Writable

Button shows:

? Read Only: Your HOSTS file is Read Only. Click to make the file Writable.

? Writable: Your HOSTS file is Writable. Click to make the file Read Only. If you did forget to

mark your HOSTS file as Read Only before leaving the program, the Read Only attribute will

be set automatically. (recommended option to try to protect the file from non-authorized

changes)

It will switch to Writable automatically when you click the Save button or when an automated

save is done.

Disable ? Enable

Allows you to temporally disable the HOSTS file. Instead of marking several entries as disabled,

you can use this option to rename the HOSTS file. Don't forget to enable the HOSTS file again

when needed, this will not be done automatically when you close the program.

Hi craig, thanks for the info, although I don't actually use Spybot for doing stuff with the Hosts file.

I only realised it had the supposed "lock" function after Andavari mentioned Hosts File and Spybot in the same sentence, and then having a browse through Spybots various options.

I'll have a look at that application although I like the simplicity of using a desktop shortcut straight to the Hosts File itself, although the update feature is handy.

BlueTack Host Manager: