News for hackers. Stuff that matters.
Re:Mmm, Pi-hole by galadran on Wednesday September 26, 2018 @08:49AM (#18075374)
> Do you use a popular browser extension? How confident are you that the creator wouldn’t accept a $10k offer to hand it over only to have it then go rogue on you?

What makes the Pi-Hole organization any more trustworthy? (and the software stack it all depends on)

Personally, I'm inclined to trust them both and hope that the long arm of the GDPR will be effective. Optimistic, I know.

Re:Mmm, Pi-hole by msmith on Wednesday September 26, 2018 @09:01AM (#18075464)
Since Pi-Hole is a DNS server running on a separate machine, it just doesn’t have the same level of access as browser extension would. Even if it was rogue, the worst it could do is share the list of domains that you visit, and possibly hijack your HTTP (but not HTTPS) sessions.
Re:Mmm, Pi-hole by galadran on Wednesday September 26, 2018 @09:09AM (#18075517)
You, and the other commentator, are forgetting that the DNS Server handles all connections, not just those from your browser. Are you confident all the self updating software you use has no vulnerabilities? How about the video games that you play?

Even assuming the use of HTTPS, there are other threats. For example, PiHole redirecting you to a MiTM, who simply observes your connection and can learn sensitive information from the timing and length of your sessions.

I am not arguing browser extensions have strictly less access, just that both PiHole and your extensions have a fairly catastrophic level of access...

Re:Mmm, Pi-hole by lvh on Wednesday September 26, 2018 @10:27AM (#18076252)
You don't have to be confident has "no vulnerabilities" (an absurd standard) to understand that the worst possible vuln in the DNS server (say CSRFable RCE in dnsmasq) still puts an attacker in a less privileged position than what they get if they control uBlock Origin: UXSS. Now that browsers are serious about mixed content, DNS poisoning just isn't as interesting as it used to be.

Also, odds are a lot of you are running dnsmasq on home routers already without knowing it, and those are worse from several perspectives, including patching (consider CVE-2017-14491), overall appsec vulns (CSRFable RCE: a thing in home routers!), and exploitability of network position (e.g. HTTPS stripping on any non-HSTS website).

Re:Mmm, Pi-hole by galadran on Wednesday September 26, 2018 @11:57AM (#18077241)
I absolutely agree with you about users already running dnsmasq, but the context here is a malicious developer abusing their position. The actual quality of the software is orthogonal.

I still think you are understating the risk of a malicious DNS server. As you note, many users will have unpatched IOT or network facing devices (e.g. cameras, baby monitors or other smart gadgets). With DNS spoofing they all become vulnerable to a remote attacker...

Maybe we can agree if we consider different types of users? Technically skilled users are likely to stick to secure hardware and have an awareness of their general software vulnerability. They choose their passwords carefully and are concerned about compromise. Less saavy users are more likely to own insecure devices, use the same password everywhere and be less concerned by account compromise.

High skill users have more to fear from a Web Extension, its impact is undetectable and can siphon passwords. Low skill users have more to fear from a malicious DNS server, they won't notice the lack of HTTPS on none-HSTS sites and their hardware will get compromised remotely.

Re:Mmm, Pi-hole by lvh on Wednesday September 26, 2018 @12:54PM (#18077870)
I did not say "a compromised DNS server is completely inconsequential", I said that a compromised WebExtension with :/// and tabs permissions has UXSS (obviously true) and UXSS is worse than compromising DNS resolution.

Which one of these is worse:

a) I might be able to convince a bad IOT device to connect to an IP I control which may or may not let me do something interesting,

-- or --

b) I can just use your session cookie for GMail and reset all of your passwords for your IOT services and also everything else? And since I get UXSS, I can scan your internal network and get XSS on that IP/origin too. Or, I dunno: try to use UXSS to log in to your home router and change the DNS server to a machine I control?

The crux of your argument seems to be "it is more valuable to be able to point an IOT device at the wrong IP than it is to get UXSS on a machine on that network". That seems obviously wrong to me for any user, technical or not. If anything, it's worse for non-technical users, because they by-and-large don't have 2FA, making e-mail compromise far worse.

I only use the quality of the software in one sense: to bound how bad DNS resolution could possibly be. dnsmasq has had more than one of those style of game-over vulns. A malicious WebExtension or DNS server is indistinguishable from one with a bad enough vuln.

Re:Mmm, Pi-hole by galadran on Wednesday September 26, 2018 @01:29PM (#18078261)
> The crux of your argument seems to be "it is more valuable to be able to point an IOT device at the wrong IP than it is to get UXSS on a machine on that network". That seems obviously wrong to me for any user, technical or not.

If PiHole is malicious, there is already an attacker on your network, DNS Spoofing is just one example of the possible consequences. The PiHole can also port scan, connect to services etc. I don't think mounting an effective phishing attack on a user would be very hard.

My point is that both scenarios are catastrophic, and its hard to justify choosing one over the other on the grounds "the developer might be malicious". Telling people "don't worry a DNS server can't do much" is massively understating the problem, considering all the local network devices directly exposed to the PiHole device and the fact it is the DNS server.

As I said, I use both and cross my fingers that Mozilla / Open Source code review / the GDPR mitigates the risk of a bad developer

Re:Mmm, Pi-hole by lvh on Wednesday September 26, 2018 @02:00PM (#18078581)
OK, so there's an attacker on the network in both cases (UXSS and the worst-case-dnsmasq-vuln). So, to compare the two, you look at what else you can do -- and UXSS clearly wins there. "It wouldn't be hard to mount a phishing attack" -- maybe? Except on the most valuable phishing domains, which already have HSTS -- and the UXSS alternative is that I literally control your browser which is clearly worse since I have almost definitionally attained the goal of the phishing attack! And if I really want to just steal your password instead of just using your session, I'm guessing "full control of the DOM everywhere" will help with that.

I have also already argued that an extension does not need to be malicious -- just buggy -- to get UXSS.

Re:Mmm, Pi-hole by acoard on Thursday September 27, 2018 @01:37PM (#18086803)
>If PiHole is malicious, there is already an attacker on your network

In contrast, UXSS provides an attacker on your network that already has access to everything inside your browser. That's banking, email, keylogging credit card numbers, etc. That's the end game right there.

A malicious rPi on your network is quite a few steps away from there, you'd still have to phish and deal with HTTPS/browser security and unlike UXSS that only gets you one set of credentials.

Re:Mmm, Pi-hole by ryandrake on Wednesday September 26, 2018 @09:49AM (#18075875)
This should just be dnsmasq, for which source code is readily available and inspectable. You can (and should) compile it yourself if you don’t trust someone else’s binary.

You can also inspect the block lists to ensure they all go to 0.0.0.0 if you’re worried about mitm attacks.

Re:Mmm, Pi-hole by gruez on Wednesday September 26, 2018 @09:58AM (#18075959)
you could do the same with ublock
Re:Mmm, Pi-hole by ryandrake on Wednesday September 26, 2018 @10:11AM (#18076093)
Not on a network-wide basis, and not on non-browsers. I don’t think anyone here is saying don’t use a browser-based blocker too. I use both a browser plugin on the client and dnsmasq on my network.
Re:Mmm, Pi-hole by jack12 on Wednesday September 26, 2018 @12:27PM (#18077600)
I think the blog post is saying that, especially in the quote that started this thread. The post portrays ad-blocking browser extensions as not worth the risk, discussing both the questionable value of blocking all ads and also the possible risk of the extension being sold to a malware creator. It then presents Pi-hole as a safe alternative to browser-based blockers.
Re:Mmm, Pi-hole by gruez on Wednesday September 26, 2018 @12:39PM (#18077727)
when i said

>you could do the same with ublock

that was in response to

>This should just be dnsmasq, for which source code is readily available and inspectable. You can (and should) compile it yourself if you don’t trust someone else’s binary.

Re:Mmm, Pi-hole by craftyguy on Wednesday September 26, 2018 @09:16AM (#18075557)
Exactly. This thing is in the best possible location for poisoning DNS for every system on your network. That should be a HUGE concern.
Re:Mmm, Pi-hole by helper on Wednesday September 26, 2018 @11:23AM (#18076871)
It is an order of magnitude safer than a browser plugin.
Re:Mmm, Pi-hole by craftyguy on Wednesday September 26, 2018 @04:23PM (#18079905)
Right, neither one of them are great ideas unless you can trust the source. To argue otherwise is a relative privation fallacy.
Re:Mmm, Pi-hole by craftyguy on Thursday September 27, 2018 @08:45PM (#18090142)
Re:Mmm, Pi-hole by fibers on Wednesday September 26, 2018 @09:21AM (#18075616)
Then don't do it and wait for taboola or google ads serve you a drive by rootkit?
Re:Mmm, Pi-hole by wp381640 on Wednesday September 26, 2018 @10:48AM (#18076475)
They could easily do a diagnostics / analytics feature where user stats are posted back to developers
Re:Mmm, Pi-hole by travisp on Wednesday September 26, 2018 @08:54AM (#18075412)
In this case it just acts as a DNS resolver. That's potentially risky when resources don't use SSL, but far less than a browser extension that can change a page in place, inject JavaScript, and record keystrokes on all pages.
Re:Mmm, Pi-hole by cremp on Wednesday September 26, 2018 @09:42AM (#18075806)
> resources don't use SSL

Huh? DNS is hit even if the site is SSL. Unless the site has HSTS, and you've got to the site before; DNS poisoning is very much doable.

Re:Mmm, Pi-hole by emilecantin on Wednesday September 26, 2018 @10:58AM (#18076588)
Yes, but the hijacker will still need to present a valid cert for that domain, which is much harder.
Re:Mmm, Pi-hole by filleokus on Wednesday September 26, 2018 @10:49AM (#18076486)
How would the attacker do anything useful with a SSL connection attempt? They can either send the real certificate, and then not be able to decrypt the data, or send a self-signed cert which the OS/browser wouldn't trust?

Are you thinking of some downgrade attack vector?

Re:Mmm, Pi-hole by giarc on Wednesday September 26, 2018 @10:08AM (#18076046)
https://github.com/pi-hole/pi-hole

Pi Hole is open source, so if someone did try to sneak in some malicious code, it would be seen.

Re:Mmm, Pi-hole by Dragonai on Wednesday September 26, 2018 @10:22AM (#18076202)
Just as a note, a project being open-source doesn't necessarily provide a 100% guarantee that it doesn't contain any (possibly obfuscated) malicious code. Our community likes to think that someone else would catch it, but enough people thinking that way can (and likely often does) lead to the bystander effect. So it's always good to be wary :)

Edit: Heartbleed was a good example of this -

https://www.csoonline.com/article/3223203/vulnerabilities/wh...

> The most ironic thing here is that OpenSSL is open source software. Anyone could look at the code, and presumably hundreds did, but nobody noticed the fairly elementary coding error.

Re:Mmm, Pi-hole by FroshKiller on Wednesday September 26, 2018 @09:40PM (#18081587)
Seen by what percentage of users who just download the binaries?
Re:Mmm, Pi-hole by move-on-by on Wednesday September 26, 2018 @09:40AM (#18075784)
I think a major difference is the update scheme. Browser extensions auto-update. If they switch hands there is no user visibility when getting the updated version. Pi-Hole is installed software and requires manual updates, which gives users more visibility and control.
Re:Mmm, Pi-hole by gruez on Wednesday September 26, 2018 @10:01AM (#18075982)
you can turn auto-updates off. also, you can easily inspect the source for an extension (AMO doesn't allow minified js), you can't easily do that for the multitude of components that make up pi hole.
Re:Mmm, Pi-hole by mynameisvlad on Wednesday September 26, 2018 @03:06PM (#18079223)
> you can't easily do that for the multitude of components that make up pi hole

What? The entirety of the project is open source. In fact it's easier to look at the source code that makes up PiHole because it's all in one spot in Github.

Re:Mmm, Pi-hole by 1943820037 on Wednesday September 26, 2018 @09:09PM (#18081498)
Considering that over 20% of https://pi-hole.net is blocked as malicious ads by my browser, I don't really understand why you would trust them to block not only the crap across the wider internet but even against their own self-interest.

Remember the warning signs of craziness with NoScript? It's like you guys never learn!

Re:Mmm, Pi-hole by dang on Thursday September 27, 2018 @01:54AM (#18082346)
Could you please not create new accounts for every few comments you post? We ban accounts that do this, and it's in the site guidelines: https://news.ycombinator.com/newsguidelines.html.

HN is a community. Users needn't use their real name, but do need to have some consistent identity for others to relate to. Otherwise we may as well have no usernames and no community at all. That would be a different kind of forum. Anonymity is fine, and throwaways for a specific purpose are ok, just not routinely.

https://hn.algolia.com/?sort=byDate&dateRange=all&type=comme...

Re:Mmm, Pi-hole by karrotwaltz on Wednesday September 26, 2018 @10:20AM (#18076170)
Someone very concerned about ads whitelists can also use multiple ad blocking extensions.

It would take every creator to accept the bribe for the ads to go through. Well, if the extension starts injecting ads it's another story...