In this day and age, networks can no longer be scanned only on IPv4 networks. Many companies are gradually migrating to IPv6, and this has serious consequences for us as pentesters. Unlike IPv4, IPv6 addresses consist of 128 bits, whereby the first 64 bits (0-63) represent the interface identifier and the last 64 bits (64-127) the network. This results in 18 446 744 073 709 551 616 addresses in a /64-IPv6 network, which must be examined in a penetration test. (Try to say this number out loud.)

Even if we were to plan an entire year for a penetration test, we would have to scan about 584 billion IPs per second, as the following calculation demonstrates:

  • 18 446 744 073 709 551 616 IPs / 365 days / 24 hours / 60 min / 60 sec

This means it’s impossible to check all addresses for even the availability of a single service during a pentest. Yet still, IPv6 does not provide realistic protection against an attacker, only a surmountable hurdle. As attackers, we are not the only ones scanning for IT systems in a network: the IT administrators also have to be able to manage their systems. Let’s take a look at the way IPv6 addresses are spelled out.

2ab0:a0b0:1:12:dead:0:b:1 is an example of an IPv6 address. As we can see, IPv6 addresses are divided into eight 16-bit blocks, among others, and indicated in hexadecimal digits. This allows for words like dead or beef to be chosen. Since administrators are only human after all, they will generally use a certain naming scheme. For example, if we already know the existing IPv6 addresses from the domain name resolution, we may be able to identify or guess a naming scheme.

In case of an internal penetration test, we have another technique for finding IPv6 addresses. By sending a multicast to all nodes via the command ping6 ff02::1%${interface}, we can identify IT systems in our local IPv6 network. However, only the target systems that accept ping requests will respond to our initial request. Furthermore, we will get link-local addresses in response to our command, which is why we need to specify the interface identifier behind the addresses in order to connect to our target systems. For example, an SSH connection request to an IPv6 link-local address would have the following syntax:

  • ssh dwestcott@fe80::c48d:69ff:fe5f:8227%eth0

Last modified: Dec. 15, 2022

Penetation Testing Course

About Pentest Training

Discover the world of penetration testing. Learn how to infiltrate networks and successfully penetrate systems and applications. Acquire the necessary hacking skills and use them when conducting professional penetration tests. Become a real penetration tester. Here you will find the free documents for the Pentest Training of binsec academy GmbH. The binsec academy GmbH offers the corresponding security training lab environments and certifications. However, the knowledge and wiki articles on hacking and penetration testing is universal.

About binsec academy GmbH

binsec academy GmbH is the European provider of online security training with virtual laboratory environments. The core component of all security training is the focus on practice, practice and more practice. In the wiki here you will find the public and freely available course materials. You can put the theory into practice at binsec-academy.com.