NI6(1)
β¨ NAME β¨
nI6 β a security assessment tool for attack vectors based on ICMPv6 Node Information messages π¦
πΈ SYNOPSIS πΈ
ni6 [-i INTERFACE] [-S LINK_SRC_ADDR | -R] [-D LINK_DST_ADDR] [-s
SRC_ADDR[/LEN] | -r] [-d DST_ADDR] [-c HOP_LIMIT] [-y FRAG_SIZE] [-u
DST_OPT_HDR_SIZE] [-U DST_OPT_U_HDR_SIZE] [-H HBH_OPT_HDR_SIZE] [-P SIZE
| -6 IPV6_ADDR | -4 IPV4_ADDR | -n NAME | -N LEN | -x LEN -o TYPE] [-Z
SIZE] [-e] [-C ICMP6_CODE] [-q NI_QTYPE] [-X NI_FLAGS] [-P SIZE | -w
IPV6_ADDR | -W IPV4_ADDR | -a NAME | -A LEN | -Q LEN -O TYPE] [-E] [-j
PREFIX[/LEN]] [-k PREFIX[/LEN]] [-J LINK_ADDR] [-K LINK_ADDR] [-b
PREFIX[/LEN]] [-g PREFIX[/LEN]] [-B LINK_ADDR] [-G LINK_ADDR] [-L | -l]
[-z] [-v] [-h]
π DESCRIPTION π
okay so ni6 lets you assess IPv6 implementations against a whole bunch of attack vectors that ride on ICMPv6 Node Information messages. it's part of the SI6 Networks' IPv6 Toolkit, which is, like, a security assessment suite for the IPv6 protocols. the whole thing is giving very much "we test the internet so it doesn't break" energy π«Ά
this tool has two modes of operation: "active" and "listening". in "active" mode the tool attacks a specific target, and in "listening" mode the tool just chills on the local network listening for ICMPv6 Node Information Query messages, then sends ICMPv6 Node Information Reply messages back in response to that traffic. iconic behavior, no cap.
- active mode is what you get if an IPv6 Destination Address is specified.
- listening mode is what you get if the
-Loption (or its long counterpart--listen) is set. - and if you specify both an attack target and the
-Loption? then the attack is launched against the specified target first, and then the tool enters listening mode to respond incoming packets with TCP segments. yes bestie, both. it does the thing then it does the other thing. π
the tool also 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 β and thus no ICMPv6 NI Reply messages are sent in response. bye π
- if any "accept filter" is specified, incoming packets must match any of the specified "accept filters" in order for the tool to respond with ICMPv6 NI Reply messages.
π OPTIONS π
ni6 takes its parameters as command-line options. each option can be specified with a short name (one character preceded with the hyphen character, as e.g. -i) or with a long name (a string preceded with two hyphen characters, as e.g. --interface). pick your fave, both slay β¨
ni6 supports IPv6 Extension Headers, including the IPv6 Fragmentation Header, which might be of use to circumvent layer-2 filtering and/or Network Intrusion Detection Systems (NIDS). however β IPv6 extension headers are not employed by default, and must be explicitly enabled with the corresponding options. no sneaky defaults here, you have to actually ask for them π§
-i INTERFACE,--interface INTERFACEβ this one tells the tool which network interface to use. if the destination address (the-doption) is a link-local address, or if "listening" (-L) mode is selected, then the interface must be explicitly specified. you can also pass the interface alongside a destination address using the-doption. π-s SRC_ADDR,--src-address SRC_ADDRβ sets the IPv6 source address (or IPv6 prefix) used as the Source Address of the attack packets. if you hand it an IPv6 prefix, the IPv6 Source Address of the ICMPv6 packets gets randomized from that prefix. so spicy πΆοΈ
note: when operating in "listening" mode, the Source Address is automatically selected depending on the IPv6 Destination Address of the ICMPv6 NI Query β unless a specific IPv6 Source Address has been specified with the -s option. it just knows, bestie.
-d DST_ADDR,--dst-address DST_ADDRβ sets the IPv6 Destination Address of the victim. you can only leave this unspecified if the-Loption is selected (i.e., if the tool is going to operate in "listening" mode). otherwise it's kinda required, yk?
note: when operating in "listening" mode, the Destination Address is automatically set to the Source Address of the incoming ICMPv6 NI Query message. it matches the vibe of whoever slid into its inbox.
--hop-limit,-Aβ specifies the Hop Limit used for the IPv6 packets. it is randomized by default π²-y SIZE,--frag-hdr SIZEβ says that the resulting packet must be fragmented. the fragment size has to be given as the argument to this option. slice it up βοΈ-u HDR_SIZE,--dst-opt-hdr HDR_SIZEβ says a Destination Options header is to be included in the resulting packet. the extension header size must be given as an argument (the header gets filled with padding options). you can stack multiple Destination Options headers by passing multiple-uoptions. more is more β¨-U HDR_SIZE,--dst-opt-u-hdr HDR_SIZEβ same idea but the Destination Options header goes into the "unfragmentable part" of the resulting packet. the header size is the argument (again, filled with padding options), and you can stack multiple of them with multiple-Uoptions. heads up though: this option is only valid if the-yoption is specified β because the concept of an "unfragmentable part" literally only makes sense when fragmentation is employed. don't skip steps bestie π-H HDR_SIZE,--hbh-opt-hdr HDR_SIZEβ includes a Hop-by-Hop Options header in the resulting packet. header size goes in as the argument (yes, padding options, you know the drill), and multiple Hop-by-Hop Options headers can be specified with multiple-Hoptions. π¦-S SRC_LINK_ADDR,--src-link-address SRC_LINK_ADDRβ sets the link-layer Source Address of the TCP segments. if you leave it unspecified, the link-layer Source Address gets set to the real link-layer address of the network interface. authentic, not cosplaying π-D DST_LINK_ADDR,--dst-link-address DST_LINK_ADDRβ sets the link-layer Destination Address of the ICMPv6 NI packets. by default, the link-layer Destination Address is automatically set to the link-layer address of the destination host (for on-link destinations) or to the link-layer of the first-hop router. autopilot mode π°οΈ--payload-size,-Pβ specifies the size (in bytes) of the ICMPv6 NI payload. π--subject-ipv6,-6β specifies an IPv6 Address to be used as the Subject of ICMPv6 Node Information Query messages. π--subject-ipv4,-4β specifies an IPv4 Address to be used as the Subject of ICMPv6 Node Information Query messages. yes, IPv4, in the IPv6 tool. we contain multitudes π«Ά--subject-name,-nβ specifies a Name to be used as the Subject of ICMPv6 Node Information Query messages. by default, the specified name is considered to be a Fully-Qualified Domain Name (FQDN). if you wanna know how to specify "single-label" names, go read the--sname-slabeloption. it's got you π--subject-fname,-Nβ tells theni6tool to set the Subject of ICMPv6 NI Query messages to a forged name of the specified length. fake it till you make it, bestie β¨
note: the forged name is a sequence of labels of'a'characters, and the maximum label size is specified by means of the--max-label-sizeoption. so, like, a lot of a's.
--subject-ename,-xβ tells theni6tool to set the Subject of an ICMPv6 NI Query message to a malformed label of the specified length. this one's useful for including a malformed label that "spans past the end of the ICMPv6 NI Query". chaos, but make it intentional π--subject-nloop,-Oβ says the Data field should be set to a Name that contains a DNS compression loop. the loop type is specified with this option, and the valid values are in the range0-1. a little infinite loop moment, as a treat π--sname-slabel,-eβ says the specified Subject Name is a single-label name, so it should be terminated with two (rather than one) NULL labels. two, not one. count them. π’--max-label-size,-Zβ specifies the maximum Name label size. it defaults to63. π--code,-Cβ specifies the ICMPv6 code. for ICMPv6 NI Query messages, if a specific Subject type is specified, the ICMPv6 code is automatically set to the corresponding value. it does the math for you π--qtype,-qβ specifies the Qtype value of ICMPv6 NI messages. for ICMPv6 NI Reply messages, if a specific Data type is specified, the ICMPv6 Qtype is automatically set to the corresponding value. again with the autofill, love that for us β¨--flags,-Xβ specifies the "Flags" field of the ICMPv6 NI messages.- for ICMPv6 NI Query messages of Qtype 3 (Node IPv6 Addresses), the "Flags" field defaults to
"GSLCA". - for ICMPv6 NI Query messages of Qtype 4 (Node IPv4 Addresses), the "Flags" field defaults to
"A". - for other ICMPv6 NI Query messages it defaults to
0. - for ICMPv6 Reply messages, the "Flags" field is copied from the corresponding ICMPv6 NI Query message. copy-paste, but make it protocol π
- for ICMPv6 NI Query messages of Qtype 3 (Node IPv6 Addresses), the "Flags" field defaults to
--data-ipv6,-wβ specifies an IPv6 Address to be used as the Data of ICMPv6 Node Information Reply messages. π--data-ipv4,-Wβ specifies an IPv4 Address to be used as the Data of ICMPv6 Node Information Reply messages. π--data-name,-aβ specifies a Name to be used as the Data of ICMPv6 Node Information Reply messages. by default the specified name is considered to be a Fully-Qualified Domain Name (FQDN). and yep, for "single-label" names, go check out the--dname-slabeloption. π§--data-fname,-Aβ tells theni6tool to set the Data of the ICMPv6 NI Reply messages to a forged name of the specified length.
note: the forged name is a sequence of labels of'a'characters, with the maximum label size being specified by means of the--max-label-sizeoption. (same a's, different field π)
--data-ename,-Qβ tells theni6tool to set the Data of ICMPv6 NI Reply messages to a malformed label of the specified length. useful for including a malformed label that "spans past the end of the ICMPv6 NI Reply". we love a boundary violation that's on purpose π--data-nloop,-O
That one sets the Data field to a Name that's packing a DNS compression loop π β you pick the loop type right there with the option, and the valid values are 0 through 2. Yeah bestie, only three. Choose wisely.
--dname-slabel,-Eβ says the Data Name you handed over is a single-label name, so it gets terminated with two NULL labels instead of just one. Double-tap that NULL, periodt. π-jSRC_ADDR,--block-srcSRC_ADDR β sets a block filter for incoming packets based on their IPv6 Source Address. You can hand it an IPv6 prefix shaped like-j prefix/prefixlen. No prefix length? It just goes ahead and assumes/128for you (i.e. it figures you meant one single IPv6 address, not a whole prefix). π«-kDST_ADDR,--block-dstDST_ADDR β sets a block filter for incoming Neighbor Solicitation messages based on their IPv6 Destination Address. Same deal, give it a prefix like-k prefix/prefixlen, and if you skip the prefix length it assumes/128(i.e. a single IPv6 address, not a prefix). π«-JSRC_ADDR,--block-link-srcSRC_ADDR β sets a block filter for incoming packets based on their link-layer Source Address. You must follow it with a link-layer address. Heads up: this one only works on Ethernet interfaces. π«-KDST_ADDR,--block-link-dstDST_ADDR β sets a block filter for incoming packets based on their link-layer Destination Address. Again, the option has to be followed by a link-layer address, and again, Ethernet interfaces only. π«-bSRC_ADDR,--accept-srcSRC_ADDR β the flip side, bestie: an accept filter for incoming packets based on their IPv6 Source Address. Specify an IPv6 prefix as-b prefix/prefixlen. Leave the prefix length out and it assumes/128(i.e. it thinks you meant a single IPv6 address rather than a prefix). π-gDST_ADDR,--accept-dstDST_ADDR β an accept filter for incoming packets based on their IPv6 Destination Address. Give it a prefix as-g prefix/prefixlen. No prefix length specified?/128it is (i.e. a single IPv6 address, not a prefix). π-BSRC_ADDR,--accept-link-srcSRC_ADDR β an accept filter for incoming Neighbor Solicitation messages based on their link-layer Source Address. Gotta follow it with a link-layer address, and it's Ethernet-only, no cap. π-GDST_ADDR,--accept-link-dstDST_ADDR β an accept filter for incoming packets based on their link-layer Destination Address. Follow it with a link-layer address; Ethernet interfaces only. π--forge-src-addr,-rβ tellsni6to forge the IPv6 Source Address of ICMPv6 NI messages. Real talk though: when you're in listening mode, unless this is set,ni6will not impersonate other nodes. π--forge-link-src-addr,-Rβ tellsni6to forge the link-layer Source Address of ICMPv6 NI messages.
Note: some interface cards (or their drivers) may straight-up silently discard packets that contain a forged link-layer Source Address. Rude, honestly. π
--loop,-lβ tells thetcp6tool to send periodic TCP segments to the victim node. How long to pause between segments is set with the-zoption, and it defaults to 1 second. Important: this option cannot be set together with the-L(--listen) option. Pick a lane, bestie. π--sleep,-zβ how long to pause between sending ICMPv6 Node Information Query messages (only relevant when--loopis set). Leave it out and it defaults to 1 second. π΄--listen,-Lβ tellsni6to go into listening mode (possibly after attacking a target you specified). And nope, this one cannot be used together with the-l(--loop) option. π--verbose,-vβ tellsni6to be verbose. Set it twice and you unlock "very verbose", where the tool also tells you which packets got discarded because of the filters you specified. Iconic. π’--help,-hβ print the help info for theni6tool. We love a helpful king. π«Ά
π EXAMPLES π
The next bits show you typical ways people actually use the ni6 tool. Vibe check passed. β¨
π Example #1
# ni6 -i eth0 --subject-ipv6 ff02::1 -d ff02::1 -q 2 -v
Send an ICMPv6 Node Information Query to the multicast address ff02::1 (that's the -d option), with a Subject IPv6 Address of ff02::1 (that's --subject-ipv6), and you're querying for Node names (-q option). Also, be verbose. π£
π¦ Example #2
# ni6 -i eth0 --data-fname 1000 -L --forge-src-addr -v
Listen for incoming ICMPv6 Node Information Query messages that are asking for node names, and reply with ICMPv6 NI Reply messages carrying a forged name of 700 bytes. Forge the IPv6 Source Address of the packets. And be verbose, obviously. π
π AUTHOR π
The ni6 tool and the corresponding manual pages were produced by Fernando Gont <fgont@si6networks.com> for SI6 Networks <http://www.si6networks.com>.
π COPYRIGHT π
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>.
And that's the whole page, bestie!! ππβ¨ This was the ni6 manual, section NI6(1) β so if you ever need to look it back up on your system, that's your page name, fr fr. Go forth and query some nodes, you absolute legend. π«Άπ
π¦ where this page comes from
- debian bookworm: ipv6toolkit 2.0+ds.1-2+b1 Β· GPL-2.0-or-later
- debian trixie: ipv6toolkit 2.0+ds.1-2+b2 Β· GPL-2.0-or-later
- epel 10: ipv6toolkit 2.2-2.el10_1 Β· GPL-3.0-or-later AND GFDL-1.3-no-invariants-or-later AND MPL-2.0
- epel 9: ipv6toolkit 2.2-2.el9 Β· GPL-3.0-or-later AND GFDL-1.3-no-invariants-or-later AND MPL-2.0
- fedora 43: ipv6toolkit 2.2-3.fc43 Β· GPL-3.0-or-later AND GFDL-1.3-no-invariants-or-later AND MPL-2.0
- fedora 44: ipv6toolkit 2.2-4.fc44 Β· GPL-3.0-or-later AND GFDL-1.3-no-invariants-or-later AND MPL-2.0
- ubuntu jammy: ipv6toolkit 2.0+ds.1-1 Β· GPL-2.0-or-later
- ubuntu noble: ipv6toolkit 2.0+ds.1-2build2 Β· GPL-2.0-or-later
- ubuntu questing: ipv6toolkit 2.0+ds.1-2build2
- ubuntu resolute: ipv6toolkit 2.0+ds.1-2build3 Β· GPL-2.0-or-later
- ubuntu stonking: ipv6toolkit 2.0+ds.1-2build3 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms