Quote Originally Posted by l0calh0st View Post
Even better, if the hosts file gets injected by a virus it won't affect long term because everytime you enable/disable/update/restart Defendos takes a fresh copy of the hosts file and patches again.
Just be aware that if a virus depends on the hosts file the do its thing it'll most likely prevent anything else from writing to it. Especially if it took refuge in the kernel which will be the case for most viruses/trojans.

Anyway, good luck with it. One suggestion I'd give you is to make the app send the hosts file to your server so you can scan it there and perhaps detect if something is preventing your app from writing to it or scanning for known phishing IP's etc. Second suggestion, make categories for blockable hosts. That way, like buddah suggested, users can choose to block specific ad sites or even things like DRM-related domains for not-so-legally-obtained-games.