Nmap broadcast-igmp-discovery NSE Script


This page contains detailed information about how to use the broadcast-igmp-discovery NSE script. For list of all NSE scripts, visit the Nmap NSE Library.

Select:
Overview
Error Messages

Script Overview


Script source code: https://github.com/nmap/nmap/tree/master/scripts/broadcast-igmp-discovery.nse
Script categories: discovery, safe, broadcast
Target service / protocol: -
Target network port(s): -
List of CVEs: -

Script Description


The broadcast-igmp-discovery.nse script discovers targets that have IGMP Multicast memberships and grabs interesting information.

The scripts works by sending IGMP Membership Query message to the 224.0.0.1 All Hosts multicast address and listening for IGMP Membership Report messages. The script then extracts all the interesting information from the report messages such as the version, group, mode, source addresses (depending on the version).

The script defaults to sending an IGMPv2 Query but this could be changed to another version (version 1 or 3) or to sending queries of all three version. If no interface was specified as a script argument or with the -e option, the script will proceed to sending queries through all the valid ethernet interfaces.

Broadcast-igmp-discovery NSE Script Arguments


This is a full list of arguments supported by the broadcast-igmp-discovery.nse script:

broadcast-igmp-discovery.interface

Network interface to use.

broadcast-igmp-discovery.mgroupnamesdb

Database with multicast group names

broadcast-igmp-discovery.timeout

Time to wait for reports in seconds. Defaults to 5 seconds.

broadcast-igmp-discovery.version

IGMP version to use. Could be 1, 2, 3 or all. Defaults to 2

max-newtargets

Sets the number of the maximum allowed new targets. If set to 0 or less then there is no limit. The default value is 0.

newtargets

If specified, lets NSE scripts add new targets.

- - -
To use these script arguments, add them to the Nmap command line using the --script-args arg1=value,[arg2=value,..] syntax. For example:

nmap --script=broadcast-igmp-discovery --script-args broadcast-igmp-discovery.interface=value,broadcast-igmp-discovery.mgroupnamesdb=value <target>

Broadcast-igmp-discovery NSE Script Example Usage


Here's an example of how to use the broadcast-igmp-discovery.nse script:

nmap --script broadcast-igmp-discovery

nmap --script broadcast-igmp-discovery -e wlan0

nmap --script broadcast-igmp-discovery
--script-args 'broadcast-igmp-discovery.version=all, broadcast-igmp-discovery.timeout=3'

Broadcast-igmp-discovery NSE Script Example Output


Here's a sample output from the broadcast-igmp-discovery.nse script:

Pre-scan script results:
| broadcast-igmp-discovery:
|   192.168.2.2
|     Interface: tap0
|     Version: 3
|     Group: 239.1.1.1
|       Mode: EXCLUDE
|       Description: Organization-Local Scope (rfc2365)
|     Group: 239.1.1.2
|       Mode: EXCLUDE
|       Description: Organization-Local Scope (rfc2365)
|     Group: 239.1.1.44
|       Mode: INCLUDE
|       Description: Organization-Local Scope (rfc2365)
|       Sources:
|           192.168.31.1
|   192.168.1.3
|     Interface: wlan0
|     Version: 2
|     Group: 239.255.255.250
|     Description: Organization-Local Scope (rfc2365)
|   192.168.1.3
|     Interface: wlan0
|     Version: 2
|     Group: 239.255.255.253
|     Description: Organization-Local Scope (rfc2365)
|_  Use the newtargets script-arg to add the results as targets

Broadcast-igmp-discovery NSE Script Example XML Output


There is no sample XML output for this module. However, by providing the -oX <file> option, Nmap will produce a XML output and save it in the file.xml file.

Author


  • Hani Benhabiles

References


See Also


Related NSE scripts to the broadcast-igmp-discovery.nse script:

Visit Nmap NSE Library for more scripts.

The broadcast-igmp-discovery.nse script may fail with the following error messages. Check for the possible causes by using the code snippets highlighted below found in the script source code. This can often times help in identifying the root cause of the problem.

Failed to retrieve %s interface information.


Here is a relevant code snippet related to the "Failed to retrieve %s interface information." error message:

319:	  interface = interface or nmap.get_interface()
320:	  if interface then
321:	    -- Get the interface information
322:	    interface = nmap.get_interface_info(interface)
323:	    if not interface then
324:	      return stdnse.format_output(false, ("Failed to retrieve %s interface information."):format(interface))
325:	    end
326:	    interfaces = {interface}
327:	    stdnse.debug1("Will use %s interface.", interface.shortname)
328:	  else
329:	    local ifacelist = nmap.list_interfaces()

Version


This page has been created based on Nmap version 7.92.

Go back to menu.