ICMP6(1)

This is icmp6(1), straight out of the General Commands Manual. Yeah bestie, we're doing the whole thing together β€” grab a boba, get comfy. πŸ§‹βœ¨


πŸ’– NAME πŸ’–

icmp6 β€” it's a security assessment tool for attack vectors based on ICMPv6 packets. periodt. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

icmp6 [-i INTERFACE] [-s SRC_ADDR[/LEN]] [-d DST_ADDR] [-S
LINK_SRC_ADDR] [-D LINK-DST-ADDR] [-c HOP_LIMIT] [-y FRAG_SIZE] [-u
DST_OPT_HDR_SIZE] [-U DST_OPT_U_HDR_SIZE] [-H HBH_OPT_HDR_SIZE] [-t
TYPE[:CODE] | -e CODE | -A CODE -V CODE -R CODE] [-r TARGET_ADDR] [-x
PEER_ADDR] [-c HOP_LIMIT] [-m MTU] [-O POINTER] [-p PAYLOAD_TYPE] [-P
PAYLOAD_SIZE] [-n] [-a SRC_PORTL[:SRC_PORTH]] [-o DST_PORTL[:DST_PORTH]]
[-X TCP_FLAGS] [-q TCP_SEQ] [-Q TCP_ACK] [-V TCP_URP] [-w TCP_WIN] [-M]
[-j PREFIX[/LEN]] [-k PREFIX[/LEN]] [-J LINK_ADDR] [-K LINK_ADDR] [-b
PREFIX[/LEN]] [-g PREFIX[/LEN]] [-B LINK_ADDR] [-G LINK_ADDR] [-f] [-L |
-l] [-z] [-v] [-h]

🌸 DESCRIPTION 🌸

okay so icmp6 lets you assess IPv6 implementations against a whole menu of attack vectors based on ICMPv6 error messages. It's part of the SI6 Networks' IPv6 Toolkit: a security assessment suite for the IPv6 Protocols. iconic, honestly. πŸ‘‘

This tool has two modes of operation: "active" and "listening". In active mode, the tool attacks a specific target without listening to any incoming traffic. In listening mode, the tool listens to traffic on the local network and launches an attack in response to such traffic. Active mode is employed if an IPv6 Destination Address is specified. Listening mode is employed if the -L option (or its long counterpart --listen) is set. And if you specify both an attack target and the -L option, the attack gets launched against the specified target, and then the tool enters listening mode to respond to incoming packets with ICMPv6 error messages. multitasking queen. πŸ’…

The tool supports filtering of incoming packets based on the Ethernet Source Address, the Ethernet Destination Address, the IPv6 Source Address, and the IPv6 Destination Address. There are two types of filters: "block filters" and "accept filters". If any block filter is specified, and the incoming packet matches any of those filters, the message is discarded β€” so no ICMPv6 error messages get sent in response, sorry not sorry. If any accept filter is specified, incoming packets must match the specified filters in order for the tool to respond with ICMPv6 error messages. no filter, no entry. 🚫


✨ OPTIONS ✨

icmp6 takes its parameters as command-line options. Each of the options can be specified with a short name (one character preceded by the hyphen character, like -i) or with a long name (a string preceded by two hyphen characters, like --interface). pick your fave, both slay. 🫢

The icmp6 tool supports IPv6 fragmentation, which might be of use to circumvent layer-2 filtering and/or Network Intrusion Detection Systems (NIDS). However, IPv6 fragmentation is not enabled by default, and must be explicitly enabled with the -y option. opt in or opt out, bestie. πŸ”₯

  • -i INTERFACE, --interface INTERFACE β€” tells the tool which network interface it's gonna use. If the destination address (-d option) is a link-local address, or the listening (-L) mode is selected, the interface must be explicitly specified. The interface may also be specified along with a destination address, with the -d option. πŸ“‘
  • -s SRC_ADDR, --src-address SRC_ADDR β€” sets the IPv6 source address (or IPv6 prefix) used for the Source Address of the attack packets. Give it a prefix and the Source Address gets randomly selected from that prefix. Leave it unspecified and the IPv6 Source Address of the attack packets is randomly selected from the prefix ::/0. chaos mode activated ✨
  • -d DST_ADDR, --dst-address DST_ADDR β€” the IPv6 Destination Address of the victim. You can only leave this unspecified if the -L option is selected (that is, if the tool is to operate in listening mode). When operating in listening mode (-L option), the IPv6 Destination Address is selected according to the IPv6 Source Address of the incoming packet. reactive queen πŸ’…
  • -S SRC_LINK_ADDR, --src-link-address SRC_LINK_ADDR β€” the link-layer Source Address of the attack packets. Left unspecified? It gets randomized. 🎲
  • -D DST_LINK_ADDR, --dst-link-address DST_LINK_ADDR β€” the link-layer Destination Address of the attack packets. If left unspecified, it's set to that of the local router (for non-local destinations) or to that corresponding to the destination host (for local hosts). When operating in listening mode, the link-layer Destination Address is set to the link-layer Source Address of the incoming packet. πŸ”
  • -c HOP_LIMIT, --hop-limit HOP_LIMIT β€” the Hop Limit to be used for the Redirect messages. If this option is left unspecified, the Hop Limit is randomized to a value between 64 and 243. πŸŽ€
  • -y SIZE, --frag-hdr SIZE β€” specifies that the ICMPv6 error messages must be fragmented. The fragment size must be specified as an argument to this option. βœ‚οΈ
  • -u HDR_SIZE, --dst-opt-hdr HDR_SIZE β€” specifies that a Destination Options header is to be included in the outgoing packet(s). The extension header size must be specified as an argument to this option (the header is filled with padding options). Multiple Destination Options headers may be specified by means of multiple -u options. stack 'em up 🧚
  • -U HDR_SIZE, --dst-opt-u-hdr HDR_SIZE β€” specifies a Destination Options header to be included in the "unfragmentable part" of the outgoing packet(s). The header size must be specified as an argument to this option (the header is filled with padding options). Multiple Destination Options headers may be specified by means of multiple -U options. ✨
  • -H HDR_SIZE, --hbh-opt-hdr HDR_SIZE β€” specifies that a Hop-by-Hop Options header is to be included in the outgoing packet(s). The header size must be specified as an argument to this option (the header is filled with padding options). Multiple Hop-by-Hop Options headers may be specified by means of multiple -H options. πŸ¦‹
  • -t TYPE, --icmp6 TYPE β€” the Type and Code of the ICMPv6 error message, in the form --icmp6 TYPE:CODE. If left unspecified, the ICMPv6 error message defaults to "Parameter Problem, Erroneous header field encountered" (Type 4, Code 0). Note: other options (such as --icmp6-unreachable) provide an alternative for setting the ICMPv6 Type and Code. πŸ’œ
  • -e, --icmp6-dest-unreach β€” sets the ICMPv6 Type to 1 (Destination Unreachable), and lets the user specify the ICMPv6 Code, in the form --icmp6-dest-unreach CODE. Note: this option is an alternative to the -t option for setting the ICMPv6 Type and Code. πŸ™ˆ
  • -E, --icmp6-packet-too-big β€” sets the ICMPv6 Type to 1, and the ICMPv6 Code to 0 (Packet Too Big). Note: this option is an alternative to the -t option for setting the ICMPv6 Type and Code. πŸ”₯
  • -A, --icmp6-time-exceeded β€” sets the ICMPv6 Type to 3 (Time Exceeded), and lets the user specify the ICMPv6 Code, in the form --icmp6-time-exceeded CODE. Note: this option is an alternative to the -t option for setting the ICMPv6 Type and Code. ⏰
  • -R, --icmp6-param-problem β€” sets the ICMPv6 Type to 4 (Parameter Problem), and lets the user specify the ICMPv6 Code, in the form --icmp6-param-problem CODE. Note: this option is an alternative to the -t option for setting the ICMPv6 Type and Code. 🚨
  • -m MTU, --mtu MTU β€” specifies the value of the "MTU" field of ICMPv6 Packet Too Big error messages. πŸ“
  • -O POINTER, --pointer POINTER β€” specifies the value of the "Pointer" field of ICMPv6 Parameter Problem error messages. πŸ‘‰πŸ‘ˆ
  • -p TYPE, --payload-type TYPE β€” specifies the payload type to be included in the ICMPv6 Payload. Currently supported payloads are TCP, UDP, and ICMP6. The payload-type defaults to TCP. When the tool operates in Listening mode, this option specifies the type of packets the tool will listen to β€” and in listening mode there's one extra type available: IP6, which makes the tool listen to all IPv6 traffic. πŸ‘‚
  • -P SIZE, --payload-size SIZE β€” size of the payload to be included in the ICMPv6 Payload (with the payload type being specified by the -p option). By default, as many bytes as possible are included, without exceeding the minimum IPv6 MTU (1280 bytes). πŸ“
  • -n, --no-payload β€” specifies that no payload should be included within the ICMPv6 error message. nothing. zero. nope. 🚫
  • -C HOP_LIMIT, --ipv6-hlim HOP_LIMIT β€” the Hop Limit of the IPv6 packet included in the payload of the ICMPv6 error message. If this option is left unspecified, the Hop Limit is randomized to a value between 64 and 243. πŸŽ€
  • -r ADDRESS, --target-addr ADDRESS β€” the Source Address of the IPv6 packet that is embedded in the ICMPv6 error message. If left unspecified, it's set to the same address as the IPv6 Destination Address of the outer packet. When operating in Listening mode, the tool automatically embeds a piece of the received packet (unless otherwise specified by the -n option), and hence the IPv6 Source Address of the embedded IPv6 packet is set accordingly. πŸ“¬
  • -x ADDRESS, --peer-addr ADDRESS β€” the Destination Address of the IPv6 packet that is embedded in the ICMPv6 error message. If left unspecified, it's set to a random value. When operating in Listening mode, the tool automatically embeds a piece of the received packet (unless otherwise specified by the -n option), and hence the IPv6 Destination Address of the embedded IPv6 packet is set accordingly. Note: since the victim host is expected to check that the ICMPv6 error message corresponds to an ongoing communication instance, when operating in active mode this option should be set to a value that corresponds to an ongoing communication instance. πŸ‘€
  • -o PORT, --target-port PORT

This option specifies the Source Port of the TCP or UDP packet contained in the ICMPv6 Payload. If a port range is specified in the form -o LOWPORT:HIGHPORT the tool will send one ICMPv6 error message for each port in that range. So like, port range = spam those errors, bestie. πŸ’…

Note: This option is meaningful only if TCP or UDP have been specified (with the -p option).
  • -a PORT, --peer-port PORT β€” okay so this one sets the Destination Port of the TCP or UDP packet chillin' inside the ICMPv6 Payload. If you give it a port range like -o LOWPORT:HIGHPORT, it's gonna send one ICMPv6 error message for every single port in that range. So many errors, so little time. ✨
Note: This option is meaningful only if TCP or UDP have been specified (with the -p option).
  • -X TCP_FLAGS, --tcp-flags TCP_FLAGS β€” this sets the flags of the TCP header inside the ICMPv6 Payload. You specify them as "F" (FIN), "S" (SYN), "R" (RST), "P" (PSH), "A" (ACK), "U" (URG), "X" (no flags). If you don't specify, only the "ACK" bit is set. So default is just ACK, periodt. πŸŽ€
Note: This option is meaningful only if TCP has been specified (with the -p option).
  • -q SEQ_NUMBER, --tcp-seq SEQ_NUMBER β€” sets the Sequence Number of the TCP header in the ICMPv6 Payload. If you leave it out, the Sequence Number is randomized. So it's giving mystery vibes. 🎲
Note: This option is meaningful only if TCP has been specified (with the -p option).
  • -Q ACK_NUMBER, --tcp-ack ACK_NUMBER β€” sets the Acknowledgment Number of the TCP header in the ICMPv6 Payload. If unspecified, it's randomized too. Random is the default, no cap. 😭
Note: This option is meaningful only if TCP has been specified (with the -p option).
  • -V URG_POINTER, --tcp-urg URG_POINTER β€” sets the Urgent Pointer of the TCP header in the ICMPv6 Payload. If you don't set it, it defaults to 0. Zero, nada, zilch. 🫢
Note: This option is meaningful only if TCP has been specified (with the -p option).
  • -w TCP_WIN, --tcp-win TCP_WIN β€” sets the Window of the TCP header in the ICMPv6 Payload. If left unspecified, the Window is randomized. Surprise! 🎁
Note: This option is meaningful only if TCP has been specified (with the -p option).
  • -j SRC_ADDR, --block-src SRC_ADDR β€” sets a block filter for incoming packets based on their IPv6 Source Address. You can give an IPv6 prefix like -j prefix/prefixlen. If you don't give a prefix length, it assumes /128, meaning it treats it as a single IPv6 address, not a prefix. So it's like, "block this exact address, bestie." 🚫
  • -k DST_ADDR, --block-dst DST_ADDR β€” sets a block filter for incoming Neighbor Solicitation messages based on their IPv6 Destination Address. You can give an IPv6 prefix like -k prefix/prefixlen. If no prefix length, it assumes /128 (single IPv6 address). Bye bye, NS messages from that address. πŸ‘‹
  • -J SRC_ADDR, --block-link-src SRC_ADDR β€” sets a block filter for incoming packets based on their link-layer Source Address. You must follow it with a link-layer address (currently only Ethernet is supported). So like, MAC address goes here. πŸ“‘
  • -K DST_ADDR, --block-link-dst DST_ADDR β€” sets a block filter for incoming packets based on their link-layer Destination Address. Must be followed by a link-layer address (currently only Ethernet is supported). Same vibe, different layer. πŸ¦‹
  • -b SRC_ADDR, --accept-src SRC_ADDR β€” sets an accept filter for incoming packets based on their IPv6 Source Address. You can specify an IPv6 prefix like -b prefix/prefixlen. If no prefix length, it assumes /128 (single IPv6 address). So this is the VIP list. πŸ’–
  • -g DST_ADDR, --accept-dst DST_ADDR β€” sets an accept filter for incoming packets based on their IPv6 Destination Address. You can specify an IPv6 prefix like -g prefix/prefixlen. If no prefix length, it assumes /128 (single IPv6 address). Another VIP list, but for destination. 🌈
  • -B SRC_ADDR, --accept-link-src SRC_ADDR β€” sets an accept filter for incoming Neighbor Solicitation messages based on their link-layer Source Address. Must be followed by a link-layer address (currently only Ethernet is supported). So NS messages from this MAC get the green light. βœ…
  • -G DST_ADDR, --accept-link-dst DST_ADDR β€” sets an accept filter for incoming packets based on their link-layer Destination Address. Must be followed by a link-layer address (currently only Ethernet is supported). Green light for that destination MAC. πŸ’š
  • -f, --sanity-filters β€” this automatically adds a "block filter" for the IPv6 Source Address of the packets. So it's like a little sanity check for your filters. 🧠
Note: This option may be desirable when the tool operates in "Listening mode" and is instructed to listen to ICMP6 or IP6 packets (thus possibly avoiding packet loops).
  • -l, --loop β€” tells the icmp6 tool to send periodic ICMPv6 error messages to the victim node. The amount of time to pause between sending can be set with the -z option, and it defaults to 1 second. So it's a loop, a cycle, a vibe. πŸ”
Note: This option cannot be set in conjunction with the -L (--listen) option.
  • -z, --sleep β€” specifies the amount of time to pause between sending ICMPv6 error messages (when the --loop option is set). If left unspecified, it defaults to 1 second. So you can control the drama pacing. ⏳
  • -L, --listen β€” instructs the icmp6 tool to operate in "Listening" mode (possibly after attacking a given node). So it's like, eavesdrop mode. πŸ‘‚
Note: This option cannot be used in conjunction with the -l (--loop) option.
  • -v, --verbose β€” tells the icmp6 tool to be verbose. When set twice, it's "very verbose", and it also tells you which packets have been accepted or discarded as a result of applying the specified filters. So set it twice for extra tea. β˜•
  • -h, --help β€” prints help information for the icmp6 tool. The classic. πŸ†˜

✨ EXAMPLES ✨

The following sections illustrate typical use cases of the icmp6 tool. So like, real-life scenarios, bestie.

Example #1

# icmp6 -i eth0 -L -p TCP -v

The tool employs the network interface eth0, and operates in "Listening" mode (-L option). Each ICMPv6 error message will contain the ICMPv6 Payload as many bytes from the captured packet without exceeding the minimum IPv6 MTU (1280 bytes). The tool will print detailed information about the attack (-v option). So it's like, capturing and listening, no cap. 🎧

Example #2

# icmp6 --icmp6-packet-too-big -p ICMP6 -d 2001:db8:10::1 --peer-addr
2001:db8:11::2 -m 1240 -v

The tool will send an ICMPv6 Packet Too Big error message that advertises an MTU of 1240 bytes. The ICMPv6 error message will be sent to the address " "2001:db8:10::1". The ICMPv6 error message will embed an ICMPv6 Echo Request message with the Source Address set to "2001:db8:10::1" (i.e., Destination Address of the error message), and the Destination Address set to "2001:db8:11::2) ("--peer-addr" option). The value of the "Identifier" and "Sequence Number" fields of the embedded ICMPv6 Echo Request message will be randomized. The tool will provide detailed information about the attack (-v option). So it's a big packet message, with embedded echo request, and random IDs. Iconic. πŸ’…


πŸ‘€ SEE ALSO πŸ‘€

RFC 5927 (available at <http://www.rfc-editor.org/rfc/rfc5927.txt>) and "Security Assessment of the Transmission Control Protocol (TCP)" (available at <http://www.si6networks.com/publications/tn-03-09-security-assessment-TCP.pdf>) for a discussion of ICMPv6 attacks against TCP. So if you wanna read the lore, go check those out. πŸ“š


πŸ’– AUTHOR πŸ’–

The icmp6 tool and the corresponding manual pages were produced by Fernando Gont <fgont@si6networks.com> for SI6 Networks. King behavior. πŸ‘‘


Copyright (c) 2011-2013 Fernando Gont.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is available at <http://www.gnu.org/licenses/fdl.html>. So you can share, remix, whatever, just keep the license. πŸ’–


And that's a wrap! The footer says ICMP6(1), so you know it's legit. Catch you later, bestie! πŸ’…βœ¨

πŸ“¦ where this page comes from