Lucene search

K
nmapFerdy RiphagenNMAP:IAX2-VERSION.NSE
HistoryNov 06, 2008 - 2:52 a.m.

iax2-version NSE Script

2008-11-0602:52:59
Ferdy Riphagen
nmap.org
58

9.8 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

10 High

CVSS2

Access Vector

NETWORK

Access Complexity

LOW

Authentication

NONE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:N/AC:L/Au:N/C:C/I:C/A:C

0.973 High

EPSS

Percentile

99.8%

Detects the UDP IAX2 service.

The script sends an Inter-Asterisk eXchange (IAX) Revision 2 Control Frame POKE request and checks for a proper response. This protocol is used to enable VoIP connections between servers as well as client-server communication.

Example Usage

nmap -sU -sV -p 4569 <target>

Script Output

PORT     STATE  SERVICE VERSION
4569/udp closed iax2

Requires


local comm = require "comm"
local nmap = require "nmap"
local shortport = require "shortport"
local string = require "string"

description = [[
Detects the UDP IAX2 service.

The script sends an Inter-Asterisk eXchange (IAX) Revision 2 Control Frame POKE
request and checks for a proper response.  This protocol is used to enable VoIP
connections between servers as well as client-server communication.
]]

---
-- @usage
-- nmap -sU -sV -p 4569 <target>
-- @output
-- PORT     STATE  SERVICE VERSION
-- 4569/udp closed iax2

author = "Ferdy Riphagen"

license = "Same as Nmap--See https://nmap.org/book/man-legal.html"

categories = {"version"}


portrule = shortport.version_port_or_service(4569, nil, "udp")

action = function(host, port)
  -- see http://www.cornfed.com/iax.pdf for all options.
  local poke = "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x1e"

  local status, recv = comm.exchange(host, port, poke, {timeout=10000})

  if not status then
    return
  end

  if (#recv) == 12 then
    local byte11 = string.byte(recv, 11)
    local byte12 = string.byte(recv, 12)

    -- byte11 must be \x06 IAX Control Frame
    -- and byte12 must be \x03 or \x04
    if ((byte11 == 6) and
      (byte12 == 3 or byte12 == 4))
    then
      nmap.set_port_state(host, port, "open")
      port.version.name = "iax2"
      nmap.set_port_version(host, port)
    end

  end
end

9.8 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

10 High

CVSS2

Access Vector

NETWORK

Access Complexity

LOW

Authentication

NONE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:N/AC:L/Au:N/C:C/I:C/A:C

0.973 High

EPSS

Percentile

99.8%

Related for NMAP:IAX2-VERSION.NSE