Live data from Hacker News

Block Adware and Malware with /etc/hosts

github.com

31–40 of 79 posts

Re: Block Adware and Malware with /etc/hosts

#31
post #20
post #12

Earlier quoted context omitted.

pi-hole also makes it super easy to block .zip and .mov TLDs.

Don't forget .com which is executable extension.

To be fair all extensions are potentially executable. Extensions are just a mapping to an application maintained by the OS. .com is just mapped to a program that executes by default. File type is a whole different ball of yarn to untangle.

Re: Block Adware and Malware with /etc/hosts

#34
I use Brave (not so much for the built-in ad block, but mostly because it's not actually Chrome) and I've noticed that more and more sites have ad-block detection that appears to work by sending a unique token to their ad server and then not loading content until after the token has been verified to have been received. I imagine there are ways around this on a per-site basis, it's generally easier to just give in and disable the ad blocker.

Re: Block Adware and Malware with /etc/hosts

#35

I use Brave (not so much for the built-in ad block, but mostly because it's not actually Chrome) and I've noticed that more and more sites have ad-block detection that appears to work by sending a unique token to their ad server and then not loading content until after the token has been verified to have been received. I imagine there are ways around this on a per-site basis, it's generally easier to just give in and…

NoScript usually bypasses this behavior. Especially when the content is delivered but hidden with JS DOM manipulation.

Re: Block Adware and Malware with /etc/hosts

#36
post #32

Much better to do so at router level via pihole or Adguard Home. That way it catches the calling home from all the various electronics too

Yes. pihole coupled with a router that can intercept outbound traffic on port 53 and force it to the pihole is how my home network is configured. That way it catches all those sneaky devices that have hard coded dns servers.

Re: Block Adware and Malware with /etc/hosts

#37

Reminds me of SlashDot where there was a relatively well known submitter that was a huge proponent of host-based ad blocking on Windows and was also a proponent of getting very angry at almost anyone else. (Edit: typo)

heh I made the mistake of engaging with that once. oh boy.... They could not wrap their head around the idea that the hosts method is limited in some use cases. This could not be blocked without blocking the main host too. https://example.com/adverts-folder/advert.jpg Now it sort of works in practice as most of the advert networks do not host on the same domain. It is good at catching out whole bad domains but partia…

I'm half expecting a torrent of abuse in reply to you now from whoever that was

Re: Block Adware and Malware with /etc/hosts

#38

Earlier quoted context omitted.

heh I made the mistake of engaging with that once. oh boy.... They could not wrap their head around the idea that the hosts method is limited in some use cases. This could not be blocked without blocking the main host too. https://example.com/adverts-folder/advert.jpg Now it sort of works in practice as most of the advert networks do not host on the same domain. It is good at catching out whole bad domains but partia…

I'm half expecting a torrent of abuse in reply to you now from whoever that was

oh no...

Re: Block Adware and Malware with /etc/hosts

#39
post #24
post #20

Earlier quoted context omitted.

Don't forget .com which is executable extension.

I'm not worried about the non-techies being tricked into thinking .com is an executable, I doubt they even know its possible. They almost certainly know about .zips

I still don't understand the threat model here. Is there an example of how this could be used as part of an attack?

Re: Block Adware and Malware with /etc/hosts

#40
post #27
post #18

Earlier quoted context omitted.

Someone explicitly called out and removed the Useless Use of cat but yet left the Useless Uses of grep, sort, and uniq in, I see. (-: * https://porkmail.org/era/unix/award#grep awk '!/#/ { seen[$1]++; } END { for (k in seen) { print seen[k],k; } }' steves_hosts

I love awk as much as the next person and I've written some pretty large scripts with it, but the original grep/sort/uniq is a lot easier to understand in two seconds. I don't think it's "useless" at all. Also your awk isn't exactly identical as it's not sorted, but in this case that probably doesn't matter.

Same, I think I use grep | sort | uniq almost on the daily.
Post reply on HN