News for hackers. Stuff that matters.
Re:Router Security by tasubotadas on Saturday July 30, 2022 @07:54AM (#32286099)
Disabling IPv6 is recommended? I thought we are all moving to use IPv6.
Re:Router Security by 8organicbits on Saturday July 30, 2022 @08:04AM (#32286148)
The link has an interesting justification, I haven't heard that before.

> That's because millions of home gateway routers, especially those leased to customers by their internet service providers (ISPs), leak their unique hardware ID numbers through their Internet Protocol (IP) addresses — and those hardware ID numbers can be connected to publicly available maps that show the street locations of Wi-Fi networks.

Re:Router Security by Sakos on Saturday July 30, 2022 @08:40AM (#32286323)
https://www.blackhat.com/us-21/briefings/schedule/#ipvseeyou...

It's based on this talk apparently

> We assume a weak adversary who is remote to the target and has no privileged access. Our privacy attack lies in IPv6 addresses formed via EUI-64, which embed the interface's hardware MAC address in the IPv6 address. While EUI-64 IPv6 addresses are no longer used by most operating systems, they are commonly found in legacy and low-profit-margin customer premises equipment (CPE), e.g., commodity routers connecting residential and business subscribers. Because IPv6 CPE are routed hops (as opposed to IPv4 NATs), we can discover their MAC address via traceroute if they use EUI-64.

> These CPE are frequently all-in-one devices that also provide Wi-Fi. Crucially, the MAC address of the Wi-Fi interface is often related to the MAC address of the wide area interface, e.g., a +/-1 offset. These Wi-Fi MACs are broadcast (the 802.11 BSSID) and captured by wardriving databases that also record their physical location. By correlating the MAC addresses embedded in IPv6 home router addresses with their Wi-Fi address counterpart, we can remotely geolocate them, fusing virtual data with meatspace.

They have a tool that lets you check a given IPv6 address: https://github.com/6int/IPvSeeYou

Re:Router Security by ikiris on Saturday July 30, 2022 @08:46AM (#32286358)
Heh, I was dubious but this is a perfectly valid explanation for why you should not embed phy addresses in IPs.

That said, it's absolutely toxic to be telling people to just turn off IPv6. Completely makes me lose trust in the rest of the site's content.

Re:Router Security by Sakos on Saturday July 30, 2022 @11:26AM (#32287533)
A source link to a very thorough article at Tom's Guide (https://www.tomsguide.com/news/home-gateway-geolocation-bh21) is provided close to the top of the page (in the short list). That guide links to the Black Hat presentation.

> For years, turning off IPv6 (IP version 6) was on the long list below, but as of August 2021, I think it belongs here on the short list too. Very very few people need it and it was recently disclosed that there is a possible security issue with it.

I think you're being a bit too accusative. Every suggestion has sources to back it up if you want to see why something is recommended.

Re:Router Security by jaclaz on Saturday July 30, 2022 @08:55AM (#32286417)
>These Wi-Fi MACs are broadcast (the 802.11 BSSID) and captured by wardriving databases that also record their physical location.

I am not sure to understand, while this is in theory doable, do these "captured by wardriving" databases exist?

And do they cover "everywhere"?

Re:Router Security by veonik on Saturday July 30, 2022 @09:18AM (#32286559)
A long while back now Google came out saying[0] they did use their Google Maps Street View cars to also collect wifi+location information. It wouldn't surprise me if they augmented this info with data they receive through Google services running on Android phones too.

So my bet is, yeah, they do exist and they do pretty much cover everywhere.

[0]: https://www.theguardian.com/technology/2010/may/15/google-ad...

Re:Router Security by Lukas_Skywalker on Saturday July 30, 2022 @09:57AM (#32286855)
Google even has a geolocation API [1] where you can send the BSSID and signal strength of the access points in your range and it calculates your position.

[1]: https://developers.google.com/maps/documentation/geolocation...

Re:Router Security by megous on Saturday July 30, 2022 @12:27PM (#32288027)
Mozilla offers a similar API. Kinda funny for a "privacy" company.
Re:Router Security by jaclaz on Saturday July 30, 2022 @09:37AM (#32286718)
I see now, thanks.

Though I believe that if Google is the adversary, they have ways (only a guess, but some kind of correlation between GPS location on mobile while connected to Wi-Fi and http requests could be one) that make the "wardriving database" unneeded, I mean, there should be a constant updating of this database, or it would turn out pretty much obsolete soon.

Re:Router Security by toast0 on Saturday July 30, 2022 @01:31PM (#32288600)
The database may have originally been filled by wardriving, but it can be updated by their distributed agents (phones with location services turned on).
Re:Router Security by alexwasserman on Saturday July 30, 2022 @03:44PM (#32289666)
It’s called Wi-Fi Positioning System: https://en.m.wikipedia.org/wiki/Wi-Fi_positioning_system

There are both open and proprietary versions.

I think early iPhones used it (with cell site data too), before they had GPS. Can’t remember their name for it.

But, all big populated areas are mapped and understood.

See Hybrid Positioning too, which is combining all available data, including Wi-Fi, to aid in rapid and accurate location information: https://en.m.wikipedia.org/wiki/Hybrid_positioning_system

Re:Router Security by h4waii on Saturday July 30, 2022 @11:07AM (#32287354)
Wigle.net
Re:Router Security by zekica on Saturday July 30, 2022 @09:02AM (#32286453)
This only correct for the router itself. Not for any devices connecting behind it.
Re:Router Security by stonepresto on Saturday July 30, 2022 @08:41AM (#32286331)
I think there's a better justification. Since IPv6 is still new-ish to SOHO, and often is lightly used at best, the firmware devs might not spend as much time building that support into the firmware. When devs get laxidasical, bugs happen.
Re:Router Security by feanaro on Saturday July 30, 2022 @08:45AM (#32286356)
I'm not sure that's a better justification. It's definitely an additional justification, making the whole thing that much worse. But street-level geolocation is pretty bad in itself.
Re:Router Security by redleader55 on Saturday July 30, 2022 @09:02AM (#32286455)
The author shows a complete lack of knowledge on IPv6. Yes, you do get a SLAAC address which basically contains you MAC, but if your OS supports it, you will also get a anonymized address which does not leak your MAC on the internet. Windows, Android, Linux, iOS all support MAC address anonymization, so as long as you are using a recent OS you should be fine. Very weird suggestion...
Re:Router Security by throw0101a on Saturday July 30, 2022 @09:14AM (#32286529)
> The author shows a complete lack of knowledge on IPv6.[…] you will also get a anonymized address which does not leak your MAC on the internet.

No, they do not lack knowledge. See the sibling comments: the issue is not a concern of what various computer and mobile OSes do, but rather with some CPE firmware still using EUI-64-based IPv6 addresses.

This allows attackers on the Internet to send out probes, find the router's Wifi interface, map it to the BSSID/SSID, and look up the SSID in geolocation database:

* https://www.blackhat.com/us-21/briefings/schedule/#ipvseeyou...

Ideally what they should be doing is contacting vendors to fix their firmware (and also creating CVEs for 'public shaming'), and not telling people to disable IPv6.

Disabling IPv6 does not solve the problem: it is still lurking there for folks that haven't read this site/advice.

Re:Router Security by yardstick on Saturday July 30, 2022 @11:26AM (#32287530)
How does the attacker get the IPv6 address from the SSID MAC? Or am I looking at the issue the wrong way?

Routers will hardly ever make connections themselves out to the internet, except maybe for things like DNS which hopefully are using major providers like Google which won’t leak the data anyway.

Re:Router Security by throw0101a on Saturday July 30, 2022 @12:43PM (#32288151)
It's explained in the Blackhat presentation if you bother flipping through the slide deck:

The attacker sends a ping to any random address in the /64. The router responds with an ICMP of "timeout" or "unreachable" or something. The ICMP response has the router's IPv6 address.

In badly written routers they use EUI-64 for the local-part of addresses. Further, most devices have interfaces where the MACs are sequential: so if the first interface has 2a:a9:d3:8f:c9:a8, then the next one probably has …:a9, and then :aa, etc.

Then the EUIs-64 and look them up in a Wifi geolocation database:

* https://www.wigle.net

Re:Router Security by yardstick on Saturday July 30, 2022 @01:42PM (#32288711)
Ah ok thanks, I understand now.

So it’s both having the EUI-64 address and the router responding with an ICMP message rather than being silent. Got it.

Re:Router Security by megous on Saturday July 30, 2022 @12:34PM (#32288070)
Just don't assign a public IPv6 address to the router, then?
Re:Router Security by whyoh on Saturday July 30, 2022 @09:10AM (#32286503)
Right. But isn't it so that each device gets its own IPv6 public address? So that PC1 and PC2 connected through the same modem are identifiable by different IPs, while you can still see that they're from the same modem/household? If that's the case, it can be a privacy concern.
Re:Router Security by tommiegannert on Saturday July 30, 2022 @09:17AM (#32286551)
Theoretically, even non-router devices could use more than one address, just to confuse what's listening on the other side.

In that scenario, DHCPv6 would be responsible for keeping the assigned subnet filled randomly, rather than being conservative and consistent with address assignments. I don't know if anyone is doing it now, but I don't think we should dismiss IPv6 for this reason.

Re:Router Security by megous on Saturday July 30, 2022 @12:40PM (#32288118)
Android doesn't respect/implement DHCPv6. But there are IPv6 privacy extensions that periodically rotate the IPv6 addresses of the device.

https://datatracker.ietf.org/doc/html/rfc4941

Re:Router Security by tommiegannert on Tuesday August 02, 2022 @03:32AM (#32316052)
Thanks for the reference! Doing that directly with SLAAC is of course even nicer.
Re:Router Security by njibhu on Saturday July 30, 2022 @08:52AM (#32286392)
There are a lot of shortcomings of IPv6 which prevents it to be widely used (particularly on the consumer network side). First thing to know is that it shifts responsibilities. The router is not responsible anymore for assigning IPs to the network. The devices assign their own IP address using SLAAC. You could use DHCPv6, but many devices simply won't support it (windows and android to begin with).

Which brings the following issues:

- No support for multi-homing. Example: You have two connections, a slow reliable one, and a fast unreliable one. With IPv4 you can easily setup multiwan in any proper L3 router. The router will ping both routes, and if the fast one is working, using it as main gateway. When it doesn't answer anymore, the router simply change its route. Because of NAT, this is transparent to the devices behind its network. For IPv6, this doesn't work anymore, because the IP prefix is set by the provider, without NAT the second provider will simply refuse to forward any packet which originates from an IP which doesn't have their prefix. The "solution" is to have your own address space, and use BGP to change the routes (which is out of reach for all of private consumers).

- ISPs got it wrong ! I'm in Germany, tried 3 different providers, they all assign to my router a /64 subnet instead of /60 or /56 (as recommended by ARIN). The problem is that SLAAC only works with /64, below the devices usually won't assign themselves an IP anymore. So you can only have one network, you can't have a Guest network with a different prefix.

- As mentioned by the article, the design is terrible for privacy: SLAAC works by simply taking the prefix from the router and filling the rest with the mac address. Which means that anybody on the internet gets to know your mac address. EDIT: This is wrong. See throw0101a answer below.

- Captive portals: SLAAC does not directly support assigning DNS servers. So most captive portals simply break because the network's firewall blocks DNS requests as long as they don't use the proper DNS server, but the device might simply not even be able to receive it. (SLAAC has an extension where it can tell the device to receive the DNS servers from DHCPv6, but many devices simply ignore it and treat DNS like browsers do with DoH). EDIT: This is wrong. See throw0101a answer below.

- Security within networks: Because the responsibilities of who assigns IP is shifted to the devices, switches cannot prevent devices to assign themselves IP anymore. So it's very easy for malicious devices to flood routing tables of switches by telling them that they own all IPv6 for the whole /64. Makes the whole network abysmally slow, or completely down.

Most of these issues are solved by using NAT6 (or NPT), but the issue with it, is that it breaks some applications. Ipv6 promised to get rid of NAT, so some applications took the liberty to assume that their local IP would always be the same visible on the internet. Not sure if that's this particular case for SIP, but it's usually broken with NAT6.

Re:Router Security by zekica on Saturday July 30, 2022 @09:04AM (#32286468)
It is far away from transparent. Devices behind the router can't know that a change in Public IP happened and won't reconnect active connections.

One example is Apple's APNS and Android's GCM. In IPv4 multiwan network, after the change they won't receive notifications at all for up to 30 minutes. In IPv6, the router can invalidate the old prefix, and publish a new one immediately.

Re:Router Security by njibhu on Saturday July 30, 2022 @09:14AM (#32286532)
I think we're talking about a different issue here. MultiWAN does break consumers which do not support reconnecting from a different source IP. But the issue is the same with IPV6, if the prefix changes, the client has to reconnect anyway.

Also, I'm personally not aware of any reliable way of invalidating IPV6 prefixes except waiting for the timeout. (And if it's republishing a RA, devices don't have to listen to it, and the packet might even be lost with an unreliable wifi for example). If I'm wrong here, I'd love to know about it.

Re:Router Security by ikiris on Saturday July 30, 2022 @09:28AM (#32286638)
Short lifetime RAs for all of the address spaces are meant to cover this.
Re:Router Security by throw0101a on Saturday July 30, 2022 @09:36AM (#32286711)
See also "Reaction of IPv6 Stateless Address Autoconfiguration (SLAAC) to Flash-Renumbering Events":

   In scenarios where network configuration information related to IPv6
   prefixes becomes invalid without any explicit and reliable signaling
   of that condition (such as when a Customer Edge router crashes and
   reboots without knowledge of the previously employed prefixes), hosts
   on the local network may continue using stale prefixes for an
   unacceptably long time (on the order of several days), thus resulting
   in connectivity problems.  This document describes this issue and
   discusses operational workarounds that may help to improve network
   robustness.  Additionally, it highlights areas where further work may
   be needed.
* https://datatracker.ietf.org/doc/html/rfc8978
Re:Router Security by Avamander on Saturday July 30, 2022 @09:54AM (#32286836)
> Which means that anybody on the internet gets to know your mac address.

Pretty sure all reasonable devices utilise privacy extensions.

> ISPs got it wrong ! I'm in Germany, tried 3 different providers, they all assign to my router a /64 subnet instead of /60 or /56 (as recommended by ARIN).

If it's wrong is subjective. If it's not a goal to upsell a business connection there might be technical limitations.

> No support for multi-homing. Example: You have two connections, a slow reliable one, and a fast unreliable one. With IPv4 you can easily setup multiwan in any proper L3 router.

Bit of a niche use-case and still very doable with NAT66.

> Captive portals: SLAAC does not directly support assigning DNS servers.

I haven't seen a captive portal that wasn't able to intercept DNS or that couldn't MITM all connections to display that page. It's a non-issue.

> So it's very easy for malicious devices to flood routing tables of switches by telling them that they own all IPv6 for the whole /64

IPv4 devices can conduct ARP spoofing, no biggie. If it's "very easy" to do either it's just poor switch software.

Re:Router Security by njibhu on Saturday July 30, 2022 @10:09AM (#32286928)
> Pretty sure all reasonable devices utilise privacy extensions.

I stand corrected by throw0101a answer. This is actually not an issue

> If it's wrong is subjective. If it's not a goal to upsell a business connection there might be technical limitations.

I don't think a Guest network should be considered a business feature

> Bit of a niche use-case and still very doable with NAT66.

Yes or NPT, as I mentioned at the end of my initial answer. But it has its own con.

> I haven't seen a captive portal that wasn't able to intercept DNS or that couldn't MITM all connections to display that page. It's a non-issue.

I also stand corrected by throw0101a, this is a non-issue.

> IPv4 devices can conduct ARP spoofing, no biggie. If it's "very easy" to do either it's just poor switch software.

The actual "switch software" in IPv4 which handles that, is to use an authoritative DHCP server. This does not exist/work in IPv6.

Re:Router Security by Avamander on Saturday July 30, 2022 @11:57AM (#32287770)
> This does not exist/work in IPv6.

Well obviously, but a proper switch, instead of DHCP snooping, has SLAAC and DHCPv6 snooping.

Re:Router Security by njibhu on Saturday July 30, 2022 @01:29PM (#32288572)
A lot of devices (android/windows) simply don't support DHCPv6. And SLAAC's RA delegates the responsibility of the IP to the device itself, so doing something like DHCP snooping is simply not possible because the RA packet doesn't tell the switch which IP belongs to which device.

SLAAC-snooping protects against ARP poisonning, not against ARP table overflow.

Re:Router Security by Avamander on Sunday July 31, 2022 @07:51AM (#32294932)
If it doesn't protect against ARP table overflow then that is again a missing feature in that software. Just like it's not IPv4's fault if there are no protections against someone sending a thousand DHCP requests and depleting the pool or filling some tables.
Re:Router Security by toast0 on Saturday July 30, 2022 @01:53PM (#32288796)
> - No support for multi-homing.

It's not really that there's no support. It's more that the support isn't very good.

In theory, you send router advertisements, with priorities for all your routes, and when a connection drops, you stop sending that route's advertisements or start sending announcements showing that prefix is now didabled. And all the clients would do useful things with it.

But of course, they don't. They'll use an address from Prefix A and send it through router B. Or prefer the first announcement they see rather than the most preferred route. And that's assuming you can convince your CPE to set the preferrences you want.

Re:Router Security by throw0101a on Saturday July 30, 2022 @09:30AM (#32286650)
> For IPv6, this doesn't work anymore, because the IP prefix is set by the provider, without NAT the second provider will simply refuse to forward any packet which originates from an IP which doesn't have their prefix.

Is multi-WAN without a static IPv6 assignment common? For home users, generally you get one assignment. If you do need this, then you can use IPv6 ULA internally and NPTv6 for prefix translation. You can still get mostly end-to-end connectivity because the external-internal is stateless. See "IPv6 Multihoming without Network Address Translation:

* https://datatracker.ietf.org/doc/html/rfc7157

> SLAAC works by simply taking the prefix from the router and filling the rest with the mac address. Which means that anybody on the internet gets to know your mac address.

Except that this hasn't been how its worked on most OSes by default for several years; see "Temporary addresses", "Cryptographically generated addresses", and "Stable privacy addresses":

* https://en.wikipedia.org/wiki/IPv6_address#Stateless_address...

> - Captive portals: SLAAC does not directly support assigning DNS servers.

For SLAAC to work you need Router Advertisements (RAs), and and with-in those you can put DNS servers (and have since 2010):

* https://datatracker.ietf.org/doc/html/rfc6106

> So it's very easy for malicious devices to flood routing tables of switches by telling them that they own all IPv6 for the whole /64. Makes the whole network abysmally slow, or completely down.

And the same thing can be done with in the IPv4 world by trying to overflow a switch's ARP table. I think switch manufacturers have figured that out.

> Most of these issues are solved by using NAT6 (or NPT), but the issue with it, is that it breaks some applications. Ipv6 promised to get rid of NAT

Except that NAT re-writes both the IP and port and thus you have to use state tracking for replies and port mapping with IPv4 NAT. Whereas NPTv6 is stateless:

   This document describes a stateless, transport-agnostic IPv6-to-IPv6
   Network Prefix Translation (NPTv6) function that provides the
   address-independence benefit associated with IPv4-to-IPv4 NAT
   (NAPT44) and provides a 1:1 relationship between addresses in the
   "inside" and "outside" prefixes, preserving end-to-end reachability
   at the network layer.
* https://datatracker.ietf.org/doc/html/rfc6296

So you can send a message to a packet to a public IP:port combo and it will be mapped to an internal IP:port without much fuss since only the first /64 needs to be re-written. Of course only if your router/firewall is configured to allow new connections, which most consumer CPEs are not by default: they only allow replies to previous outgoing connections.

IMHO, most of the problems you describe haven't been a problem for years.

Re:Router Security by yardstick on Saturday July 30, 2022 @11:35AM (#32287594)
> Is multi-WAN without a static IPv6 assignment common?

Yes, it’s incredibly common in the small business/retail/food/shop business with fibre primary and cellular backup. These places don’t have the budget for BGP, but can afford an extra €$£20-50/month for a backup cellular circuit. They don’t need static IPs, they just need working outbound internet access. And they want failover to occur within a few seconds, not 30s or 2-3mins.

Re:Router Security by njibhu on Saturday July 30, 2022 @09:53AM (#32286830)
> And the same thing can be done with in the IPv4 world by trying to overflow a switch's ARP table. I think switch manufacturers have figured that out.

Not really though, because in Ipv4, a DHCP server can be authoritative, and switches can ignore IPs which are not assigned by the DHCP server. That's how it's usually figured out for Ipv4.

> Except that NAT re-writes both the IP and port and thus you have to use state tracking for replies and port mapping with IPv4 NAT. Whereas NPTv6 is stateless.

Yes, I didn't meant to state anything contrarily to that, but you still break applications which assumes that the local IP is the same than what is visible from a remote server on the internet.

For the captive portals, I stand corrected, and wasn't aware that you can now embed DNS directly in RAs, but stayed with the original implementation which delegates the DNS part to DHCP.

I probably have an outdated understanding of Ipv6, but to be fair it's quite a challenging exactly because of all the amendments that you linked. These are only some of the problems I encountered personally, and as you showed, each individual problem has a different RFC to solve it. You never know how stable they are and if they are properly implemented. And most of the time the safe default is to only work with the initial standard.

Re:Router Security by tryauuum on Saturday July 30, 2022 @09:00AM (#32286444)
if you don't have ipv6 access to internet, makes sense to disable it in router's kernel. It makes the attack surface smaller

By default Linux assigns a link-local ipv6 address to each interface, this can be undesirable