Kuboid
Open Luck·Kuboid.in

Internet Protocol v. 6

DEFCONConference1,582 views25:18over 1 year ago

This talk provides a foundational technical overview of IPv6 addressing, subnetting, and configuration mechanisms. It explains the structure of IPv6 addresses, the role of SLAAC (Stateless Address Auto-Configuration), and the function of privacy extensions in modern network environments. The presentation highlights the practical differences between IPv4 and IPv6, specifically focusing on address space management and the use of shorthand notation like double colons.

Why Your IPv6 Addressing Strategy Is Leaking Internal Network Topology

TLDR: IPv6 address configuration via SLAAC and EUI-64 creates predictable, hardware-linked identifiers that persist across network boundaries. This research demonstrates how these mechanisms allow for tracking and correlation of devices as they roam between different subnets. Security teams must implement privacy extensions and static addressing policies to prevent internal network mapping and user tracking.

Most security professionals treat IPv6 as a black box, assuming it is just a larger version of the address space we have managed for decades. This assumption is dangerous. While we spent years hardening IPv4 environments against scanning and enumeration, IPv6 introduces native configuration mechanisms that effectively broadcast device identity and network location by design. If you are conducting a red team engagement or performing a security assessment, you are likely ignoring the most potent source of internal reconnaissance available on modern enterprise networks.

The Mechanics of SLAAC and EUI-64

Stateless Address Auto-Configuration, or SLAAC, is the default way most modern operating systems acquire an IPv6 address. Unlike DHCPv4, which relies on a central server to lease an address, SLAAC allows a host to generate its own address by combining a network prefix advertised by the local router with an interface identifier.

The most common method for generating this identifier is EUI-64. This process takes the 48-bit MAC address of the network interface, inserts a 16-bit value (0xFFFE) in the middle, and flips the seventh bit of the first byte. The result is a 64-bit interface identifier that is mathematically derived from the hardware address. Because the MAC address is globally unique and burned into the hardware, the resulting IPv6 address becomes a permanent, globally unique identifier for that specific device.

When a device moves from the office Wi-Fi to a coffee shop or a home network, it receives a new prefix, but the interface identifier remains constant. This allows anyone monitoring traffic at different points in the network to correlate the device identity across disparate subnets. For a pentester, this means you can track a target across the entire enterprise infrastructure without ever needing to perform an active scan.

Privacy Extensions and the Illusion of Anonymity

To combat the tracking risks inherent in EUI-64, the industry introduced Privacy Extensions for SLAAC. These extensions generate temporary, randomized interface identifiers that rotate periodically. While this prevents long-term tracking, it creates a new headache for network administrators and security monitoring tools.

If you are performing an audit, you will notice that a single host might have multiple active IPv6 addresses: one stable address derived from the MAC address and several temporary addresses used for outbound traffic. This behavior often bypasses traditional firewall rules that rely on static IP-to-identity mapping. If your security policy assumes a one-to-one relationship between an IP and a host, you are likely missing significant portions of the traffic flow.

Practical Reconnaissance in the Field

During an engagement, the first step is to identify the network prefix. You can do this by listening for Router Advertisement (RA) packets. Once you have the prefix, you do not need to run a noisy Nmap scan. Instead, you can passively monitor the network to build a map of active hosts. Because the interface identifier is often static, you can identify the manufacturer of the device by looking at the Organizationally Unique Identifier (OUI) portion of the address.

When you need to interact with a specific host, remember that IPv6 addresses are not always easy to type into a browser or a tool like curl. The shorthand notation using double colons (::) is essential for managing these long strings. If you are trying to reach a host, ensure you are using the correct scope. For example, link-local addresses starting with fe80:: are only reachable on the local segment. If you are testing a web application, you must wrap the address in square brackets to distinguish the address from the port number:

curl -v http://[2607:f8b0:4005:811::200e]:80/

This syntax is non-negotiable. If you omit the brackets, the shell will interpret the colons as separators for the port, leading to connection errors that waste your time during a time-boxed assessment.

Defensive Hardening

Defenders must move away from the "set it and forget it" mentality regarding IPv6. If your organization is not actively managing IPv6, you are likely running a shadow network that is already being enumerated. Disable SLAAC on sensitive segments where you require strict control over address assignment. Use DHCPv6 if you need to maintain a centralized audit log of which device held which address at a specific time.

Furthermore, ensure that your perimeter firewalls are not just filtering IPv4 traffic. Many organizations have robust IPv4 egress filtering but leave their IPv6 stack wide open, allowing internal hosts to communicate directly with the internet via global unicast addresses. This bypasses NAT, which, while not a security feature, often acts as a convenient barrier against direct inbound connections.

The transition to IPv6 is not just about address exhaustion. It is a fundamental shift in how devices identify themselves and communicate with the network. If you are not accounting for the predictability of EUI-64 and the complexity of privacy extensions, you are leaving the door open for anyone who knows how to listen to the traffic. Start by auditing your own network segment and see how many devices you can identify without sending a single packet. You might be surprised by how much your hardware is telling the world.

Premium Security Audit

We break your app before they do.

Professional penetration testing and vulnerability assessments by the Kuboid Secure Layer team. Securing your infrastructure at every layer.

Get in Touch
Official Security Partner
kuboid.in