this post was submitted on 06 May 2024
497 points (98.3% liked)

Technology

59593 readers
3584 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


founded 1 year ago
MODERATORS
top 50 comments
sorted by: hot top controversial new old
[–] adam_y@lemmy.world 293 points 6 months ago (14 children)

"There are no ways to prevent such attacks except when the user's VPN runs on Linux or Android."

So there are ways.

[–] Rin@lemm.ee 98 points 6 months ago (1 children)
load more comments (1 replies)
load more comments (12 replies)
[–] dgmib@lemmy.world 77 points 6 months ago (8 children)

So for this attack to work, the attacker needs to be able to run a malicious DHCP server on the target machine’s network.

Meaning they need to have already compromised your local network either physically in person or by compromising a device on that network. If you’ve gotten that far you can already do a lot of damage without this attack.

For the average person this is yet another non-issue. But if you regularly use a VPN over untrusted networks like a hotel or coffee shop wifi then, in theory, an attacker could get your traffic to route outside the VPN tunnel.

[–] GamingChairModel@lemmy.world 45 points 6 months ago (1 children)

Put another way, this means that a malicious coffee shop or hotel can eavesdrop on all VPN traffic on their network. That's a really big fucking deal.

[–] dgmib@lemmy.world 27 points 6 months ago (4 children)

Not all VPN traffic. Only traffic that would be routable without a VPN.

This works by tricking the computer into routing traffic to the attacker’s gateway instead of the VPN’s gateway. It doesn’t give the attacker access to the VPN gateway.

So traffic intended for a private network that is only accessible via VPN (like if you were connecting to a corporate network for example) wouldn’t be compromised. You simply wouldn’t be able to connect through the attacker’s gateway to the private network, and there wouldn’t be traffic to intercept.

This attack doesn’t break TLS encryption either. Anything you access over https (which is the vast majority of the internet these days) would still be just as encrypted as if you weren’t using a VPN.

For most people, in most scenarios, this amount to a small invasion of privacy. Our hypothetical malicious coffee shop could tell the ip addresses of websites you’re visiting, but probably not what you’re doing on those websites, unless it was an insecure website to begin with. Which is the case with or with VPN.

For some people or some situations that is a MASSIVE concern. People who use VPNs to hide what they’re doing from state level actors come to mind.

But for the average person who’s just using a VPN because they’re privacy conscious, or because they’re location spoofing. This is not going to represent a significant risk.

load more comments (4 replies)
[–] wreleven@lemmy.ca 44 points 6 months ago (1 children)

This is the primary reason folks use VPNs - to protect themselves on public networks. I would say it's definitely not a non-issue.

load more comments (1 replies)
[–] bdonvr@thelemmy.club 12 points 6 months ago

Not quite, this could be exploited by telecom providers when using mobile data. Also using a VPN for networks you DON'T control is one of the more popular uses of the things

load more comments (5 replies)
[–] homesweethomeMrL@lemmy.world 62 points 6 months ago (5 children)

there are no ways to prevent such attacks except when the user's VPN runs on Linux or Android.

So . . . unix? Everything-but-Windows?

[–] freeman@sh.itjust.works 34 points 6 months ago

Maybe it affects BSD and MacOS.

It also can affect some Linux systems based on configuration. Android doesn't implement the exploited standard at all and is always immune.

load more comments (4 replies)
[–] kinther@lemmy.world 54 points 6 months ago (3 children)

If your LAN is already compromised with a rogue DHCP server, you've got bigger problems than them intercepting just VPN traffic. They can man in the middle all of your non-encrypted traffic. While this is bad, it's not a scenario most people will run into.

[–] doubletwist@lemmy.world 65 points 6 months ago (1 children)

The problem isn't them being in you LAN. It's about going to an untrusted network (eg Starbucks, hotel) and connecting to your VPN, boom, now your VPN connection is compromised.

[–] kinther@lemmy.world 13 points 6 months ago

I woke up this morning and thought of this exact scenario, then found your comment lol

Yes, this is bad for anyone who travels for work and can't trust the network they connect to.

[–] sudneo@lemm.ee 22 points 6 months ago

The other comment already covers the fact that VPN should be useful exactly when you are connected to untrusted LANs. I want to add that also the main point of your comment is anyway imprecise. You don't need a compromise DHCP, you just need another machine who spoofs being a DHCP. Not all networks have proper measures in place for these attacks, especially when we are talking wireless (for example, block client-to-client traffic completely). In other words, there is quite a middle-ground between a compromised router (which does DHCP in most cases) and just having a malicious device connected to the network.

load more comments (1 replies)
[–] Nyfure@kbin.social 49 points 6 months ago (7 children)

To be fair, any proper VPN setup that only relies on the routing table like this is flawed to begin with.
If the VPN program dies or the network interface disappears, the routes are removed aswell, allowing traffic to leave the machine without the VPN.
So it is already a good practice to block traffic where it shouldnt go (or even better, only allowing it where it should).

Many VPN-Programs by Providers already have settings to enable this to prevent "leaking".

load more comments (7 replies)
[–] Postmortal_Pop@lemmy.world 39 points 6 months ago (2 children)

So I gave the article a glance and it's a bit beyond me can someone give me an eli5?

[–] Bricriu@lemmy.world 60 points 6 months ago (1 children)

My understanding is that if you run a rogue discoverable DHCP server in a local network with a particular set of options set and hyper-specific routing rules, you can clobber the routing rules set by the VPN software on any non-Android device, and route all traffic from those devices through arbitrary midpoints that you control.

But IANANE (I am not a network engineer) so please correct my misinterpretations.

[–] applepie@kbin.social 32 points 6 months ago (4 children)

this implies physical access or at least access within the network?

[–] SzethFriendOfNimi@lemmy.world 49 points 6 months ago (1 children)

Keeping in mind that may mean that somebody like a cellular provider could do so. Since your local network in that context would be them.

[–] sailingbythelee@lemmy.world 25 points 6 months ago (1 children)

Exactly. And if your ISP or cellular provider wants, or is forced, to gather information about your internet activities, they can almost certainly find a way. The cheap consumer-grade VPN services most of us use just prevent casual or automated observers from easily detecting your device's IP address. For most people that just want to torrent casually or use public wifi, it's enough.

load more comments (1 replies)
load more comments (3 replies)
[–] vvv@programming.dev 50 points 6 months ago* (last edited 6 months ago) (4 children)

(obligatory I'm not a network surgeon this is likely not perfectly correct)

The article mentions network interfaces, DHCP and gateways so real quick: a network interface usually represents a physical connection to a network, like an Ethernet port or a WiFi card. DHCP is a protocol that auto configured network routes and addresses once a physical connection is established, like when you jack in via an ethernet cable, it tells you the IP address you should go by, the range of IP address on the network you've connected to, where you can resolve domain names to IP addresses. It also tells you the address of a default gateway to route traffic to, if you're trying to reach something outside of this network.

You can have more than one set of this configuration. Your wired network might tell you that your an address is 10.0.0.34, anything that starts with 10.0.0. is local, and to talk to 10.0.0.254 if you're trying to get to anything else. If at the same time you also connect to a wireless network, that might tell you that your address is 192.168.0.69, 192.168.0.* is your local network, and 192.168.0.254 is your gateway out. Now your computer wants to talk to 4.2.2.2. Should it use the wireless interface and go via 192.168.0.254? or the wired one and use 10.0.0.254? Your os has a routing table that includes both of those routes, and based on the precedence of the entries in it, it'll pick one.

VPN software usually works by creating a network interface on your computer, similar to an interface to a WiFi card, but virtual. It then asks the OS to route all network traffic, through the new interface it created. Except of course traffic from the VPN software, because that still needs to get out to the VPN provider (let's say, at 1.3.3.7) via real Internet.

So if you're following along at home, your routing table at this point might look like this:

  • traffic to 1.3.3.7 should go to 10.0.0.254 via the wired interface
  • all traffic should go to the VPN interface
  • traffic to 10.0.0.* should go to the wired interface
  • all traffic should go to 10.0.0.254 via the wired interface
  • traffic to 192.168.0.* should go to the wireless interface
  • all traffic should go to 192.168.0.254 via the wireless interface

whenever your os wants to send network packets, it'll go down this list of rules until one applies. With that VPN turned on, most of the time, only those two first rules will ever apply.

If I'm reading the article correctly, what this attack does, is run a DHCP server, that when handing out routing rules, will send one with a flag that causes, for example, the last two rules to be placed at the top of the list instead of the bottom. Your VPN will still be on, the configuration it's requested the OS to make would still be in place, and yet all your traffic will be routed out to this insecure wireless network that's somehow set itself as the priority route over anything else.

[–] mysticalone@lemmy.world 18 points 6 months ago

Thank you network nurse

load more comments (3 replies)
[–] yardy_sardley@lemmy.ca 28 points 6 months ago (1 children)

I think this is a good enough reason to actually put in some effort to phase out ipv4 and dhcp. There shouldn't be a way for some random node on the network to tell my node what device to route traffic over. Stateless ipv6 for the win.

[–] 9point6@lemmy.world 17 points 6 months ago (6 children)

Efforts have been put in for several decades now

I still remember all the hype around "IPv6" day about 12 years ago...

Any day now...

load more comments (6 replies)
[–] xenoclast@lemmy.world 23 points 6 months ago

Step one, be in full control of DNS on the network. Not difficult, but not simple.

[–] RaoulDook@lemmy.world 23 points 6 months ago (2 children)

So if they are changing routes by using DHCP options, perhaps this could be exploited by telecom insiders when you are using mobile data, because your mobile data IP could be assigned by a DHCP server on the telecom network. If you're at home on wifi, then you can control your own DHCP server to prevent that.

[–] rimu@piefed.social 12 points 6 months ago (4 children)

No - the VPN provider has another DHCP server for use 'inside' the VPN.

[–] SzethFriendOfNimi@lemmy.world 15 points 6 months ago

Except this bypasses that I believe.

load more comments (3 replies)
load more comments (1 replies)
[–] LordCrom@lemmy.world 22 points 6 months ago (3 children)

To execute this you need a DHCP server on the network.... But any admin worth his salt has a config on the switch to limit DHCP traffic to a designated server.

Seems extremely difficult to pull off in any corporate environment

load more comments (3 replies)
[–] Max_P@lemmy.max-p.me 21 points 6 months ago (3 children)

That's why half decent VPN apps also add firewall rules to prevent leakage. Although nothing can beat Linux and shoving the real interface in a namespace so it's plainly not available to anything except the VPN process.

load more comments (3 replies)
[–] TipRing@lemmy.world 18 points 6 months ago (3 children)

I use option 121 as part of my work, though I am not an expert on DHCP. This attack does make sense to me and it would be hard to work around given the legitimate uses for that option.

load more comments (3 replies)
[–] MonkderDritte@feddit.de 17 points 6 months ago* (last edited 6 months ago) (2 children)

If i get this right, that attack only works before the tunnel is initiated (i.e. traffic encrypted), if the hosts is compromised, right? No danger from untrusted points inbetween, right?

[–] NeatNit@discuss.tchncs.de 22 points 6 months ago (4 children)

This technique can also be used against an already established VPN connection once the VPN user’s host needs to renew a lease from our DHCP server. We can artificially create that scenario by setting a short lease time in the DHCP lease, so the user updates their routing table more frequently. In addition, the VPN control channel is still intact because it already uses the physical interface for its communication. In our testing, the VPN always continued to report as connected, and the kill switch was never engaged to drop our VPN connection.

Sounds to me like it totally works even after the tunnel has started.

load more comments (4 replies)
[–] DreamlandLividity@lemmy.world 13 points 6 months ago* (last edited 6 months ago) (3 children)

No, it works at any point and the local network needs to be compromised (untrusted), the host can be secure.

So it is likely not an issue at your home unless you have weak Wi-Fi password. But on any public/untrusted Wi-Fi, it is an issue.

load more comments (3 replies)
[–] Natanael@slrpnk.net 13 points 6 months ago

Pushing a route also means that the network traffic will be sent over the same interface as the DHCP server instead of the virtual network interface. This is intended functionality that isn’t clearly stated in the RFC. Therefore, for the routes we push, it is never encrypted by the VPN’s virtual interface but instead transmitted by the network interface that is talking to the DHCP server. As an attacker, we can select which IP addresses go over the tunnel and which addresses go over the network interface talking to our DHCP server.

Ok, so double encrypted and authenticated traffic (TLS inside the VPN) would still be safe, and some stuff requiring an internal network origin via the VPN is safe (because the attacker can't break into the VPN connection and your client won't get the right response), but a ton of other traffic is exposed (especially unencrypted internal traffic on corporate networks, especially if it's also reachable without a VPN or if anything sends credentials in plaintext)

[–] SplashJackson@lemmy.ca 13 points 6 months ago

But why was this attacking novels? Are comic books safe?

load more comments
view more: next ›