News for hackers. Stuff that matters.
Re:Ask HN: Is Public WiFi Dangerous? by Shank on Friday March 18, 2022 @01:33PM (#30725085)
Your intuition is correct. The exception is that DNS will, by-default, be sent to the default router DNS servers, which might monitor/track what you do (most ISPs run DNS that do this too), and unencrypted HTTP. Unencrypted HTTP is more and more rare as time goes on.

Most of the "shame on public WiFi" comes from VPN companies, which are just trying to fearmonger into a sale. Sure, DNS over HTTPs isn't as widespread as it should be. Sure, some websites aren't encrypted, still. But that doesn't mean that routing all of your insecure traffic to a VPN provider so they can handle it instead is going to increase your security. It just moves the threat model from "your public WiFi network and people on it" to the VPN provider.

If you really want to be safe, you could run your own VPN with algo (https://github.com/trailofbits/algo) or manually setup WireGuard and route traffic e.g., back to your home ISP, instead. That's probably my best suggestion, rather than using any of the cliche VPN providers that advertise everywhere.

Re:Ask HN: Is Public WiFi Dangerous? by profmonocle on Friday March 18, 2022 @03:27PM (#30726445)
Worth noting that the benefits of DNS over TLS/HTTPS (with encrypted SNI) are a bit limited. For cases where a very large number of domains are hosted on a single IP address (or pool of IPs) it's effective at masking your destination from network sniffing. (sites behind Amazon Cloudfront, Cloudflare's free plan, Google App Engine/Cloud Run, old school web hosts, etc.)

But there are still tons of sites with their own IPs, or pool of IPs, in which case seeing the destination IP will reveal what domain you're visiting with no need to observe DNS traffic or SNI. i.e. 199.232.125.140 is Reddit and only Reddit. If you visit https://199.232.125.140 you get an error that the cert is for *.reddit.com.

If your goal is to prevent your network operator from seeing even the domains you're accessing, encrypted DNS + encrypted SNI helps but doesn't get you all the way there. A VPN (or Tor) is the only true solution there. However I imagine this is a relatively uncommon need, at least for most people on HN.

Re:Ask HN: Is Public WiFi Dangerous? by pabs3 on Friday March 18, 2022 @10:28PM (#30730345)
There was a study that showed that even for the cloud hosted sites, traffic patterns to the IP address can reveal the site (so ESNI/ECH are not foolproof):

https://blog.apnic.net/2019/08/23/what-can-you-learn-from-an... https://news.ycombinator.com/item?id=28103770

Re:Ask HN: Is Public WiFi Dangerous? by sneak on Friday March 18, 2022 @09:57PM (#30730146)
I think most TLS today does not use encrypted SNI; the hostname to which you are connecting is still sent in the clear in the large majority of cases even when there are many sites sharing an IP.
Re:Ask HN: Is Public WiFi Dangerous? by kodah on Friday March 18, 2022 @01:40PM (#30725176)
> Most of the "shame on public WiFi" comes from VPN companies

I would call that a half-truth. When I was a kid (in the early 2000's) it was exceptionally easy to crack public wifi networks. A lot of that had to do with misconfiguration and every company scrambling to create public wifi APs. It makes sense that these memories and experiences live on and have become slogans of companies vying for privacy.

Re:Ask HN: Is Public WiFi Dangerous? by thot_experiment on Friday March 18, 2022 @02:31PM (#30725805)
The early 2000's were a real good time. Default passwords on everything, plain HTTP. In high school I did a MITM on a coffee shop because their router had the default credentials and just had a great time watching everyone else's browsing. My dad blocked battle.net AND found the keylogger I put on his computer to recover the router password to unblock it (though he was impressed enough by my attempt that he didn't ground me) which resulted in my first foray into linux (shouts to BackTrack) so I could crack the neighbors WEP.

Once I figured out packet injection (before cellphones) I actually cracked some random company WEP in a parking lot when my friends and I got lost in order to look up directions.

Nowadays things are a lot less fun. :(

Re:Ask HN: Is Public WiFi Dangerous? by zoover2020 on Friday March 18, 2022 @02:37PM (#30725874)
Oh boy, bring me back to the WEP-cracking Backtrack days as a kid.

I remember buying a network adapter with packet injection capabilities SPECIFICALLY for this haha

Re:Ask HN: Is Public WiFi Dangerous? by joeyrobert on Friday March 18, 2022 @03:02PM (#30726165)
While I didn't do this myself, I remember watching Kevin Rose do this on his internet show thebroken. He talks about getting an orinoco PCMCIA wifi adapter because of their broad support for this kind of thing. If you want a blast from the past, you can watch them here: https://archive.org/details/thebroken_xvid
Re:Ask HN: Is Public WiFi Dangerous? by freedomben on Friday March 18, 2022 @07:19PM (#30728897)
Oh man yeah, good time. The 90s were even better (I remember when nearly every SMTP server was an open relay, and every company used smtp.example.com so you could easily guess the hostname), although the world was so much less connected. The early 2000s everybody was getting computers so even though some tricks weren't easy anymore, there was an abundance of juice.
Re:Ask HN: Is Public WiFi Dangerous? by RajT88 on Friday March 18, 2022 @05:03PM (#30727497)
There is still a lot of fun to be had!

Driver support for packet injection in Kali Linux is fantastic now, making it easy to spray de-auth packets with most hardware and capture your auth packets without having to wait.

I tested out Hashcat recently with my GTX 1060 (a modest card), and could burn through 170k WPA2 hashes a second. That's a long way from brute force, but doable for most wordlist attacks.

Re:Ask HN: Is Public WiFi Dangerous? by pabs3 on Friday March 18, 2022 @10:30PM (#30730355)
Are the driver support for packet injection upstream now? ie can one do this on normal distros not just Kali?
Re:Ask HN: Is Public WiFi Dangerous? by kodah on Saturday March 19, 2022 @12:39PM (#30735202)
If you have an antheros card (which is quite popular) then they've been upstream in mainline with permiscuous mode for an eternity.
Re:Ask HN: Is Public WiFi Dangerous? by znpy on Friday March 18, 2022 @03:57PM (#30726787)
> When I was a kid (in the early 2000's) it was exceptionally easy to crack public wifi networks

But you're not a kid anymore and nowadays it's way harder to crack public wifi networks.

Fearmongering by VPN vendors is very real.

I wouldn't have a problem browsing my home banking on a public wifi network. Everything is tls-encrypted, my browser can do dns-over-https, and anything important (including the login) requires me to enter an one-time code from my non-smart token.

And by the way, on a public wifi you might be pray of the occasional wifi attacker where as if you're using a vpn from a vpn vendor you're by definition giving all your traffic to a company whose main specialty is networking, usually under the vague promise not to log your traffic.

Re:Ask HN: Is Public WiFi Dangerous? by city41 on Friday March 18, 2022 @05:48PM (#30727975)
Not sure why you're so downvoted. Everything you state is correct and the person you are responding to brought up completely irrelevant things. VPN companies really do use fear tactics to sell their products.
Re:Ask HN: Is Public WiFi Dangerous? by moonchild on Monday March 21, 2022 @04:07AM (#30751511)
Not to detract from your overall point, but a one-time code wouldn't protect you from mitm.
Re:Ask HN: Is Public WiFi Dangerous? by the_snooze on Friday March 18, 2022 @02:03PM (#30725476)
TLS/HTTPS was also far less common in the early 2000s. It's so prevalent these days that unencrypted wifi connections really don't matter anymore. Computers are talking to remote servers over encrypted connections regardless of the presence or absence of wifi-level encryption.
Re:Ask HN: Is Public WiFi Dangerous? by acdha on Friday March 18, 2022 @02:34PM (#30725835)
A related factor was responsibility shirking: some companies tried to claim that the problem for their lack of authentication / encryption was a problem with WiFi. I gave a few talks back then pushing what's now termed zero trust and you could just see the instinctive rejection from the telecom guys who were used to thinking of security as a function of the physical environment. That got criticism at the time, of course, but it really became untenable after so many malware attacks finally got the point through that you could not possibly rely on trusting the network layer.
Re:Ask HN: Is Public WiFi Dangerous? by zokier on Friday March 18, 2022 @02:04PM (#30725495)
Also things like Firesheep were pretty high profile back in the days
Re:Ask HN: Is Public WiFi Dangerous? by Maursault on Friday March 18, 2022 @07:23PM (#30728929)
> it was exceptionally easy to crack public wifi networks

This may be because public wifi networks are public, which means they're open, which means there's no wifi password or encryption. Cracking a public wifi network takes all the effort of merely joining the wireless network with a mobile device.

Re:Ask HN: Is Public WiFi Dangerous? by RobertMiller on Friday March 18, 2022 @01:44PM (#30725229)
For the few years in college I was living off campus, I never paid for internet at all. Cracking WEP was that easy.
Re:Ask HN: Is Public WiFi Dangerous? by willcipriano on Friday March 18, 2022 @01:47PM (#30725269)
I used this to get internet in my first apartment: https://www.whatsmyip.org/lib/fios-wep-key-calculator/
Re:Ask HN: Is Public WiFi Dangerous? by bennathanson on Friday March 18, 2022 @02:36PM (#30725859)
Just checked my (old, not-used-anymore) Fios network name and there was the original password! Keeping the default password is never a good idea.
Re:Ask HN: Is Public WiFi Dangerous? by sayrer on Friday March 18, 2022 @02:06PM (#30725522)
Another problem here is the initial HTTP request on the web, if the site isn't in the HSTS preload list. It's easy for this to happen when you click a link, and there are lots of HTTP links generated by protocol-less highlighting too (think foo.com with no prefix).

What usually happens these days is a redirect to the HTTPS site, but that first request can still be attacked.

Re:Ask HN: Is Public WiFi Dangerous? by mcculley on Friday March 18, 2022 @02:14PM (#30725623)
I find that many sites implement HSTS and the redirect to HTTPS wrong. For example, they will have http://example.com redirect to https://www.example.com instead of first redirecting to https://example.com. According to the spec, the browser will not automatically upgrade to HTTPS next time, leaving that first request still open to attack.

[Kind of a plug: I made a test for this in my tool, DomainProactive (https://domainproactive.com). I would appreciate feedback on this kind of error.]

Re:Ask HN: Is Public WiFi Dangerous? by boring_twenties on Friday March 18, 2022 @02:25PM (#30725733)
Indeed. I now have firefox configured to always try HTTPS first. A warning pops up if it doesn't work, and you have to click through it if you want to proceed. It turns out that a large number of sites not only have http://example.com redirect to https://www.example.com, as you describe, but https://example.com doesn't work at all -- resulting in this warning. Clicking through it, you end up at https://www.example.com.
Re:Ask HN: Is Public WiFi Dangerous? by escalt on Friday March 18, 2022 @02:23PM (#30725713)
Exactly. A commonly missed attack vector is just intercepting plaintext http and blocking https, so the browser thinks the site doesn't offer https and will just continue in plaintext. The same criticism applies to smtp using starttls, an attacker can suppress the starttls command and the default is to just continue in plaintext.

This is why an https only mode is important. In Firefox it can be enabled somewhere in the settings.

Re:Ask HN: Is Public WiFi Dangerous? by cxcorp on Friday March 18, 2022 @03:07PM (#30726238)
Luckily browsers are nowadays shifting towards making the initial request via HTTPS. Chrome, for example, has been using HTTPS when typing an address into the address bar without specifying http:// explicitly [1].

[1]: https://blog.chromium.org/2021/03/a-safer-default-for-naviga...

Re:Ask HN: Is Public WiFi Dangerous? by z3t4 on Friday March 18, 2022 @03:20PM (#30726386)
no, it will relay your URL via Google Search :P
Re:Ask HN: Is Public WiFi Dangerous? by LinAGKar on Friday March 18, 2022 @02:20PM (#30725681)
Unless you enable HTTPS-only mode, or HTTPS Everywhere EASE mode.
Re:Ask HN: Is Public WiFi Dangerous? by zeepzeep on Friday March 18, 2022 @04:11PM (#30726934)
> HTTPS-only mode

should be the default.

Re:Ask HN: Is Public WiFi Dangerous? by sybercecurity on Friday March 18, 2022 @01:44PM (#30725228)
Plus, the plaintext DNS is rarely altered, with even NXDOMAIN hijacking* being rare these days. Usually it's just collecting for ads or basic malware detection. Or content filtering depending on the provider.

*where instead of returning the proper "name not found" DNS error, the recursive server redirects to a site owned by the provider to show ads. Not to be confused with typo squatting where domain speculators register domains showing ads hoping people mistype URLs.

Re:Ask HN: Is Public WiFi Dangerous? by heavyset_go on Friday March 18, 2022 @06:09PM (#30728165)
There was this vulnerability[1] that allowed attackers to hijack VPN connections and inject their own data into them. It affected all VPNs, including WireGuard.

[1] https://news.ycombinator.com/item?id=21712280

Re:Ask HN: Is Public WiFi Dangerous? by j1elo on Friday March 18, 2022 @08:18PM (#30729425)
Just curious: Any practical difference between Algo [0] and PiVPN [1] from someone that has tested them? Both seem to support Wireguard.

[0]: https://github.com/trailofbits/algo

[1]: https://pivpn.io/

I just learned about Algo but have been a long time user of PiVPN (from when they only supported OpenVPN!) on my Raspberry Pi, so in the case that I wanted to reinstall the server, I wonder if the change would bring something new to the table.

Re:Ask HN: Is Public WiFi Dangerous? by chrisweekly on Friday March 18, 2022 @02:26PM (#30725743)
"manually setup Wireguard" or take the way easier route and use Tailscale, which is built atop Wireguard, but w/ incredibly simple setup and great UX
Re:Ask HN: Is Public WiFi Dangerous? by JamesSwift on Friday March 18, 2022 @03:17PM (#30726355)
Or the equally simple Subspace [1] if you want to stick with self-hosting Wireguard directly.

[1] - The community fork at least. Upstream is no longer updated: https://github.com/subspacecommunity/subspace

Re:Ask HN: Is Public WiFi Dangerous? by erohead on Friday March 18, 2022 @02:34PM (#30725845)
Wireguard exit routing has resulted in pretty slow VPN-like traffic for me. Dedicated VPN seems like a better option just for secure browsing
Re:Ask HN: Is Public WiFi Dangerous? by antihero on Friday March 18, 2022 @03:01PM (#30726155)
Currently I use Outline as it’s designed to punch through networks that don’t want to allow VPNs. Is there any reason to switch to algo?
Re:Ask HN: Is Public WiFi Dangerous? by dijonman2 on Friday March 18, 2022 @03:07PM (#30726232)
What does outline do?
Re:Ask HN: Is Public WiFi Dangerous? by antihero on Sunday March 20, 2022 @07:08AM (#30741680)
It’s an easy to set up VPN that is designed to work where the VPNs won’t (e.g. China) using things like shadowsocks etc
Re:Ask HN: Is Public WiFi Dangerous? by md_ on Friday March 18, 2022 @01:37PM (#30725148)
Doesn't Android do DoT by default? And iOS does iCloud Private Relay by default?
Re:Ask HN: Is Public WiFi Dangerous? by borski on Friday March 18, 2022 @01:41PM (#30725190)
Private Relay is not a default today.
Re:Ask HN: Is Public WiFi Dangerous? by md_ on Friday March 18, 2022 @01:45PM (#30725238)
Private Relay DNS appears to be a default (at least on my device).
Re:Ask HN: Is Public WiFi Dangerous? by junon on Saturday March 19, 2022 @03:24AM (#30731885)
> be sent to the default router DNS servers

Unless you've manually specified them in your network/adapter settings, which means they won't be taken from the DHCP lease.

Re:Ask HN: Is Public WiFi Dangerous? by goodpoint on Friday March 18, 2022 @02:15PM (#30725637)
WireGuard is much much more secure than algo. Stay away from IPSEC: it's a very complex protocol and implementations have vulnerabilities as a consequence.
Re:Ask HN: Is Public WiFi Dangerous? by vetinari on Friday March 18, 2022 @03:24PM (#30726418)
While there are many footguns in the ipsec, if you have set ip up, you can have better performance with ipsec than with wireguard.

Many devices include ipsec hardware acceleration, while wireguard ciphers are purely in software. With your typical Ubiquiti or Mikrotik device you can have much more performant connection encrypted with aes+sha than with chacha+poly.

Re:Ask HN: Is Public WiFi Dangerous? by goodpoint on Monday March 21, 2022 @06:00AM (#30752196)
> Many devices include ipsec hardware acceleration,

This led to serious vulnerabilities and backdoors.

> while wireguard ciphers are purely in software

This is a feature, not a bug. It's quite difficult to trust commercial routers.

> you can have better performance with ipsec than with wireguard

Citation needed. Modern CPUs are very cost-efficient at this.

Re:Ask HN: Is Public WiFi Dangerous? by vetinari on Tuesday March 22, 2022 @05:26AM (#30764166)
> This led to serious vulnerabilities and backdoors.

This is a matter of implementation; not whether the implementation is in hw or sw. Do you have any examples, where there was a such issue for example in Cavium Octeon (used by Ubiquiti in their USG routers), Qualcomm IPQ-xxx or Marvel Armada SOCs (used by multitude of other vendors)?

> This is a feature, not a bug. It's quite difficult to trust commercial routers.

It is difficult to trust many routers; even if they are open source, their maintenance might be not exactly transparent.

> Citation needed. Modern CPUs are very cost-efficient at this.

Typical routers do not have desktop or server class modern CPU. They run on 700-1400 Mhz, and they are busy with things like firewall rules (why do you thing that Fasttrack on Mikrotiks exists?) or, when a beefier CPU is available, with BGP. You can test it for yourself and see, that with hw accelerated AES and SHA you can saturate your available bandwidth and with Wireguard you can saturate only a fraction (unless you have low enough bandwidth...).

Re:Ask HN: Is Public WiFi Dangerous? by 7ewis on Friday March 18, 2022 @02:29PM (#30725777)
algo offer WireGuard too.
Re:Ask HN: Is Public WiFi Dangerous? by goodpoint on Sunday March 20, 2022 @03:13PM (#30745639)
You don't need ansible at all to configure WireGuard
Re:Ask HN: Is Public WiFi Dangerous? by soheil on Friday March 18, 2022 @06:49PM (#30728617)
And now you moved your "thread model" to a repo controlled by hundreds of random contributors around the world using exotics languages as Jinja?
Re:Ask HN: Is Public WiFi Dangerous? by Tijdreiziger on Friday March 18, 2022 @01:36PM (#30725118)
> (most ISPs run DNS that do this too)

Is there a source confirming this, or is this just speculation?

Re:Ask HN: Is Public WiFi Dangerous? by riquito on Friday March 18, 2022 @02:16PM (#30725640)
Depends on the country, but yes, they do sell that data. E.g. https://arstechnica.com/information-technology/2017/03/how-i...
Re:Ask HN: Is Public WiFi Dangerous? by Tijdreiziger on Friday March 18, 2022 @03:50PM (#30726680)
That article seems to be about the US only. I'd be kind of surprised if it were legal in the EU, though I'm not a lawyer.
Re:Ask HN: Is Public WiFi Dangerous? by zikduruqe on Friday March 18, 2022 @04:07PM (#30726895)
> WireGuard and route traffic e.g., back to your home

100% of what I have been doing for years.