SlideShare a Scribd company logo
IPv6	for	Pentesters
Whoami
• Owen	Shearing	@rebootuser	
• www.notsosecure.com
Coming	up…
• IPv6	addresses	and	terminology	(minimal	theory!)
• Connecting	to	remote	IPv6	services;	even	if	the	ISP	doesn’t	support	native	IPv6
• Taking	a	look	at	non-IPv6	aware	toolsets	(Linux	&	Windows)
• Limitations	(or	unawareness)	of	common	security	configurations
• Putting	this	stuff	into	practice!
IPv6	for	Pentesters
A	VERY light	touch	on	addressing	&	terms
FE80::/10	- Link-Local	Unicast	Address
• The	new APIPA	(Automatic	Private	IP	Addressing,	i.e.	169.254.0.0	in	the	IPv4	world)
• Not	routable
FC00::/7	- Unique	Local	Unicast	Address	(ULA)
• Comparable	to	private	IPv4	addresses
2000::/3	– Global	Unicast	Address
• Comparable	to	public	IPv4	addresses
Useful	Multicast	Addresses:
• FF02::1	– All	nodes
• FF02::2	– All	routers
coming	up…
Local	targets
Finding	live	IPv6	hosts	on	the	local	network	is	as	easy	as:	
• ping6 -c4 -I eth0 ff02::1 (Link-Local addresses)
• ping6 -c4 -I 2a00:23c4:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx ff02::1 (Global addresses)
• thc-ipv6 https://www.thc.org/thc-ipv6/
A	dirty	one	liner	to	determine	the	IPv4,	IPv6	Link-Local	&	Global	addresses	of	a	target(s):
atk6-alive6 eth0 -l > /dev/null; atk6-alive6 eth0 > /dev/null; arp-scan -l | head -n -
2 | tail -n +3 > arp && ip -6 neigh > neigh && for line in $(cat neigh | cut -d" " -f5
|sort -u); do grep $line arp && grep $line neigh && echo -e 'n'; done; rm arp neigh
Local	targets
Example:	Mapping	out	OS	behaviour
pkt1=(Ether(dst="33:33:00:00:00:01")/IPv6(dst="ff02::1",src="fe80::a00:27ff:fe29:2f2c
")/ICMPv6EchoRequest())
• Get’s	a	valid	response
• However	in	testing,	Windows	systems	did	not	reply!
Local	targets
pkt2=(Ether(dst="33:33:00:00:00:01")/IPv6(dst="ff02::1",src="fe80::a00:27ff:fe29:2f2c
")/IPv6ExtHdrDestOpt(len=1)/ICMPv6EchoRequest())
• Sends	an	invalid	packet	and	get’s	an	invalid	response…
• …but	Windows	systems	DO reply	(hence	IPv6	enabled	host	discovery	==	complete)
Windows	gotya’s
“… the	colon	is	an	illegal	character	in	a	UNC	path	name.	
Thus,	the	use	of	IPv6	addresses	is	also	illegal	in	UNC	
names.	For	this	reason,	Microsoft	implemented	a	
transcription	algorithm	to	represent	an	IPv6	address	in	
the	form	of	a	domain	name	that	can	be	used	in	UNC	
paths,	ipv6-literal.net	…”*
*https://en.wikipedia.org/wiki/IPv6_address#Literal_IPv6_addresses_in_U
NC_path_names
On	a	side	note…
The	domain	ipv6-literal.net	is	no	longer	owned	by	Microsoft	and	is	up	for	auction!
https://gb.auctions.godaddy.com/trpItemListing.aspx?miid=137558591
Remote	targets
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.117 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::a00:27ff:fe29:2f2c prefixlen 64 scopeid 0x20<link>
“…a tunnel broker service enables you to reach the IPv6 Internet by tunneling over existing IPv4
connections from your IPv6 enabled host or router to one of our IPv6 routers…”*
*https://tunnelbroker.net/	
Speaking	the	lingo:	Tunnel	Brokers
• No	cutting	edge	techniques	needed	here…
Host	recon
nmap -Pn -nvv -sV ipv6.rebootuser.com
Warning: Hostname ipv6.rebootuser.com
resolves to 2 IPs. Using 46.101.42.219.
Other addresses for ipv6.rebootuser.com (not
scanned): 2a03:b0c0:1:d0::1650:b001
Not shown: 999 filtered ports
Reason: 998 no-responses
PORT STATE SERVICE REASON VERSION
80/tcp open http syn-ack ttl 51 nginx
1.10.0 (Ubuntu)
It’s	all	a	matter	of	perspective
nmap -Pn -nvv -sV ipv6.rebootuser.com -6
Warning: Hostname ipv6.rebootuser.com resolves
to 2 IPs. Using 2a03:b0c0:1:d0::1650:b001.
Other addresses for ipv6.rebootuser.com (not
scanned): 46.101.42.219
Not shown: 998 closed ports
Reason: 998 resets
PORT STATE SERVICE REASON VERSION
22/tcp open ssh syn-ack ttl 56 OpenSSH
7.2p2 Ubuntu 4ubuntu2.1 (Ubuntu Linux; protocol
2.0)
80/tcp open http syn-ack ttl 56 nginx
1.10.0 (Ubuntu)
Talking	to	the	target
server
{
listen [::]:80 default_server;
root /var/www/html/ipv6;
server
{
listen 80 default_server;
root /var/www/html/ipv4;
Talking	to	the	target
ls -l /var/www/html/ipv6/
total 8
-rw-r--r-- 1 www-data www-data 147 May 4 16:56 index.php
drwxr-xr-x 5 www-data www-data 4096 May 24 12:03 wp
ls -l /var/www/html/ipv4/
total 4
-rw-r--r-- 1 www-data www-data 147 May 4 16:56 index.php
• IPv6	aware:
wpscan --url http://[2a03:b0c0:1:d0::1650:b001]/wp/ --enumerate u
[+] URL: http://[2a03:b0c0:1:d0::1650:b001]/wp/
[snip]
[+] Enumerating usernames ...
[+] Identified the following 1 user/s:
+----+---------+----------------+
| Id | Login | Name |
+----+---------+----------------+
| 1 | blogger | blogger – IPv6 |
+----+---------+----------------+
• IPv6	unaware:
nikto -host http://[2a03:b0c0:1:d0::1650:b001]
- Nikto v2.1.6
---------------------------------------------------------------------------
+ ERROR: Cannot resolve hostname '[2a03'
+ 0 host(s) tested
IPv6	unaware	tools	(Linux)
• Forcing	a	square	peg	into	a	round	hole…
socat -v tcp4-listen:80,fork tcp6:[2a03:b0c0:1:d0::1650:b001]:80
[snip]...
< 2017/05/26 17:12:03.734587 length=313 from=151 to=463
r
7br
<!DOCTYPE html>
<html>
<body>
<H1>You hit my IPv6 page!</H1>Your IP: 2002:xxxx:xxxx:10:99d8:b8d5:b5e0:fef
nikto -host http://127.0.0.1
- Nikto v2.1.6
---------------------------------------------------------------------------
+ Target IP: 127.0.0.1
+ Target Hostname: 127.0.0.1
+ Target Port: 80
+ Start Time: 2017-05-26 17:12:03 (GMT1)
---------------------------------------------------------------------------
+ Server: nginx/1.10.0 (Ubuntu)
+ The anti-clickjacking X-Frame-Options header is not present.
IPv6	unaware	tools	(Linux)
IPv6	unaware	tools	(Windows)
• Taking	advantage	of	the	netsh PortProxy interface
netsh interface portproxy add v4tov6 listenport=80
connectaddress=2a03:b0c0:1:d0::1650:b001 connectport=80 protocol=tcp
https://technet.microsoft.com/en-us/library/cc731068(v=ws.10).aspx
IPv6	unaware	tools	(Windows)
• A	fairly	restrictive	iptables configuration	– would	you	agree?
sudo iptables –S
-P INPUT DROP
-P FORWARD DROP
-P OUTPUT DROP
-N LOGGING
-A INPUT -i lo -j ACCEPT
-A OUTPUT -o lo -j ACCEPT
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
-A OUTPUT -p tcp -m tcp --sport 80 -m conntrack --ctstate ESTABLISHED -j ACCEPT
-A OUTPUT -d 8.8.8.8/32 -p udp -m udp --dport 53 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
-A OUTPUT -d 66.155.40.186/32 -p tcp -m multiport --dports 80,443 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
-A OUTPUT -d 66.155.40.187/32 -p tcp -m multiport --dports 80,443 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
-A OUTPUT -d 66.155.40.188/32 -p tcp -m multiport --dports 80,443 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
-A OUTPUT -d 66.155.40.189/32 -p tcp -m multiport --dports 80,443 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
-A OUTPUT -d 66.155.40.202/32 -p tcp -m multiport --dports 80,443 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
-A OUTPUT -d 66.155.40.250/32 -p tcp -m multiport --dports 80,443 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
-A OUTPUT -j LOGGING
-A LOGGING -m limit --limit 2/min -j LOG --log-prefix "IPTables-Dropped: " --log-level 5
-A LOGGING -j DROP
iptables will	save	us.	Right?
iptables will	save	us.	Right?
AttackerVictim
It’s	all	in	the	n6me!
AttackerVictim
• Lets	fix	this…
sudo ip6tables -S
-P INPUT DROP
-P FORWARD DROP
-P OUTPUT DROP
-A INPUT -i lo -j ACCEPT
-A OUTPUT -o lo -j ACCEPT
-A INPUT -s fe80::/10 -j ACCEPT
-A INPUT -d ff00::/8 -j ACCEPT
-A INPUT -p ipv6-icmp -j ACCEPT
-A INPUT -p tcp -m multiport --dports 22,80 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
-A OUTPUT -s fe80::/10 -j ACCEPT
-A OUTPUT -d ff00::/8 -j ACCEPT
-A OUTPUT -p ipv6-icmp -j ACCEPT
-A OUTPUT -p tcp -m multiport --sports 22,80 -m conntrack --ctstate ESTABLISHED -j ACCEPT
It’s	all	in	the	n6me!
thc-ipv6
• https://github.com/vanhauser-thc/thc-ipv6
Scapy with	IPv6
• http://www.idsv6.de/Downloads/IPv6PacketCreationWithScapy.pdf
Various	IPv6	tutorials
• http://www.omnisecu.com/tcpip/ipv6/
IPv6	Essentials
• https://www.amazon.co.uk/d/cka/IPv6-Essentials-Silvia-
Hagen/1449319211/ref=sr_1_1?ie=UTF8&qid=1496609973&sr=8-1&keywords=ipv6+essentials
That’s	all	folks!	
Tools	and	resources	worth	a	look
IPv6 for Pentesters

More Related Content

PPT
Linux networking
DOC
Networking Tutorial Goes to Basic PPP Configuration
PPTX
Juniper JNCIA – Juniper OSPF Route Configuration
PPTX
Cisco CCNA IP SLA with tracking configuration
PPTX
Juniper JNCIA – Juniper RIP and OSPF Route Configuration
PPTX
Cisco CCNA OSPF IPV6 Configuration
KEY
Fosscon 2012 firewall workshop
PDF
Evaluation of OpenFlow in RB750GL
Linux networking
Networking Tutorial Goes to Basic PPP Configuration
Juniper JNCIA – Juniper OSPF Route Configuration
Cisco CCNA IP SLA with tracking configuration
Juniper JNCIA – Juniper RIP and OSPF Route Configuration
Cisco CCNA OSPF IPV6 Configuration
Fosscon 2012 firewall workshop
Evaluation of OpenFlow in RB750GL

What's hot (15)

PDF
True stories on the analysis of network activity using Python
PPT
IP tables
PPTX
Juniper JNCIA – Juniper RIP Route Configuration
DOCX
portfolio2
DOCX
25 most frequently used linux ip tables rules examples
PPT
In depth understanding network security
PPTX
Cisco CCNA IPV6 Static Configuration
PPTX
Cisco CCNA EIGRP IPV6 Configuration
PPTX
Cisco CCNA GRE Tunnel Configuration
PPTX
Cisco CCNA- How to Configure Multi-Layer Switch
DOC
Catalystの設定シナリオ(メモ段階)
DOCX
Ccna command
PPTX
Juniper JNCIA – Juniper Floating Static Route Configuration
PPTX
Cisco CCNA-Standard Access List
PDF
Practice Lab CSC
True stories on the analysis of network activity using Python
IP tables
Juniper JNCIA – Juniper RIP Route Configuration
portfolio2
25 most frequently used linux ip tables rules examples
In depth understanding network security
Cisco CCNA IPV6 Static Configuration
Cisco CCNA EIGRP IPV6 Configuration
Cisco CCNA GRE Tunnel Configuration
Cisco CCNA- How to Configure Multi-Layer Switch
Catalystの設定シナリオ(メモ段階)
Ccna command
Juniper JNCIA – Juniper Floating Static Route Configuration
Cisco CCNA-Standard Access List
Practice Lab CSC
Ad

Similar to IPv6 for Pentesters (20)

PDF
Network Security Best Practice (BCP38 & 140)
PPTX
6th floorsharingsession ep 1 - networking - arp v 1.0
PDF
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online
PDF
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120
PPTX
How to convert your Linux box into Security Gateway - Part 1
DOCX
25 most frequently used linux ip tables rules examples
PDF
The Next Generation Firewall for Red Hat Enterprise Linux 7 RC
PDF
AutoIP -A mechanism for IPv6 migration and IPv4 sunsetting by Shishio Tsuchiy...
PDF
OpenStack Havana over IPv6
PPTX
Ipv6
PDF
Multihomed Linux router
PDF
Iptables presentation
PPTX
Getting started with IPv6
PDF
Complete squid &amp; firewall configuration. plus easy mac binding
ODP
nftables - the evolution of Linux Firewall
PDF
Implementing an IPv6 Enabled Environment for a Public Cloud Tenant
PDF
IPv6 Security - Hacker Halted 2013
PDF
Deploying IPv6 in OpenStack Environments
PDF
IPv6 in CloudStack Basic Networking
PDF
Short Introduction to IPv6
Network Security Best Practice (BCP38 & 140)
6th floorsharingsession ep 1 - networking - arp v 1.0
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120
How to convert your Linux box into Security Gateway - Part 1
25 most frequently used linux ip tables rules examples
The Next Generation Firewall for Red Hat Enterprise Linux 7 RC
AutoIP -A mechanism for IPv6 migration and IPv4 sunsetting by Shishio Tsuchiy...
OpenStack Havana over IPv6
Ipv6
Multihomed Linux router
Iptables presentation
Getting started with IPv6
Complete squid &amp; firewall configuration. plus easy mac binding
nftables - the evolution of Linux Firewall
Implementing an IPv6 Enabled Environment for a Public Cloud Tenant
IPv6 Security - Hacker Halted 2013
Deploying IPv6 in OpenStack Environments
IPv6 in CloudStack Basic Networking
Short Introduction to IPv6
Ad

More from camsec (6)

PDF
Cleartext and PtH still alive
PDF
Custom Rules & Broken Tools (Password Cracking)
PDF
Reversing for beginners 2
PDF
Active Directory Delegation - By @rebootuser
PDF
Working with NIM - By Jordan Hrycaj
PPTX
Basic ASM by @binaryheadache
Cleartext and PtH still alive
Custom Rules & Broken Tools (Password Cracking)
Reversing for beginners 2
Active Directory Delegation - By @rebootuser
Working with NIM - By Jordan Hrycaj
Basic ASM by @binaryheadache

Recently uploaded (20)

PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
A comparative study of natural language inference in Swahili using monolingua...
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
Getting Started with Data Integration: FME Form 101
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PPTX
Tartificialntelligence_presentation.pptx
PPT
What is a Computer? Input Devices /output devices
PDF
Unlock new opportunities with location data.pdf
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
Hybrid model detection and classification of lung cancer
PPTX
Modernising the Digital Integration Hub
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Enhancing emotion recognition model for a student engagement use case through...
1 - Historical Antecedents, Social Consideration.pdf
Univ-Connecticut-ChatGPT-Presentaion.pdf
A comparative study of natural language inference in Swahili using monolingua...
Module 1.ppt Iot fundamentals and Architecture
Getting Started with Data Integration: FME Form 101
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Tartificialntelligence_presentation.pptx
What is a Computer? Input Devices /output devices
Unlock new opportunities with location data.pdf
NewMind AI Weekly Chronicles – August ’25 Week III
A novel scalable deep ensemble learning framework for big data classification...
Hybrid model detection and classification of lung cancer
Modernising the Digital Integration Hub
Assigned Numbers - 2025 - Bluetooth® Document
Getting started with AI Agents and Multi-Agent Systems
sustainability-14-14877-v2.pddhzftheheeeee
Developing a website for English-speaking practice to English as a foreign la...
A contest of sentiment analysis: k-nearest neighbor versus neural network

IPv6 for Pentesters