Nmap knx-gateway-info NSE Script


This page contains detailed information about how to use the knx-gateway-info 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/knx-gateway-info.nse
Script categories: default, discovery, safe
Target service / protocol: efcp, udp
Target network port(s): 3671
List of CVEs: -

Script Description


The knx-gateway-info.nse script identifies a KNX gateway on UDP port 3671 by sending a KNX Description Request.

Further information:

Knx-gateway-info NSE Script Arguments


The knx-gateway-info.nse script does not have any arguments.

Knx-gateway-info NSE Script Example Usage


Here's an example of how to use the knx-gateway-info.nse script:

nmap --script=knx-gateway-info <target>

Knx-gateway-info NSE Script Example Output


Here's a sample output from the knx-gateway-info.nse script:

3671/udp open|filtered efcp
| knx-gateway-info:
|   Body:
|     DIB_DEV_INFO:
|       KNX address: 15.15.255
|       Decive serial: 00ef2650065c
|       Multicast address: 0.0.0.0
|       Device friendly name: IP-Viewer
|     DIB_SUPP_SVC_FAMILIES:
|       KNXnet/IP Core version 1
|       KNXnet/IP Device Management version 1
|       KNXnet/IP Tunneling version 1
|_      KNXnet/IP Object Server version 1

Knx-gateway-info 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.

Authors


References


See Also


Related NSE scripts to the knx-gateway-info.nse script:

Visit Nmap NSE Library for more scripts.

The knx-gateway-info.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.

KNX header error: %s


Here is a relevant code snippet related to the "KNX header error: %s" error message:

49:	-- @param knxMessage UDP response packet
50:	local knxParseDescriptionResponse = function(knxMessage)
51:	  local knx_header_length, knx_protocol_version, knx_service_type, knx_total_length, pos = knx.parseHeader(knxMessage)
52:	
53:	  if not knx_header_length then
54:	    stdnse.debug1("KNX header error: %s", knx_protocol_version)
55:	    return
56:	  end
57:	
58:	  local message_format = '>BBB c1 I2 c2 c6 c4 c6 c30 BB'
59:	  if #knxMessage - pos + 1 < string.packlen(message_format) then

Connect failed: %s


Here is a relevant code snippet related to the "Connect failed: %s" error message:

126:	action = function(host, port)
127:	  local sock = nmap.new_socket()
128:	  local status, err = sock:connect(host, port)
129:	
130:	  if not status then
131:	    stdnse.debug1("Connect failed: %s", err)
132:	    return
133:	  end
134:	
135:	  local _, lhost, lport, _, _ = sock:get_info()
136:	  sock:send(knx.query(0x0203, lhost, lport))

Receive failed: %s


Here is a relevant code snippet related to the "Receive failed: %s" error message:

135:	  local _, lhost, lport, _, _ = sock:get_info()
136:	  sock:send(knx.query(0x0203, lhost, lport))
137:	  local status, data = sock:receive()
138:	
139:	  if not status then
140:	    stdnse.debug("Receive failed: %s", err)
141:	    sock:close()
142:	    return
143:	  end
144:	
145:	  sock:close()

Version


This page has been created based on Nmap version 7.92.

Go back to menu.