Live data from Hacker News

Block Adware and Malware with /etc/hosts

github.com

11–20 of 79 posts

Re: Block Adware and Malware with /etc/hosts

#12

This is the default list used by the pihole project as well; it's a very good list. FWIW, something like ublock origin is going to be better for in-browser blocking (for example, DNS poisoning won't work with youtube ads, which are served from youtube.com, but addins like UBO can remove them because they can hook into the actual traffic). The ultimate adblocking solution is to use UBO in your browsers AND spin up a p…

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

Re: Block Adware and Malware with /etc/hosts

#13
post #7

To ensure there are no nefarious redirects in such a massive list, this one-liner comes in handy[1]: grep -v '#' steves_hosts | awk '{print $1}'| sort | uniq -c [1] https://news.ycombinator.com/item?id=11456562

What is a nefarious redirect? Does it look for entries without 127.0.0.1?

Re: Block Adware and Malware with /etc/hosts

#14

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)

That’s the most believable thing I’ve read on the Internet for ages.

Slashdot has a, shall we say _engaged_, community.

Re: Block Adware and Malware with /etc/hosts

#15
post #13
post #7

To ensure there are no nefarious redirects in such a massive list, this one-liner comes in handy[1]: grep -v '#' steves_hosts | awk '{print $1}'| sort | uniq -c [1] https://news.ycombinator.com/item?id=11456562

What is a nefarious redirect? Does it look for entries without 127.0.0.1?

A redirect to some unexpected IP address. Here's what the output looks like:

    190625 0.0.0.0
      3 127.0.0.1
      1 255.255.255.255
      3 ::1
      1 fe80::1%lo0
      2 ff00::0
      1 ff02::1
      1 ff02::2
      1 ff02::3

Re: Block Adware and Malware with /etc/hosts

#16
post #13
post #7

To ensure there are no nefarious redirects in such a massive list, this one-liner comes in handy[1]: grep -v '#' steves_hosts | awk '{print $1}'| sort | uniq -c [1] https://news.ycombinator.com/item?id=11456562

What is a nefarious redirect? Does it look for entries without 127.0.0.1?

There's a concern that a malicious list could point domain names to a malicious IP address. I don't think its a big concern with https:// since the cert will be invalid, but it's still a concern.

Re: Block Adware and Malware with /etc/hosts

#17
The only problem with this is that on interface up/down it can take a few minutes for the network to be available. This may not be an issue with a server or idle desktop but may be confusing for non tech people or laptop users.

If you can manage it, a pihole/pivpn instance may be better. Both of those can be installed on any debian distro easily.

Re: Block Adware and Malware with /etc/hosts

#18
post #7

To ensure there are no nefarious redirects in such a massive list, this one-liner comes in handy[1]: grep -v '#' steves_hosts | awk '{print $1}'| sort | uniq -c [1] https://news.ycombinator.com/item?id=11456562

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

Re: Block Adware and Malware with /etc/hosts

#20
post #12

This is the default list used by the pihole project as well; it's a very good list. FWIW, something like ublock origin is going to be better for in-browser blocking (for example, DNS poisoning won't work with youtube ads, which are served from youtube.com, but addins like UBO can remove them because they can hook into the actual traffic). The ultimate adblocking solution is to use UBO in your browsers AND spin up a p…

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

Don't forget .com which is executable extension.
Post reply on HN