SIP Deregister Extension - Metasploit


This page contains detailed information about how to use the auxiliary/voip/sip_deregister metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.

Module Overview


Name: SIP Deregister Extension
Module: auxiliary/voip/sip_deregister
Source code: modules/auxiliary/voip/sip_deregister.rb
Disclosure date: -
Last modification time: 2019-03-05 04:43:37 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): 5060
List of CVEs: -

This module will attempt to deregister a SIP user from the provider. It has been tested successfully when the sip provider/server doesn't use REGISTER authentication.

Module Ranking and Traits


Module Ranking:

  • normal: The exploit is otherwise reliable, but depends on a specific version and can't (or doesn't) reliably autodetect. More information about ranking can be found here.

Basic Usage


This module is a scanner module, and is capable of testing against multiple hosts.

msf > use auxiliary/voip/sip_deregister
msf auxiliary(sip_deregister) > show options
    ... show and set options ...
msf auxiliary(sip_deregister) > set RHOSTS ip-range
msf auxiliary(sip_deregister) > exploit

Other examples of setting the RHOSTS option:

Example 1:

msf auxiliary(sip_deregister) > set RHOSTS 192.168.1.3-192.168.1.200 

Example 2:

msf auxiliary(sip_deregister) > set RHOSTS 192.168.1.1/24

Example 3:

msf auxiliary(sip_deregister) > set RHOSTS file:/tmp/ip_list.txt

Go back to menu.

Msfconsole Usage


Here is how the voip/sip_deregister auxiliary module looks in the msfconsole:

msf6 > use auxiliary/voip/sip_deregister

msf6 auxiliary(voip/sip_deregister) > show info

       Name: SIP Deregister Extension
     Module: auxiliary/voip/sip_deregister
    License: Metasploit Framework License (BSD)
       Rank: Normal

Provided by:
  ChrisJohnRiley

Check supported:
  No

Basic options:
  Name       Current Setting  Required  Description
  ----       ---------------  --------  -----------
  DOMAIN     example.com      yes       Use a specific SIP domain
  EXTENSION  100              yes       The specific extension or name to target
  RPORT      5060             yes       The target port (UDP)
  SRCADDR    192.168.1.1      yes       The sip address the spoofed deregister request is coming from
  THREADS    1                yes       The number of concurrent threads (max one per host)

Description:
  This module will attempt to deregister a SIP user from the provider. 
  It has been tested successfully when the sip provider/server doesn't 
  use REGISTER authentication.

Module Options


This is a complete list of options available in the voip/sip_deregister auxiliary module:

msf6 auxiliary(voip/sip_deregister) > show options

Module options (auxiliary/voip/sip_deregister):

   Name       Current Setting  Required  Description
   ----       ---------------  --------  -----------
   DOMAIN     example.com      yes       Use a specific SIP domain
   EXTENSION  100              yes       The specific extension or name to target
   RPORT      5060             yes       The target port (UDP)
   SRCADDR    192.168.1.1      yes       The sip address the spoofed deregister request is coming from
   THREADS    1                yes       The number of concurrent threads (max one per host)

Advanced Options


Here is a complete list of advanced options supported by the voip/sip_deregister auxiliary module:

msf6 auxiliary(voip/sip_deregister) > show advanced

Module advanced options (auxiliary/voip/sip_deregister):

   Name                 Current Setting  Required  Description
   ----                 ---------------  --------  -----------
   CHOST                                 no        The local client address
   CPORT                                 no        The local client port
   SIP_PROXY_NAME                        no        Use a specific SIP proxy
   SIP_PROXY_PORT       5060             no        SIP Proxy port to use
   ShowProgress         true             yes       Display progress messages during a scan
   ShowProgressPercent  10               yes       The interval in percent that progress should be shown
   VERBOSE              false            no        Enable detailed status messages
   WORKSPACE                             no        Specify the workspace for this module

Auxiliary Actions


This is a list of all auxiliary actions that the voip/sip_deregister module can do:

msf6 auxiliary(voip/sip_deregister) > show actions

Auxiliary actions:

   Name  Description
   ----  -----------

Evasion Options


Here is the full list of possible evasion options supported by the voip/sip_deregister auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):

msf6 auxiliary(voip/sip_deregister) > show evasion

Module evasion options:

   Name  Current Setting  Required  Description
   ----  ---------------  --------  -----------

Go back to menu.

Error Messages


This module may fail with the following error messages:

Check for the possible causes from the code snippets below found in the module source code. This can often times help in identifying the root cause of the problem.

EXTENSION cannot contain spaces


Here is a relevant code snippet related to the "EXTENSION cannot contain spaces" error message:

36:	
37:	
38:	  def setup
39:	    # throw argument error if extension or domain contain spaces
40:	    if datastore['EXTENSION'].match(/\s/)
41:	      raise ArgumentError, "EXTENSION cannot contain spaces"
42:	    elsif datastore['DOMAIN'].match(/\s/)
43:	      raise ArgumentError, "DOMAIN cannot contain spaces"
44:	    end
45:	  end
46:	

DOMAIN cannot contain spaces


Here is a relevant code snippet related to the "DOMAIN cannot contain spaces" error message:

38:	  def setup
39:	    # throw argument error if extension or domain contain spaces
40:	    if datastore['EXTENSION'].match(/\s/)
41:	      raise ArgumentError, "EXTENSION cannot contain spaces"
42:	    elsif datastore['DOMAIN'].match(/\s/)
43:	      raise ArgumentError, "DOMAIN cannot contain spaces"
44:	    end
45:	  end
46:	
47:	  def run_host(ip)
48:	

No response received from remote host


Here is a relevant code snippet related to the "No response received from remote host" error message:

84:	        response = parse_reply(r)
85:	      end
86:	
87:	      # print error information if no response has been received
88:	      # may be expected if spoofing the SRCADDR
89:	      print_error("No response received from remote host") if not response
90:	
91:	    rescue Errno::EACCES
92:	    ensure
93:	      disconnect_udp
94:	    end

Unable to de-register <TESTN> [401 Unauthorised]


Here is a relevant code snippet related to the "Unable to de-register <TESTN> [401 Unauthorised]" error message:

109:	      testn = "#{$1.strip}".split(';')[0]
110:	    end
111:	
112:	    case resp.to_i
113:	    when 401
114:	      print_error("Unable to de-register #{testn} [401 Unauthorised]")
115:	    when 403
116:	      print_error("Unable to de-register #{testn} [403 Forbidden]")
117:	    when 200
118:	      print_good("#{testn} de-registered [200 OK]")
119:	    else

Unable to de-register <TESTN> [403 Forbidden]


Here is a relevant code snippet related to the "Unable to de-register <TESTN> [403 Forbidden]" error message:

111:	
112:	    case resp.to_i
113:	    when 401
114:	      print_error("Unable to de-register #{testn} [401 Unauthorised]")
115:	    when 403
116:	      print_error("Unable to de-register #{testn} [403 Forbidden]")
117:	    when 200
118:	      print_good("#{testn} de-registered [200 OK]")
119:	    else
120:	      print_error("#{testn} : Undefined error code #{resp.to_i}")
121:	    end

<TESTN> : Undefined error code <RESP.TO_I>


Here is a relevant code snippet related to the "<TESTN> : Undefined error code <RESP.TO_I>" error message:

115:	    when 403
116:	      print_error("Unable to de-register #{testn} [403 Forbidden]")
117:	    when 200
118:	      print_good("#{testn} de-registered [200 OK]")
119:	    else
120:	      print_error("#{testn} : Undefined error code #{resp.to_i}")
121:	    end
122:	
123:	    return true # set response to true
124:	  end
125:	end

Go back to menu.


Go back to menu.

See Also


Check also the following modules related to this module:

Authors


  • ChrisJohnRiley

Version


This page has been produced using Metasploit Framework version 6.1.27-dev. For more modules, visit the Metasploit Module Library.

Go back to menu.